Skip to main content
Version: 3.0.0

Luos engine's APIs

By writing services code you will have the opportunity to use the Luos engine's APIs. These APIs are designed to help you to manage your messages and services.

Luos messages management functions

DescriptionFunctionReturn
Remove all pending massagesLuos_Flush(void);void
Send a Luos messageLuos_SendMsg(service_t *service, msg_t *msg);error_return_t
Allow to know if all TX messages have been processedLuos_TxComplete(void);error_return_t

Luos polling message management functions (please consider using callback instead)

DescriptionFunctionReturn
Read a Luos messageLuos_ReadMsg(service_t *service, msg_t *msg_to_write);error_return_t
Read a Luos message comming from a specific serviceLuos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_to_write);error_return_t
Get the number of available messagesLuos_NbrAvailableMsg(void);uint16_t

Luos timestamp management functions

DescriptionFunctionReturn
Get the current timestampLuos_Timestamp(void);time_luos_t
Return true if the given message is timestampedLuos_IsMsgTimstamped(const msg_t *msg);bool
Extract the timestamp from a messageLuos_GetMsgTimestamp(msg_t *msg);time_luos_t
Send a timestamped Luos messageLuos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp);error_return_t

Luos big data management functions

DescriptionFunctionReturn
Send the remaining data in case of long messagesLuos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size);void
Receive the remaining data in case of long messagesLuos_ReceiveData(service_t *service, msg_t *msg, void *bin_data);data size at the end of reception

Luos pub/sub functions

DescriptionFunctionReturn
Subscribe to a new topic for pub/sub messagesLuos_Subscribe(service_t *service, uint16_t topic);error_return_t
Unsubscribe from a topic for pub/sub messagesLuos_Unsubscribe(service_t *service, uint16_t topic);error_return_t

Luos streaming messaging management functions

DescriptionFunctionReturn
Send data stored in a streaming channelLuos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream);void
Send a specific quantity of data stored in a streaming channelLuos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size);void
Receive data from a streaming channelLuos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream);error_return_t

Luos streaming buffer functions

DescriptionFunctionReturn
Create a streaming rung bufferStreaming_CreateChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size);streaming_channel_t
Reset the streaming bufferStreaming_ResetChannel(streaming_channel_t *stream);void
Write samples in the bufferStreaming_PutSample(streaming_channel_t *stream, const void *data, uint16_t size);uint16_t
Get samples from the bufferStreaming_GetSample(streaming_channel_t *stream, void *data, uint16_t size);uint16_t
Get the number of available sample in the bufferStreaming_GetAvailableSampleNB(streaming_channel_t *stream);uint16_t
Get the number of available before the buffer endStreaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream);uint16_t
Indicate to the streaming structure that samples have been added to the buffer (this is mostly used with DMA)Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size);uint16_t
Indicate to the streaming structure that samples have been consumed from the buffer (this is mostly used with DMA)Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size);uint16_t