trkwsTRANSFER_SER
Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:11
Index
Return to man pages list
NAME
trkwsTRANSFER_SER - handles the 'normal transfer commands'.
SYNOPSIS
#include "trkwsTRANSFER_SER.h"
class trkwsTRANSFER_SER : public evhDB_CMD_SERIAL
{
public:
trkwsTRANSFER_SER(const dbSYMADDRESS dbPoint,
const dbSYMADDRESS destDbPoint = NULL);
~trkwsTRANSFER_SER();
ccsCOMPL_STAT DestinationDbPoint(const dbSYMADDRESS dbPoint);
ccsCOMPL_STAT SendAll(msgMESSAGE &msg);
ccsCOMPL_STAT SendAll(msgMESSAGE &originalMsg, msgMESSAGE &toBeSentMsg);
virtual ccsCOMPL_STAT Reset();
protected:
virtual evhCB_COMPL_STAT CompletedCB(msgMESSAGE &msg, void *udata);
virtual evhCB_COMPL_STAT ErrorCB(msgMESSAGE &msg, void *udata);
virtual evhCB_COMPL_STAT TimeoutCB(msgMESSAGE &msg, void *udata);
private:
fndQUEUE messages;
};
PARENT CLASS
evhDB_COMMAND_SERIAL
DESCRIPTION
This class is used to handle the 'normal transfer commands' for the
tracking. These are mainly simple data transfer commands, distributed
from the WS to the currently tracking LCUs. The class takes care of
sending the commands, by using an object of class mswMOD_LIST_COMMAND,
of handling replies and errors from the LCUs, and it also sends replies
to the originator of the original command.
Commands are "serialized", i.e. whenever a new command has to be
tranferred it is queued internally and sent only when the previous
one has been completely handled.
PUBLIC METHODS
trkwsTRANSFER_SER(const dbSYMADDRESS dbPoint,
const dbSYMADDRESS destDbPoint = NULL);
The constructor receives as parameter the symbolic address of
online database support point for the object, i.e. the point
where the object can find configuration and run time values.
The second parameter (optional) is the address of the
mswMOD_LIST_COMMAND instance to handle sending of commands.
If the parameter is not given, it is assumed that it is asub-point
called "cmd"
~trkwsTRANSFER_SER();
ccsCOMPL_STAT DestinationDbPoint(const dbSYMADDRESS dbPoint);
This method is used to give the object the name of the database point
where the list of target addresses are.
ccsCOMPL_STAT SendAll(msgMESSAGE &msg);
ccsCOMPL_STAT SendAll(msgMESSAGE &originalMsg, msgMESSAGE &toBeSentMsg);
This is the sending method, which is using the inherited Send() method
of its parent class.
The parameter is a msgMESSAGE instance containing a received command
that must be transferred to all the units described by the instance of
mswMOD_LIST_COMMAND.
If SendAll() is called while a command is pending, the new one is queued
and actually sent only when the previous one is completed.
In order to be able to send back the proper replies, the received
msgMESSAGE structure is copied and stored internally in a queue.
When the command is completed and the proper replies have been sent,
the copy is deleted.
The second version allow to send a command different from the received
one. The received message is passed as a parameter and used to send
the reply. The new command is passed as the second parameter
virtual ccsCOMPL_STAT Reset();
This overloads the Reset() method of the base class in order to cleanly
reset.
PROTECTED METHODS
fndQUEUE &trkwsTRANSFER_SER::MessageQueue()
Returns the queue of waiting messages, to extract them when
a reply is received.
virtual evhCB_COMPL_STAT CompletedCB(msgMESSAGE &msg, void *udata);
virtual evhCB_COMPL_STAT ErrorCB(msgMESSAGE &msg, void *udata);
virtual evhCB_COMPL_STAT TimeoutCB(msgMESSAGE &msg, void *udata);
These methods overload the corresponding ones of the base class
to implement the specific behaviour.
In particular they send the proper reply to the originator of the
"transferred" command and delete the local copy of the originally
received message when it is no more needed
PRIVATE DATA MEMBERS
fndQUEUE messages; Queue to store messages received and to be processed
ON LINE DATABASE
To handle an object of class trkwsTRANSFER_SER, a database point of
dbl class trkwsTRANSFER_SER is used:
Index
- NAME
-
- SYNOPSIS
-
- PARENT CLASS
-
- DESCRIPTION
-
- PUBLIC METHODS
-
- PROTECTED METHODS
-
- PRIVATE DATA MEMBERS
-
- ON LINE DATABASE
-
This document was created by
man2html,
using the manual pages.
Time: 10:11:26 GMT, April 23, 2012