![]() |
VR-Forces 4.3 Class Documentation
|
Base class for any radios on VrfObjects. More...
Public Member Functions | |
| DtVrfRadio (DtRadioCreationParams ¶ms) | |
| virtual | ~DtVrfRadio () |
| virtual bool | init () |
| Virtual init. Must be called after construction. | |
| virtual DtString | type () const |
| virtual bool | sendMessage (DtVrfObjectMessage *message) |
| Fills in the sender name, and sends the message out to any designated recipients. | |
| template<typename messageType > | |
| void | addMessageCallback (const messageType &type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| template<typename messageType > | |
| void | removeMessageCallback (const messageType &type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| virtual bool | readyToSend () const |
| Indicates whether or not this radio is currently clear to send messages. | |
| virtual void | tick () |
| Called every simulation tick. | |
| virtual void | receiveMessage (const DtVrfObjectMessage *message) |
| This method pushes this message into the message executive, and any appropriate callbacks are invoked. | |
| virtual void | setReadyToSend (bool val) |
| Changes the readyToSend state of this radio. | |
| virtual DtVrfObject * | vrfObject () |
| virtual int | radioId () const |
| virtual double | sampleRate () const |
| virtual void | processReadCommModelSettings (const DtSettingsObject *settings) |
| 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 const DtVrfRadioTransmitter * | radioTransmitter () const |
| virtual DtVrfRadioTransmitter * | radioTransmitter () |
Static Public Member Functions | |
| static DtVrfRadio * | create (DtRadioCreationParams ¶ms) |
| Static creator function that can be registered with factories. | |
| static void | setFactory (DtVrfRadioFactory *factory) |
| Sets the static factory to the specified radio factory. | |
| static DtVrfRadio * | createRadio (const DtString &typeString, DtVrfObject *vrfObject, const DtVrfRadioDescriptor *descriptor, int radioId) |
| Uses the static factory to create a new DtRadio subclass and returns it. | |
| static void | readCommModelSettingsCallback (const DtSettingsObject *settings, void *usr) |
| If this radio's comm-model-name is "default-radio-comm-model" this callback is registered with the DtVrfSimSettingsManager and will switch between the "default-internal-radio-comm-model" and the "default-external-radio-comm-model" based on the "use-external-comm-model" back-end setting. | |
Protected Types | |
| typedef std::deque < DtVrfObjectMessagePtr > | DtMessageQueue |
Protected Attributes | |
| DtVrfObject * | myVrfObject |
| const DtVrfRadioDescriptor & | myRadioDescriptor |
| DtVrfObjectMessageExecutive | myMessageExecutive |
| DtCommModel * | myCommModel |
| The radio network which this radio is part of. | |
| DtVrfRadioTransmitter * | myRadioTransmitter |
| int | myRadioId |
| bool | myReadyToSend |
| DtMessageQueue | myMessageQueuedToSend |
Static Protected Attributes | |
| static DtVrfRadioFactory * | theFactory |
Private Member Functions | |
| DtVrfRadio () | |
| Not implemented. | |
| DtVrfRadio (const DtVrfRadio &orig) | |
| Not implemented. | |
| DtVrfRadio & | operator= (const DtVrfRadio &orig) |
| Not implemented. | |
Base class for any radios on VrfObjects.
A DtVrfRadio acts as the interface between an entity and a DtCommModel. Callbacks can be registered on a radio for receipt of various message types, and messages can be sent though the radio by calling sendMessage().
|
protected |
|
private |
Not implemented.
|
private |
Not implemented.
| DtVrfRadio::DtVrfRadio | ( | DtRadioCreationParams & | params | ) |
|
virtual |
|
private |
Not implemented.
|
virtual |
Virtual init. Must be called after construction.
|
virtual |
|
virtual |
Fills in the sender name, and sends the message out to any designated recipients.
|
virtual |
Callback which is called for every message that is received by this interface.
|
virtual |
Callback which is called for every message that is received by this interface.
|
inline |
|
inline |
|
virtual |
Indicates whether or not this radio is currently clear to send messages.
Depending on the comm model that this radio is associated with, it may not be able to send a message because the radio network is busy. When it is not ready to send, calls to sendMessage() will cause the message to be queued for later sending.
|
virtual |
Called every simulation tick.
Tick the radio transmitter, if present.
|
virtual |
This method pushes this message into the message executive, and any appropriate callbacks are invoked.
This method should only be called by a DtCommModel.
|
virtual |
Changes the readyToSend state of this radio.
This method should only be called by a DtCommModel.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
Static creator function that can be registered with factories.
|
static |
Sets the static factory to the specified radio factory.
|
static |
Uses the static factory to create a new DtRadio subclass and returns it.
|
static |
If this radio's comm-model-name is "default-radio-comm-model" this callback is registered with the DtVrfSimSettingsManager and will switch between the "default-internal-radio-comm-model" and the "default-external-radio-comm-model" based on the "use-external-comm-model" back-end setting.
See commModelParams.mtl in the config directory for the definitions of the comm models, and vrfSimSettings.xml for the current state of "use-external-comm-model".
|
virtual |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
The radio network which this radio is part of.
|
protected |
|
protected |
|
protected |
|
protected |