Line data Source code
1 : /**
2 : * @file WIBCommon.hpp
3 : *
4 : * WIBCommon class used communicate with a WIB
5 : *
6 : * This is part of the DUNE DAQ Software Suite, copyright 2020.
7 : * Licensing/copyright details are in the COPYING file that you should have
8 : * received with this code.
9 : */
10 :
11 : #include "wibmod/WIBCommon.hpp"
12 :
13 : #include "logging/Logging.hpp"
14 :
15 : #include <string>
16 :
17 : namespace dunedaq {
18 : namespace wibmod {
19 :
20 0 : WIBCommon::WIBCommon(const std::string &wib_addr) :
21 0 : context(1),
22 0 : socket(context, ZMQ_REQ)
23 : {
24 0 : socket.connect(wib_addr); // tcp://192.168.121.*:1234
25 0 : TLOG_DEBUG(0) << wib_addr << " Connected!";
26 0 : }
27 :
28 0 : WIBCommon::~WIBCommon()
29 : {
30 0 : socket.close();
31 0 : }
32 :
33 : } // namespace wibmod
34 : } // namespace dunedaq
|