![]() |
MAK RTIspy API Documentation for HLA 1.3
|
class DtRequestDatabase More...
Collaboration diagram for DtRequestDatabase:Public Member Functions | |
| DtRequestDatabase () | |
| virtual | ~DtRequestDatabase () |
| virtual void | clearAll () |
| Clear database of all entries. | |
| virtual void | addRemoteRequest (const DtAttributeHandleSet &requestSet, DtFederateHandle fed) |
| Call to indicate that a remote federate has requested ownership of requestSet. | |
| virtual void | removeRemoteRequest (const DtAttributeHandleSet &requestSet, DtFederateHandle fed) |
| Remove a Federate from the list of federates pending confirm for a set of attributes. | |
| virtual void | removeRemoteRequest (const DtAttributeHandleSet &requestSet) |
| Remote request of supplied attributes is complete. | |
| virtual void | addPendingConfirm (const DtAttributeHandleSet &requestSet, DtFederateHandle fed) |
| Call to indicate that these this federate has matched a divest with a remote request. | |
| virtual void | removePendingConfirm (const DtAttributeHandleSet &requestSet, DtFederateHandle fed) |
| Remove a Federate from the list of federates pending confirm for a set of attributes. | |
| 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. | |
| void | moveRemoteRequestToPendingList (const DtAttributeHandleSet &requestSet) |
| Move all requests for the supplied attributes from the request list to the pending confirm list. | |
| virtual void | cancelRemoteRequest (const DtAttributeHandleSet &canceledSet, DtFederateHandle fed) |
| Remote request of supplied attributes is canceled. | |
| virtual void | cancelAllRemoteRequest (const DtAttributeHandleSet &canceledSet) |
| Remove all supplied attributes from pending set and add them to canceled set. | |
| virtual void | removeCanceledRequests (const DtAttributeHandleSet &releaseSet) |
| Remove the supplied attributes from the canceled set. | |
| virtual bool | isRequestCanceled (DtAttributeHandle hand) const |
| Returns boolean: is there a canceled request for the attribute for which the federate has not responded? | |
| virtual DtAttributeHandleSet | canceledRequestSet () const |
| Returns the set of canceled attributes requests. | |
| 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. | |
| 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. | |
| virtual DtFederateHandle | pendingRemoteRequest (DtAttributeHandle hand) const |
| Returns the handle of the federate that has most recently requested ownership of this attribute. | |
| virtual DtFederateHandle | pendingConfirm (DtAttributeHandle hand) const |
| Returns the handle of the remote federate that will be given ownership pending confirmation from the local federate. | |
| 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. | |
| virtual DtAttributeHandleSet | remoteRequestByFed (DtFederateHandle fed) const |
| Returns the set of Attributes requested (not pending) by this federate. | |
| virtual DtAttributeHandleSet | pendingConfirmByFed (DtFederateHandle fed) const |
| Returns the current set of attributes that are pending confirm. | |
| virtual int | requestCount () const |
| Return the number of requested attributes. | |
| virtual DtAttributeHandleSet const & | requestedAttributes () const |
| Return the set of requested attributes. | |
| virtual int | confirmCount () const |
| Return the number of pending confirmed attributes. | |
| virtual DtAttributeHandleSet const & | pendingConfirmAttributes () const |
| Return the set of pending confirmed attributes. | |
| 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. | |
| virtual DtFederateHandle | unavailablePendingRequests (DtAttributeHandleSet *invalidatedSet) |
| Get the next federate with pending requests that have become unavailable and the invalidated attrs. | |
| 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. | |
| DtAttributeHandleSet | myRemoteCanceledRequestSet |
| Requests that have been canceled. Not important by whom. | |
| DtAttrToFederatesMap | myRemoteRequestsByAttr |
| DtAttrToFederatesMap | myPendingConfirmByAttr |
| In 1516, the attributes are not release until confirmed. | |
| DtAttributeHandleSet | myPendingConfirmSet |
| DtAttrToFederatesMap | myPendingSkipConfirmByAttr |
| In 1516-2010, the some pending confirms do not send unavailable. | |
| 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. | |
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.
|
protected |
|
protected |
| DtRequestDatabase::DtRequestDatabase | ( | ) |
|
virtual |
|
virtual |
Call to indicate that these this federate has matched a divest with a remote request.
|
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 |
|
virtual |
Remove all supplied attributes from pending set and add them to canceled set.
|
virtual |
Returns the set of canceled attributes requests.
|
virtual |
Remote request of supplied attributes is canceled.
Remove them from pending set and add them to canceled set.
|
virtual |
Clear database of all entries.
|
virtual |
Return the number of pending confirmed attributes.
|
virtual |
Returns boolean: is there a canceled request for the attribute for which the federate has not responded?
|
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 |
Returns the handle of the remote federate that will be given ownership pending confirmation from the local federate.
|
virtual |
Return the set of pending confirmed attributes.
|
virtual |
Returns the current set of attributes that are pending confirm.
|
virtual |
Returns the handle of the federate that has most recently requested ownership of this attribute.
|
virtual |
|
virtual |
|
virtual |
|
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 |
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 |
Returns the set of Attributes requested (not pending) by this federate.
|
virtual |
Remove the supplied attributes from the canceled set.
|
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 |
Remote request of supplied attributes is complete.
Remove them from pending set.
|
virtual |
|
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 |
Remote request of supplied attributes is complete.
Remove them from pending set.
|
virtual |
|
virtual |
Return the number of requested attributes.
|
virtual |
Return the set of requested attributes.
|
virtual |
Returns the set of attributes most recently requested by fed By default, attributes that are pending confirm are not returned.
|
virtual |
Get the next federate with pending requests that have become unavailable and the invalidated attrs.
|
protected |
In 1516, the attributes are not release until confirmed.
|
protected |
|
protected |
In 1516-2010, the some pending confirms do not send unavailable.
|
protected |
|
protected |
Requests that have been canceled. Not important by whom.
|
protected |
|
protected |
Attributes whose ownership has been requested by a remote federate.
|
protected |
In 1516, multiple federates may have pending requests, when the divest is confirmed for one federate, the attrs become unavailable for all others.