#include <Federate.hh>
Public Member Functions | |
Federate (const char *the_name, FederateHandle) throw (RTIinternalError) | |
A new FederateName is allocated. theLink must have been opened before. | |
FederateHandle | getHandle () const |
void | setHandle (FederateHandle h) |
const char * | getName () const |
bool | isConstrained () const |
bool | isRegulator () const |
void | setConstrained (bool c) |
void | setRegulator (bool r) |
void | setClassRelevanceAdvisorySwitch (bool val) |
Sets the ClassRelevanceAdvisorySwitch of the federate to the value of the input parameter val. | |
void | setInteractionRelevanceAdvisorySwitch (bool val) |
Sets the InteractionRelevanceAdvisorySwitch of the federate to the value of the input parameter val. | |
void | setAttributeRelevanceAdvisorySwitch (bool val) |
Sets the AttributeRelevanceAdvisorySwitch of the federate to the value of the input parameter val. | |
void | setAttributeScopeAdvisorySwitch (bool val) |
Sets the AttributeScopeAdvisorySwitch of the federate to the value of the input parameter val. | |
bool | isClassRelevanceAdvisorySwitch () const |
Returns the current state of the ClassRelevanceAdvisory switch. | |
bool | isInteractionRelevanceAdvisorySwitch () const |
Returns the current state of the InteractionRelevanceAdvisory switch. | |
bool | isAttributeRelevanceAdvisorySwitch () const |
Returns the current state of the AttributeRelevanceAdvisory switch. | |
bool | isAttributeScopeAdvisorySwitch () const |
Returns the current state of the AttributeScopeAdvisory switch. | |
bool | isSaving () const |
bool | isRestoring () const |
void | setSaving (bool s) |
void | setRestoring (bool r) |
void | addSynchronizationLabel (const char *) throw (RTIinternalError) |
Add a synchronization label to federate. | |
void | removeSynchronizationLabel (const char *) throw (RTIinternalError) |
Removes a synchronization label from federate. | |
bool | isSynchronizationLabel (const char *) const |
Returns whether the federate is already synchronized with this label. | |
Private Types | |
typedef std::vector< std::string > | SyncList |
Private Attributes | |
FederateHandle | handle |
Federate ID. | |
std::string | name |
Federate name. | |
bool | regulator |
bool | constrained |
= false by default. | |
bool | cras |
= class relevance advisory switch -> true by default. | |
bool | iras |
= interaction relevance advisory siwtch -> true by default. | |
bool | aras |
= attribute relevance advisory switch -> false by default. | |
bool | asas |
= attribute scope advisory switch -> false by default. | |
SyncList | syncLabels |
bool | saving |
True when saving has been initiated on federate. | |
bool | restoring |
True when restoring has been initiated on federate. |
Definition at line 36 of file Federate.hh.
typedef std::vector<std::string> SyncList [private] |
Definition at line 133 of file Federate.hh.
Federate | ( | const char * | the_name, | |
FederateHandle | the_handle | |||
) | throw (RTIinternalError) |
A new FederateName is allocated. theLink must have been opened before.
Definition at line 44 of file Federate.cc.
FederateHandle getHandle | ( | ) | const [inline] |
void setHandle | ( | FederateHandle | h | ) | [inline] |
const char* getName | ( | ) | const [inline] |
bool isConstrained | ( | ) | const [inline] |
Definition at line 45 of file Federate.hh.
References Federate::constrained.
Referenced by Federation::addConstrained(), and Federation::removeConstrained().
bool isRegulator | ( | ) | const [inline] |
Definition at line 46 of file Federate.hh.
References Federate::regulator.
Referenced by Federation::updateRegulator().
void setConstrained | ( | bool | c | ) | [inline] |
Definition at line 47 of file Federate.hh.
References Federate::constrained.
Referenced by Federation::addConstrained(), and Federation::removeConstrained().
void setRegulator | ( | bool | r | ) | [inline] |
Definition at line 48 of file Federate.hh.
References Federate::regulator.
Referenced by Federation::addRegulator(), and Federation::removeRegulator().
void setClassRelevanceAdvisorySwitch | ( | bool | val | ) | [inline] |
Sets the ClassRelevanceAdvisorySwitch of the federate to the value of the input parameter val.
The CRA switch is enabled by default.
[in] | val | new value for the switch true means enable false means disable. |
Definition at line 56 of file Federate.hh.
References Federate::cras.
Referenced by Federation::setClassRelevanceAdvisorySwitch(), and Federation::unsetClassRelevanceAdvisorySwitch().
void setInteractionRelevanceAdvisorySwitch | ( | bool | val | ) | [inline] |
Sets the InteractionRelevanceAdvisorySwitch of the federate to the value of the input parameter val.
The IRA switch is enabled by default.
[in] | val | new value for the switch true means enable false means disable. |
Definition at line 64 of file Federate.hh.
References Federate::iras.
Referenced by Federation::setInteractionRelevanceAdvisorySwitch(), and Federation::unsetInteractionRelevanceAdvisorySwitch().
void setAttributeRelevanceAdvisorySwitch | ( | bool | val | ) | [inline] |
Sets the AttributeRelevanceAdvisorySwitch of the federate to the value of the input parameter val.
The ARA switch is disabled by default.
[in] | val | new value for the switch true means enable false means disable. |
Definition at line 72 of file Federate.hh.
References Federate::aras.
Referenced by Federation::setAttributeRelevanceAdvisorySwitch(), and Federation::unsetAttributeRelevanceAdvisorySwitch().
void setAttributeScopeAdvisorySwitch | ( | bool | val | ) | [inline] |
Sets the AttributeScopeAdvisorySwitch of the federate to the value of the input parameter val.
The ASA switch is disabled by default.
[in] | val | new value for the switch true means enable false means disable. |
Definition at line 80 of file Federate.hh.
References Federate::asas.
Referenced by Federation::setAttributeScopeAdvisorySwitch(), and Federation::unsetAttributeScopeAdvisorySwitch().
bool isClassRelevanceAdvisorySwitch | ( | ) | const [inline] |
Returns the current state of the ClassRelevanceAdvisory switch.
Definition at line 87 of file Federate.hh.
References Federate::cras.
Referenced by Federation::setClassRelevanceAdvisorySwitch(), Federation::subscribeObject(), and Federation::unsetClassRelevanceAdvisorySwitch().
bool isInteractionRelevanceAdvisorySwitch | ( | ) | const [inline] |
Returns the current state of the InteractionRelevanceAdvisory switch.
Definition at line 94 of file Federate.hh.
References Federate::iras.
Referenced by Federation::setInteractionRelevanceAdvisorySwitch(), and Federation::unsetInteractionRelevanceAdvisorySwitch().
bool isAttributeRelevanceAdvisorySwitch | ( | ) | const [inline] |
Returns the current state of the AttributeRelevanceAdvisory switch.
Definition at line 101 of file Federate.hh.
References Federate::aras.
Referenced by Federation::setAttributeRelevanceAdvisorySwitch(), and Federation::unsetAttributeRelevanceAdvisorySwitch().
bool isAttributeScopeAdvisorySwitch | ( | ) | const [inline] |
Returns the current state of the AttributeScopeAdvisory switch.
Definition at line 108 of file Federate.hh.
References Federate::asas.
Referenced by Federation::setAttributeScopeAdvisorySwitch(), and Federation::unsetAttributeScopeAdvisorySwitch().
bool isSaving | ( | ) | const [inline] |
bool isRestoring | ( | ) | const [inline] |
void setSaving | ( | bool | s | ) | [inline] |
Definition at line 112 of file Federate.hh.
References Federate::saving.
Referenced by Federation::federateSaveStatus().
void setRestoring | ( | bool | r | ) | [inline] |
Definition at line 113 of file Federate.hh.
References Federate::restoring.
Referenced by Federation::federateRestoreStatus().
void addSynchronizationLabel | ( | const char * | label | ) | throw (RTIinternalError) |
Add a synchronization label to federate.
Definition at line 57 of file Federate.cc.
References certi::rtig::G, PrettyDebug::Out(), and pdGendoc.
void removeSynchronizationLabel | ( | const char * | label | ) | throw (RTIinternalError) |
Removes a synchronization label from federate.
Definition at line 76 of file Federate.cc.
Referenced by Federation::unregisterSynchronization().
bool isSynchronizationLabel | ( | const char * | label | ) | const |
Returns whether the federate is already synchronized with this label.
Definition at line 90 of file Federate.cc.
References Federate::syncLabels.
FederateHandle handle [private] |
Federate ID.
Definition at line 120 of file Federate.hh.
Referenced by Federate::getHandle(), and Federate::setHandle().
std::string name [private] |
bool regulator [private] |
= false by default -- Used only on the RTIA, because on RTIG there is a upper level list of regulator Federates (in Federation).
Definition at line 125 of file Federate.hh.
Referenced by Federate::isRegulator(), and Federate::setRegulator().
bool constrained [private] |
= false by default.
Definition at line 126 of file Federate.hh.
Referenced by Federate::isConstrained(), and Federate::setConstrained().
bool cras [private] |
= class relevance advisory switch -> true by default.
Definition at line 128 of file Federate.hh.
Referenced by Federate::isClassRelevanceAdvisorySwitch(), and Federate::setClassRelevanceAdvisorySwitch().
bool iras [private] |
= interaction relevance advisory siwtch -> true by default.
Definition at line 129 of file Federate.hh.
Referenced by Federate::isInteractionRelevanceAdvisorySwitch(), and Federate::setInteractionRelevanceAdvisorySwitch().
bool aras [private] |
= attribute relevance advisory switch -> false by default.
Definition at line 130 of file Federate.hh.
Referenced by Federate::isAttributeRelevanceAdvisorySwitch(), and Federate::setAttributeRelevanceAdvisorySwitch().
bool asas [private] |
= attribute scope advisory switch -> false by default.
Definition at line 131 of file Federate.hh.
Referenced by Federate::isAttributeScopeAdvisorySwitch(), and Federate::setAttributeScopeAdvisorySwitch().
SyncList syncLabels [private] |
bool saving [private] |
True when saving has been initiated on federate.
Definition at line 136 of file Federate.hh.
Referenced by Federate::isSaving(), and Federate::setSaving().
bool restoring [private] |
True when restoring has been initiated on federate.
Definition at line 137 of file Federate.hh.
Referenced by Federate::isRestoring(), and Federate::setRestoring().