![]() |
VR-Forces 4.0.4 Class Documentation
|
The central class of a DtVrfObject for all communications to and from the object. More...
Public Member Functions | |
| virtual | ~DtVrfObjectCommunicationInterface () |
| virtual void | createRadiosFromDescriptorList () |
| Creates radios from descriptor list. | |
| virtual void | createRadiosFromDescriptorList (const DtRadioDescriptorList &descList) |
| Creates radios from descriptor list. | |
| virtual void | sendSimInternalMessage (DtVrfObjectMessage *message) |
| Sends the specified message though the DtSimInternalCommunicationInterface. | |
| virtual DtVrfRadio * | lookupRadio (int radioId) |
| virtual DtVrfRadio * | lookupRadio (const DtString &radioName) |
| virtual DtVrfRadio * | defaultRadio () |
| DtSimInternalCommunicationInterface * | simInternalCommunicationInterface () |
| virtual void | tick () |
| Called each simulation tick. | |
| virtual bool | sendRadioMessage (const DtString &radioName, DtVrfObjectMessage *message) |
| Sends the specified message though the radio system. | |
| virtual bool | sendRadioMessage (int radioId, DtVrfObjectMessage *message) |
| Sends though the radio with the specified ID. | |
| virtual bool | sendRadioMessage (DtVrfObjectMessage *message) |
| Sends though the default radio. | |
| virtual void | addMessageCallback (DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called for every message that is received by this interface. | |
| virtual void | removeMessageCallback (DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called for every message that is received by this interface. | |
| virtual void | addMessageCallback (int type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific type of object message is processed. | |
| virtual void | removeMessageCallback (int type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific type of object message is processed. | |
| virtual void | addMessageCallbackByCategory (int category, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific category of object message is processed. | |
| virtual void | removeMessageCallbackByCategory (int category, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific category of object message is processed. | |
Static Public Member Functions | |
| static DtVrfObjectCommunicationInterface * | create (DtVrfObject *vrfObject) |
| Calls constructor and init(), and returns the result. | |
Protected Types | |
| typedef std::map < DtSymbolString, DtVrfRadio * > | DtRadioMap |
Protected Member Functions | |
| DtVrfObjectCommunicationInterface (DtVrfObject *vrfObject) | |
| Use the create() method instead of calling the constructor. | |
| virtual bool | init () |
| Virtual init, called from the create() method. | |
Protected Attributes | |
| DtVrfObject * | myVrfObject |
| DtVrfObjectMessageExecutive | myMessageExecutive |
| DtSimInternalCommunicationInterface * | mySimInternalInterface |
| DtRadioMap | myRadios |
| DtVrfRadio * | myDefaultRadio |
Private Member Functions | |
| DtVrfObjectCommunicationInterface () | |
| Not Implemented. | |
| DtVrfObjectCommunicationInterface (const DtVrfObjectCommunicationInterface &orig) | |
| Not Implemented. | |
| DtVrfObjectCommunicationInterface & | operator= (const DtVrfObjectCommunicationInterface &orig) |
| Not Implemented. | |
| virtual void | processVrfObjectMessage (const DtVrfObjectMessage *msg) |
| Callback processing method for messages received from one of the contained message interfaces. | |
| static void | vrfObjectMessageCallback (const DtVrfObjectMessage *msg, void *usr) |
| Callback processing method for messages received from one of the contained message interfaces. | |
The central class of a DtVrfObject for all communications to and from the object.
This class manages all communications on a specific DtVrfObject, though both simulation internal communication, and communication though the simulated radios of the object. All communication is done though the use of the DtVrfObjectMessage class and its subclasses. Callbacks can be registered on this interface which will be called on receipt of a message by this entity. Messages can be sent from this entity by using the message sending functions. These messages may be sent though the SimInternal message mechanism, or the radio message system. Radios will not exist until createRadiosFromDescriptorList() or createRadiosFromDescriptorList(const DtRadioDescriptorList& descList) is called.
typedef std::map<DtSymbolString, DtVrfRadio*> DtVrfObjectCommunicationInterface::DtRadioMap [protected] |
Not Implemented.
| DtVrfObjectCommunicationInterface::DtVrfObjectCommunicationInterface | ( | const DtVrfObjectCommunicationInterface & | orig | ) | [private] |
Not Implemented.
| DtVrfObjectCommunicationInterface::DtVrfObjectCommunicationInterface | ( | DtVrfObject * | vrfObject | ) | [protected] |
Use the create() method instead of calling the constructor.
| virtual DtVrfObjectCommunicationInterface::~DtVrfObjectCommunicationInterface | ( | ) | [virtual] |
| DtVrfObjectCommunicationInterface& DtVrfObjectCommunicationInterface::operator= | ( | const DtVrfObjectCommunicationInterface & | orig | ) | [private] |
Not Implemented.
| static DtVrfObjectCommunicationInterface* DtVrfObjectCommunicationInterface::create | ( | DtVrfObject * | vrfObject | ) | [static] |
Calls constructor and init(), and returns the result.
Upon return, invoke one of these: createRadiosFromDescriptorList(); or createRadiosFromDescriptorList(const DtRadioDescriptorList& descList); to supply radio creation parameters to the communication interface.
| virtual bool DtVrfObjectCommunicationInterface::init | ( | ) | [protected, virtual] |
Virtual init, called from the create() method.
| virtual void DtVrfObjectCommunicationInterface::createRadiosFromDescriptorList | ( | ) | [virtual] |
Creates radios from descriptor list.
Called from DtVrfObject::createCommunicationsInterface()
| virtual void DtVrfObjectCommunicationInterface::createRadiosFromDescriptorList | ( | const DtRadioDescriptorList & | descList | ) | [virtual] |
Creates radios from descriptor list.
Called from DtVrfObject::createCommunicationsInterface(const DtRadioDescriptorList&)
| virtual void DtVrfObjectCommunicationInterface::sendSimInternalMessage | ( | DtVrfObjectMessage * | message | ) | [virtual] |
Sends the specified message though the DtSimInternalCommunicationInterface.
Messages sent this way are intended to be internal simulation types of messages, meaning that they will not be sent over simulated radios, and are guaranteed to get to their addressee.
| virtual bool DtVrfObjectCommunicationInterface::sendRadioMessage | ( | const DtString & | radioName, |
| DtVrfObjectMessage * | message | ||
| ) | [virtual] |
Sends the specified message though the radio system.
Specify the name of the radio to use, or send though the default radio. Message sender information will be set in the message.
| virtual bool DtVrfObjectCommunicationInterface::sendRadioMessage | ( | int | radioId, |
| DtVrfObjectMessage * | message | ||
| ) | [virtual] |
Sends though the radio with the specified ID.
Radio IDs are assigned based on their order in the OPE file, starting with 0 and incrementing by 1.
| virtual bool DtVrfObjectCommunicationInterface::sendRadioMessage | ( | DtVrfObjectMessage * | message | ) | [virtual] |
Sends though the default radio.
The default radio is the first radio listed in the radio list for the entity.
| virtual DtVrfRadio* DtVrfObjectCommunicationInterface::lookupRadio | ( | int | radioId | ) | [virtual] |
| virtual DtVrfRadio* DtVrfObjectCommunicationInterface::lookupRadio | ( | const DtString & | radioName | ) | [virtual] |
| virtual DtVrfRadio* DtVrfObjectCommunicationInterface::defaultRadio | ( | ) | [virtual] |
| DtSimInternalCommunicationInterface* DtVrfObjectCommunicationInterface::simInternalCommunicationInterface | ( | ) |
| virtual void DtVrfObjectCommunicationInterface::addMessageCallback | ( | DtVrfObjectMessageCallbackFcn | fcn, |
| void * | usr | ||
| ) | [virtual] |
Callback which is called for every message that is received by this interface.
This includes sim internal messages, and messages from any radio.
| virtual void DtVrfObjectCommunicationInterface::removeMessageCallback | ( | DtVrfObjectMessageCallbackFcn | fcn, |
| void * | usr | ||
| ) | [virtual] |
Callback which is called for every message that is received by this interface.
This includes sim internal messages, and messages from any radio.
| virtual void DtVrfObjectCommunicationInterface::addMessageCallback | ( | int | type, |
| DtVrfObjectMessageCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Callback which is called when a specific type of object message is processed.
The type parameter is the content type of the message. This includes sim internal messages, and messages from any radio.
| virtual void DtVrfObjectCommunicationInterface::removeMessageCallback | ( | int | type, |
| DtVrfObjectMessageCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Callback which is called when a specific type of object message is processed.
The type parameter is the content type of the message. This includes sim internal messages, and messages from any radio.
| virtual void DtVrfObjectCommunicationInterface::addMessageCallbackByCategory | ( | int | category, |
| DtVrfObjectMessageCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Callback which is called when a specific category of object message is processed.
Categories are general message types such as: DtTaskMessageType, DtReportMessageType, DtSetDataRequestMessageType, and DtAdminMessageType. This includes sim internal messages, and messages from any radio.
| virtual void DtVrfObjectCommunicationInterface::removeMessageCallbackByCategory | ( | int | category, |
| DtVrfObjectMessageCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Callback which is called when a specific category of object message is processed.
Categories are general message types such as: DtTaskMessageType, DtReportMessageType, DtSetDataRequestMessageType, and DtAdminMessageType. This includes sim internal messages, and messages from any radio.
| virtual void DtVrfObjectCommunicationInterface::tick | ( | ) | [virtual] |
Called each simulation tick.
Ticks any radios owned by this communication interface.
| static void DtVrfObjectCommunicationInterface::vrfObjectMessageCallback | ( | const DtVrfObjectMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
Callback processing method for messages received from one of the contained message interfaces.
| virtual void DtVrfObjectCommunicationInterface::processVrfObjectMessage | ( | const DtVrfObjectMessage * | msg | ) | [protected, virtual] |
Callback processing method for messages received from one of the contained message interfaces.
DtSimInternalCommunicationInterface* DtVrfObjectCommunicationInterface::mySimInternalInterface [protected] |