Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
KM3NETDAQ::JDAQClient_t Struct Reference

Auxiliary data structure for DAQ client data. More...

#include <JDAQClient.hh>

Inheritance diagram for KM3NETDAQ::JDAQClient_t:
KM3NETDAQ::JDAQClient AcousticDataFilter JDAQDemoClient KM3NETDAQ::DataQueue KM3NETDAQ::JDAQDriver KM3NETDAQ::JDQSimulator KM3NETDAQ::JDataFilter KM3NETDAQ::JDataWriter KM3NETDAQ::JEventGenerator KM3NETDAQ::MonitorRouter

Public Member Functions

 JDAQClient_t (JDAQStateMachine *chsm)
 Constructor.
 
const std::string & getHostname () const
 Get hostname.
 
const std::string & getFullName () const
 Get full name of this run control client.
 
const JTaggetUniqueTag () const
 Get unique tag of this run control client.
 
long long int getClockDelay () const
 Get total delay time.
 
long long int getClockInterval () const
 Get interval time.
 
void setClockInterval (const long long int interval_us)
 Set interval time.
 
void resetClock ()
 Reset clock.
 
const std::string & getEventInfo () const
 Get last event information.
 
void setEventInfo (const std::string &info)
 Set last event information.
 

Static Public Attributes

static const int TIMEOUT_S = 1
 time out of update [s]
 

Protected Attributes

JEventTable eventTable
 event table
 
std::string hostname
 
std::string fullname
 
JTag unique_tag
 
JTimekeeper clock
 central clock
 
std::string event_info
 event information
 

Detailed Description

Auxiliary data structure for DAQ client data.

Definition at line 61 of file JDAQClient.hh.

Constructor & Destructor Documentation

◆ JDAQClient_t()

KM3NETDAQ::JDAQClient_t::JDAQClient_t ( JDAQStateMachine * chsm)
inline

Constructor.

Parameters
chsmstate machine

Definition at line 71 of file JDAQClient.hh.

72 {
73 using namespace std;
74 using namespace JPP;
75
79
80 for (JTag buffer[] = { RC_CMD, unique_tag, DISPTAG_UNDEFINED }, *tag = buffer; *tag != DISPTAG_UNDEFINED; ++tag) {
81
82 eventTable.insert(*tag, chsm->ev_init);
83 eventTable.insert(*tag, chsm->ev_configure);
84 eventTable.insert(*tag, chsm->ev_start);
85 eventTable.insert(*tag, chsm->ev_pause);
86 eventTable.insert(*tag, chsm->ev_continue);
87 eventTable.insert(*tag, chsm->ev_stop);
88 eventTable.insert(*tag, chsm->ev_reset);
89 eventTable.insert(*tag, chsm->ev_quit);
90 eventTable.insert(*tag, chsm->ev_off);
91
92 eventTable.insert(*tag, chsm->ev_check);
93 eventTable.insert(*tag, chsm->ev_input);
94
95 eventTable.insert(*tag, chsm->ev_recover);
96 }
97
99
100 setClockInterval(TIMEOUT_S * 1000000LL);
101 }
const std::string & getName() const
Get name of state machine.
Definition JDAQCHSM.hh:89
JDAQStateMachine::ev_recover_event ev_recover
JDAQStateMachine::ev_continue_event ev_continue
JDAQStateMachine::ev_stop_event ev_stop
JDAQStateMachine::ev_off_event ev_off
JDAQStateMachine::ev_init_event ev_init
JDAQStateMachine::ev_start_event ev_start
JDAQStateMachine::ev_pause_event ev_pause
JDAQStateMachine::ev_check_event ev_check
JDAQStateMachine::ev_reset_event ev_reset
JDAQStateMachine::ev_configure_event ev_configure
JDAQStateMachine::ev_input_event ev_input
JDAQStateMachine::ev_quit_event ev_quit
static void Throw(const bool option)
Definition JThrow.hh:37
void insert(const JTag &tag, JDAQEvent_t &event)
Insert entry in table.
static const JTag DISPTAG_UNDEFINED(0)
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::string getFullName(const std::string &hostname, const std::string &name)
Get full name of run control client.
JTag getUniqueTag(const std::string &hostname, const std::string &name)
Get unique tag of run control client.
static const JNET::JTag RC_CMD
Definition JDAQTags.hh:66
const std::string & getHostname() const
Get hostname.
void setClockInterval(const long long int interval_us)
Set interval time.
JEventTable eventTable
event table
static const int TIMEOUT_S
time out of update [s]
Definition JDAQClient.hh:63

Member Function Documentation

◆ getHostname()

const std::string & KM3NETDAQ::JDAQClient_t::getHostname ( ) const
inline

Get hostname.

Returns
host name

Definition at line 109 of file JDAQClient.hh.

110 {
111 return hostname;
112 }

◆ getFullName()

const std::string & KM3NETDAQ::JDAQClient_t::getFullName ( ) const
inline

Get full name of this run control client.

Returns
full name

Definition at line 120 of file JDAQClient.hh.

121 {
122 return fullname;
123 }

◆ getUniqueTag()

const JTag & KM3NETDAQ::JDAQClient_t::getUniqueTag ( ) const
inline

Get unique tag of this run control client.

Returns
unique tag

Definition at line 131 of file JDAQClient.hh.

132 {
133 return unique_tag;
134 }

◆ getClockDelay()

long long int KM3NETDAQ::JDAQClient_t::getClockDelay ( ) const
inline

Get total delay time.

Returns
delay time [us]

Definition at line 142 of file JDAQClient.hh.

143 {
144 return clock.getDelay();
145 }
long long int getDelay() const
Get total delay time.
JTimekeeper clock
central clock

◆ getClockInterval()

long long int KM3NETDAQ::JDAQClient_t::getClockInterval ( ) const
inline

Get interval time.

Returns
interval time [us]

Definition at line 154 of file JDAQClient.hh.

155 {
156 return clock.getInterval();
157 }
long long int getInterval() const
Get interval time.

◆ setClockInterval()

void KM3NETDAQ::JDAQClient_t::setClockInterval ( const long long int interval_us)
inline

Set interval time.

Parameters
interval_usinterval time [us]

Definition at line 165 of file JDAQClient.hh.

166 {
167 clock.setInterval(interval_us);
168 }
void setInterval(const long long int interval_us)
Set interval time.

◆ resetClock()

void KM3NETDAQ::JDAQClient_t::resetClock ( )
inline

Reset clock.

Definition at line 174 of file JDAQClient.hh.

175 {
176 clock.reset();
177 }
void reset(const long long int t0)
Reset time.

◆ getEventInfo()

const std::string & KM3NETDAQ::JDAQClient_t::getEventInfo ( ) const
inline

Get last event information.

Returns
event information

Definition at line 185 of file JDAQClient.hh.

186 {
187 return event_info;
188 }
std::string event_info
event information

◆ setEventInfo()

void KM3NETDAQ::JDAQClient_t::setEventInfo ( const std::string & info)
inline

Set last event information.

Parameters
infoevent information

Definition at line 196 of file JDAQClient.hh.

197 {
198 this->event_info = info;
199 }

Member Data Documentation

◆ TIMEOUT_S

const int KM3NETDAQ::JDAQClient_t::TIMEOUT_S = 1
static

time out of update [s]

Definition at line 63 of file JDAQClient.hh.

◆ eventTable

JEventTable KM3NETDAQ::JDAQClient_t::eventTable
protected

event table

Definition at line 203 of file JDAQClient.hh.

◆ hostname

std::string KM3NETDAQ::JDAQClient_t::hostname
protected

Definition at line 204 of file JDAQClient.hh.

◆ fullname

std::string KM3NETDAQ::JDAQClient_t::fullname
protected

Definition at line 205 of file JDAQClient.hh.

◆ unique_tag

JTag KM3NETDAQ::JDAQClient_t::unique_tag
protected

Definition at line 206 of file JDAQClient.hh.

◆ clock

JTimekeeper KM3NETDAQ::JDAQClient_t::clock
protected

central clock

Definition at line 207 of file JDAQClient.hh.

◆ event_info

std::string KM3NETDAQ::JDAQClient_t::event_info
protected

event information

Definition at line 208 of file JDAQClient.hh.


The documentation for this struct was generated from the following file: