SmartSnippets DA1459x SDK
Data Fields

Structure for messages with id, type, data. More...

#include <msg_queues.h>

Data Fields

MSG_ID id
 
MSG_TYPE type
 
MSG_SIZE size
 
uint8_t * data
 
MSG_FREE free_cb
 

Detailed Description

Structure for messages with id, type, data.

Structure that will be passed to message queues. Content of this structure will be copied to queue and can be released by sender except data pointed by data. When message is sent with msg_queue_put() entire msg structure is copied. The data part of variable size pointed by data is not copied at this time. When receiving a message, msg_release() will be called, which will in turn call free_cb(data) if free_cb() is not NULL. free_cb is set by message queue allocator when msg_queue_init_msg() is used to initialize message. It is also set with msg_init() or msq_queue_send_zero_copy() function calls.

Field Documentation

◆ data

uint8_t* msg::data

Variable part of message

◆ free_cb

MSG_FREE msg::free_cb

Pointer to function to call when receiver is done with message

◆ id

MSG_ID msg::id

Message ID - not touched by queues

◆ size

MSG_SIZE msg::size

Size of data pointed by data

◆ type

MSG_TYPE msg::type

Message type - not touched by queues


The documentation for this struct was generated from the following file: