![]() |
VR-Forces 4.0.4 Class Documentation
|
Class: DtResourceCheckInfo. More...
Public Member Functions | |
| DtResourceCheckInfo () | |
| DtResourceCheckInfo (const DtResourceCheckInfo &orig) | |
| virtual | ~DtResourceCheckInfo () |
| virtual DtResourceCheckInfo & | operator= (const DtResourceCheckInfo &) |
| void | setResourceName (const DtString &name) |
| const DtString & | resourceName () const |
| virtual void | removeRequestor (const DtString &name) |
| const std::list< DtString > & | requestors () const |
| virtual void | setPublishCondition (int iMonitoryBy, const DtFloat64 &dMonitorPeriod, DtSimManager *manager) |
| Sets up a conditional expression to be evaluated based on the iMonitoryBy setting. | |
| virtual void | addRequestor (const DtString &req) |
| Adds a requestor only if the requestor does not currently exist. | |
| virtual bool | shouldPublish (double simTime, const DtString &echelonId, DtSimManager *manager) const |
| Return true if this resource should be updated based on the conditional expression. | |
| virtual void | setNextPublicationPeriod (double simTime, const DtString &echelonId, DtSimManager *manager) |
| Given the specified conditional expression, set the next time the expression should evaluate to true. | |
Protected Member Functions | |
| virtual void | createSimTimeExpression (const DtFloat64 &dMonitorPeriod) |
| Creates a publish condition that is based on simulation time. | |
| virtual void | updateSimTimeExpression (double simTime, const DtString &echelonId, DtSimManager *manager) |
| Simulation time -- Fire off at the current exercise time plus the buffer period. | |
Protected Attributes | |
| DtString | myResourceName |
| std::list< DtString > | myRequestors |
| DtFloat64 | myMonitorPeriod |
| DtSimCondExpr * | myPublishCondition |
Class: DtResourceCheckInfo.
This class will track resources to check and expressions that determine whether or not they need to be updated on the network
| DtResourceCheckInfo::DtResourceCheckInfo | ( | const DtResourceCheckInfo & | orig | ) |
| virtual DtResourceCheckInfo::~DtResourceCheckInfo | ( | ) | [virtual] |
| virtual DtResourceCheckInfo& DtResourceCheckInfo::operator= | ( | const DtResourceCheckInfo & | ) | [virtual] |
| void DtResourceCheckInfo::setResourceName | ( | const DtString & | name | ) | [inline] |
| const DtString& DtResourceCheckInfo::resourceName | ( | ) | const [inline] |
| virtual void DtResourceCheckInfo::removeRequestor | ( | const DtString & | name | ) | [virtual] |
| const std::list<DtString>& DtResourceCheckInfo::requestors | ( | ) | const [inline] |
| virtual void DtResourceCheckInfo::setPublishCondition | ( | int | iMonitoryBy, |
| const DtFloat64 & | dMonitorPeriod, | ||
| DtSimManager * | manager | ||
| ) | [virtual] |
Sets up a conditional expression to be evaluated based on the iMonitoryBy setting.
| virtual void DtResourceCheckInfo::addRequestor | ( | const DtString & | req | ) | [virtual] |
Adds a requestor only if the requestor does not currently exist.
| virtual bool DtResourceCheckInfo::shouldPublish | ( | double | simTime, |
| const DtString & | echelonId, | ||
| DtSimManager * | manager | ||
| ) | const [virtual] |
Return true if this resource should be updated based on the conditional expression.
The simManager is supplied in case the condition needs it
| virtual void DtResourceCheckInfo::setNextPublicationPeriod | ( | double | simTime, |
| const DtString & | echelonId, | ||
| DtSimManager * | manager | ||
| ) | [virtual] |
Given the specified conditional expression, set the next time the expression should evaluate to true.
For the current supported conditions, the following will happen:
Simulation time -- Fire off at the current exercise time plus the buffer period. If this is the first time, set a random period between 0 and the period time to fire off to prevent network flooding
| virtual void DtResourceCheckInfo::createSimTimeExpression | ( | const DtFloat64 & | dMonitorPeriod | ) | [protected, virtual] |
Creates a publish condition that is based on simulation time.
If there is already an existing expression (sim time), it will reuse the expression but respect the faster update time. If there is not a sim time expression, it will remove the old one in favor of this
| virtual void DtResourceCheckInfo::updateSimTimeExpression | ( | double | simTime, |
| const DtString & | echelonId, | ||
| DtSimManager * | manager | ||
| ) | [protected, virtual] |
Simulation time -- Fire off at the current exercise time plus the buffer period.
If this is the first time, set a random period between 0 and the period time to fire off to prevent network flooding
DtString DtResourceCheckInfo::myResourceName [protected] |
std::list<DtString> DtResourceCheckInfo::myRequestors [protected] |
DtFloat64 DtResourceCheckInfo::myMonitorPeriod [protected] |
DtSimCondExpr* DtResourceCheckInfo::myPublishCondition [protected] |