SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
FrtosQueue Struct Reference
Collaboration diagram for FrtosQueue:

Public Member Functions

 FrtosQueue (uint32_t cap, uint32_t msg_size, const char *name, uint8_t *ext_buf)
 FrtosQueue (uint32_t cap, uint32_t msg_size, const char *name)
 ~FrtosQueue ()

Static Public Member Functions

static uint8_t * AllocBuffer (uint32_t cap, uint32_t msg_size)

Public Attributes

stk::sync::MessageQueue m_mq
bool m_buf_owned
bool m_cb_owned
FrtosQueueSetm_set
 non-owning ptr to the queue set this member belongs to (nullptr if none)

Detailed Description

Definition at line 511 of file freertos_stk.cpp.

Constructor & Destructor Documentation

◆ FrtosQueue() [1/2]

FrtosQueue::FrtosQueue ( uint32_t cap,
uint32_t msg_size,
const char * name,
uint8_t * ext_buf )
inlineexplicit

Definition at line 514 of file freertos_stk.cpp.

516 : m_mq(ext_buf, static_cast<size_t>(cap), static_cast<size_t>(msg_size)),
517 m_buf_owned(false), m_cb_owned(true)
518 #if configUSE_QUEUE_SETS
519 , m_set(nullptr)
520 #endif
521 {
522 m_mq.SetTraceName(name);
523 }
stk::sync::MessageQueue m_mq
FrtosQueueSet * m_set
non-owning ptr to the queue set this member belongs to (nullptr if none)

References configUSE_QUEUE_SETS, m_buf_owned, m_cb_owned, m_mq, and m_set.

◆ FrtosQueue() [2/2]

FrtosQueue::FrtosQueue ( uint32_t cap,
uint32_t msg_size,
const char * name )
inlineexplicit

Definition at line 526 of file freertos_stk.cpp.

527 : m_mq(AllocBuffer(cap, msg_size),
528 static_cast<size_t>(cap),
529 static_cast<size_t>(msg_size)),
530 m_buf_owned(m_mq.IsStorageValid()), m_cb_owned(true)
531 #if configUSE_QUEUE_SETS
532 , m_set(nullptr)
533 #endif
534 {
535 m_mq.SetTraceName(name);
536 }
static uint8_t * AllocBuffer(uint32_t cap, uint32_t msg_size)

References AllocBuffer(), configUSE_QUEUE_SETS, m_buf_owned, m_cb_owned, m_mq, and m_set.

Here is the call graph for this function:

◆ ~FrtosQueue()

FrtosQueue::~FrtosQueue ( )
inline

Definition at line 538 of file freertos_stk.cpp.

539 {
540 if (m_buf_owned)
541 ObjFreeArray(m_mq.GetBuffer());
542 }
static void ObjFreeArray(void *ptr)

References m_buf_owned, m_mq, and ObjFreeArray().

Here is the call graph for this function:

Member Function Documentation

◆ AllocBuffer()

uint8_t * FrtosQueue::AllocBuffer ( uint32_t cap,
uint32_t msg_size )
inlinestatic

Definition at line 544 of file freertos_stk.cpp.

545 {
546 return ObjAllocArray<uint8_t>(static_cast<size_t>(cap) * msg_size);
547 }
static T * ObjAllocArray(size_t count)

References ObjAllocArray().

Referenced by FrtosQueue().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_buf_owned

bool FrtosQueue::m_buf_owned

Definition at line 551 of file freertos_stk.cpp.

Referenced by FrtosQueue(), FrtosQueue(), and ~FrtosQueue().

◆ m_cb_owned

bool FrtosQueue::m_cb_owned

Definition at line 552 of file freertos_stk.cpp.

Referenced by FrtosQueue(), FrtosQueue(), and xQueueCreateStatic().

◆ m_mq

◆ m_set

FrtosQueueSet* FrtosQueue::m_set

non-owning ptr to the queue set this member belongs to (nullptr if none)

Definition at line 554 of file freertos_stk.cpp.

Referenced by FrtosQueue(), FrtosQueue(), xQueueAddToSet(), and xQueueRemoveFromSet().


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