DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
AMCController.hpp
Go to the documentation of this file.
1#ifndef __DUNEDAQ_TDEMODULES_INCLUDE_AMCCONTROLLER_HPP___
2#define __DUNEDAQ_TDEMODULES_INCLUDE_AMCCONTROLLER_HPP___
3
4#include <cstdint>
5#include <string>
6#include <vector>
7
8#include "logging/Logging.hpp"
9
10namespace dunedaq {
11
13 AMCCommandIssue,
14 "AMC with ip:" + ip + " and port: " << port << " | " << "send command failed, reason: " << text,
15 ((std::string)ip)((uint16_t)port)((std::string)text));
16
17namespace tdemodules {
18
20{
21public:
22 enum CmdCode : uint32_t
23 {
27 };
28
29 AMCController(const std::string& ip, uint16_t data_port);
30
31 void card_start();
32 void card_stop();
33 void card_status();
34 void card_reset();
35
36private:
37 std::string m_ctrl_ip;
38 uint16_t m_ctrl_port = 325;
39 uint16_t m_data_port;
40
41 std::vector<uint8_t> m_status_cmd;
42 std::vector<uint8_t> m_start_cmd;
43 std::vector<uint8_t> m_stop_cmd;
44 std::vector<uint8_t> m_reset_cmd;
45
46 std::vector<uint8_t> send_cmd(const std::vector<uint8_t>& cmd);
47};
48
49} // namespace tdemodules
50} // namespace dunedaq
51
52#endif // __DUNEDAQ_TDEMODULES_INCLUDE_AMCCONTROLLER_HPP___
std::vector< uint8_t > m_status_cmd
std::vector< uint8_t > m_start_cmd
AMCController(const std::string &ip, uint16_t data_port)
std::vector< uint8_t > m_reset_cmd
std::vector< uint8_t > send_cmd(const std::vector< uint8_t > &cmd)
std::vector< uint8_t > m_stop_cmd
The DUNE-DAQ namespace.
ERS_DECLARE_ISSUE(cibmodules, CIBCommunicationError, " CIB Hardware Communication Error: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(cibmodules