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/CommonDefitions.hpp>
7
8// namespace srs
9// {
10
11
12// enum class Commands
13// {
14// acq_on,
15// acq_off,
16// configure_hybrid,
17// link_status,
18// powercycle_hybrids,
19// read_adc,
20// reset,
21// send_config,
22// set_mask,
23// system_registers,
24// trigger_acq_constants,
25// };
26
27// enum class MessageMode
28// {
29// read,
30// write
31// };
32
33// struct DeviceIndex
34// {
35// uint8_t hybrid{};
36// uint8_t vmm{};
37// };
38
39// struct MessageHeader
40// {
41// constexpr explicit MessageHeader(uint8_t CMD)
42// : cmd{ CMD }
43// {
44// }
45
46// uint8_t cmd = 0;
47// uint8_t type = CMD_TYPE;
48// uint16_t cmd_length = DEFAULT_CMD_LENGTH;
49// };
50
51// class Control;
52
53// using CommandsHandlerMap = std::map<Commands, std::function<void(Control&, DeviceIndex)>>;
54// extern const CommandsHandlerMap commands_handler_map;
55
56// } // namespace srs