INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
orcaice::Component Class ReferenceBase class for all Components using libOrcaIce. More...
Inherits hydroutil::Uncopyable. Inherited by bicycle::Component, disparity::Component, laserview::Component, orcaview2d::Component, orcaview3d::Component, probe::Component, registryview::Component, robot2d::Component, teleop::Component, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, and tracermon::Component.
Detailed DescriptionBase class for all Components using libOrcaIce. Deriving from this makes it easy to use code as either a stand-alone application (using orcaice::Application) or as a service in an IceBox (using orcaice::Service). Two functions must be implemented: start and stop. Most of the state of the component is summarized in its Component::context. The information is read-only because it is set prior to the component's initialization.
Component initialisation code can be put in two places: 1. Component Constructor
Clean-up code belongs in one of two places:
2. Component Destructor
Constructor & Destructor Documentation
Takes the text tag with which to identify it in the config files. The flag specifies what standard interfaces to initialize. It is also possible to configure standard interfaces with the following configuration parameters. Orca.Component.EnableTracer Orca.Component.EnableStatus Orca.Component.EnableHome Inside this contructor the component context is not initialized yet and cannot be used. Member Function Documentation
Activates the component's adapter. Activation makes provided interfaces accessible from the outside world. It also tries to register the adapter with the IceGrid Registry. If the registry is unreachable, the adapter is not fully activated. An Orca configuration property Orca.Component.RequireRegistry determines what happens if the Registry is not available. If RequireRegistry=1 (default) and the registry is unreachable, an orcaice::NetworkException is thrown. In this case it is safe to call activate again later, hoping that the regisry will become reachable. If RequireRegistry=0 no exception is thrown. References orcaice::Context::activate().
Component's "context", which contains component's naming and networking information. It can be used directly or passed to threads and classes. For example: //!context().tracer().info("Everything is OK"); //!MainLoop myloop( context() ); //!
This function is called by Application when the executable is called with References hydroutil::basename().
This function is called by the component's container (Application or Service). It should return immediately, possibly after launching a thread. GUI components are an exception to this rule, they may run in the calling thread provided that the Ctrl-C handler was not installed (see Application, Service).
This function is called by the component's container (Application or Service) when the component is ordered to stop execution. Default implementation does nothing.
This function is called by Application on startup (including when the executable is ! called with virtual const std::string version() const { return std::string(PROJECT_VERSION); }; ! Note that PROJECT_VERSION is defined automatically for all projects. The documentation for this class was generated from the following files:
|
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)