MAK RTIspy API Documentation for HLA 1516
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtRtiMsgQueue Class Reference

Sorted list for queueing messages in time stamped order. More...

+ Inheritance diagram for DtRtiMsgQueue:
+ Collaboration diagram for DtRtiMsgQueue:

Public Member Functions

 DtRtiMsgQueue (DtLogicalTimeFactory *fedTimeFactory)
virtual ~DtRtiMsgQueue ()
virtual bool timeRegulating ()
 Set/Get status of time regulation/constraint.
virtual void setTimeRegulating (bool isTimeRegulating)
virtual bool timeConstrained ()
virtual void setTimeConstrained (bool isTimeConstrained)
virtual bool asynchronous ()
virtual void setAsynchronous (bool isAsynchronous)
virtual bool timeAvailable ()
virtual void setTimeAvailable (bool isTimeAvailable)
virtual bool timeAdvancing ()
virtual void setTimeAdvancing (bool isTimeAdvancing)
virtual const RTI::FedTimetimestamp ()
 Set/Get current federate time.
virtual void setTimestamp (const RTI::FedTime &federateTime)
virtual const RTI::FedTimelookahead ()
 Set/Get current federate lookahead.
virtual void setLookahead (const RTI::FedTime &lookaheadValue)
virtual const RTI::FedTimegalt ()
 Set/Get greatest allowed logical time When in the time advancing state messages with timestamps less than this value (and greater than logical time) are passed through without being queued.
virtual void setGalt (const RTI::FedTime &federateTime)
virtual bool queueMsg (DtRtiMsg const &msg)
 A clone of the message is added to queue if the queue is time constrained, message is timestamp order, and message timestamp is greater than queue timestamp.
virtual DtRtiMsgremoveMsg (const DtMessageRetractionHandle &retractHandle)
 Return and remove the message with the supplied retraction handle.
virtual bool deleteMsg (const DtMessageRetractionHandle &retractHandle)
 Remove and delete the message with the supplied retraction handle Return boolean: message was in queue and deleted?
virtual void deleteMsgs (DtFederateHandle federateHandle)
 Remove and delete the messages with the supplied federate handle.
virtual void deleteAll ()
 Remove and delete all the messages.
virtual DtRtiMsgnextMsg (const RTI::FedTime &timestamp)
 Return and remove the next message with a lower timestamp.
virtual DtRtiMsgnextTsoMsg (const RTI::FedTime &timestamp)
 Return and remove the next TSO message with a lower timestamp.
virtual DtRtiMsgremoveNextTsoMsg ()
 Remove the next TSO message.
virtual DtRtiMsgpeekNextTsoMsg ()
 Return but do not remove the next TSO message.
unsigned int roQueueLength () const
- Public Member Functions inherited from DtSortedList
 DtSortedList (DtSortOrder sortOrderVal=DtSortOrderAscending)
 Constructor.
virtual ~DtSortedList ()
 Destructor - does NOT free memory of data associated with the items.
 DtSortedList (const DtSortedList &orig)
 Copy constructor.
DtSortedListoperator= (const DtSortedList &orig)
 Assignment operator.
virtual void setSortOrder (DtSortOrder sortOrderValue)
 Set/Get sort order.
virtual DtSortOrder sortOrder () const
virtual DtSortedListItemfirst () const
 Return first and last item on the list.
virtual DtSortedListItemlast () const
unsigned count () const
 Returns the number of elements in the list.
virtual bool compareItems (const DtSortedListItem &firstItem, const DtSortedListItem &secondItem) const
 Compare the two items based on sort order and return true if first comes first in order to second.
virtual void * remove (DtSortedListItem *item)
 Remove an element from the list.
virtual void removeAll ()
 Calls remove for all elements in the list.
virtual DtSortedListItemitemLookup (void *data) const
 Returns the DtSortedListItem envelope object containing the indicated data element.
virtual void reverseSortOrder ()
 Reverses sort order of list.
virtual void printData (DtSortOrder order=DtSortOrderAscending)
 Print the list.

Protected Member Functions

virtual DtSortedListItemnewItem (void *data)
 Create a new DtMessageItem envelope for the data to be inserted into the list.
 DtRtiMsgQueue (const DtRtiMsgQueue &orig)
DtRtiMsgQueueoperator= (DtRtiMsgQueue const &orig)
virtual DtSortedListItemadd (void *data)
 Only internal methods should use this non typed add.
- Protected Member Functions inherited from DtSortedList
virtual void addToList (DtSortedListItem *item, DtSortedListItem *before)
 Add first item to the list before second.
virtual void removeFromList (DtSortedListItem *item)
 Remove item from the list. Does NOT delete the data contained in item.
virtual void reposition (DtSortedListItem *item)
 An item's data for sorting has changed. Reposition it within the list.
virtual void repositionForward (DtSortedListItem *item, DtSortedListItem *positionItem)
 An item's data for sorting has changed.
virtual void repositionBackward (DtSortedListItem *item, DtSortedListItem *positionItem)
 An item's data for sorting has changed.
virtual void insertBefore (DtSortedListItem *item, DtSortedListItem *positionItem)
 Insert the first item before the second.
virtual void insertAfter (DtSortedListItem *item, DtSortedListItem *positionItem)
 Insert the first item after the second.

Protected Attributes

MAKRti::DtList myRoList
bool myTimeConstrainedEnabled
bool myTimeRegulatingEnabled
bool myAsynchronous
bool myTimeAvailable
bool myTimeAdvancing
DtLogicalTimeFactorymyLogicalTimeFactory
std::auto_ptr< RTI::FedTimemyTime
std::auto_ptr< RTI::FedTimemyLookahead
std::auto_ptr< RTI::FedTimemyGalt
- Protected Attributes inherited from DtSortedList
DtSortedListItemmyFirst
DtSortedListItemmyLast
unsigned myCount
DtSortOrder mySortOrder

Detailed Description

Sorted list for queueing messages in time stamped order.

Constructor & Destructor Documentation

DtRtiMsgQueue::DtRtiMsgQueue ( DtLogicalTimeFactory fedTimeFactory)
DtRtiMsgQueue::~DtRtiMsgQueue ( )
virtual

References deleteAll().

DtRtiMsgQueue::DtRtiMsgQueue ( const DtRtiMsgQueue orig)
protected

Member Function Documentation

DtSortedListItem * DtRtiMsgQueue::add ( void *  data)
protectedvirtual

Only internal methods should use this non typed add.

Reimplemented from DtSortedList.

Referenced by queueMsg().

bool DtRtiMsgQueue::asynchronous ( )
inlinevirtual

References myAsynchronous.

Referenced by queueMsg().

void DtRtiMsgQueue::deleteAll ( )
virtual

Remove and delete all the messages.

References DtSortedList::first(), myRoList, and NULL.

Referenced by ~DtRtiMsgQueue().

bool DtRtiMsgQueue::deleteMsg ( const DtMessageRetractionHandle retractHandle)
virtual

Remove and delete the message with the supplied retraction handle Return boolean: message was in queue and deleted?

References removeMsg().

void DtRtiMsgQueue::deleteMsgs ( DtFederateHandle  federateHandle)
virtual

Remove and delete the messages with the supplied federate handle.

References DtSortedListItem::data(), DtRtiMsg::federateHandle(), DtSortedList::first(), DtSortedListItem::next(), and NULL.

const RTI::FedTime & DtRtiMsgQueue::galt ( )
inlinevirtual

Set/Get greatest allowed logical time When in the time advancing state messages with timestamps less than this value (and greater than logical time) are passed through without being queued.

Time available includes equal values.

Referenced by queueMsg().

const RTI::FedTime & DtRtiMsgQueue::lookahead ( )
inlinevirtual

Set/Get current federate lookahead.

DtSortedListItem * DtRtiMsgQueue::newItem ( void *  data)
protectedvirtual

Create a new DtMessageItem envelope for the data to be inserted into the list.

Reimplemented from DtSortedList.

References myLogicalTimeFactory.

DtRtiMsg * DtRtiMsgQueue::nextMsg ( const RTI::FedTime timestamp)
virtual

Return and remove the next message with a lower timestamp.

References NULL.

DtRtiMsg * DtRtiMsgQueue::nextTsoMsg ( const RTI::FedTime timestamp)
virtual

Return and remove the next TSO message with a lower timestamp.

References DtSortedListItem::data(), NULL, and DtRtiMsg::time().

DtRtiMsgQueue & DtRtiMsgQueue::operator= ( DtRtiMsgQueue const &  orig)
protected
DtRtiMsg * DtRtiMsgQueue::peekNextTsoMsg ( )
virtual

Return but do not remove the next TSO message.

References DtSortedListItem::data(), DtSortedList::first(), and NULL.

bool DtRtiMsgQueue::queueMsg ( DtRtiMsg const &  msg)
virtual

A clone of the message is added to queue if the queue is time constrained, message is timestamp order, and message timestamp is greater than queue timestamp.

Return boolean: message was added to queue?

References add(), asynchronous(), DtRtiMsg::cloneWithTransport(), galt(), DtRtiMsg::isConstrained(), myLogicalTimeFactory, myRoList, myTime, DtRtiMsg::orderType(), printableString(), DtRtiMsg::time(), timeAdvancing(), timeAvailable(), and timeConstrained().

Referenced by DtConnectionMgr::handleMsg(), DtConnectionMgr::processPendingMsg(), and DtConnectionMgr::sendLoopback().

DtRtiMsg * DtRtiMsgQueue::removeMsg ( const DtMessageRetractionHandle retractHandle)
virtual
DtRtiMsg * DtRtiMsgQueue::removeNextTsoMsg ( )
virtual

Remove the next TSO message.

References DtSortedList::first(), and NULL.

unsigned int DtRtiMsgQueue::roQueueLength ( ) const
inline

References myRoList.

void DtRtiMsgQueue::setAsynchronous ( bool  isAsynchronous)
inlinevirtual

References myAsynchronous.

void DtRtiMsgQueue::setGalt ( const RTI::FedTime federateTime)
inlinevirtual
void DtRtiMsgQueue::setLookahead ( const RTI::FedTime lookaheadValue)
inlinevirtual
void DtRtiMsgQueue::setTimeAdvancing ( bool  isTimeAdvancing)
inlinevirtual

References myTimeAdvancing.

void DtRtiMsgQueue::setTimeAvailable ( bool  isTimeAvailable)
inlinevirtual

References myTimeAvailable.

void DtRtiMsgQueue::setTimeConstrained ( bool  isTimeConstrained)
inlinevirtual
void DtRtiMsgQueue::setTimeRegulating ( bool  isTimeRegulating)
inlinevirtual
void DtRtiMsgQueue::setTimestamp ( const RTI::FedTime federateTime)
inlinevirtual
bool DtRtiMsgQueue::timeAdvancing ( )
inlinevirtual

References myTimeAdvancing.

Referenced by queueMsg().

bool DtRtiMsgQueue::timeAvailable ( )
inlinevirtual

References myTimeAvailable.

Referenced by queueMsg().

bool DtRtiMsgQueue::timeConstrained ( )
inlinevirtual

References myTimeConstrainedEnabled.

Referenced by queueMsg().

bool DtRtiMsgQueue::timeRegulating ( )
inlinevirtual

Set/Get status of time regulation/constraint.

References myTimeRegulatingEnabled.

const RTI::FedTime & DtRtiMsgQueue::timestamp ( )
inlinevirtual

Set/Get current federate time.

Member Data Documentation

bool DtRtiMsgQueue::myAsynchronous
protected

Referenced by asynchronous(), and setAsynchronous().

std::auto_ptr<RTI::FedTime> DtRtiMsgQueue::myGalt
protected

Referenced by DtRtiMsgQueue().

DtLogicalTimeFactory* DtRtiMsgQueue::myLogicalTimeFactory
protected

Referenced by DtRtiMsgQueue(), newItem(), and queueMsg().

std::auto_ptr<RTI::FedTime> DtRtiMsgQueue::myLookahead
protected

Referenced by DtRtiMsgQueue().

MAKRti::DtList DtRtiMsgQueue::myRoList
protected

Referenced by deleteAll(), queueMsg(), and roQueueLength().

std::auto_ptr<RTI::FedTime> DtRtiMsgQueue::myTime
protected

Referenced by DtRtiMsgQueue(), and queueMsg().

bool DtRtiMsgQueue::myTimeAdvancing
protected

Referenced by setTimeAdvancing(), and timeAdvancing().

bool DtRtiMsgQueue::myTimeAvailable
protected

Referenced by setTimeAvailable(), and timeAvailable().

bool DtRtiMsgQueue::myTimeConstrainedEnabled
protected
bool DtRtiMsgQueue::myTimeRegulatingEnabled
protected

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

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)