MIRA
Classes | Public Member Functions | List of all members
AuthorityManager Class Reference

Central instance that stores all created Authorities. More...

#include <fw/AuthorityManager.h>

Public Member Functions

 AuthorityManager ()
 
 ~AuthorityManager ()
 
template<typename Reflector >
void reflect (Reflector &r)
 Reflect method for serialization. More...
 
void addAuthority (AbstractAuthority *authority)
 Adds an authority to the list of checked in authorities. More...
 
void removeAuthority (AbstractAuthority *authority)
 Removes an authority. More...
 
void start (const std::string &id) const
 Start the authority with the given id. More...
 
void stop (const std::string &id) const
 Stops the authority with the given id. More...
 
bool hasAuthority (const std::string &id) const
 Returns if an authority with the given global id exists. More...
 
bool isRunning (const std::string &id) const
 Returns true if authority with given id is started. More...
 
bool isLocal (const std::string &id) const
 Returns true if authority with given id is a local one (The instance lives in this framework/process) More...
 
bool hasUnrecoverableFailure (const std::string &id) const
 Returns true if authority with given id has an unrecoverable error. More...
 
StatusManager::StatusMap getStatusMap (const std::string &id) const
 Returns the status informations of the authority with given id. More...
 
AuthorityDescription getDescription (const std::string &id) const
 Returns the description of the authority with given id. More...
 
std::set< std::string > getPublishedChannels (const std::string &id) const
 Returns the published channels of the authority with given id. More...
 
std::set< std::string > getSubscribedChannels (const std::string &id) const
 Returns the subscribed channels of the authority with given id. More...
 
boost::shared_ptr< PropertyNodegetProperties (const std::string &id) const
 Returns the properties of the authority with given id. More...
 
std::set< std::string > getAuthorities () const
 Returns a list of existing authorities. More...
 
SharedAuthority getAuthority (const std::string &id)
 Get direct access to an authority pointer. More...
 

Detailed Description

Central instance that stores all created Authorities.

Each Authority will automatically register and unregister here when checking in / checking out.

Constructor & Destructor Documentation

◆ AuthorityManager()

◆ ~AuthorityManager()

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

Reflect method for serialization.

◆ addAuthority()

void addAuthority ( AbstractAuthority authority)

Adds an authority to the list of checked in authorities.

Exceptions
XInvalidParameterif authority already exists

◆ removeAuthority()

void removeAuthority ( AbstractAuthority authority)

Removes an authority.

◆ start()

void start ( const std::string &  id) const

Start the authority with the given id.

See AbstractAuthority::start()

◆ stop()

void stop ( const std::string &  id) const

Stops the authority with the given id.

See AbstractAuthority::stop()

◆ hasAuthority()

bool hasAuthority ( const std::string &  id) const

Returns if an authority with the given global id exists.

Returns
true if exists

◆ isRunning()

bool isRunning ( const std::string &  id) const

Returns true if authority with given id is started.

See AbstractAuthority::isRunning()

◆ isLocal()

bool isLocal ( const std::string &  id) const

Returns true if authority with given id is a local one (The instance lives in this framework/process)

◆ hasUnrecoverableFailure()

bool hasUnrecoverableFailure ( const std::string &  id) const

Returns true if authority with given id has an unrecoverable error.

See AbstractAuthority::hasUnrecoverableFailure()

◆ getStatusMap()

StatusManager::StatusMap getStatusMap ( const std::string &  id) const

Returns the status informations of the authority with given id.

See AbstractAuthority::getStatusMap()

◆ getDescription()

AuthorityDescription getDescription ( const std::string &  id) const

Returns the description of the authority with given id.

See AbstractAuthority::getDescription()

◆ getPublishedChannels()

std::set<std::string> getPublishedChannels ( const std::string &  id) const

Returns the published channels of the authority with given id.

See AbstractAuthority::getPublishedChannels()

◆ getSubscribedChannels()

std::set<std::string> getSubscribedChannels ( const std::string &  id) const

Returns the subscribed channels of the authority with given id.

See AbstractAuthority::getSubscribedChannels()

◆ getProperties()

boost::shared_ptr<PropertyNode> getProperties ( const std::string &  id) const

Returns the properties of the authority with given id.

See AbstractAuthority::getProperties()

◆ getAuthorities()

std::set<std::string> getAuthorities ( ) const

Returns a list of existing authorities.

Returns
list of authority names

◆ getAuthority()

SharedAuthority getAuthority ( const std::string &  id)

Get direct access to an authority pointer.

The access is protected by a wrapper object that ensures the lifetime of the Authority as long as the wrapper exists.


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