MIRA
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
RemoteAuthority Class Reference

A remote authority is located in another framework. More...

#include <fw/RemoteAuthority.h>

Inheritance diagram for RemoteAuthority:
Inheritance graph
[legend]

Public Types

typedef std::multimap< std::string, std::string > ChannelNameMapping
 
typedef std::map< std::string, StatusChannelStatusMap
 

Public Member Functions

 RemoteAuthority (const AuthorityDescription &desc)
 
virtual ~RemoteAuthority ()
 
bool needSynchronizeProperties ()
 
void synchronizeProperties ()
 
Implementation of AbstractAuthority
virtual StatusManager::StatusMap getStatusMap ()
 Return a status map that contains the status of the authority as well as all registered submodules. More...
 
virtual boost::shared_ptr< PropertyNodegetProperties ()
 Returns the main property node of this Authority. More...
 
virtual std::set< std::string > getPublishedChannels ()
 Returns all published channels by this authority (and its sub-authorities) More...
 
virtual std::set< std::string > getSubscribedChannels ()
 Returns all subscribed channels by this authority (and its sub-authorities) More...
 
virtual std::set< std::string > getServiceInterfaces ()
 Returns all service interfaces provided by this authority. More...
 
virtual ChannelNameMapping getPublishedChannelNames ()
 Returns all published channels (pair of global and local names) by this authority (and its sub-authorities) More...
 
virtual ChannelNameMapping getSubscribedChannelNames ()
 Returns all subscribed channels (pair of global and local names) by this authority (and its sub-authorities) More...
 
virtual ChannelStatusMap getSubscribedChannelStatus ()
 Returns status for all subscribed channels (ok, no publisher, no data, ...) by this authority (and its sub-authorities) More...
 
virtual void start ()
 Starts/Resumes the authority. More...
 
virtual void stop ()
 Stops/Pauses the authority. To continue call start(). More...
 
virtual bool hasUnrecoverableFailure () const
 Returns true, if there was a failure while processing the immediate handlers. More...
 
virtual bool isStarted () const
 Returns true, if the authority was started (by calling start()). More...
 
virtual bool isRunning () const
 Return if the authority is running. More...
 
Detailed Information Retrieval

These methods allow to obtain detailed information on the Authority.

std::string getNamespace () const
 Return the resolved namespace of the authority. More...
 
std::string getGlobalName () const
 Return the fully qualified global name (includes namespace) This method returns the name without the trailing UUID added if the authority is anonymous. More...
 
std::string getGlobalID () const
 Return the fully qualified global id (includes namespace) More...
 
std::string getID () const
 Return the id of the authority. More...
 
std::string getName () const
 Return the name of the authority. More...
 
const AuthorityDescriptiongetDescription () const
 Return the description of this authority. More...
 

Protected Attributes

AuthorityDescription mDescription
 

Friends

class RemoteAuthorityPropertyUpdater
 

Detailed Description

A remote authority is located in another framework.

This class acts as an interface or proxy to remote authorities. All calls to this interface will be redirected to the remote instance using RPCs. For the RPC calls that are used internally a limited timeout is used. Hence, some of the methods below will throw an exception, if the operation was not successful. Getting remote properties will be handled in a separate worker thread. That means, that the first get on a remote property will cause an exception ("Waiting for property query"). Subsequent get calls will return the last received value of the property, or if an exception was thrown in the original property getter, it will be thrown here. Each get call on a property will trigger an update, which is executed by the worker thread.

Member Typedef Documentation

◆ ChannelNameMapping

typedef std::multimap<std::string, std::string> ChannelNameMapping
inherited

◆ ChannelStatusMap

typedef std::map<std::string, Status> ChannelStatusMap
inherited

Constructor & Destructor Documentation

◆ RemoteAuthority()

◆ ~RemoteAuthority()

virtual ~RemoteAuthority ( )
virtual

Member Function Documentation

◆ getStatusMap()

virtual StatusManager::StatusMap getStatusMap ( )
virtual

Return a status map that contains the status of the authority as well as all registered submodules.

Implements AbstractAuthority.

◆ getProperties()

virtual boost::shared_ptr<PropertyNode> getProperties ( )
virtual

Returns the main property node of this Authority.

Implements AbstractAuthority.

◆ getPublishedChannels()

virtual std::set<std::string> getPublishedChannels ( )
virtual

Returns all published channels by this authority (and its sub-authorities)

Implements AbstractAuthority.

◆ getSubscribedChannels()

virtual std::set<std::string> getSubscribedChannels ( )
virtual

Returns all subscribed channels by this authority (and its sub-authorities)

Implements AbstractAuthority.

◆ getServiceInterfaces()

virtual std::set<std::string> getServiceInterfaces ( )
virtual

Returns all service interfaces provided by this authority.

Implements AbstractAuthority.

◆ getPublishedChannelNames()

virtual ChannelNameMapping getPublishedChannelNames ( )
virtual

Returns all published channels (pair of global and local names) by this authority (and its sub-authorities)

Implements AbstractAuthority.

◆ getSubscribedChannelNames()

virtual ChannelNameMapping getSubscribedChannelNames ( )
virtual

Returns all subscribed channels (pair of global and local names) by this authority (and its sub-authorities)

Implements AbstractAuthority.

◆ getSubscribedChannelStatus()

virtual ChannelStatusMap getSubscribedChannelStatus ( )
virtual

Returns status for all subscribed channels (ok, no publisher, no data, ...) by this authority (and its sub-authorities)

Implements AbstractAuthority.

◆ start()

virtual void start ( )
virtual

Starts/Resumes the authority.

Implements AbstractAuthority.

◆ stop()

virtual void stop ( )
virtual

Stops/Pauses the authority. To continue call start().

Implements AbstractAuthority.

◆ hasUnrecoverableFailure()

virtual bool hasUnrecoverableFailure ( ) const
virtual

Returns true, if there was a failure while processing the immediate handlers.

This is an unrecoverable failure that will disallow the further execution of the authority.

Implements AbstractAuthority.

◆ isStarted()

virtual bool isStarted ( ) const
virtual

Returns true, if the authority was started (by calling start()).

It will return false, if the authority was not yet started or stopped.

Implements AbstractAuthority.

◆ isRunning()

virtual bool isRunning ( ) const
virtual

Return if the authority is running.

Implements AbstractAuthority.

◆ needSynchronizeProperties()

bool needSynchronizeProperties ( )

◆ synchronizeProperties()

void synchronizeProperties ( )

◆ getNamespace()

std::string getNamespace ( ) const
inlineinherited

Return the resolved namespace of the authority.

Returns
Namespace

◆ getGlobalName()

std::string getGlobalName ( ) const
inlineinherited

Return the fully qualified global name (includes namespace) This method returns the name without the trailing UUID added if the authority is anonymous.

Use getGlobalID() to obtain the unique id of the authority.

Returns
Global Name

◆ getGlobalID()

std::string getGlobalID ( ) const
inlineinherited

Return the fully qualified global id (includes namespace)

Returns
Global ID

◆ getID()

std::string getID ( ) const
inlineinherited

Return the id of the authority.

Returns
ID

◆ getName()

std::string getName ( ) const
inlineinherited

Return the name of the authority.

Returns
Name of this authority

◆ getDescription()

const AuthorityDescription& getDescription ( ) const
inlineinherited

Return the description of this authority.

Friends And Related Function Documentation

◆ RemoteAuthorityPropertyUpdater

friend class RemoteAuthorityPropertyUpdater
friend

Member Data Documentation

◆ mDescription

AuthorityDescription mDescription
protectedinherited

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