Primary interface to remote loggers. More...
Collaboration diagram for MAKLogger::DtRemoteControlInterface:Classes | |
| struct | DtPendingAcknowledge |
| Entry for pending acknowledgment. More... | |
Public Member Functions | |
| DtRemoteControlInterface (int numberOfLoggersToManage=0) | |
| Main constructor. | |
| virtual | ~DtRemoteControlInterface () |
| Destructor. | |
| virtual void | setConnection (DtExerciseConn *exconn, const DtEntityIdentifier &entityId) |
| Register callbacks with a newly created exconn. | |
| virtual void | clearConnection () |
| Unregister callbacks. | |
| virtual void | disconnect (const DtEntityIdentifier &entityId) |
| Disconnect the logger with the given ID. | |
| virtual void | tick () |
| Called periodically to process control pdus to send and receive. | |
| virtual void | getConnectionIds (DtEntityIdSet &connectedLoggers) const |
| Get the set of connected loggers. | |
| virtual void | getConnectionIds (DtEntityIdSet &connectedLoggers, const DtEntityIdentifier &idFilter) const |
| Get the set of connected loggers that match the given ID that may contain wildcards. | |
| virtual DtRemoteLoggerConnection * | getConnection (const DtEntityIdentifier &id) |
| Get the connection info for the given ID. | |
| virtual DtTime | lowestTime () const |
| Get the time of the logger with the lowest current time. | |
| virtual DtTime | highestTime () const |
| Get the time of the logger with the highest current time. | |
| virtual DtSequenceNumber | sendCommandMessage (const DtCommand &command, const DtEntityIdentifier &target=theWildcardAddress) |
| Send a command message Return the message sequence number. | |
| virtual DtSequenceNumber | sendCommandMessage (const DtCommand &command, DtRemoteControlDomainInterface *domainInterface, const DtEntityIdentifier &target=theWildcardAddress) |
| Send a command message Return the message sequence number. | |
| virtual DtSequenceNumber | sendLoggerControlMessage (DtLgrControlPdu &lgrControl, const DtEntityIdentifier &target=theWildcardAddress) |
| Send a logger control message Return the message sequence number. | |
| virtual DtSequenceNumber | sendLoggerControlMessage (DtLgrControlPdu &lgrControl, DtRemoteControlDomainInterface *domainInterface, const DtEntityIdentifier &target=theWildcardAddress) |
| Send a logger control message Return the message sequence number. | |
| virtual void | setId (const DtEntityIdentifier &id) |
| Set/Get our ID. | |
| virtual const DtEntityIdentifier & | id () const |
| Set/Get our ID. | |
| virtual void | setAcceptAnyId (bool acceptAny) |
| Set/Get control to accept any identifier. | |
| virtual bool | acceptAnyId () const |
| Set/Get control to accept any identifier. | |
| virtual DtTime | connectionTimeout () const |
| Set/Get connection timeout threashold. | |
| virtual void | setConnectionTimeout (DtTime val) |
| Set/Get connection timeout threashold. | |
| virtual void | setNumberOfLoggers (int numberOfLoggersToManage) |
| Set/Get number of loggers expected to connect. | |
| virtual int | numberOfLoggers () const |
| Set/Get number of loggers expected to connect. | |
Get the command domain interfaces | |
|
virtual DtRemoteControlSystemInterface * | systemInterface () |
|
virtual DtRemoteControlPlaybackInterface * | playbackInterface () |
|
virtual DtRemoteControlRecordInterface * | recordInterface () |
|
virtual DtRemoteControlEditorInterface * | editorInterface () |
|
virtual DtRemoteControlSimulationInterface * | simulationInterface () |
|
virtual DtRemoteControlSharedInterface * | sharedInterface () |
Add/Remove callback for various logger control messages / events | |
| virtual void | addCallback (DtLgrConnectCb cb, void *user) |
| virtual void | removeCallback (DtLgrConnectCb) |
| virtual void | addCallback (DtLgrDisconnectCb cb, void *user) |
| virtual void | removeCallback (DtLgrDisconnectCb) |
| virtual void | addCallback (DtLgrLgrHeartbeatCb cb, void *user) |
| virtual void | removeCallback (DtLgrLgrHeartbeatCb) |
| virtual void | addCallback (DtLgrAcknowledgeCb cb, void *user) |
| virtual void | removeCallback (DtLgrAcknowledgeCb) |
| virtual void | addCallback (DtLgrResponseCb cb, void *user) |
| virtual void | removeCallback (DtLgrResponseCb) |
| virtual void | addCallback (DtLgrTotalStateCb cb, void *user) |
| virtual void | removeCallback (DtLgrTotalStateCb) |
| virtual void | addCallbackConnectionAdded (DtLgrConnectionAddedCb cb, void *user) |
| virtual void | removeCallbackConnectionAdded (DtLgrConnectionAddedCb) |
| virtual void | addCallbackConnectionRemoved (DtLgrConnectionRemovedCb cb, void *user) |
| virtual void | removeCallbackConnectionRemoved (DtLgrConnectionRemovedCb) |
| virtual void | addCallbackConnectionTimedOut (DtLgrConnectionTimedOutCb cb, void *user) |
| virtual void | removeCallbackConnectionTimedOut (DtLgrConnectionTimedOutCb) |
| virtual void | addCallbackCommandAccepted (DtLgrCommandAcceptedCb cb, void *user) |
| virtual void | removeCallbackCommandAccepted (DtLgrCommandAcceptedCb) |
| virtual void | addCallbackCommandRejected (DtLgrCommandRejectedCb cb, void *user) |
| virtual void | removeCallbackCommandRejected (DtLgrCommandRejectedCb) |
| virtual void | addCallbackCommandTimedOut (DtLgrCommandTimedOutCb cb, void *user) |
| virtual void | removeCallbackCommandTimedOut (DtLgrCommandTimedOutCb) |
Static Public Member Functions | |
| static const DtEntityIdentifier & | wildcardAddress () |
| The wildcard address. | |
| static const char * | commandToString (int domain, int command) |
| Return the string name for the command/response ID. | |
Protected Types | |
|
typedef struct MAKLogger::DtRemoteControlInterface::DtPendingAcknowledge | DtPendingAcknowledge |
| Entry for pending acknowledgment. | |
|
typedef std::map < DtSequenceNumber, DtPendingAcknowledge > | DtPendingAcknowledgeList |
|
typedef std::map < DtSequenceNumber, DtTime > | DtRejectCommandList |
|
typedef std::map < DtSequenceNumber, DtRemoteControlDomainInterface * > | DtAcknowledgeDomainMap |
|
typedef std::list < DtLgrControlPdu * > | DtPduList |
Protected Member Functions | |
| virtual void | lgrCtrlCallback (DtInteraction *) |
| Implementation of callback. | |
| virtual void | processControlPdus () |
| Called periodically to process control pdus received. | |
| virtual void | checkConnections () |
| Called periodically to check connection timeouts. | |
| virtual bool | isIdMatching (const DtEntityIdentifier &targetId, bool allowWildCard=true) |
| Does the given target ID match the interface ID? | |
| virtual DtSequenceNumber | nextSequenceNumber () |
| Get next sequence number. | |
| virtual void | commandAccepted (DtSequenceNumber sequenceNumber) |
| Command acknowledged. | |
| virtual void | commandRejected (const DtEntityIdentifier &source, DtSequenceNumber sequenceNumber) |
| Command rejected. | |
| virtual void | commandTimedOut (DtSequenceNumber sequenceNumber) |
| Command timed out. | |
Process logger control PDUs | |
| virtual void | processTotalState (DtLgrTotalStatePdu *totalStatePdu) |
| virtual void | processConnect (DtLgrConnectPdu *connectPdu) |
| virtual void | processDisconnect (DtLgrDisconnectPdu *disconnectPdu) |
| virtual void | processLgrHeartbeat (DtLgrLgrHeartbeatPdu *lgrHeartbeatPdu) |
| virtual void | processAcknowledge (DtLgrAcknowledgePdu *acknowledgePdu) |
| virtual void | processResponse (DtLgrResponsePdu *responsePdu) |
Static Protected Member Functions | |
| static void | lgrCtrlCb (DtInteraction *, void *) |
| Static callback function. | |
Protected Attributes | |
| DtExerciseConn * | myExerciseCon |
| DtEntityIdentifier | myId |
| DtSequenceNumber | mySequenceNumber |
| DtPduList | myPduList |
| DtRemoteLoggerMap | myRemoteLoggers |
| DtEntityIdSet | myRemoteLoggerIds |
| DtEntityIdSet | myRejectedLoggerIds |
| bool | myAcceptAnyId |
| DtTime | myConnectionTimeout |
| DtTime | myNextTimeoutCheck |
| DtPendingAcknowledgeList | myPendingAcknowledgements |
| DtRejectCommandList | myRejectedCommands |
| DtTime | MyAcknowledgeTimeout |
| int | myNumberOfLoggers |
| DtAcknowledgeDomainMap | myAcknowledgeInterface |
| std::map< DtLgrConnectCb, void * > | myConnectCallbacks |
|
std::map< DtLgrDisconnectCb, void * > | myDisconnectCallbacks |
|
std::map< DtLgrAcknowledgeCb, void * > | myAcknowledgeCallbacks |
| std::map< DtLgrResponseCb, void * > | myResponseCallbacks |
|
std::map< DtLgrTotalStateCb, void * > | myTotalStateCallbacks |
|
std::map< DtLgrLgrHeartbeatCb, void * > | myHeartbeatCallbacks |
|
std::map < DtLgrConnectionAddedCb, void * > | myConnectionAddedCallbacks |
|
std::map < DtLgrConnectionRemovedCb, void * > | myConnectionRemovedCallbacks |
|
std::map < DtLgrConnectionTimedOutCb, void * > | myConnectionTimedOutCallbacks |
|
std::map < DtLgrCommandAcceptedCb, void * > | myCommandAcceptedCallbacks |
|
std::map < DtLgrCommandRejectedCb, void * > | myCommandRejectedCallbacks |
|
std::map < DtLgrCommandTimedOutCb, void * > | myCommandTimedOutCallbacks |
| DtRemoteControlSystemInterface * | mySystemInterface |
| DtRemoteControlPlaybackInterface * | myPlaybackInterface |
| DtRemoteControlRecordInterface * | myRecordInterface |
| DtRemoteControlEditorInterface * | myEditorInterface |
| DtRemoteControlSimulationInterface * | mySimulationInterface |
| DtRemoteControlSharedInterface * | mySharedInterface |
Static Protected Attributes | |
| static const DtU16 | theAddressWildcard = ((1<<16)-1) |
| static const DtEntityIdentifier | theWildcardAddress |
Private Member Functions | |
| DtRemoteControlInterface (const DtRemoteControlInterface &) | |
| Not Implemented. | |
| DtRemoteControlInterface & | operator= (const DtRemoteControlInterface &) |
| Not Implemented. | |
Primary interface to remote loggers.
Responsible for sending and receiving logger messages and decoding them into commands.
| MAKLogger::DtRemoteControlInterface::DtRemoteControlInterface | ( | int | numberOfLoggersToManage = 0 | ) |
Main constructor.
Interface will permit the given number of loggers to connect. If 0, any number of loggers may connect.
| virtual void MAKLogger::DtRemoteControlInterface::clearConnection | ( | ) | [virtual] |
Unregister callbacks.
Thus should be called before deleting an exercise connection.
| virtual DtSequenceNumber MAKLogger::DtRemoteControlInterface::sendCommandMessage | ( | const DtCommand & | command, |
| const DtEntityIdentifier & | target = theWildcardAddress |
||
| ) | [virtual] |
Send a command message Return the message sequence number.
A sequence number value of 0 indicates a message was not sent (i.e., no exercise connection).
| virtual DtSequenceNumber MAKLogger::DtRemoteControlInterface::sendCommandMessage | ( | const DtCommand & | command, |
| DtRemoteControlDomainInterface * | domainInterface, | ||
| const DtEntityIdentifier & | target = theWildcardAddress |
||
| ) | [virtual] |
Send a command message Return the message sequence number.
A sequence number value of 0 indicates a message was not sent (i.e., no exercise connection). The provided domain interface is called when command accepted/rejected.
| virtual DtSequenceNumber MAKLogger::DtRemoteControlInterface::sendLoggerControlMessage | ( | DtLgrControlPdu & | lgrControl, |
| const DtEntityIdentifier & | target = theWildcardAddress |
||
| ) | [virtual] |
Send a logger control message Return the message sequence number.
A sequence number value of 0 indicates a message was not sent (i.e., no exercise connection).
| virtual DtSequenceNumber MAKLogger::DtRemoteControlInterface::sendLoggerControlMessage | ( | DtLgrControlPdu & | lgrControl, |
| DtRemoteControlDomainInterface * | domainInterface, | ||
| const DtEntityIdentifier & | target = theWildcardAddress |
||
| ) | [virtual] |
Send a logger control message Return the message sequence number.
A sequence number value of 0 indicates a message was not sent (i.e., no exercise connection). The provided domain interface is called when command accepted/rejected.