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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

Adding Interfaces to Orca

Note:
Reviewed for release 2.9.0
See also:
Adding Souce Code to Orca.
How to write an interface file
Orca interfaces are written in Slice interface definition language. There are no restrictions on what an Orca interface should or should not contain.

A Slice interface is defined as a set operations. Opararations can contain input and output parameters. These parameters can be represented in different ways listed here in order of increasing complexity:

  • struct
    • In C++, this becomes a simple structure.
    • Use these unless there is a good reason not to.
  • class with member variables only
    • In C++, this becomes a smart pointer to class.
    • Use these if you need inheritance in object definition.
  • interface
    • In C++, this becomes a proxy to a remote interface.
    • Use these if you need to return an address of another interface.
  • class with member variables and functions
    • Same as class without functioins but requires implementing factories.
    • Use these if you need to perform local operations using remote objects.

For more information read the chapter on Slice in the Ice Manual [download]

How to add an interface to the build system
  1. Write a Slice file (*.ice) which defines an interface.
    • Slice files are in [ORCA_SRC]/src/interfaces/slice/orca
    • To create a new interface start by copying a similar file.
  2. Add the filename of the new file to the list of Slice sources
    • Edit file [ORCA_SRC]/src/interfaces/slice/orca/slice_sources.cmake

Adding support for you interface
Optionally, consider adding support for you interface in libraries and utilities. Library libOrcaObjects has many functions specialized for data objects, e.g. toString() and setSane(). The following tools have a plug-in architecture, with a plug-in per interface:
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5