18 #define IMT_QUEUE_SIZE 1U
25#define IMT_CRC_SIZE 2U
32 #ifndef IMT_PAYLOAD_SIZE
33 #define IMT_PAYLOAD_SIZE 5000U + IMT_CRC_SIZE
36 #ifndef IMT_PAYLOAD_SIZE
37 #define IMT_PAYLOAD_SIZE 100000U + IMT_CRC_SIZE
76bool imtQueueMoAdd(
const uint16_t topic,
const char * data,
const size_t length);
86bool imtQueueMtAdd(
const uint16_t topic,
const uint16_t
id,
const size_t length);
bool imtQueueMtRemove(void)
Remove an outgoing mobile-terminated (MT) message from the queue.
Definition imt_queue.c:125
#define IMT_QUEUE_SIZE
Number of messages allowed in the internal message queue.
Definition imt_queue.h:18
bool imtQueueMoAdd(const uint16_t topic, const char *data, const size_t length)
Add an outgoing mobile-originated (MO) message to the queue.
Definition imt_queue.c:11
bool imtQueueMoRemove(void)
Remove an outgoing mobile-originated (MO) message from the queue.
Definition imt_queue.c:104
imt_t * imtQueueMoGetFirst(void)
Get the address of the head of the MO queue.
Definition imt_queue.c:68
imt_t * imtQueueMtGetLast(void)
Get the address of the latest message in the MT queue.
Definition imt_queue.c:92
void imtQueueInit(void)
Used to initialise both outgoing and incoming queues.
Definition imt_queue.c:146
bool imtQueueMtAdd(const uint16_t topic, const uint16_t id, const size_t length)
Add an incoming mobile-terminated (MT) message to the queue.
Definition imt_queue.c:31
void imtQueueMtLock(bool lock)
Lock or unlock the MT queue to prevent messages from getting discarded if full.
Definition imt_queue.c:56
imt_t * imtQueueMtGetFirst(void)
Get the address of the head of the MT queue.
Definition imt_queue.c:80
size_t imtQueueSize(imt_queue_t *queue)
Inline function used to get the current size of the selected queue.
Definition imt_queue.h:144
Circular buffer structure to hold queued messages.
Definition imt_queue.h:60
uint16_t tail
Definition imt_queue.h:64
uint16_t count
Definition imt_queue.h:62
uint16_t head
Definition imt_queue.h:63
uint16_t maxLength
Definition imt_queue.h:65
Represents a single message in the queue.
Definition imt_queue.h:46
bool readyToProcess
Definition imt_queue.h:51
uint16_t topic
Definition imt_queue.h:50
bool ready
Definition imt_queue.h:52
size_t length
Definition imt_queue.h:49
uint8_t * buffer
Definition imt_queue.h:48
uint16_t id
Definition imt_queue.h:47