Jpp
|
Runcontrol client to simulate DOM. More...
Classes | |
class | JData |
Public Member Functions | |
JDOMSimulator (const std::string &name, const std::string &server, JLogger *logger, const int level) | |
Constructor. More... | |
virtual void | actionConfigure (int length, const char *buffer) |
virtual void | actionReset (int length, const char *buffer) |
virtual void | actionQuit (int length, const char *buffer) |
virtual void | actionStart (int length, const char *buffer) |
virtual void | actionStop (int length, const char *buffer) |
virtual void | actionRunning () |
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 () |
Enter the state machine. More... | |
virtual bool | exit () |
Exit the state machine. More... | |
const std::string & | getFullName () const |
Get full name of this run control client. More... | |
const JNET::JTag & | getUniqueTag () const |
Get unique tag of this run control client. More... | |
int | getEventNumber () const |
Get last event number. More... | |
bool | isRunning () const |
Check if this client is in runnig state. More... | |
void | replaceEvent (const JNET::JTag &oldTag, const JNET::JTag &newTag, JDAQEvent_t &event) |
Replace tag of given event in event table. More... | |
JDAQEvent_t * | findEvent (const JNET::JTag &tag, const std::string &event_name) |
Find event in event table. 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... | |
long long int | getClockDelay () const |
Get total delay time. More... | |
const std::string & | getHostname () const |
Get hostname. 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... | |
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) |
This method is called at ev_input . More... | |
virtual bool | filter (const std::string &tag, int length, const char *buffer) |
Filter message. 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... | |
Static Public Attributes | |
static const int | TIMEOUT_S = 1 |
time out of update [s] More... | |
Protected Attributes | |
JSharedPointer< JControlHost > | server |
message server More... | |
JMessageLogger | logger |
message logger More... | |
Private Types | |
typedef JIO::JByteArrayWriter | JFrame |
Memory management for sending of raw data. More... | |
typedef std::vector< JFrame > | JTimeslice |
Private Attributes | |
std::vector< JSource > | source |
std::vector< JTarget > | target |
JData | data |
long long int | numberOfSlices |
long long int | numberOfBytes |
JEEP::JTimer | timer |
Runcontrol client to simulate DOM.
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 163 of file JDOMSimulator.cc.
|
private |
Memory management for sending of raw data.
Definition at line 333 of file JDOMSimulator.cc.
|
private |
Definition at line 334 of file JDOMSimulator.cc.
|
inline |
Constructor.
name | name of client |
server | name of command message server |
logger | pointer to logger |
level | debug level |
Definition at line 175 of file JDOMSimulator.cc.
|
inlinevirtual |
Definition at line 185 of file JDOMSimulator.cc.
|
inlinevirtual |
Definition at line 250 of file JDOMSimulator.cc.
|
inlinevirtual |
Definition at line 261 of file JDOMSimulator.cc.
|
inlinevirtual |
Definition at line 267 of file JDOMSimulator.cc.
|
inlinevirtual |
Definition at line 281 of file JDOMSimulator.cc.
|
inlinevirtual |
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 288 of file JDOMSimulator.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 143 of file JDAQClient.hh.
|
inlinevirtualinherited |
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 195 of file JDAQClient.hh.
|
inlinevirtualinherited |
Exit the state machine.
This method releases the various resources.
Definition at line 225 of file JDAQClient.hh.
|
inlineinherited |
Get full name of this run control client.
Definition at line 248 of file JDAQClient.hh.
|
inlineinherited |
Get unique tag of this run control client.
Definition at line 259 of file JDAQClient.hh.
|
inlineinherited |
Get last event number.
Definition at line 270 of file JDAQClient.hh.
|
inlineinherited |
Check if this client is in runnig state.
Definition at line 281 of file JDAQClient.hh.
|
inlineinherited |
Replace tag of given event in event table.
oldTag | old tag |
newTag | new tag |
event | event |
Definition at line 294 of file JDAQClient.hh.
|
inlineinherited |
Find event in event table.
tag | tag |
event_name | event name |
Definition at line 309 of file JDAQClient.hh.
|
inlineinherited |
Add parameter to parser used in method enter().
option | option |
parameter | parameter |
Definition at line 327 of file JDAQClient.hh.
|
inlineinherited |
Add parameter to parser used in method enter().
option | option |
parameter | parameter |
value | default value |
Definition at line 341 of file JDAQClient.hh.
|
inlineinherited |
Get total delay time.
Definition at line 352 of file JDAQClient.hh.
|
inlineinherited |
|
inlineinherited |
Get interval time.
Definition at line 374 of file JDAQClient.hh.
|
inlineinherited |
Set interval time.
interval_us | interval time [us] |
Definition at line 385 of file JDAQClient.hh.
|
inlineinherited |
Reset clock.
Definition at line 394 of file JDAQClient.hh.
|
inlineinherited |
Set the file descriptor mask for the select call.
Definition at line 403 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, and KM3NETDAQ::MonitorRouter.
Definition at line 419 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::DataQueue, KM3NETDAQ::JDataWriter, and KM3NETDAQ::MonitorRouter.
Definition at line 429 of file JDAQClient.hh.
|
inlinevirtualinherited |
This method is called at ev_input
.
length | length of data |
buffer | pointer to data |
Reimplemented in AcousticDataFilter.
Definition at line 450 of file JDAQClient.hh.
|
inlinevirtualinherited |
Filter message.
The filter method can be overloaded 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 477 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 493 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 573 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 618 of file JDAQClient.hh.
|
private |
Definition at line 327 of file JDOMSimulator.cc.
|
private |
Definition at line 328 of file JDOMSimulator.cc.
|
private |
Definition at line 437 of file JDOMSimulator.cc.
|
private |
Definition at line 439 of file JDOMSimulator.cc.
|
private |
Definition at line 440 of file JDOMSimulator.cc.
|
private |
Definition at line 442 of file JDOMSimulator.cc.
|
staticinherited |
time out of update [s]
Definition at line 631 of file JDAQClient.hh.
|
protectedinherited |
message server
Definition at line 635 of file JDAQClient.hh.
|
protectedinherited |
message logger
Definition at line 636 of file JDAQClient.hh.