Luos works as a code library running on nodes. To match Luos library with your hardware, Luos offers a Hardware Abstraction Layer for various devices in LuosHALHardware Abstraction Layer used to fit Luos with various hardware designs..
- LuosHAL: This repository provides a list of family devices covered to match the Luos library with your hardware.
- Luos: This is the main library you will be working with.
To make it work in your environment, you have to:
- Include the Luos lib folders in your project compilation;
- Select the right LuosHAL for your device family in LuosHAL folder, and include
luos_hal_config.hin your project;
- Change, if necessary,
luos_hal_config.hfor your project. The default configuration created by Luos is an example for a MCU family that can be modify to fit with your design (eg: match pins with your design);
luos.hon your source file.
Luos allow you to configure some parameters allowing to optimize the memory usage to your needs. To make it we advise to use a configuration file call node_config.h. Put the file at the root folder of your project and add it in the compiling variables section of your IDE using a -include node_config.h.
You can use it to set all your custom configuration:
- for the services of your node
- for Luos library of your node
- to modify Luos HAL config to make it fit with your design
|NBR_NAK_RETRY||10||Number of retries to send after a received NAK.|
|MAX_CONTAINER_NUMBER||5||Number of containers in the node (memory optimisation).|
|MSG_BUFFER_SIZE||3*size_msg||Message buffer size. Max size of a message (3 * (7 bytes header + 128 bytes data + 2 bytes CRC)).|
|MAX_MSG_NB||2*MAX_CONTAINER_NUMBER||Max number of messages for a container that can be referenced.|
|NBR_PORT||2||Number of PTP on the node ( max 8). See electronic design page.|
You will find the default configuration for Luos Library in the file config.h,
Check the Luos_hal_config.h of your MCU family to see parameter that can be change to fit your design.
FYI: Every examples provided by luos have a node_config.h files that can be use as base to fit your project needs.