Jpp
19.1.0-rc.1
the software that should make you happy
|
Runcontrol client to simulate data queue. More...
Classes | |
class | JData |
Public Member Functions | |
JDQSimulator (const std::string &name, const std::string &server, JLogger *logger, const int level) | |
Constructor. More... | |
virtual void | actionConfigure (int length, const char *buffer) override |
virtual void | actionReset (int length, const char *buffer) override |
virtual void | actionQuit (int length, const char *buffer) override |
virtual void | actionStart (int length, const char *buffer) override |
virtual void | actionStop (int length, const char *buffer) override |
virtual void | actionRunning () override |
This method is repeatedly called when this client machine is in state Running and the clock interval time is non-zero. More... | |
virtual bool | enter (const JArgs &args) |
Enter the state machine. More... | |
virtual bool | enter () override |
Enter the state machine. More... | |
virtual bool | exit () override |
Exit the state machine. More... | |
bool | isRunning () const |
Check if this client is in runnig state. More... | |
void | replaceEvent (const JTag &oldTag, const JTag &newTag, JDAQEvent_t &event) |
Replace tag of given event in event table. More... | |
JDAQEvent_t * | findEvent (const JTag &tag, const std::string &event_name) |
Find event in event table. More... | |
void | addSubscription (const JSubscription &subscription) |
Add custom subscription. More... | |
template<class T > | |
void | addParameter (const char option, T ¶meter) |
Add parameter to parser used in method enter(). More... | |
template<class T > | |
void | addParameter (const char option, T ¶meter, const T &value) |
Add parameter to parser used in method enter(). More... | |
void | setSelect () |
Set the file descriptor mask for the select call. More... | |
virtual void | setSelect (JFileDescriptorMask &mask) const |
Set the file descriptor mask for the select call. More... | |
virtual void | actionSelect (const JFileDescriptorMask &mask) |
Action method following last select call. More... | |
virtual void | actionInput (int length, const char *buffer) override |
This method is called at ev_input . More... | |
virtual bool | filter (const JTag &tag, int length, const char *buffer) |
Filter message. More... | |
virtual void | actionTagged (const JTag &tag, int length, const char *buffer) |
This method is called when a custom tag is encountered. More... | |
void | run () |
Run as run control client following command messages via JNET::JControlHost. More... | |
void | run (const int port) |
Run for ever. More... | |
void | run (std::istream &in) |
Run client with commands from input stream (e.g. for debugging). More... | |
void | A1 (CHSM_ns_alias::event const &) |
void | A2 (CHSM_ns_alias::event const &) |
void | A3 (CHSM_ns_alias::event const &) |
void | A4 (CHSM_ns_alias::event const &) |
void | A5 (CHSM_ns_alias::event const &) |
void | A6 (CHSM_ns_alias::event const &) |
void | A7 (CHSM_ns_alias::event const &) |
void | A8 (CHSM_ns_alias::event const &) |
void | A9 (CHSM_ns_alias::event const &) |
void | A10 (CHSM_ns_alias::event const &) |
void | A11 (CHSM_ns_alias::event const &) |
void | A12 (CHSM_ns_alias::event const &) |
void | A13 (CHSM_ns_alias::event const &) |
void | A14 (CHSM_ns_alias::event const &) |
void | EAM4root (CHSM_ns_alias::state const &, CHSM_ns_alias::event const &) |
void | XAM4root (CHSM_ns_alias::state const &, CHSM_ns_alias::event const &) |
const std::string & | getName () const |
Get name of state machine. More... | |
int | getDetectorID () const |
Get detector identifier. More... | |
int | getRunNumber () const |
Get run number. More... | |
virtual void | actionEnter () |
Interface methods for actions corresponding to state transitions. More... | |
virtual void | actionExit () |
virtual void | actionInit (int, const char *) |
virtual void | actionPause (int, const char *) |
virtual void | actionContinue (int, const char *) |
virtual void | actionError () |
virtual void | actionRecover (int, const char *) |
const std::string & | getHostname () const |
Get hostname. More... | |
const std::string & | getFullName () const |
Get full name of this run control client. More... | |
const JTag & | getUniqueTag () const |
Get unique tag of this run control client. More... | |
long long int | getClockDelay () const |
Get total delay time. More... | |
long long int | getClockInterval () const |
Get interval time. More... | |
void | setClockInterval (const long long int interval_us) |
Set interval time. More... | |
void | resetClock () |
Reset clock. More... | |
const std::string & | getEventInfo () const |
Get last event information. More... | |
void | setEventInfo (const std::string &info) |
Set last event information. More... | |
Static Public Attributes | |
static const int | TIMEOUT_S = 1 |
time out of update [s] More... | |
Protected Types | |
typedef void(JDAQCHSM::* | action) (int, const char *) |
Type definition of action method. More... | |
Protected Attributes | |
JSharedPointer< JControlHost > | server |
message server More... | |
JMessageLogger | logger |
message logger More... | |
std::string | name |
int | detector_id |
int | run_number |
JEventTable | eventTable |
event table More... | |
std::string | hostname |
std::string | fullname |
JTag | unique_tag |
JTimekeeper | clock |
central clock More... | |
std::string | event_info |
event information More... | |
Private Types | |
typedef JIO::JByteArrayWriter | JFrame |
Memory management for sending of raw data. More... | |
typedef std::vector< JFrame > | JTimeslice |
Private Member Functions | |
void | update () |
Update state machine. More... | |
void | update (const JTag &tag, int length, const char *buffer) |
Update state machine. More... | |
void | configure () |
Configure client. More... | |
std::string | getMessage (const CHSM::state &state, const CHSM::event &event) const |
Get event message. More... | |
virtual void | enterState (const CHSM::state &state, const CHSM::event &event) override |
Action when entering state. More... | |
virtual void | actionCheck (int length, const char *buffer) override |
This method is called at ev_check and reports a system check by mimicing an enter state action. More... | |
void | execute (action __action, const CHSM::event &__event) override |
The method to execute the action. More... | |
const CHSM::state * | getState () const |
Get current state. More... | |
Private Attributes | |
std::vector< JSource > | source |
std::vector< JTarget > | target |
map_type | snooze |
JData | data |
long long int | numberOfSlices |
long long int | numberOfBytes |
JEEP::JTimer | timer |
JSelectReader | select |
select call More... | |
JParser | parser |
parser method enter() More... | |
JSubscriptionList | subscription |
custom subscription More... | |
CHSM_ns_alias::state * | state_ [11] |
CHSM_ns_alias::event const * | taken_ [14] |
CHSM_ns_alias::state * | target_ [14] |
Static Private Attributes | |
static int const | ev_daq_transitions [] |
static int const | ev_init_transitions [] |
static int const | ev_configure_transitions [] |
static int const | ev_start_transitions [] |
static int const | ev_pause_transitions [] |
static int const | ev_continue_transitions [] |
static int const | ev_stop_transitions [] |
static int const | ev_reset_transitions [] |
static int const | ev_quit_transitions [] |
static int const | ev_off_transitions [] |
static int const | ev_check_transitions [] |
static int const | ev_input_transitions [] |
static int const | ev_recover_transitions [] |
static int const | ev_error_transitions [] |
static CHSM_ns_alias::transition const | transition_ [] |
Runcontrol client to simulate data queue.
In state running, this application will send raw data to the data filters in a round robin way, based on the frame index.
Definition at line 168 of file JDQSimulator.cc.
|
private |
Memory management for sending of raw data.
Definition at line 381 of file JDQSimulator.cc.
|
private |
Definition at line 382 of file JDQSimulator.cc.
|
protectedinherited |
Type definition of action method.
Definition at line 152 of file JDAQCHSM.hh.
|
inline |
Constructor.
name | name of client |
server | name of command message server |
logger | pointer to logger |
level | debug level |
Definition at line 180 of file JDQSimulator.cc.
|
inlineoverridevirtual |
Reimplemented from JDAQCHSM.
Definition at line 190 of file JDQSimulator.cc.
|
inlineoverridevirtual |
Reimplemented from JDAQCHSM.
Definition at line 293 of file JDQSimulator.cc.
|
inlineoverridevirtual |
Reimplemented from JDAQCHSM.
Definition at line 305 of file JDQSimulator.cc.
|
inlineoverridevirtual |
Reimplemented from JDAQCHSM.
Definition at line 311 of file JDQSimulator.cc.
|
inlineoverridevirtual |
Reimplemented from JDAQCHSM.
Definition at line 325 of file JDQSimulator.cc.
|
inlineoverridevirtual |
This method is repeatedly called when this client machine is in state Running and the clock interval time is non-zero.
This implementation does nothing but may be redefined by the derived class. Care has to be taken so that the time needed to execute this method should be less than the specified clock interval time (see method setClockInterval()).
Reimplemented from KM3NETDAQ::JDAQClient.
Definition at line 332 of file JDQSimulator.cc.
|
inlinevirtualinherited |
Enter the state machine.
This overloaded method enter reproduces the constructor. All necessary input is parsed from the list of arguments. In case of an error, the state machine is not entered.
args | array of command line arguments |
Definition at line 392 of file JDAQClient.hh.
|
inlineoverridevirtualinherited |
Enter the state machine.
This method activates the subscription to JNET::JControlHost messages. In case of an error, the state machine is not entered.
Reimplemented in KM3NETDAQ::JDAQDriver.
Definition at line 447 of file JDAQClient.hh.
|
inlineoverridevirtualinherited |
Exit the state machine.
This method releases the various resources.
Definition at line 485 of file JDAQClient.hh.
|
inlineinherited |
Check if this client is in runnig state.
Definition at line 508 of file JDAQClient.hh.
|
inlineinherited |
Replace tag of given event in event table.
oldTag | old tag |
newTag | new tag |
event | event |
Definition at line 521 of file JDAQClient.hh.
|
inlineinherited |
Find event in event table.
tag | tag |
event_name | event name |
Definition at line 536 of file JDAQClient.hh.
|
inlineinherited |
Add custom subscription.
subscription | subscription |
Definition at line 552 of file JDAQClient.hh.
|
inlineinherited |
Add parameter to parser used in method enter().
option | option |
parameter | parameter |
Definition at line 565 of file JDAQClient.hh.
|
inlineinherited |
Add parameter to parser used in method enter().
option | option |
parameter | parameter |
value | default value |
Definition at line 579 of file JDAQClient.hh.
|
inlineinherited |
Set the file descriptor mask for the select call.
Definition at line 588 of file JDAQClient.hh.
|
inlinevirtualinherited |
Set the file descriptor mask for the select call.
This implementation does nothing but may be redefined by the derived class.
mask | file descriptor mask |
Reimplemented in KM3NETDAQ::JDataWriter, KM3NETDAQ::JDataFilter, and KM3NETDAQ::MonitorRouter.
Definition at line 604 of file JDAQClient.hh.
|
inlinevirtualinherited |
Action method following last select call.
This implementation does nothing but may be redefined by the derived class.
mask | file descriptor mask |
Reimplemented in KM3NETDAQ::JDataWriter, KM3NETDAQ::JDataFilter, KM3NETDAQ::MonitorRouter, and KM3NETDAQ::DataQueue.
Definition at line 614 of file JDAQClient.hh.
|
inlineoverridevirtualinherited |
This method is called at ev_input
.
length | length of data |
buffer | pointer to data |
Reimplemented from JDAQCHSM.
Reimplemented in KM3NETDAQ::DataQueue.
Definition at line 635 of file JDAQClient.hh.
|
inlinevirtualinherited |
Filter message.
The filter method can be overwritten so that a specific action is made before the corresponding message is processed by the state machine. The message is ignored if true is returned, else it is normally processed.
tag | tag |
length | number of characters |
buffer | message |
Definition at line 662 of file JDAQClient.hh.
|
inlinevirtualinherited |
This method is called when a custom tag is encountered.
tag | tag |
length | length of data |
buffer | pointer to data |
Reimplemented in KM3NETDAQ::JDataFilter.
Definition at line 675 of file JDAQClient.hh.
|
inlineinherited |
Run as run control client following command messages via JNET::JControlHost.
This method can be called once the state machine is entered. It returns when the state machine is exited. If the clock interval is non-zero, the method actionRunning() is repeatedly called when this client machine is in state Running. The file descriptor mask can be set to interrupt the timeout of the select call and clock method wait() in this calling sequence (see methods setSelect() and actionSelect()).
Definition at line 690 of file JDAQClient.hh.
|
inlineinherited |
Run for ever.
This method can be used when the run control client is started before the run control (e.g. at boot time of the host processor). This method should be called before the state machine is entered. It launches a server which accepts a JNET::JControlHost connection from a designated application e.g. the JDAQClientStarter.cc program. The state machine is entered using the available data in the JNET::JControlHost message. After the state machine is exited, it accepts a new a JNET::JControlHost connection.
port | port number |
Definition at line 775 of file JDAQClient.hh.
|
inlineinherited |
Run client with commands from input stream (e.g. for debugging).
Example input format:
<tag> <event name>[#data]; <tag> <event name>[#data];
in | input stream |
Definition at line 820 of file JDAQClient.hh.
|
inlineprivateinherited |
Update state machine.
This method waits for a message from JNET::JControlHost server.
Definition at line 842 of file JDAQClient.hh.
|
inlineprivateinherited |
Update state machine.
tag | tag |
length | number of characters |
buffer | message |
Definition at line 867 of file JDAQClient.hh.
|
inlineprivateinherited |
Configure client.
This method is used to setup the event table.
Definition at line 952 of file JDAQClient.hh.
|
inlineprivateinherited |
Get event message.
state | state |
event | event |
Definition at line 964 of file JDAQClient.hh.
|
inlineoverrideprivatevirtualinherited |
Action when entering state.
This method provides for the hand shaking with the run control program.
state | entered state |
event | event that triggered transition |
Implements JDAQCHSM.
Reimplemented in KM3NETDAQ::JDAQDriver.
Definition at line 987 of file JDAQClient.hh.
|
inlineoverrideprivatevirtualinherited |
This method is called at ev_check
and reports a system check by mimicing an enter state action.
length | number of characters |
buffer | message |
Reimplemented from JDAQCHSM.
Definition at line 1001 of file JDAQClient.hh.
|
inlineoverrideprivatevirtualinherited |
The method to execute the action.
__action | pointer to action method |
__event | event that triggered the action |
Implements JDAQCHSM.
Definition at line 1028 of file JDAQClient.hh.
|
inlineprivateinherited |
Get current state.
Definition at line 1048 of file JDAQClient.hh.
|
inherited |
Definition at line 344 of file JDAQCHSM.cc.
|
inherited |
Definition at line 346 of file JDAQCHSM.cc.
|
inherited |
Definition at line 348 of file JDAQCHSM.cc.
|
inherited |
Definition at line 350 of file JDAQCHSM.cc.
|
inherited |
Definition at line 352 of file JDAQCHSM.cc.
|
inherited |
Definition at line 354 of file JDAQCHSM.cc.
|
inherited |
Definition at line 364 of file JDAQCHSM.cc.
|
inherited |
Definition at line 366 of file JDAQCHSM.cc.
|
inherited |
Definition at line 368 of file JDAQCHSM.cc.
|
inherited |
Definition at line 370 of file JDAQCHSM.cc.
|
inherited |
Definition at line 372 of file JDAQCHSM.cc.
|
inherited |
Definition at line 374 of file JDAQCHSM.cc.
|
inherited |
Definition at line 376 of file JDAQCHSM.cc.
|
inherited |
Definition at line 378 of file JDAQCHSM.cc.
|
inherited |
Definition at line 337 of file JDAQCHSM.cc.
|
inherited |
Definition at line 340 of file JDAQCHSM.cc.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
Interface methods for actions corresponding to state transitions.
Reimplemented in KM3NETDAQ::JDataFilter, KM3NETDAQ::MonitorRouter, JDAQDemoClient, KM3NETDAQ::DataQueue, and AcousticDataFilter.
Definition at line 120 of file JDAQCHSM.hh.
|
inlinevirtualinherited |
Reimplemented in KM3NETDAQ::JDAQDriver, KM3NETDAQ::JDataFilter, KM3NETDAQ::MonitorRouter, JDAQDemoClient, KM3NETDAQ::DataQueue, and AcousticDataFilter.
Definition at line 121 of file JDAQCHSM.hh.
|
inlinevirtualinherited |
Reimplemented in KM3NETDAQ::JDataWriter, KM3NETDAQ::JDataFilter, KM3NETDAQ::MonitorRouter, JDAQDemoClient, KM3NETDAQ::DataQueue, and AcousticDataFilter.
Definition at line 123 of file JDAQCHSM.hh.
|
inlinevirtualinherited |
Reimplemented in KM3NETDAQ::JDataFilter, KM3NETDAQ::MonitorRouter, JDAQDemoClient, KM3NETDAQ::DataQueue, and AcousticDataFilter.
Definition at line 126 of file JDAQCHSM.hh.
|
inlinevirtualinherited |
Reimplemented in KM3NETDAQ::JDataFilter, KM3NETDAQ::MonitorRouter, JDAQDemoClient, KM3NETDAQ::DataQueue, and AcousticDataFilter.
Definition at line 127 of file JDAQCHSM.hh.
|
inlinevirtualinherited |
Definition at line 135 of file JDAQCHSM.hh.
|
inlinevirtualinherited |
Definition at line 136 of file JDAQCHSM.hh.
|
inlineinherited |
|
inlineinherited |
Get full name of this run control client.
Definition at line 120 of file JDAQClient.hh.
|
inlineinherited |
Get unique tag of this run control client.
Definition at line 131 of file JDAQClient.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set interval time.
interval_us | interval time [us] |
Definition at line 165 of file JDAQClient.hh.
|
inlineinherited |
|
inlineinherited |
Get last event information.
Definition at line 185 of file JDAQClient.hh.
|
inlineinherited |
Set last event information.
info | event information |
Definition at line 196 of file JDAQClient.hh.
|
private |
Definition at line 373 of file JDQSimulator.cc.
|
private |
Definition at line 374 of file JDQSimulator.cc.
|
private |
Definition at line 375 of file JDQSimulator.cc.
|
private |
Definition at line 486 of file JDQSimulator.cc.
|
private |
Definition at line 488 of file JDQSimulator.cc.
|
private |
Definition at line 489 of file JDQSimulator.cc.
|
private |
Definition at line 491 of file JDQSimulator.cc.
|
protectedinherited |
message server
Definition at line 834 of file JDAQClient.hh.
|
protectedinherited |
message logger
Definition at line 835 of file JDAQClient.hh.
|
privateinherited |
select call
Definition at line 1064 of file JDAQClient.hh.
|
privateinherited |
parser method enter()
Definition at line 1065 of file JDAQClient.hh.
|
privateinherited |
custom subscription
Definition at line 1066 of file JDAQClient.hh.
|
inherited |
|
inherited |
|
staticprivateinherited |
Definition at line 216 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 238 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 240 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 258 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 260 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 278 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 280 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 298 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 300 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 318 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 320 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 338 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 340 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 358 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 360 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 378 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 380 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 398 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 400 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 418 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 420 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 438 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 440 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 458 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 460 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 478 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 480 of file JDAQCHSM.hh.
|
inherited |
|
inherited |
Definition at line 495 of file JDAQCHSM.hh.
|
privateinherited |
Definition at line 522 of file JDAQCHSM.hh.
|
staticprivateinherited |
Definition at line 523 of file JDAQCHSM.hh.
|
privateinherited |
Definition at line 524 of file JDAQCHSM.hh.
|
privateinherited |
Definition at line 525 of file JDAQCHSM.hh.
|
protectedinherited |
Definition at line 165 of file JDAQCHSM.hh.
|
protectedinherited |
Definition at line 166 of file JDAQCHSM.hh.
|
protectedinherited |
Definition at line 167 of file JDAQCHSM.hh.
|
staticinherited |
time out of update [s]
Definition at line 63 of file JDAQClient.hh.
|
protectedinherited |
event table
Definition at line 203 of file JDAQClient.hh.
|
protectedinherited |
Definition at line 204 of file JDAQClient.hh.
|
protectedinherited |
Definition at line 205 of file JDAQClient.hh.
|
protectedinherited |
Definition at line 206 of file JDAQClient.hh.
|
protectedinherited |
central clock
Definition at line 207 of file JDAQClient.hh.
|
protectedinherited |
event information
Definition at line 208 of file JDAQClient.hh.