MAK RTIspy API Documentation for HLA Evolved
 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 Member Functions | Protected Attributes
DtSyncPointMsg Class Reference
+ Inheritance diagram for DtSyncPointMsg:
+ Collaboration diagram for DtSyncPointMsg:

Public Member Functions

 DtSyncPointMsg (DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Constructor.
 DtSyncPointMsg (DtSyncMsgType kind, DtFederateHandle id, DtSyncPointStatus statusValue, char const *name, char const *tag, const DtFederateHandleSet *set=NULL, const DtFederateHandleSet *unsuccessfulSet=NULL, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 DtSyncPointMsg (const DtNetSyncMsg *netRepMsg, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Constructor.
virtual ~DtSyncPointMsg ()
 Deconstructor.
virtual DtRtiMsgclone (bool copy=true) const
 Return a copy/empty object of the same type as this.
virtual void set (DtSyncMsgType kind, DtFederateHandle id, DtSyncPointStatus statusValue, char const *name, char const *tag, DtFederateHandleSet const *set=NULL, DtFederateHandleSet const *unsuccessfulSet=NULL)
 Set all fields simultaneously.
virtual void setSyncMsgKind (DtSyncMsgType kind)
 Set/Get synchronization message kind.
virtual DtSyncMsgType syncMsgKind () const
virtual void setFederateId (DtFederateHandle id)
 Set/Get federate id.
virtual DtFederateHandle federateId () const
virtual void setSyncPointStatus (DtSyncPointStatus statusValue)
 Set/Get sync point status.
virtual DtSyncPointStatus syncPointStatus () const
virtual void setSyncPointName (char const *name)
 Set/Get synchronization point name.
virtual char const * syncPointName () const
virtual void setTag (char const *tag)
 Set/Get tag.
virtual char const * tag () const
virtual void setFederates (const DtFederateHandleSet *set)
 Set the set of federate handles to be encoded in the message.
virtual DtFederateHandleSet const * federates () const
 Returns the set of federates encoded in the message.
virtual void getFederates (DtFederateHandleSet *set) const
 Alternate way to get the set of federates contained in the message.
virtual int numFederates () const
 Get number of federates.
virtual void getUnsuccessfulFederates (DtFederateHandleSet *set) const
 Alternate way to get the set of federates contained in the message.
virtual void setUnsuccessfulFederates (const DtFederateHandleSet *set)
 Set the set of unsuccessfully synched federate handles to be encoded in the message.
virtual DtFederateHandleSet const * unsuccessfulFederates () const
 Returns the set of unsuccessfully synched federates encoded in the message.
virtual int numUnsuccessfulFederates () const
 Get number of unsuccessfully synched federates.
virtual void printData (DtLogicalTimeFactory *logicalTimeFactory) const
 Print the data section.
- Public Member Functions inherited from DtRtiMsg
virtual ~DtRtiMsg ()
 Destructor.
virtual DtRtiMsgcloneWithTransport (bool copy=true) const
 Return a copy/empty object of the same type as this using clone and set the transport type from the host message.
virtual DtNetMsgHeadernetHeader () const
 Get header of network representation.
virtual int version () const
 Return the message version.
virtual bool isValidVersion () const
 Returns bool: message version is valid?
virtual void setFedEx (const MAKRti::DtString &name)
 All RTI messages contain information to identify which federation execution the message applies to.
virtual void setFedEx (int handle)
 Set federation execution identifier as a handle.
virtual bool isForExec (const MAKRti::DtString &execName, int execHandle) const
 Returns true if the current message belongs to the indicated federation execution, false otherwise.
virtual DtRtiMsgKind msgKind () const
 Get the message kind.
virtual const char * kindString () const
 Returns the message kind string name.
virtual bool isConstrained () const
 Return boolean: message type can be time constrained?
virtual bool isAllowedDuringSave () const
 Return boolean: message type can be processed during save?
virtual void setTime (const RTI::FedTime &time)
 Set/Get time Used in timestamped messages.
virtual RTI::FedTime const * time (DtLogicalTimeFactory *fedTimeFactory) const
virtual bool hasTime () const
 Returns true if time field is valid.
virtual void setSerialNumber (unsigned long serialNumberValue)
 Set/Get event retraction serial number Used in timestamped messages.
virtual unsigned long serialNumber () const
virtual void setTransportType (DtTransportHandle type)
 Set/Get transport type.
virtual DtTransportHandle transportType () const
virtual DtOrderHandle orderType () const
 This base implementation always returns recieve order.
virtual bool isMetadataPresent () const
 Test if metadata has been added to a DtRtiMsg object.
virtual bool addMetadata (caddr_t *mtdAddr, unsigned int size, unsigned int *alignPad, unsigned int *headerPad=NULL)
 Allocate space for next block of metadata.
virtual void removeMetadata (unsigned int size)
 Update the size of the message when metadata has been removed.
bool isInteractionMsgType () const
 Utility functions, check the message type against known interaciton/update message types.
bool isUpdateMsgType () const
virtual void print (DtLogicalTimeFactory *logicalTimeFactory) const
 Printing functions.
virtual void printHeader (DtLogicalTimeFactory *logicalTimeFactory) const
virtual void printTime (const char *label, RTI::FedTime const *timeValue) const
 Print the given time.
virtual void printInterval (const char *label, RTI::FedTime const *intervalValue) const
 Print the interval.
virtual int status () const
 Returns MSG_STATUS_OK if OK, a reason enumeration otherwise.
virtual const MAKRti::DtString fedExName () const
 These two functions should be avoided in favor of isForExec().
virtual int fedExHandle () const
 Get the federation execution identifier as a handle Returns 0 if the identifier is being represented as a name.
virtual void setFederateHandle (DtFederateHandle handle)
 Set/Get federate handle.
virtual DtFederateHandle federateHandle () const
 Set/Get federate handle.
virtual void setSequenceNumber (unsigned long value)
 Set/Get message sequence number.
virtual unsigned long sequenceNumber () const
 Set/Get message sequence number.
virtual void setServiceCallNumber (unsigned long value)
 Set/Get service call number.
virtual unsigned long serviceCallNumber () const
 Set/Get service call number.
virtual void setTriggerMessageNumber (unsigned long value)
 Set/Get trigger message sequence number (i.e., the message being processed that triggered this message being sent).
virtual unsigned long triggerMessageNumber () const
 Set/Get trigger message sequence number (i.e., the message being processed that triggered this message being sent).

Static Public Member Functions

static DtRtiMsgcreate (const DtNetMsgHeader *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Creator.
static DtRtiMsgcreate (DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Creator.
static void addCallback (DtConnectionMgr *conn, DtSyncPointCb cb, void *usr)
 Callback management.
static void removeCallback (DtConnectionMgr *conn, DtSyncPointCb cb, void *usr)
- Static Public Member Functions inherited from DtRtiMsg
static const DtNetMsgHeadernetHeader (const void *buffer)
 Extracts the header network representation from the buffer.
static const char * kindToString (DtRtiMsgKind kind)
 Returns the name of the message, by kind enumeration.
static const char * kindString (const void *buffer)
 Extracts the message kind from the given buffer and returns its string name.
static const DtRtiMsgKind msgKind (const void *buffer)
 Extracts the message kind from the given buffer.
static unsigned int version (const void *buffer)
 Extracts the message version form the given buffer.
static unsigned int fedExHandle (const void *buffer)
 Extracts the message fedEx handle form the given buffer (0 if lightweight fedEx name)
static DtFederateHandle federateHandle (const void *buffer)
 Extracts the message federate handle form the given buffer.
static unsigned long sequenceNumber (const void *buffer)
 Extracts the message sequence number form the given buffer.
static void setDefaultRegionSet (unsigned long defaultRegionSet)
 Set the default region set handle.
static void setUse32BitsForValueSize (bool use32BitsForValueSizeEnabled)
 Set/Get flag to enable use of 32 bit size field for attribute/parameter values.
static bool use32BitsForValueSize ()
static void setSmartForwardingEnabled (bool enabled)
 Set/Get is SmartForwarding enabled?
static bool smartForwardingEnabled ()

Protected Member Functions

virtual DtNetSyncMsgnetSyncMsg ()
 The network representation.
virtual const DtNetSyncMsgnetSyncMsg () const
virtual DtNetU32 * handleArray ()
 Pointers to various fields of the net message.
virtual DtNetU32 * unsuccessfulHandleArray ()
virtual char * tagPtr ()
virtual char * namePtr ()
virtual int handleArraySize () const
 Sizes of various fields of the net message.
virtual int unsuccessfulHandleArraySize () const
virtual int tagFieldSize () const
virtual int nameFieldSize () const
virtual DtRtiMsgKind internalDtRtiMsgKind ()
 Returns the kind of a synchronization msg.
virtual int minSize () const
 Returns the minimum size of a message, including the header.
DtSyncPointMsgself () const
 Casts away constness. Use with caution.
- Protected Member Functions inherited from DtRtiMsg
 DtRtiMsg ()
 Constructor.
virtual void sizeChanged (int size)
 Called whenever size is changed using changeSize, or insert/deleteBytes.
void initDtRtiMsg (int size, DtRtiMsgKind msgKindVal, DtBufferPtr buffer)
 Called by ctor, so not virtual.
void initDtRtiMsg (const void *initial, int size, DtBufferPtr buffer)
void initDtRtiMsg (const DtNetMsgHeader *header, DtBufferPtr buffer)
virtual void adjustBytes (int offset, int numBytes)
 Adjust numBytes bytes at the indicated offset in the net rep.
virtual void adjustBytes (void *address, int numBytes)
 Adjust the numBytes starting at the indicated addres.

Protected Attributes

char * myTag
MAKRti::DtString myName
DtFederateHandleSetmySet
DtFederateHandleSetmyUnsuccessfulSet
- Protected Attributes inherited from DtRtiMsg
DtTransportHandle myTransportType
DtOrderHandle myOrderType
RTI::FedTimemyFedTime
bool myTimeIsValid
bool myConstrained
bool myAllowedDuringSave
unsigned long mySerialNumber
unsigned long myServiceCallNumber
unsigned long myTriggerMessage

Additional Inherited Members

- Static Public Attributes inherited from DtRtiMsg
static unsigned long theDefaultRegionSetHandle = 0
static const char * theDefaultTag = NULL
- Static Protected Attributes inherited from DtRtiMsg
static bool theUse32BitsForValueSize = false
static bool theSmartForwardingEnabled = false

Constructor & Destructor Documentation

DtSyncPointMsg::DtSyncPointMsg ( DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER)

Constructor.

References DtRtiMsg::initDtRtiMsg(), internalDtRtiMsgKind(), and minSize().

Referenced by clone(), and create().

DtSyncPointMsg::DtSyncPointMsg ( DtSyncMsgType  kind,
DtFederateHandle  id,
DtSyncPointStatus  statusValue,
char const *  name,
char const *  tag,
const DtFederateHandleSet set = NULL,
const DtFederateHandleSet unsuccessfulSet = NULL,
DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER 
)
DtSyncPointMsg::DtSyncPointMsg ( const DtNetSyncMsg netRepMsg,
DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER 
)

Constructor.

References DtNetSyncMsg::header, and DtRtiMsg::initDtRtiMsg().

DtSyncPointMsg::~DtSyncPointMsg ( )
virtual

Deconstructor.

References mySet, and myTag.

Member Function Documentation

void DtSyncPointMsg::addCallback ( DtConnectionMgr conn,
DtSyncPointCb  cb,
void *  usr 
)
static
DtRtiMsg * DtSyncPointMsg::clone ( bool  copy = true) const
virtual

Return a copy/empty object of the same type as this.

Implements DtRtiMsg.

References DtSyncPointMsg(), and netSyncMsg().

DtRtiMsg * DtSyncPointMsg::create ( const DtNetMsgHeader initial,
DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER 
)
static

Creator.

References DtSyncPointMsg().

DtRtiMsg * DtSyncPointMsg::create ( DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER)
static

Creator.

References DtSyncPointMsg().

DtFederateHandle DtSyncPointMsg::federateId ( ) const
virtual
DtFederateHandleSet const * DtSyncPointMsg::federates ( ) const
virtual

Returns the set of federates encoded in the message.

The object returned is a reference to internal memory, and is only valid until the next time federates() is called.

References getFederates(), mySet, NULL, and numFederates().

Referenced by DtFedExec::createSyncPoint(), printData(), DtFedExec::processRegisterSyncPoint(), and DtRtiExecFederateMgr::processSyncPointMsg().

void DtSyncPointMsg::getFederates ( DtFederateHandleSet set) const
virtual

Alternate way to get the set of federates contained in the message.

After this call, set will contain the appropriate federate set. Make sure that set is large enough to hold numFederates() handles.

References handleArray(), and numFederates().

Referenced by federates(), and DtRtiExecFederateMgr::processSyncPointMsg().

void DtSyncPointMsg::getUnsuccessfulFederates ( DtFederateHandleSet set) const
virtual

Alternate way to get the set of federates contained in the message.

After this call, set will contain the appropriate federate set. Make sure that set is large enough to hold numFederates() handles.

References numUnsuccessfulFederates(), and unsuccessfulHandleArray().

Referenced by DtRtiExecFederateMgr::processSyncPointMsg(), and unsuccessfulFederates().

DtNetU32 * DtSyncPointMsg::handleArray ( )
protectedvirtual

Pointers to various fields of the net message.

References netSyncMsg().

Referenced by getFederates(), setFederates(), and unsuccessfulHandleArray().

int DtSyncPointMsg::handleArraySize ( ) const
protectedvirtual

Sizes of various fields of the net message.

References netSyncMsg(), and DtNetSyncMsg::numHandles.

Referenced by unsuccessfulHandleArray().

DtRtiMsgKind DtSyncPointMsg::internalDtRtiMsgKind ( )
protectedvirtual

Returns the kind of a synchronization msg.

Implements DtRtiMsg.

References DtSyncPointMsgKind.

Referenced by DtSyncPointMsg().

int DtSyncPointMsg::minSize ( ) const
protectedvirtual

Returns the minimum size of a message, including the header.

Referenced by DtSyncPointMsg().

int DtSyncPointMsg::nameFieldSize ( ) const
protectedvirtual
char * DtSyncPointMsg::namePtr ( )
protectedvirtual

References tagFieldSize(), and tagPtr().

Referenced by setSyncPointName().

DtNetSyncMsg * DtSyncPointMsg::netSyncMsg ( )
protectedvirtual
const DtNetSyncMsg * DtSyncPointMsg::netSyncMsg ( ) const
protectedvirtual
int DtSyncPointMsg::numFederates ( ) const
virtual
int DtSyncPointMsg::numUnsuccessfulFederates ( ) const
virtual

Get number of unsuccessfully synched federates.

References netSyncMsg(), and DtNetSyncMsg::numUnsuccessfulHandles.

Referenced by getUnsuccessfulFederates(), setUnsuccessfulFederates(), and unsuccessfulFederates().

void DtSyncPointMsg::printData ( DtLogicalTimeFactory logicalTimeFactory) const
virtual
void DtSyncPointMsg::removeCallback ( DtConnectionMgr conn,
DtSyncPointCb  cb,
void *  usr 
)
static
DtSyncPointMsg * DtSyncPointMsg::self ( ) const
inlineprotected

Casts away constness. Use with caution.

void DtSyncPointMsg::set ( DtSyncMsgType  kind,
DtFederateHandle  id,
DtSyncPointStatus  statusValue,
char const *  name,
char const *  tag,
DtFederateHandleSet const *  set = NULL,
DtFederateHandleSet const *  unsuccessfulSet = NULL 
)
virtual
void DtSyncPointMsg::setFederateId ( DtFederateHandle  id)
virtual

Set/Get federate id.

References DtNetSyncMsg::id, and netSyncMsg().

Referenced by DtSyncPointMsg(), and set().

void DtSyncPointMsg::setFederates ( const DtFederateHandleSet set)
virtual

Set the set of federate handles to be encoded in the message.

References handleArray(), rti1516e::insertBytes(), netSyncMsg(), numFederates(), DtNetSyncMsg::numHandles, and set().

Referenced by DtSyncPointMsg(), and set().

void DtSyncPointMsg::setSyncMsgKind ( DtSyncMsgType  kind)
virtual

Set/Get synchronization message kind.

References DtNetSyncMsg::kind, and netSyncMsg().

Referenced by DtSyncPointMsg(), and set().

void DtSyncPointMsg::setSyncPointName ( char const *  name)
virtual

Set/Get synchronization point name.

References rti1516e::insertBytes(), nameFieldSize(), namePtr(), DtNetSyncMsg::nameSize, and netSyncMsg().

Referenced by DtSyncPointMsg(), and set().

void DtSyncPointMsg::setSyncPointStatus ( DtSyncPointStatus  statusValue)
virtual

Set/Get sync point status.

References netSyncMsg(), and DtNetSyncMsg::status.

Referenced by DtSyncPointMsg(), and set().

void DtSyncPointMsg::setTag ( char const *  tag)
virtual
void DtSyncPointMsg::setUnsuccessfulFederates ( const DtFederateHandleSet set)
virtual

Set the set of unsuccessfully synched federate handles to be encoded in the message.

References rti1516e::insertBytes(), netSyncMsg(), numUnsuccessfulFederates(), DtNetSyncMsg::numUnsuccessfulHandles, set(), and unsuccessfulHandleArray().

Referenced by DtSyncPointMsg(), and set().

DtSyncMsgType DtSyncPointMsg::syncMsgKind ( ) const
virtual
const char * DtSyncPointMsg::syncPointName ( ) const
virtual
DtSyncPointStatus DtSyncPointMsg::syncPointStatus ( ) const
virtual
const char * DtSyncPointMsg::tag ( ) const
virtual
int DtSyncPointMsg::tagFieldSize ( ) const
protectedvirtual

References netSyncMsg(), and DtNetSyncMsg::tagSize.

Referenced by namePtr(), setTag(), and tag().

char * DtSyncPointMsg::tagPtr ( )
protectedvirtual
DtFederateHandleSet const * DtSyncPointMsg::unsuccessfulFederates ( ) const
virtual

Returns the set of unsuccessfully synched federates encoded in the message.

The object returned is a reference to internal memory, and is only valid until the next time federates() is called.

References getUnsuccessfulFederates(), myUnsuccessfulSet, NULL, and numUnsuccessfulFederates().

DtNetU32 * DtSyncPointMsg::unsuccessfulHandleArray ( )
protectedvirtual
int DtSyncPointMsg::unsuccessfulHandleArraySize ( ) const
protectedvirtual

Member Data Documentation

MAKRti::DtString DtSyncPointMsg::myName
protected

Referenced by syncPointName().

DtFederateHandleSet* DtSyncPointMsg::mySet
protected

Referenced by federates(), and ~DtSyncPointMsg().

char* DtSyncPointMsg::myTag
protected

Referenced by tag(), and ~DtSyncPointMsg().

DtFederateHandleSet* DtSyncPointMsg::myUnsuccessfulSet
protected

Referenced by unsuccessfulFederates().


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

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)