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
|
Suggestions on the Internal Component Structure
libOrcaIce . Several of the components in the repository are designed in this way.A basic component template looks like this:
The main pieces are:
This the main class which instantiates and contains the other pieces. Deriving from orcaice::Component makes it easy to place it within either a stand-alone application or an IceBox Service. To implement an orcaice::Component, the 'start()' and 'stop()' functions must be implemented.
MyInterface is called MyInterfaceI . The files are named myinterface.h and myinterface.cpp .Remote Method Invocations arrive asynchronously from the outside world or from the Main Loop. Requests from the outside world can be answered using the information in the thread-safe buffers.
MainLoop's job is to be an intermediary between Hardware/Algorithm and Interface_Implementation (via the Buffers). A loop might look somthing like this (going vaguely clockwise in the figure):
The purpose of this design is try to separate (a) network communication, (b) sequence of control (including setup/shutdown, component life-cycle), and (c) the algorithm or hardware driver itself. |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)