Myriota Flex SDK 2.6.0
Loading...
Searching...
No Matches
User Messages

Build and schedule messages for satellite transmission. More...

Classes

struct  FLEX_MessageStatus
 Status information for a message in the uplink queue. More...
 

Enumerations

enum  FLEX_MessageTransmitStatus { FLEX_MSG_TRANSMIT_PENDING , FLEX_MSG_TRANSMIT_ONGOING , FLEX_MSG_TRANSMIT_COMPLETE , FLEX_MSG_TRANSMIT_EXPIRED }
 Message transmission status. More...
 

Functions

int FLEX_MessageSchedule (const uint8_t *const Message, const size_t MessageSize)
 
int FLEX_MessageSlotsFree (void)
 
size_t FLEX_MessageBytesFree (void)
 
void FLEX_MessageSave (void)
 
void FLEX_MessageQueueClear (void)
 Clear all messages in the message queue.
 
int FLEX_MessageSlotsMax (void)
 
int FLEX_MessageQueueStatus (FLEX_MessageStatus *Status, const int StatusCount)
 
int FLEX_MessageQueueDelete (const uint16_t MessageID)
 

Detailed Description

Build and schedule messages for satellite transmission.

Enumeration Type Documentation

◆ FLEX_MessageTransmitStatus

Message transmission status.

Enumerator
FLEX_MSG_TRANSMIT_PENDING 

Message not yet transmitted.

FLEX_MSG_TRANSMIT_ONGOING 

Message is currently being transmitted.

FLEX_MSG_TRANSMIT_COMPLETE 

Message fully transmitted.

FLEX_MSG_TRANSMIT_EXPIRED 

Message expired before completion.

Function Documentation

◆ FLEX_MessageSchedule()

int FLEX_MessageSchedule ( const uint8_t *const Message,
const size_t MessageSize )

Calling ScheduleMessage when the number of slots returned by MessageSlotsFree is 0 will replace an existing message in the queue. This may result in dropped messages.

Parameters
[in]Messagepointer to the message to be scheduled.
[in]MessageSizelength of the message.
Returns
the message ID on success and < 0 if failed.

◆ FLEX_MessageSlotsFree()

int FLEX_MessageSlotsFree ( void )

Returns the number of available slots in the internal message queue, that is, the number of messages that can be scheduled with FLEX_MessageSchedule

◆ FLEX_MessageBytesFree()

size_t FLEX_MessageBytesFree ( void )

Returns the number of bytes remaining in the internal queue, that is, the number of bytes that can be scheduled with FLEX_MessageSchedule

Returns
number of bytes remaining in the internal queue.

◆ FLEX_MessageSave()

void FLEX_MessageSave ( void )

Save all messages in the message queue to the module's persistent storage. Saved messages will be transmitted after reset.

◆ FLEX_MessageSlotsMax()

int FLEX_MessageSlotsMax ( void )

Returns the maximum number of message slots available in the internal message queue. This value represents the total capacity of the queue, independent of how many slots are currently free.

Returns
maximum number of message slots available.

◆ FLEX_MessageQueueStatus()

int FLEX_MessageQueueStatus ( FLEX_MessageStatus * Status,
const int StatusCount )

Returns the status of messages in the message queue. Fills up to status_count entries in the status array.

Parameters
[in]Statuspointer to an array of Flex_MessageStatus structs.
[in]StatusCountmaximum number of Flex_MessageStatus structs to fill.
Returns
the number of entries written if succeeded and < 0 if failed.
Return values
-FLEX_ERROR_EINVALinvalid input.

◆ FLEX_MessageQueueDelete()

int FLEX_MessageQueueDelete ( const uint16_t MessageID)

Deletes a message from the message queue based on its message ID.

Returns
FLEX_SUCCESS (0) if succeeded and < 0 if failed.
Return values
-FLEX_ERROR_EINVALmessage ID was not found.