SRS-control 0.1.4
Loading...
Searching...
No Matches
CommandHandlers.hpp
Go to the documentation of this file.
1// #pragma once
2
3// #include <cstdint>
4// #include <functional>
5// #include <map>
6// #include <srs/CommonDefinitions.hpp>
7
8// namespace srs
9// {
10
11// enum class Commands
12// {
13// acq_on,
14// acq_off,
15// configure_hybrid,
16// link_status,
17// powercycle_hybrids,
18// read_adc,
19// reset,
20// send_config,
21// set_mask,
22// system_registers,
23// trigger_acq_constants,
24// };
25
26// enum class MessageMode
27// {
28// read,
29// write
30// };
31
32// struct DeviceIndex
33// {
34// uint8_t hybrid{};
35// uint8_t vmm{};
36// };
37
38// struct MessageHeader
39// {
40// constexpr explicit MessageHeader(uint8_t CMD)
41// : cmd{ CMD }
42// {
43// }
44
45// uint8_t cmd = 0;
46// uint8_t type = CMD_TYPE;
47// uint16_t cmd_length = DEFAULT_CMD_LENGTH;
48// };
49
50// class Control;
51
52// using CommandsHandlerMap = std::map<Commands, std::function<void(Control&, DeviceIndex)>>;
53// extern const CommandsHandlerMap commands_handler_map;
54
55// } // namespace srs