Skip to main content
Version: 2.7.0

Types of services

As explained in the service page, Luos enables message exchanges between services in a straightforward way for developers. Still, to easily use a service you need to know their interfaces or how to interact with them.

In your code, in order to know what are the capabilities and the purpose of any services of your product, you need to know their types.

Standard interface between services

Types allow to define the interface of a service. Types create a common API between services.

The following example uses the most straightforward type available in Luos: STATE_TYPE defines the capability to manage state messages format. With this information, each application that wants to send a message to the LED driver knows how to communicate with this service; it only has to put the state information, and the LED can then be controlled.

To define the capabilities of a specific type, you can use or create profiles. Profiles are API definitions that can be applied to a service.

List of all supported services' type

IDTypeDescription
0VOID_TYPEA service doing nothing, it allows you to detect a board with no running service on it.
1GATE_TYPEThe gate service allows to translate JSON to Luos and Luos to JSON constantly. This service continuously pulls data from the sensors detected on the network and streams it into a JSON format. Also, it can receive JSON data and convert it into a service command.
2COLOR_TYPEThe Color service handles an RGB color data.
3ANGLE_TYPEThe Angle service handles a rotation position value.
4STATE_TYPEThe State service can handles a sensor (Button board for example), or an actuator (Power Switch board for example). Generally, this type of services allows to manage bi-state elements such as on/off, pushed/release, 0/1, ...
5DISTANCE_TYPEThe Distance service handles a sensor measuring a distance.
6VOLTAGE_TYPEThe Voltage service handles a sensor measuring voltage.
7IMU_TYPEThe Imu service handles an inertial sensor.
8LIGHT_TYPEThe Light service handles a sensor measuring a light intensity.
9LOAD_TYPEThe Load service handles a sensor measuring a force.
10PIPE_TYPEA communication service with the external world.
11MOTOR_TYPEAn universal motor handling speed, position, and torque control, limits and measurement.
12SERVO_MOTOR_TYPEThe Servo service allows to drive RC elements like servomotor.
13INSPECTOR_TYPEA service allowing an external program to take control and inspect an embedded Luos network through a PIPE service.
14LUOS_LAST_TYPEThis is not an actual type this is the beginning of the user specific type space.