Federate Class Reference

#include <Federate.hh>

List of all members.

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.


Detailed Description

This class manages the federate status and other relevant information.

Definition at line 36 of file Federate.hh.


Member Typedef Documentation

typedef std::vector<std::string> SyncList [private]

Definition at line 133 of file Federate.hh.


Constructor & Destructor Documentation

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.


Member Function Documentation

FederateHandle getHandle (  )  const [inline]

Definition at line 41 of file Federate.hh.

References Federate::handle.

void setHandle ( FederateHandle  h  )  [inline]

Definition at line 42 of file Federate.hh.

References Federate::handle.

const char* getName (  )  const [inline]

Definition at line 44 of file Federate.hh.

References Federate::name.

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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Returns:
a boolean indicating the current state of the switch, true means enabled, false means disabled

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.

Returns:
a boolean indicating the current state of the switch, true means enabled, false means disabled

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.

Returns:
a boolean indicating the current state of the switch, true means enabled, false means disabled

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.

Returns:
a boolean indicating the current state of the switch, true means enabled, false means disabled

Definition at line 108 of file Federate.hh.

References Federate::asas.

Referenced by Federation::setAttributeScopeAdvisorySwitch(), and Federation::unsetAttributeScopeAdvisorySwitch().

bool isSaving (  )  const [inline]

Definition at line 110 of file Federate.hh.

References Federate::saving.

bool isRestoring (  )  const [inline]

Definition at line 111 of file Federate.hh.

References Federate::restoring.

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.

Here is the call graph for this function:

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.


Member Data Documentation

Federate ID.

Definition at line 120 of file Federate.hh.

Referenced by Federate::getHandle(), and Federate::setHandle().

std::string name [private]

Federate name.

Definition at line 121 of file Federate.hh.

Referenced by Federate::getName().

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]

Definition at line 134 of file Federate.hh.

Referenced by Federate::isSynchronizationLabel().

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().


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

Generated on Thu Apr 30 16:00:18 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5