VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtVrfMessageInterface Class Reference
Inheritance diagram for DtVrfMessageInterface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtVrfMessageInterface (DtExerciseConn *exConn, bool useDefaultInterfaceFactory=true)
 Contructor.
virtual ~DtVrfMessageInterface ()
 destructor
virtual bool init ()
 Creates all the other pieces.
virtual bool createMessageExecutive ()
 Creator functions.
virtual void createSplitMessageCollector ()
 Replaces mySplitMessageCollector with a new one.
virtual DtSplitMessageCollectorsplitMessageCollector ()
virtual const
DtSplitMessageCollector
splitMessageCollector () const
virtual bool deliverMessage (const DtSimInterfaceMessage &msg)
 Send a message.
virtual bool receiveMessage (const DtSimInterfaceMessage &msg)
virtual bool createAndDeliverMessage (const DtSimulationAddress &recipient, const DtSimInterfaceContent &content, bool overrideTimestampOrder=true)
virtual bool getContentFromNet (DtDataInteraction *dataInter, DtSimInterfaceContent *&content) const
 Create/set objects based on DtDataInteraction information.
virtual bool getContentFromNet (unsigned nBufferSize, int nContentType, const char *pContentBuffer, DtSimInterfaceContent *&content) const
virtual bool setContentForNet (DtDataInteraction *dataInter, DtSimInterfaceContent *content) const
virtual void setSequence (DtU32 num)
 Get/Set the sequence number.
virtual DtU32 sequence () const
virtual void setSessionId (DtU32 num)
 Get/Set the session id.
virtual DtU32 sessionId () const
virtual void setVrfMessageVersionSupported (DtU32 num)
 Get/Set the vrf message version.
virtual DtU32 vrfMessageVersionSupported () const
virtual bool isMessageVrfVersionSupported (DtDataInteraction *) const
 Returns true if this data interaction passes the message version check.
virtual void addVrfMessageVersionValidCallback (DtIsValidVrfMessageVersionFcn fcn, void *usr)
 Register vrf message interface version valid.
virtual void removeVrfMessageVersionValidCallback (DtIsValidVrfMessageVersionFcn fcn, void *usr)
virtual bool isVrfMessageVersionTransparentMessageType (int messageType) const
 Returns true if the given message type is message verson transparent (i.e.
virtual bool isSessionTransparentMessageType (int messageType)
 Returns true if the given message type is session transparent (i.e.
virtual DtExerciseConn * exerciseConn ()
 Get the exercise connection ptr.
virtual void clearExerciseConn ()
 Sets the exercise conn to NULL.
virtual DtInterfaceContentFactoryfactory () const
 Get/Set the factory used for creating interface content msgs.
virtual void setFactory (DtInterfaceContentFactory *fact)
virtual
DtInterfaceMessageExecutive
messageExecutive () const
 Get the message executive ptr.
virtual const DtSimulationAddress & messageAddress () const
 Get the address that should be used as the sender for all messages originating from the backend.
virtual void receiveMessage (DtDataInteraction *dataInter)
 Process a received data interaction from the network.
virtual bool sendMessage (const DtSimInterfaceMessage &message)
 Send a sim interface message.
virtual void addMessageCallback (int type, DtMessageCallbackFcn fcn, void *usrData)
 Add/Remove interface message callback functions.
virtual void removeMessageCallback (int type, DtMessageCallbackFcn fcn, void *usrData)
virtual bool sendSplitContent (const char *pContentBuffer, unsigned int nBufferSize, int nContentType, const DtSimulationAddress &sender, const DtSimulationAddress &recipient, DtSplitMessageHandle &msgHandleReturn)
 Sends oversize message content as multiple DtSimInterfaceMessages with DtIfSplitContent.
virtual bool sendSplitContent (const char *pContentBuffer, unsigned int nBufferSize, int nContentType, const DtSimulationAddress &sender, const DtSimulationAddress &recipient)
 Sends oversize message content as multiple DtSimInterfaceMessages with DtIfSplitContent.
virtual bool isQueuedMessage (const DtSimInterfaceMessage &message)
 Determines if a message should get put into the receive queue.
virtual void processReceiveMessageQueue ()
 Receives any interface messages we have in the myReceiveMessageQueue.
virtual void setQueueMessages (bool)
 Set to false to not queue messages in HLA. Default is true.
virtual bool queueMessages () const
virtual void processReassembledContent (const char *pContent, int nContentSize, int nContentType, const DtSimulationAddress &messageIdSender, int messageIdNumber, const DtSimulationAddress &recipient)
 Reconstitute a message based on previously split content.
virtual bool receiveMessage (const DtSimInterfaceContent &content)
 Call this to receive a message internally -- this will not go out over the network.

Static Public Member Functions

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

Protected Member Functions

bool sendNormalMessage (const DtSimInterfaceMessage &message)
 Send a message, called from sendMessage if message content does not exceed maximum size.
 DtVrfMessageInterface (const DtVrfMessageInterface &orig)
DtVrfMessageInterfaceoperator= (const DtVrfMessageInterface &orig)
 DtVrfMessageInterface ()

Static Protected Member Functions

static bool matchPattern (const DtSimulationAddress &address, const DtSimulationAddress &pattern)
 Utiltiy function that returns true if the address matches the given pattern.
static void postDrainCallback (void *usr)
 calls processSendMessageQueue();

Protected Attributes

DtInterfaceContentFactorymyContentFactory
DtInterfaceMessageExecutivemyMessageExecutive
DtExerciseConn * myExerciseConnection
bool myCreatedInterfaceFactory
DtU32 mySequenceNumber
DtU32 mySessionId
DtSplitMessageCollectormySplitMessageCollector
DtU32 myVrfMessageVersionSupported
 The vrf version is set (by default) from the values found in version.h.
DtList myCallbacks
DtList myReceiveMessageQueue
 Used to hold interface messages which will cause response messages to be sent until after drainInput, when they can safely be sent (with the DMSO RTI).
bool myQueueMessages
 Set to false to not queue messages in HLA. Default is true.

Constructor & Destructor Documentation

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

Contructor.

destructor


Member Function Documentation

virtual bool DtVrfMessageInterface::init ( ) [virtual]

Creates all the other pieces.

Reimplemented in DtVrfMsgPrinter.

Creator functions.

These can be overridden to create managed objects that are derived from the base objects we provide.

Replaces mySplitMessageCollector with a new one.

Send a message.

virtual bool DtVrfMessageInterface::createAndDeliverMessage ( const DtSimulationAddress &  recipient,
const DtSimInterfaceContent content,
bool  overrideTimestampOrder = true 
) [virtual]
virtual bool DtVrfMessageInterface::getContentFromNet ( DtDataInteraction *  dataInter,
DtSimInterfaceContent *&  content 
) const [virtual]

Create/set objects based on DtDataInteraction information.

virtual bool DtVrfMessageInterface::getContentFromNet ( unsigned  nBufferSize,
int  nContentType,
const char *  pContentBuffer,
DtSimInterfaceContent *&  content 
) const [virtual]
virtual bool DtVrfMessageInterface::setContentForNet ( DtDataInteraction *  dataInter,
DtSimInterfaceContent content 
) const [virtual]
virtual void DtVrfMessageInterface::setSequence ( DtU32  num) [virtual]

Get/Set the sequence number.

DtU32 DtVrfMessageInterface::sequence ( ) const [inline, virtual]

References mySequenceNumber.

void DtVrfMessageInterface::setSessionId ( DtU32  num) [inline, virtual]

Get/Set the session id.

References mySessionId.

DtU32 DtVrfMessageInterface::sessionId ( ) const [inline, virtual]

References mySessionId.

void DtVrfMessageInterface::setVrfMessageVersionSupported ( DtU32  num) [inline, virtual]

Get/Set the vrf message version.

References myVrfMessageVersionSupported.

DtU32 DtVrfMessageInterface::vrfMessageVersionSupported ( ) const [inline, virtual]
virtual bool DtVrfMessageInterface::isMessageVrfVersionSupported ( DtDataInteraction *  ) const [virtual]

Returns true if this data interaction passes the message version check.

This will be true if: 1) The Major, Minor and Extra version info match between the version of the message interface or 2) Any installed version check callbacks return true. NOTE that it is important that if a callback returns true it is sure that it will not have a detremental effect in the system. Returning true to support a message that might otherwise would be ignored for version reasons could cause system instability

Note that if a data interaction does not have a version record, the version of that interaction will be assumed to be 0.

Register vrf message interface version valid.

bool DtVrfMessageInterface::isVrfMessageVersionTransparentMessageType ( int  messageType) const [inline, virtual]

Returns true if the given message type is message verson transparent (i.e.

delivered to all message interfaces, regardless of their vrf message version)

References DtVrfObjectDataMessageType.

bool DtVrfMessageInterface::isSessionTransparentMessageType ( int  messageType) [inline, virtual]

Returns true if the given message type is session transparent (i.e.

delivered to all message interfaces, regardless of their session ID)

References DtVrfObjectDataMessageType.

DtExerciseConn * DtVrfMessageInterface::exerciseConn ( ) [inline, virtual]

Get the exercise connection ptr.

References myExerciseConnection.

void DtVrfMessageInterface::clearExerciseConn ( ) [inline, virtual]

Sets the exercise conn to NULL.

References myExerciseConnection.

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

Get the message executive ptr.

virtual const DtSimulationAddress& DtVrfMessageInterface::messageAddress ( ) const [virtual]

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

virtual void DtVrfMessageInterface::receiveMessage ( DtDataInteraction *  dataInter) [virtual]

Process a received data interaction from the network.

Reimplemented in DtVrfMsgPrinter.

virtual bool DtVrfMessageInterface::sendMessage ( const DtSimInterfaceMessage message) [virtual]

Send a sim interface message.

virtual void DtVrfMessageInterface::addMessageCallback ( int  type,
DtMessageCallbackFcn  fcn,
void *  usrData 
) [virtual]

Add/Remove interface message callback functions.

virtual void DtVrfMessageInterface::removeMessageCallback ( int  type,
DtMessageCallbackFcn  fcn,
void *  usrData 
) [virtual]
virtual bool DtVrfMessageInterface::sendSplitContent ( const char *  pContentBuffer,
unsigned int  nBufferSize,
int  nContentType,
const DtSimulationAddress &  sender,
const DtSimulationAddress &  recipient,
DtSplitMessageHandle msgHandleReturn 
) [virtual]

Sends oversize message content as multiple DtSimInterfaceMessages with DtIfSplitContent.

This is called from sendMessage() when the size of content will exceed the maximum allowable packet size. sendSplitContent() will break up the buffer into chunks and transmit them as DtIfSplitContent, to be reconstructed on the receiving end.

Returns:
true if success, false if failure.
Parameters:
[in]pContentBufferThe original content, assumed to be oversized.
[in]nBufferSizeThe size of pContentBuffer in bytes.
[in]nContentTypeThe original content type.
[in]senderThe simulator from which the message is being sent.
[in]recipientThe simulator(s) to which the message should be sent.
[out]msgHandleReturnWill contain information about how the DtIfSplitContent messages were prepared.
virtual bool DtVrfMessageInterface::sendSplitContent ( const char *  pContentBuffer,
unsigned int  nBufferSize,
int  nContentType,
const DtSimulationAddress &  sender,
const DtSimulationAddress &  recipient 
) [virtual]

Sends oversize message content as multiple DtSimInterfaceMessages with DtIfSplitContent.

This call will redirect to sendSplitContent(...), above.

virtual bool DtVrfMessageInterface::isQueuedMessage ( const DtSimInterfaceMessage message) [virtual]

Determines if a message should get put into the receive queue.

Receives any interface messages we have in the myReceiveMessageQueue.

This function should only be called by postDrainCallback(). WARNING: Calling this function from within an RTI callback will cause the DMSO RTI to throw concurrent modification exceptions. Use with caution and be sure to test with the DMSO RTI after adding a call to this function.

virtual void DtVrfMessageInterface::setQueueMessages ( bool  ) [virtual]

Set to false to not queue messages in HLA. Default is true.

virtual bool DtVrfMessageInterface::queueMessages ( ) const [virtual]
virtual void DtVrfMessageInterface::processReassembledContent ( const char *  pContent,
int  nContentSize,
int  nContentType,
const DtSimulationAddress &  messageIdSender,
int  messageIdNumber,
const DtSimulationAddress &  recipient 
) [virtual]

Reconstitute a message based on previously split content.

static void DtVrfMessageInterface::netMessageCallback ( DtDataInteraction *  dataInter,
void *  usr 
) [static]
virtual bool DtVrfMessageInterface::receiveMessage ( const DtSimInterfaceContent content) [virtual]

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

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

Send a message, called from sendMessage if message content does not exceed maximum size.

static bool DtVrfMessageInterface::matchPattern ( const DtSimulationAddress &  address,
const DtSimulationAddress &  pattern 
) [static, protected]

Utiltiy function that returns true if the address matches the given pattern.

Returns true for the following cases: address.site == -1 && address.applicationId == -1 address.site == pattern.site && address.applicationId == -1 address.site == pattern.site && address.applicationId == pattern.applicationId

returns false otherwise

static void DtVrfMessageInterface::postDrainCallback ( void *  usr) [static, protected]

calls processSendMessageQueue();

DtVrfMessageInterface& DtVrfMessageInterface::operator= ( const DtVrfMessageInterface orig) [protected]

Member Data Documentation

DtExerciseConn* DtVrfMessageInterface::myExerciseConnection [protected]

Referenced by clearExerciseConn(), and exerciseConn().

Referenced by sequence().

Referenced by sessionId(), and setSessionId().

Referenced by splitMessageCollector().

The vrf version is set (by default) from the values found in version.h.

Call setVrfMessageVersionSupported after construction to change to a new version

Referenced by setVrfMessageVersionSupported(), and vrfMessageVersionSupported().

Used to hold interface messages which will cause response messages to be sent until after drainInput, when they can safely be sent (with the DMSO RTI).

Set to false to not queue messages in HLA. Default is true.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)