Is Luos for me? 🤔

General integration consideration

Library

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.c, luos_hal.h and luos_hal_config.h in your project;
  • Change, if necessary, luos_hal_config.h for 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);
  • Include luos.h on your source file.

Configuration

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
ParametersDefaults valueDescription
NBR_NAK_RETRY10Number of retries to send after a received NAK.
MAX_CONTAINER_NUMBER5Number of containers in the node (memory optimisation).
MSG_BUFFER_SIZE3*size_msgMessage buffer size. Max size of a message (3 * (7 bytes header + 128 bytes data + 2 bytes CRC)).
MAX_MSG_NB2*MAX_CONTAINER_NUMBERMax number of messages for a container that can be referenced.
NBR_PORT2Number 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.