A service is a block of code which will provide functionality. Services are able to communicate with any other services present in the Luos network.
A service can be an application or a driver.
Each service provides a particular set of tasks such as managing a motor, handling a laser range finder, or more complex operations like computing an inverse-kinematics.
Each service is hosted in a single nodeHardware element (MCU) hosting and running Luos and hosting one or several services. (MCU), but a node can handle several services at the same time and manage communication between them and between other services hosted in other nodes, using the same network interface.
As a developer you will always develop your functionalities into services, and never into the
main() program. The only information that should be put on the
main() code are MCU setup parameters and services' run functions.
To properly work, each service has some properties allowing other services to recognize and access it:
|ID||The ID is a unique number given to each service depending on their physical position. The system automatically assigns each ID during the detection phase. If you move a service from a microcontroller A to a microcontroller B on a given device, the ID will change. In the same way, if you change the wiring order of a microcontroler on the network on a given device, the ID will change too.||Integer|
|TYPE||The type defines the service purpose. A few types are predefined and can be used, or new ones can be created. The service type can't be changed after service initialization. See Type for more informations.||String|
|ALIAS||Alias is the name of the service. It's used to easily identify a service. Each service has a default alias which can be changed by users. For example, a service with the default alias ||String|