Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

JAUS::Subsystem Class Reference

Describes a Subsystem and it's configuration and identification. More...

#include <subsystem.h>

Inheritance diagram for JAUS::Subsystem:
JAUS::Vehicle

List of all members.

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.
ComponentGetComponent (const Address &id)
 Gets a pointer to the Component within the configuration.
const ComponentGetComponent (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 SubsystemClone () const
Subsystemoperator= (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].

Detailed Description

Describes a Subsystem and it's configuration and identification.

Definition at line 55 of file subsystem.h.


Member Typedef Documentation

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.


Member Enumeration Documentation

Enumerator:
Vehicle 
OCU 
OtherSubsystem 

Definition at line 60 of file subsystem.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

void Subsystem::AddComponent ( const Address component,
const Service::ID::Set services 
)

Adds a component and its services to the subsystem.

Parameters:
[in]componentComponent ID.
[in]servicesThe Service set for the component.

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.

void Subsystem::CopySubsystemMap ( const Map src,
Map dest 
) [static]

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.

Parameters:
[in]idID of the component to look for.
Returns:
Pointer to component data.

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.

Parameters:
[in]idID of the component to look for.
Returns:
Pointer to component data, NULL if not part of configuration.

Definition at line 331 of file subsystem.cpp.

Address::List Subsystem::GetComponentsWithService ( const std::string &  name ) const
Parameters:
[in]nameName of Service to look for.
Returns:
List of component IDs for those supporting a specific Service.

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.

Parameters:
[in]idID of the component to look for.
Returns:
True if the component is part of the configuration, otherwise false.

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.

Parameters:
[in]nameName of Service to look for.
[out]idOptional parameter. If not NULL, then the ID of the component with the service is returned.
Returns:
True if Service is supported by subsystem, otherwise false.

Definition at line 207 of file subsystem.cpp.

bool JAUS::Subsystem::IsVehicle (  ) const [inline]

Definition at line 96 of file subsystem.h.

Subsystem & Subsystem::operator= ( const Subsystem configuration )

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.

Parameters:
[in]componentComponent ID.

Definition at line 180 of file subsystem.cpp.


Member Data Documentation

Node configurations for this subsystem.

Definition at line 112 of file subsystem.h.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines