Overview

HemiStereo sensors come with a minimal operating system installed which contains the Linux kernel, device drivers and Docker as container engine. Device applications encapsulated in one or more containers defined through Docker Compose files. If you want to create your own application, see section Custom apps for reference.

Application structure

Applications provided by 3dvisionlabs are composed of the following components:

Inputs

…are used to send messages to the application. The message type is fixed and defined by the application.

Outputs

…are used to retrieve messages from the application. The message type is fixed and defined by the application. Clients can subscribe to outputs to retrieve the messages produced by the application.

Properties

…are used to change parameters of the application. At the moment, properties can have the following types: Int32, UInt32, Int64, UInt64, Float, Double, Bool, String, Enum.

The components of an application are addressable by names defined by the application itself. A gRPC service is exposed for interfacing the application. Please see Application service for the service description.

Service selection

Multiple apps can run on a sensor simultaneously. Because each app uses the same service description, clients must be able to select a specific application. To achieve this, an application manager is used as service gateway. Instead of connecting directly to the app, clients connect to the application manager which routes requests to a specific app. To let the application manager select the right app, clients have to provide the app name as additional field app inside the http header. For example, in C++ this can be achieved by adding metadata to the gRPC client context:

// create a new gRPC context
grpc::ClientContext context;

// add the app name to the context as metadata
// to insert it into the http header
std::string appName = "stereo";
context.AddMetadata("app", appName);