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 | Protected Types | Protected Attributes
DtRequestDatabase Class Reference

class DtRequestDatabase More...

+ Collaboration diagram for DtRequestDatabase:

Public Member Functions

 DtRequestDatabase ()
 
virtual ~DtRequestDatabase ()
 
virtual void clearAll ()
 Clear database of all entries. More...
 
virtual void addRemoteRequest (const DtAttributeHandleSet &requestSet, DtFederateHandle fed)
 Call to indicate that a remote federate has requested ownership of requestSet. More...
 
virtual void removeRemoteRequest (const DtAttributeHandleSet &requestSet, DtFederateHandle fed)
 Remove a Federate from the list of federates pending confirm for a set of attributes. More...
 
virtual void removeRemoteRequest (const DtAttributeHandleSet &requestSet)
 Remote request of supplied attributes is complete. More...
 
virtual void addPendingConfirm (const DtAttributeHandleSet &requestSet, DtFederateHandle fed)
 Call to indicate that these this federate has matched a divest with a remote request. More...
 
virtual void removePendingConfirm (const DtAttributeHandleSet &requestSet, DtFederateHandle fed)
 Remove a Federate from the list of federates pending confirm for a set of attributes. More...
 
virtual void addSkipPendingConfirm (const DtAttributeHandleSet &requestSet, DtFederateHandle fed)
 
virtual void removeSkipPendingConfirm (const DtAttributeHandleSet &requestSet, DtFederateHandle fed)
 
virtual void removePendingSkipConfirm (const DtAttributeHandleSet &requestSet)
 
virtual void removePendingConfirm (const DtAttributeHandleSet &requestSet)
 Remote request of supplied attributes is complete. More...
 
void moveRemoteRequestToPendingList (const DtAttributeHandleSet &requestSet)
 Move all requests for the supplied attributes from the request list to the pending confirm list. More...
 
virtual void cancelRemoteRequest (const DtAttributeHandleSet &canceledSet, DtFederateHandle fed)
 Remote request of supplied attributes is canceled. More...
 
virtual void cancelAllRemoteRequest (const DtAttributeHandleSet &canceledSet)
 Remove all supplied attributes from pending set and add them to canceled set. More...
 
virtual void removeCanceledRequests (const DtAttributeHandleSet &releaseSet)
 Remove the supplied attributes from the canceled set. More...
 
virtual bool isRequestCanceled (DtAttributeHandle hand) const
 Returns boolean: is there a canceled request for the attribute for which the federate has not responded? More...
 
virtual DtAttributeHandleSet canceledRequestSet () const
 Returns the set of canceled attributes requests. More...
 
virtual DtFederateHandle releaseRequested (const DtAttributeHandleSet &inSet, DtAttributeHandleSet *releasedSet, bool keepForConfirm)
 Calls to this method with the attributes provided in inSet will remove and return in releaseSet any matching requested attributes from a single requesting federate, whose handle is the return argument. More...
 
virtual DtFederateHandle releaseConfirm (const DtAttributeHandleSet &inSet, DtAttributeHandleSet *releasedSet)
 Calls to this method with the attributes provided in inSet will remove and return in releaseSet any matching pending confirm attributes assigned to a single requesting federate, whose handle is the return argument. More...
 
virtual DtFederateHandle pendingRemoteRequest (DtAttributeHandle hand) const
 Returns the handle of the federate that has most recently requested ownership of this attribute. More...
 
virtual DtFederateHandle pendingConfirm (DtAttributeHandle hand) const
 Returns the handle of the remote federate that will be given ownership pending confirmation from the local federate. More...
 
virtual DtAttributeHandleSet requestedByFed (DtFederateHandle fed, bool includePendingConfirm=false) const
 Returns the set of attributes most recently requested by fed By default, attributes that are pending confirm are not returned. More...
 
virtual DtAttributeHandleSet remoteRequestByFed (DtFederateHandle fed) const
 Returns the set of Attributes requested (not pending) by this federate. More...
 
virtual DtAttributeHandleSet pendingConfirmByFed (DtFederateHandle fed) const
 Returns the current set of attributes that are pending confirm. More...
 
virtual int requestCount () const
 Return the number of requested attributes. More...
 
virtual DtAttributeHandleSet
const & 
requestedAttributes () const
 Return the set of requested attributes. More...
 
virtual int confirmCount () const
 Return the number of pending confirmed attributes. More...
 
virtual DtAttributeHandleSet
const & 
pendingConfirmAttributes () const
 Return the set of pending confirmed attributes. More...
 
virtual DtAttributeHandleSet
const & 
pendingSkipConfirmAttributes () const
 
virtual void markPendingRequestsUnavailable (const DtAttributeHandleSet &requestSet, DtFederateHandle confirmedFed)
 Mark Pending Requests unavailable for all requesting federates except the federate which has been confirmed. More...
 
virtual DtFederateHandle unavailablePendingRequests (DtAttributeHandleSet *invalidatedSet)
 Get the next federate with pending requests that have become unavailable and the invalidated attrs. More...
 
virtual DtAttributeHandleSet pendingSkipConfirmByFed (DtFederateHandle fed) const
 
virtual DtFederateHandle pendingSkipConfirm (DtAttributeHandle hand) const
 

Protected Types

typedef std::map
< DtAttributeHandle,
DtFederateHandleSet
DtAttrToFederatesMap
 
typedef std::map
< DtFederateHandle,
DtAttributeHandleSet
DtFedToAttributesMap
 

Protected Attributes

DtAttributeHandleSet myRemoteRequestSet
 Attributes whose ownership has been requested by a remote federate. More...
 
DtAttributeHandleSet myRemoteCanceledRequestSet
 Requests that have been canceled. Not important by whom. More...
 
DtAttrToFederatesMap myRemoteRequestsByAttr
 
DtAttrToFederatesMap myPendingConfirmByAttr
 In 1516, the attributes are not release until confirmed. More...
 
DtAttributeHandleSet myPendingConfirmSet
 
DtAttrToFederatesMap myPendingSkipConfirmByAttr
 In 1516-2010, the some pending confirms do not send unavailable. More...
 
DtAttributeHandleSet myPendingSkipConfirmSet
 
DtFedToAttributesMap myUnavailableRequestsByFed
 In 1516, multiple federates may have pending requests, when the divest is confirmed for one federate, the attrs become unavailable for all others. More...
 

Detailed Description

class DtRequestDatabase

An object uses an instance of this class to manage ownership requests from remote federates. Adding a remote federate's request replaces any previous requests (i.e., only the most recent request is saved). As attributes are divested, this database is queried for matching requests. In the 1.3 IFSPEC, the requests are satisfied as soon as they are matched with a divestiture. In the 1516 IFSPEC, the request are not fully satisfied until the federate confirms the divestiture. A request can be canceled (and removed from the database). In the 1.3 IFSPEC, canceled requests are maintained in order to determine valid releases. Released attributes must have been requested, but a request can be canceled after a release request but before the release response.

Member Typedef Documentation

Constructor & Destructor Documentation

DtRequestDatabase::DtRequestDatabase ( )
virtual DtRequestDatabase::~DtRequestDatabase ( )
virtual

Member Function Documentation

virtual void DtRequestDatabase::addPendingConfirm ( const DtAttributeHandleSet requestSet,
DtFederateHandle  fed 
)
virtual

Call to indicate that these this federate has matched a divest with a remote request.

virtual void DtRequestDatabase::addRemoteRequest ( const DtAttributeHandleSet requestSet,
DtFederateHandle  fed 
)
virtual

Call to indicate that a remote federate has requested ownership of requestSet.

If an attribute is passed to this function more than once, the more recent request takes precedence. That is, when it's time to divest, we will divest the attribute to the most recent requesting federate.

virtual void DtRequestDatabase::addSkipPendingConfirm ( const DtAttributeHandleSet requestSet,
DtFederateHandle  fed 
)
virtual
virtual void DtRequestDatabase::cancelAllRemoteRequest ( const DtAttributeHandleSet canceledSet)
virtual

Remove all supplied attributes from pending set and add them to canceled set.

virtual DtAttributeHandleSet DtRequestDatabase::canceledRequestSet ( ) const
virtual

Returns the set of canceled attributes requests.

virtual void DtRequestDatabase::cancelRemoteRequest ( const DtAttributeHandleSet canceledSet,
DtFederateHandle  fed 
)
virtual

Remote request of supplied attributes is canceled.

Remove them from pending set and add them to canceled set.

virtual void DtRequestDatabase::clearAll ( )
virtual

Clear database of all entries.

virtual int DtRequestDatabase::confirmCount ( ) const
virtual

Return the number of pending confirmed attributes.

virtual bool DtRequestDatabase::isRequestCanceled ( DtAttributeHandle  hand) const
virtual

Returns boolean: is there a canceled request for the attribute for which the federate has not responded?

virtual void DtRequestDatabase::markPendingRequestsUnavailable ( const DtAttributeHandleSet requestSet,
DtFederateHandle  confirmedFed 
)
virtual

Mark Pending Requests unavailable for all requesting federates except the federate which has been confirmed.

void DtRequestDatabase::moveRemoteRequestToPendingList ( const DtAttributeHandleSet requestSet)

Move all requests for the supplied attributes from the request list to the pending confirm list.

virtual DtFederateHandle DtRequestDatabase::pendingConfirm ( DtAttributeHandle  hand) const
virtual

Returns the handle of the remote federate that will be given ownership pending confirmation from the local federate.

virtual DtAttributeHandleSet const& DtRequestDatabase::pendingConfirmAttributes ( ) const
virtual

Return the set of pending confirmed attributes.

virtual DtAttributeHandleSet DtRequestDatabase::pendingConfirmByFed ( DtFederateHandle  fed) const
virtual

Returns the current set of attributes that are pending confirm.

virtual DtFederateHandle DtRequestDatabase::pendingRemoteRequest ( DtAttributeHandle  hand) const
virtual

Returns the handle of the federate that has most recently requested ownership of this attribute.

virtual DtFederateHandle DtRequestDatabase::pendingSkipConfirm ( DtAttributeHandle  hand) const
virtual
virtual DtAttributeHandleSet const& DtRequestDatabase::pendingSkipConfirmAttributes ( ) const
virtual
virtual DtAttributeHandleSet DtRequestDatabase::pendingSkipConfirmByFed ( DtFederateHandle  fed) const
virtual
virtual DtFederateHandle DtRequestDatabase::releaseConfirm ( const DtAttributeHandleSet inSet,
DtAttributeHandleSet releasedSet 
)
virtual

Calls to this method with the attributes provided in inSet will remove and return in releaseSet any matching pending confirm attributes assigned to a single requesting federate, whose handle is the return argument.

The method should be called repeatedly until it returns 0 to release all the matching attributes. Not all the attributes may match a pending confirm.

virtual DtFederateHandle DtRequestDatabase::releaseRequested ( const DtAttributeHandleSet inSet,
DtAttributeHandleSet releasedSet,
bool  keepForConfirm 
)
virtual

Calls to this method with the attributes provided in inSet will remove and return in releaseSet any matching requested attributes from a single requesting federate, whose handle is the return argument.

The method should be called repeatedly until it returns 0 to release all the matching attributes. In 1516 negotiated divest, these attributes are not fully released. Set the bool value to move them to a pending confirm status (see releaseConfirm below). Not all the attributes may match a request.

virtual DtAttributeHandleSet DtRequestDatabase::remoteRequestByFed ( DtFederateHandle  fed) const
virtual

Returns the set of Attributes requested (not pending) by this federate.

virtual void DtRequestDatabase::removeCanceledRequests ( const DtAttributeHandleSet releaseSet)
virtual

Remove the supplied attributes from the canceled set.

virtual void DtRequestDatabase::removePendingConfirm ( const DtAttributeHandleSet requestSet,
DtFederateHandle  fed 
)
virtual

Remove a Federate from the list of federates pending confirm for a set of attributes.

Note: this method assumes that caller handles the case that this is the last pending Federate.

virtual void DtRequestDatabase::removePendingConfirm ( const DtAttributeHandleSet requestSet)
virtual

Remote request of supplied attributes is complete.

Remove them from pending set.

virtual void DtRequestDatabase::removePendingSkipConfirm ( const DtAttributeHandleSet requestSet)
virtual
virtual void DtRequestDatabase::removeRemoteRequest ( const DtAttributeHandleSet requestSet,
DtFederateHandle  fed 
)
virtual

Remove a Federate from the list of federates pending confirm for a set of attributes.

Note: this method assumes that caller handles the case that this is the last pending Federate.

virtual void DtRequestDatabase::removeRemoteRequest ( const DtAttributeHandleSet requestSet)
virtual

Remote request of supplied attributes is complete.

Remove them from pending set.

virtual void DtRequestDatabase::removeSkipPendingConfirm ( const DtAttributeHandleSet requestSet,
DtFederateHandle  fed 
)
virtual
virtual int DtRequestDatabase::requestCount ( ) const
virtual

Return the number of requested attributes.

virtual DtAttributeHandleSet const& DtRequestDatabase::requestedAttributes ( ) const
virtual

Return the set of requested attributes.

virtual DtAttributeHandleSet DtRequestDatabase::requestedByFed ( DtFederateHandle  fed,
bool  includePendingConfirm = false 
) const
virtual

Returns the set of attributes most recently requested by fed By default, attributes that are pending confirm are not returned.

virtual DtFederateHandle DtRequestDatabase::unavailablePendingRequests ( DtAttributeHandleSet invalidatedSet)
virtual

Get the next federate with pending requests that have become unavailable and the invalidated attrs.

Member Data Documentation

DtAttrToFederatesMap DtRequestDatabase::myPendingConfirmByAttr
protected

In 1516, the attributes are not release until confirmed.

DtAttributeHandleSet DtRequestDatabase::myPendingConfirmSet
protected
DtAttrToFederatesMap DtRequestDatabase::myPendingSkipConfirmByAttr
protected

In 1516-2010, the some pending confirms do not send unavailable.

DtAttributeHandleSet DtRequestDatabase::myPendingSkipConfirmSet
protected
DtAttributeHandleSet DtRequestDatabase::myRemoteCanceledRequestSet
protected

Requests that have been canceled. Not important by whom.

DtAttrToFederatesMap DtRequestDatabase::myRemoteRequestsByAttr
protected
DtAttributeHandleSet DtRequestDatabase::myRemoteRequestSet
protected

Attributes whose ownership has been requested by a remote federate.

DtFedToAttributesMap DtRequestDatabase::myUnavailableRequestsByFed
protected

In 1516, multiple federates may have pending requests, when the divest is confirmed for one federate, the attrs become unavailable for all others.


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

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)