Describes a Subsystem and it's configuration and identification. More...
#include <subsystem.h>
Classes | |
class | Component |
Describes a Component and its' supported Services. More... | |
Public Types | |
enum | Type { Vehicle = 10001, OCU = 20001, OtherSubsystem = 30001 } |
typedef Mutex::ScopedPtr < Subsystem > | Ptr |
typedef std::map< Byte, Component::Set > | Configuration |
typedef std::map< UShort, Subsystem * > | Map |
Public Member Functions | |
Subsystem () | |
Constructor. | |
Subsystem (const Subsystem &configuration) | |
Constructor. | |
~Subsystem () | |
Destructor. | |
bool | IsVehicle () const |
void | AddComponent (const Address &component, const Service::ID::Set &services) |
Adds a component and its services to the subsystem. | |
void | RemoveComponent (const Address &component) |
Removes a component and its services to the subsystem. | |
bool | HaveService (const std::string &name, Address *id=NULL) const |
Checks to see if a subsystem has a Service. | |
bool | HaveComponent (const Address &id) const |
Checks to see if a component is part of the subsystem configuration. | |
Component * | GetComponent (const Address &id) |
Gets a pointer to the Component within the configuration. | |
const Component * | GetComponent (const Address &id) const |
Gets a pointer to the Component within the configuration. | |
Address::List | GetComponentsWithService (const std::string &name) const |
Component::List | GetConfiguration () const |
Gets the Subsystem::Configuration of the subsystem. | |
Address::List | GetAddressList () const |
Gets the Subsystem::Configuration of the subsystem. | |
virtual Subsystem * | Clone () const |
Subsystem & | operator= (const Subsystem &configuration) |
Sets equal to. | |
void | CopySubsystemData (const Subsystem *subsystem) |
Copies data to internal data members. | |
Static Public Member Functions | |
static void | DeleteSubsystemMap (Map &list) |
Deletes all data and clears list. | |
static void | CopySubsystemMap (const Map &src, Map &dest) |
Copies data from src to dest. | |
Public Attributes | |
UShort | mSubsystemID |
Subsystem ID that configuration is for. | |
Configuration | mConfiguration |
Node configurations for this subsystem. | |
Type | mType |
Type of subsystem. | |
Time | mUpdateTime |
The last time the contents of the Subsystem were updated. | |
std::string | mIdentification |
Identification name of Subsystem [up to 255 characters]. |
Describes a Subsystem and it's configuration and identification.
Definition at line 55 of file subsystem.h.
typedef std::map<Byte, Component::Set> JAUS::Subsystem::Configuration |
Definition at line 91 of file subsystem.h.
typedef std::map<UShort, Subsystem *> JAUS::Subsystem::Map |
Reimplemented in JAUS::Vehicle.
Definition at line 92 of file subsystem.h.
typedef Mutex::ScopedPtr<Subsystem> JAUS::Subsystem::Ptr |
Reimplemented in JAUS::Vehicle.
Definition at line 90 of file subsystem.h.
Definition at line 60 of file subsystem.h.
Subsystem::Subsystem | ( | ) |
Constructor.
Definition at line 130 of file subsystem.cpp.
Subsystem::Subsystem | ( | const Subsystem & | configuration ) |
Constructor.
Definition at line 142 of file subsystem.cpp.
Subsystem::~Subsystem | ( | ) |
Destructor.
Definition at line 153 of file subsystem.cpp.
void Subsystem::AddComponent | ( | const Address & | component, |
const Service::ID::Set & | services | ||
) |
Adds a component and its services to the subsystem.
Definition at line 166 of file subsystem.cpp.
virtual Subsystem* JAUS::Subsystem::Clone | ( | ) | const [inline, virtual] |
Reimplemented in JAUS::Vehicle.
Definition at line 106 of file subsystem.h.
void Subsystem::CopySubsystemData | ( | const Subsystem * | subsystem ) |
Copies data to internal data members.
Definition at line 469 of file subsystem.cpp.
Copies data from src to dest.
Definition at line 511 of file subsystem.cpp.
void Subsystem::DeleteSubsystemMap | ( | Map & | list ) | [static] |
Deletes all data and clears list.
Definition at line 485 of file subsystem.cpp.
Address::List Subsystem::GetAddressList | ( | ) | const |
Gets the Subsystem::Configuration of the subsystem.
Definition at line 425 of file subsystem.cpp.
Subsystem::Component * Subsystem::GetComponent | ( | const Address & | id ) |
Gets a pointer to the Component within the configuration.
If the component doesn't exist, it is created and added to the configuration.
[in] | id | ID of the component to look for. |
Definition at line 277 of file subsystem.cpp.
const Subsystem::Component * Subsystem::GetComponent | ( | const Address & | id ) | const |
Gets a pointer to the Component within the configuration.
[in] | id | ID of the component to look for. |
Definition at line 331 of file subsystem.cpp.
Address::List Subsystem::GetComponentsWithService | ( | const std::string & | name ) | const |
[in] | name | Name of Service to look for. |
Definition at line 370 of file subsystem.cpp.
Subsystem::Component::List Subsystem::GetConfiguration | ( | ) | const |
Gets the Subsystem::Configuration of the subsystem.
Definition at line 400 of file subsystem.cpp.
bool Subsystem::HaveComponent | ( | const Address & | id ) | const |
Checks to see if a component is part of the subsystem configuration.
[in] | id | ID of the component to look for. |
Definition at line 244 of file subsystem.cpp.
bool Subsystem::HaveService | ( | const std::string & | name, |
Address * | id = NULL |
||
) | const |
Checks to see if a subsystem has a Service.
[in] | name | Name of Service to look for. |
[out] | id | Optional parameter. If not NULL, then the ID of the component with the service is returned. |
Definition at line 207 of file subsystem.cpp.
bool JAUS::Subsystem::IsVehicle | ( | ) | const [inline] |
Definition at line 96 of file subsystem.h.
Sets equal to.
Definition at line 450 of file subsystem.cpp.
void Subsystem::RemoveComponent | ( | const Address & | component ) |
Removes a component and its services to the subsystem.
[in] | component | Component ID. |
Definition at line 180 of file subsystem.cpp.
Node configurations for this subsystem.
Definition at line 112 of file subsystem.h.
std::string JAUS::Subsystem::mIdentification |
Identification name of Subsystem [up to 255 characters].
Definition at line 115 of file subsystem.h.
Subsystem ID that configuration is for.
Definition at line 111 of file subsystem.h.
Type of subsystem.
Definition at line 113 of file subsystem.h.
The last time the contents of the Subsystem were updated.
Definition at line 114 of file subsystem.h.