VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtVrfTDLMessageInterface Class Reference

The DtVrfTDLMessageInterface is a transporter for sending TDL messages as data interactions using a VR-Link exercise connection. More...

Inheritance diagram for DtVrfTDLMessageInterface:
Inheritance graph
[legend]

Public Member Functions

 DtVrfTDLMessageInterface (DtExerciseConn *exConn, bool useDefaultInterfaceFactory=true)
 Constructor.
virtual ~DtVrfTDLMessageInterface ()
 destructor
virtual bool init ()
 Creates all the other pieces.
virtual bool createAndDeliverMessage (const DtSimulationAddress &recipient, const DtVrfTDLMessage &content, bool overrideTimestampOrder=true)
 If there is a recipient in the message it is supplanted by the recipient in the createAndDeliverMessage call.
virtual const DtSimulationAddress & messageAddress () const
 Get the address that should be used as the sender for all messages originating from the backend.
virtual bool sendMessage (DtVrfTDLMessage &message)
 Send a sim interface message.
virtual DtExerciseConn * exerciseConn ()
 Get the exercise connection ptr.
virtual void clearExerciseConn ()
 Sets the exercise conn to NULL.
virtual void setSequence (DtU32 num)
 Get/Set the sequence number.
virtual DtU32 sequence () const
virtual void addVrfTDLMessageCallback (DtVrfTDLMessageCallbackFcn fcn, void *usr)
 Adds/removes callbacks to be notified when a VRF TDL message is received. Does not matter the type – it will be triggered for all messages.
virtual void removeVrfTDLMessageCallback (DtVrfTDLMessageCallbackFcn fcn, void *usr)
virtual void setTransportTypeReliable (int contentType)
 Sets the transport type for the given content type to be \iable.
virtual void setTransportTypeBestEffort (int contentType)
 Sets the transport type for the given content type to be best-effort.
virtual void updateTransportTypeForMsg (const DtVrfTDLMessage &message)
 Update the transportation type to be used based on the given message.
virtual bool receiveMessage (DtVrfTDLMessage *content)
 Call this to receive a TDL message internally – this will not go out over the network.
virtual DtVrfTDLMessageFactoryfactory () const
 Get/Set the factory used for creating interface content msgs.
virtual void setFactory (DtVrfTDLMessageFactory *fact)

Static Public Member Functions

static chardataInteractionChooser (DtExerciseConn *exConn, const DtInteraction &inter)

Protected Types

typedef std::vector< std::pair
< DtVrfTDLMessageCallbackFcn,
void * > > 
CallbackData

Protected Member Functions

virtual bool setContentForNet (DtDataInteraction *dataInter, DtVrfTDLMessage &content) const
virtual void receiveMessage (DtDataInteraction *dataInter)
 Process a received data interaction from the network.
virtual bool matchPattern (const DtSimulationAddress &address, const DtSimulationAddress &pattern) const
virtual bool getContentFromNet (DtDataInteraction *dataInter, DtVrfTDLMessage *&content) const
 Create/set objects based on DtDataInteraction information.
virtual bool getContentFromNet (unsigned nBufferSize, const char *pContentBuffer, DtVrfTDLMessage *&content) const
virtual void invokeCallbacks (DtVrfTDLMessage *)
 Invokes callbacks for a particular VRF TDL message.

Static Protected Member Functions

static void netMessageCallback (DtDataInteraction *dataInter, void *usr)

Protected Attributes

DtExerciseConn * myExerciseConnection
DtU32 mySequenceNumber
bool myAllowReliableDataInteractions
bool myUseReliableTransport
DtVrfTDLMessageFactorymyFactory
bool myCreatedInterfaceFactory
CallbackData myCallbacks
DtVrfTDLMessagemyVrfTDLMessageTranslator
std::set< intmyContentTypesToSendReliable
 Set of content types to be sent via reliable transport.

Private Member Functions

 DtVrfTDLMessageInterface (const DtVrfTDLMessageInterface &orig)
DtVrfTDLMessageInterfaceoperator= (const DtVrfTDLMessageInterface &orig)
 DtVrfTDLMessageInterface ()

Detailed Description

The DtVrfTDLMessageInterface is a transporter for sending TDL messages as data interactions using a VR-Link exercise connection.

Member Typedef Documentation

typedef std::vector<std::pair<DtVrfTDLMessageCallbackFcn, void*> > DtVrfTDLMessageInterface::CallbackData
protected

Constructor & Destructor Documentation

DtVrfTDLMessageInterface::DtVrfTDLMessageInterface ( DtExerciseConn *  exConn,
bool  useDefaultInterfaceFactory = true 
)

Constructor.

virtual DtVrfTDLMessageInterface::~DtVrfTDLMessageInterface ( )
virtual

destructor

DtVrfTDLMessageInterface::DtVrfTDLMessageInterface ( const DtVrfTDLMessageInterface orig)
private
DtVrfTDLMessageInterface::DtVrfTDLMessageInterface ( )
private

Member Function Documentation

virtual bool DtVrfTDLMessageInterface::init ( )
virtual

Creates all the other pieces.

virtual bool DtVrfTDLMessageInterface::createAndDeliverMessage ( const DtSimulationAddress &  recipient,
const DtVrfTDLMessage content,
bool  overrideTimestampOrder = true 
)
virtual

If there is a recipient in the message it is supplanted by the recipient in the createAndDeliverMessage call.

virtual const DtSimulationAddress& DtVrfTDLMessageInterface::messageAddress ( ) const
virtual

Get the address that should be used as the sender for all messages originating from the backend.

virtual bool DtVrfTDLMessageInterface::sendMessage ( DtVrfTDLMessage message)
virtual

Send a sim interface message.

DtExerciseConn * DtVrfTDLMessageInterface::exerciseConn ( )
inlinevirtual

Get the exercise connection ptr.

References myExerciseConnection.

void DtVrfTDLMessageInterface::clearExerciseConn ( )
inlinevirtual

Sets the exercise conn to NULL.

References myExerciseConnection.

virtual void DtVrfTDLMessageInterface::setSequence ( DtU32  num)
virtual

Get/Set the sequence number.

DtU32 DtVrfTDLMessageInterface::sequence ( ) const
inlinevirtual

References mySequenceNumber.

virtual void DtVrfTDLMessageInterface::addVrfTDLMessageCallback ( DtVrfTDLMessageCallbackFcn  fcn,
void *  usr 
)
virtual

Adds/removes callbacks to be notified when a VRF TDL message is received. Does not matter the type – it will be triggered for all messages.

virtual void DtVrfTDLMessageInterface::removeVrfTDLMessageCallback ( DtVrfTDLMessageCallbackFcn  fcn,
void *  usr 
)
virtual
virtual void DtVrfTDLMessageInterface::setTransportTypeReliable ( int  contentType)
virtual

Sets the transport type for the given content type to be \iable.

virtual void DtVrfTDLMessageInterface::setTransportTypeBestEffort ( int  contentType)
virtual

Sets the transport type for the given content type to be best-effort.

Since best-effort will be the default for all messages not explicitly set to another transport type, this is only necessary to undo a previous setting.

virtual void DtVrfTDLMessageInterface::updateTransportTypeForMsg ( const DtVrfTDLMessage message)
virtual

Update the transportation type to be used based on the given message.

static char* DtVrfTDLMessageInterface::dataInteractionChooser ( DtExerciseConn *  exConn,
const DtInteraction inter 
)
static
virtual bool DtVrfTDLMessageInterface::receiveMessage ( DtVrfTDLMessage content)
virtual

Call this to receive a TDL message internally – this will not go out over the network.

The sender and recipient will be the address of this exercise connection

Reimplemented in DtVrfTDLMsgPrinter.

virtual DtVrfTDLMessageFactory* DtVrfTDLMessageInterface::factory ( ) const
virtual

Get/Set the factory used for creating interface content msgs.

virtual void DtVrfTDLMessageInterface::setFactory ( DtVrfTDLMessageFactory fact)
virtual
virtual bool DtVrfTDLMessageInterface::setContentForNet ( DtDataInteraction *  dataInter,
DtVrfTDLMessage content 
) const
protectedvirtual
static void DtVrfTDLMessageInterface::netMessageCallback ( DtDataInteraction *  dataInter,
void *  usr 
)
staticprotected
virtual void DtVrfTDLMessageInterface::receiveMessage ( DtDataInteraction *  dataInter)
protectedvirtual

Process a received data interaction from the network.

virtual bool DtVrfTDLMessageInterface::matchPattern ( const DtSimulationAddress &  address,
const DtSimulationAddress &  pattern 
) const
protectedvirtual
virtual bool DtVrfTDLMessageInterface::getContentFromNet ( DtDataInteraction *  dataInter,
DtVrfTDLMessage *&  content 
) const
protectedvirtual

Create/set objects based on DtDataInteraction information.

Reimplemented in DtVrfTDLMsgPrinter.

virtual bool DtVrfTDLMessageInterface::getContentFromNet ( unsigned  nBufferSize,
const char pContentBuffer,
DtVrfTDLMessage *&  content 
) const
protectedvirtual
virtual void DtVrfTDLMessageInterface::invokeCallbacks ( DtVrfTDLMessage )
protectedvirtual

Invokes callbacks for a particular VRF TDL message.

DtVrfTDLMessageInterface& DtVrfTDLMessageInterface::operator= ( const DtVrfTDLMessageInterface orig)
private

Member Data Documentation

DtExerciseConn* DtVrfTDLMessageInterface::myExerciseConnection
protected

Referenced by clearExerciseConn(), and exerciseConn().

DtU32 DtVrfTDLMessageInterface::mySequenceNumber
protected

Referenced by sequence().

bool DtVrfTDLMessageInterface::myAllowReliableDataInteractions
protected
bool DtVrfTDLMessageInterface::myUseReliableTransport
protected
DtVrfTDLMessageFactory* DtVrfTDLMessageInterface::myFactory
protected
bool DtVrfTDLMessageInterface::myCreatedInterfaceFactory
protected
CallbackData DtVrfTDLMessageInterface::myCallbacks
protected
DtVrfTDLMessage* DtVrfTDLMessageInterface::myVrfTDLMessageTranslator
protected
std::set<int> DtVrfTDLMessageInterface::myContentTypesToSendReliable
protected

Set of content types to be sent via reliable transport.


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)