|
orca-robotics

INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications
REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map
DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca
PEOPLE
Contributors
Users

Project
Download
Mailing lists
|
|
|
orcaice::Context Class ReferenceComponent's naming and networking information.
More...
#include <context.h>
List of all members.
|
Public Member Functions |
const std::string & | tag () const |
| Component's tag used in configuration files.
|
const orca::FQComponentName & | name () const |
| Component's fully-qualified name given to the Registry.
|
bool | isApplication () const |
| Is this component executed inside and application or a service? Returns TRUE if this instance of the Component is used in a stand-alone application. Otherwise, returns FALSE, meaning that it's used inside an IceBox service.
|
Ice::CommunicatorPtr | communicator () const |
| Returns smart pointer to the component's communicator.
|
Ice::ObjectAdapterPtr | adapter () const |
| Returns smart pointer to the component's adapter.
|
Ice::PropertiesPtr | properties () const |
orcaice::Home & | home () const |
| Access to setting home information.
|
gbxsickacfr::gbxutilacfr::Tracer & | tracer () const |
| Access tracing functions.
|
gbxsickacfr::gbxutilacfr::Status & | status () const |
| Access status functions.
|
hydroutil::History & | history () const |
| Access history functions.
|
void | activate () |
void | shutdown () |
| Triggers component shutdown.
|
hydroutil::Context | toHydroContext (const std::string &prefixToStrip) const |
hydroutil::Context | toHydroContext () const |
Detailed Description
Component's naming and networking information.
Contains pointers to component's registered name plus its communicator, adapter, etc. It makes it easy to pass all this information to the network and hardware handlers from the class derived from Component.
A note on thread safety. None of access functions are thread-safe. However, all object which are referenced (with pointers and smart pointers) are themselves thread-safe.
This means that once a copy of of Context is created, it is safe to use it from different threads. Pass context by const reference and store a copy, e.g. a class definition would look like this: class MyClass
{
public:
MyClass( const orcaice::Context & context )
: context_(context) {};
private:
orcaice::Context context_;
}
Member Function Documentation
void orcaice::Context::activate |
( |
|
) |
|
|
|
Actiates server functionality of the component. This function is useful when component activation (technically Ice::ObjectAdapter activation) must be delayed until after something is initialized in the child thread. |
Ice::PropertiesPtr orcaice::Context::properties |
( |
|
) |
const [inline] |
|
|
Convenience function which returns smart pointer to the component's properties. Same as calling communicator()->getProperties() |
|
Conveniance function which is a shortcut for the function above with prefixToStrip = tag()+".Config." |
hydroutil::Context orcaice::Context::toHydroContext |
( |
const std::string & |
prefixToStrip |
) |
const |
|
|
Repackages itself into the form useful for initializing Hydro drivers. Strips 'prefixToStrip' from the front of all properties. Does not copy properties which do not begin with prefixToStrip. Transfers the following config parameters from Orca configs to Hydro configs:
- Orca.Warn.DefaultProperty
|
The documentation for this class was generated from the following files:
|
|