libxr 1.0
Want to be the best embedded framework
|
线程安全的队列实现,基于 FreeRTOS 消息队列 Thread-safe queue implementation based on FreeRTOS message queue More...
#include <lock_queue.hpp>
Public Member Functions | |
LockQueue (size_t length) | |
构造函数,创建指定长度的队列 Constructor that creates a queue of specified length | |
~LockQueue () | |
析构函数,删除队列 Destructor that deletes the queue | |
ErrorCode | Push (const Data &data) |
将数据推入队列(非阻塞) Pushes data into the queue (non-blocking) | |
ErrorCode | Pop (Data &data, uint32_t timeout=UINT32_MAX) |
从队列弹出数据(阻塞) Pops data from the queue (blocking) | |
ErrorCode | Pop (uint32_t timeout) |
从队列弹出数据(不关心数据值) Pops data from the queue without retrieving its value | |
ErrorCode | Overwrite (const Data &data) |
覆盖队列中的数据 Overwrites the data in the queue | |
ErrorCode | PushFromCallback (const Data &data, bool in_isr) |
从 ISR(中断服务例程)推入数据 Pushes data into the queue from an ISR (Interrupt Service Routine) | |
ErrorCode | PopFromCallback (Data &data, bool in_isr) |
从 ISR(中断服务例程)弹出数据 Pops data from the queue in an ISR (Interrupt Service Routine) | |
ErrorCode | PopFromCallback (bool in_isr) |
从 ISR(中断服务例程)弹出数据 Pops data from the queue in an ISR (Interrupt Service Routine) | |
ErrorCode | OverwriteFromCallback (const Data &data, bool in_isr) |
从 ISR 覆盖队列中的数据 Overwrites the data in the queue from an ISR | |
ErrorCode | Peek (Data &data) |
查看队列中的数据(非阻塞) Peeks at the data in the queue (non-blocking) | |
ErrorCode | PeekFromCallback (Data &data, bool in_isr) |
从 ISR 查看队列中的数据 Peeks at the data in the queue from an ISR | |
void | Reset () |
重置队列,清空所有数据 Resets the queue, clearing all data | |
size_t | Size () |
获取队列中的数据项数量 Gets the number of items in the queue | |
size_t | EmptySize () |
获取队列剩余的可用空间 Gets the remaining available space in the queue | |
size_t | SizeFromCallback (bool in_isr) |
从 ISR 获取队列大小 Gets the queue size from an ISR | |
size_t | EmptySizeFromCallback (bool in_isr) |
从 ISR 获取队列剩余的可用空间 Gets the remaining available space in the queue from an ISR | |
LockQueue (size_t length) | |
构造函数,初始化队列 Constructor to initialize the queue | |
~LockQueue () | |
析构函数,释放资源 Destructor to release resources | |
ErrorCode | Push (const Data &data) |
向队列中推送数据 Pushes data into the queue | |
ErrorCode | Pop (Data &data, uint32_t timeout) |
从队列中弹出数据(带超时) Pops data from the queue with timeout | |
ErrorCode | Pop () |
无参数弹出数据 Pops data from the queue without storing it | |
ErrorCode | PopFromCallback (bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | Pop (uint32_t timeout) |
带超时的弹出数据 Pops data from the queue with timeout | |
ErrorCode | Overwrite (const Data &data) |
覆盖队列中的数据 Overwrites data in the queue | |
ErrorCode | PushFromCallback (const Data &data, bool in_isr) |
从回调函数中推送数据 Pushes data into the queue from a callback function | |
ErrorCode | PopFromCallback (Data &data, bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | OverwriteFromCallback (const Data &data, bool in_isr) |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function | |
ErrorCode | Peek (Data &item) |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it | |
ErrorCode | PeekFromCallback (Data &item, bool in_isr) |
从回调函数中查看数据 Peeks at the data in the queue from a callback function | |
void | Reset () |
重置队列 Resets the queue | |
size_t | Size () |
获取队列中的数据项数量 Gets the number of items in the queue | |
size_t | EmptySize () |
获取队列的剩余容量 Gets the remaining capacity of the queue | |
size_t | SizeFromCallback (bool in_isr) |
从回调函数中获取队列大小 Gets the queue size from a callback function | |
size_t | EmptySizeFromCallback (bool in_isr) |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function | |
LockQueue (size_t length) | |
构造函数,初始化队列 Constructor to initialize the queue | |
~LockQueue () | |
析构函数,释放资源 Destructor to release resources | |
ErrorCode | Push (const Data &data) |
向队列中推送数据 Pushes data into the queue | |
ErrorCode | Pop (Data &data, uint32_t timeout) |
从队列中弹出数据(带超时) Pops data from the queue with timeout | |
ErrorCode | Pop () |
无参数弹出数据 Pops data from the queue without storing it | |
ErrorCode | PopFromCallback (bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | Pop (uint32_t timeout) |
带超时的弹出数据 Pops data from the queue with timeout | |
ErrorCode | Overwrite (const Data &data) |
覆盖队列中的数据 Overwrites data in the queue | |
ErrorCode | PushFromCallback (const Data &data, bool in_isr) |
从回调函数中推送数据 Pushes data into the queue from a callback function | |
ErrorCode | PopFromCallback (Data &data, bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | OverwriteFromCallback (const Data &data, bool in_isr) |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function | |
ErrorCode | Peek (Data &item) |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it | |
ErrorCode | PeekFromCallback (Data &item, bool in_isr) |
从回调函数中查看数据 Peeks at the data in the queue from a callback function | |
void | Reset () |
重置队列 Resets the queue | |
size_t | Size () |
获取队列中的数据项数量 Gets the number of items in the queue | |
size_t | EmptySize () |
获取队列的剩余容量 Gets the remaining capacity of the queue | |
size_t | SizeFromCallback (bool in_isr) |
从回调函数中获取队列大小 Gets the queue size from a callback function | |
size_t | EmptySizeFromCallback (bool in_isr) |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function | |
LockQueue (size_t length) | |
构造函数,初始化队列 Constructor to initialize the queue | |
~LockQueue () | |
析构函数,释放资源 Destructor to release resources | |
ErrorCode | Push (const Data &data) |
向队列中推送数据 Pushes data into the queue | |
ErrorCode | Pop (Data &data, uint32_t timeout) |
从队列中弹出数据(带超时) Pops data from the queue with timeout | |
ErrorCode | Pop () |
无参数弹出数据 Pops data from the queue without storing it | |
ErrorCode | PopFromCallback (bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | Pop (uint32_t timeout) |
带超时的弹出数据 Pops data from the queue with timeout | |
ErrorCode | Overwrite (const Data &data) |
覆盖队列中的数据 Overwrites data in the queue | |
ErrorCode | PushFromCallback (const Data &data, bool in_isr) |
从回调函数中推送数据 Pushes data into the queue from a callback function | |
ErrorCode | PopFromCallback (Data &data, bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | OverwriteFromCallback (const Data &data, bool in_isr) |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function | |
ErrorCode | Peek (Data &item) |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it | |
ErrorCode | PeekFromCallback (Data &item, bool in_isr) |
从回调函数中查看数据 Peeks at the data in the queue from a callback function | |
void | Reset () |
重置队列 Resets the queue | |
size_t | Size () |
获取队列中的数据项数量 Gets the number of items in the queue | |
size_t | EmptySize () |
获取队列的剩余容量 Gets the remaining capacity of the queue | |
size_t | SizeFromCallback (bool in_isr) |
从回调函数中获取队列大小 Gets the queue size from a callback function | |
size_t | EmptySizeFromCallback (bool in_isr) |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function | |
LockQueue (size_t length) | |
构造函数,初始化队列 Constructor to initialize the queue | |
~LockQueue () | |
析构函数,释放资源 Destructor to release resources | |
ErrorCode | Push (const Data &data) |
向队列中推送数据 Pushes data into the queue | |
ErrorCode | Pop (Data &data, uint32_t timeout) |
从队列中弹出数据(带超时) Pops data from the queue with timeout | |
ErrorCode | Pop () |
无参数弹出数据 Pops data from the queue without storing it | |
ErrorCode | PopFromCallback (bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | Pop (uint32_t timeout) |
带超时的弹出数据 Pops data from the queue with timeout | |
ErrorCode | Overwrite (const Data &data) |
覆盖队列中的数据 Overwrites data in the queue | |
ErrorCode | PushFromCallback (const Data &data, bool in_isr) |
从回调函数中推送数据 Pushes data into the queue from a callback function | |
ErrorCode | PopFromCallback (Data &data, bool in_isr) |
从回调函数中弹出数据 Pops data from the queue in a callback function | |
ErrorCode | OverwriteFromCallback (const Data &data, bool in_isr) |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function | |
ErrorCode | Peek (Data &item) |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it | |
ErrorCode | PeekFromCallback (Data &item, bool in_isr) |
从回调函数中查看数据 Peeks at the data in the queue from a callback function | |
void | Reset () |
重置队列 Resets the queue | |
size_t | Size () |
获取队列中的数据项数量 Gets the number of items in the queue | |
size_t | EmptySize () |
获取队列的剩余容量 Gets the remaining capacity of the queue | |
size_t | SizeFromCallback (bool in_isr) |
从回调函数中获取队列大小 Gets the queue size from a callback function | |
size_t | EmptySizeFromCallback (bool in_isr) |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function | |
Private Attributes | |
QueueHandle_t | queue_handle_ |
FreeRTOS 队列句柄 FreeRTOS queue handle. | |
const uint32_t | LENGTH |
队列最大长度 Maximum queue length | |
Queue< Data > | queue_handle_ |
底层队列对象 Underlying queue object | |
Mutex | mutex_ |
互斥锁 Mutex for thread safety | |
Semaphore | semaphore_handle_ |
信号量 Semaphore for synchronization | |
线程安全的队列实现,基于 FreeRTOS 消息队列 Thread-safe queue implementation based on FreeRTOS message queue
线程安全的锁队列类,提供同步和异步操作支持 Thread-safe lock queue class with synchronous and asynchronous operation support
Data | 队列存储的数据类型 The type of data stored in the queue |
该类封装了 FreeRTOS 的 xQueue
,提供线程安全的 Push、Pop、Peek 操作, 并支持中断服务例程(ISR)中的数据操作,确保任务间的数据同步与通信。
This class wraps FreeRTOS's xQueue
, providing thread-safe Push, Pop, and Peek operations. It also supports operations in Interrupt Service Routines (ISR) to ensure safe data synchronization and communication between tasks.
Data | 队列存储的数据类型 The type of data stored in the queue |
Definition at line 25 of file lock_queue.hpp.
|
inline |
构造函数,创建指定长度的队列 Constructor that creates a queue of specified length
length | 队列的最大长度 The maximum length of the queue |
Definition at line 33 of file lock_queue.hpp.
|
inline |
|
inline |
构造函数,初始化队列 Constructor to initialize the queue
length | 队列的最大长度 Maximum length of the queue |
Definition at line 28 of file lock_queue.hpp.
|
inline |
|
inline |
构造函数,初始化队列 Constructor to initialize the queue
length | 队列的最大长度 Maximum length of the queue |
Definition at line 28 of file lock_queue.hpp.
|
inline |
|
inline |
构造函数,初始化队列 Constructor to initialize the queue
length | 队列的最大长度 Maximum length of the queue |
Definition at line 28 of file lock_queue.hpp.
|
inline |
|
inline |
构造函数,初始化队列 Constructor to initialize the queue
length | 队列的最大长度 Maximum length of the queue |
Definition at line 28 of file lock_queue.hpp.
|
inline |
|
inline |
获取队列剩余的可用空间 Gets the remaining available space in the queue
Definition at line 297 of file lock_queue.hpp.
|
inline |
获取队列的剩余容量 Gets the remaining capacity of the queue
Definition at line 238 of file lock_queue.hpp.
|
inline |
获取队列的剩余容量 Gets the remaining capacity of the queue
Definition at line 238 of file lock_queue.hpp.
|
inline |
获取队列的剩余容量 Gets the remaining capacity of the queue
Definition at line 238 of file lock_queue.hpp.
|
inline |
获取队列的剩余容量 Gets the remaining capacity of the queue
Definition at line 238 of file lock_queue.hpp.
|
inline |
从 ISR 获取队列剩余的可用空间 Gets the remaining available space in the queue from an ISR
in_isr | 是否在 ISR 环境中 Whether it is being called from an ISR |
Definition at line 323 of file lock_queue.hpp.
|
inline |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 264 of file lock_queue.hpp.
|
inline |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 264 of file lock_queue.hpp.
|
inline |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 264 of file lock_queue.hpp.
|
inline |
从回调函数中获取队列的剩余容量 Gets the remaining capacity of the queue from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 264 of file lock_queue.hpp.
覆盖队列中的数据 Overwrites the data in the queue
data | 要写入的新数据 The new data to overwrite |
Definition at line 109 of file lock_queue.hpp.
覆盖队列中的数据 Overwrites data in the queue
data | 要覆盖写入的数据 The data to overwrite |
Definition at line 128 of file lock_queue.hpp.
覆盖队列中的数据 Overwrites data in the queue
data | 要覆盖写入的数据 The data to overwrite |
Definition at line 128 of file lock_queue.hpp.
覆盖队列中的数据 Overwrites data in the queue
data | 要覆盖写入的数据 The data to overwrite |
Definition at line 128 of file lock_queue.hpp.
覆盖队列中的数据 Overwrites data in the queue
data | 要覆盖写入的数据 The data to overwrite |
Definition at line 128 of file lock_queue.hpp.
|
inline |
从 ISR 覆盖队列中的数据 Overwrites the data in the queue from an ISR
data | 要写入的新数据 The new data to overwrite |
in_isr | 是否在 ISR 环境中 Whether it is being called from an ISR |
该方法在中断上下文中执行 Overwrite()
,但目前 in_isr
参数未被使用。
This method performs Overwrite()
in an interrupt context, but currently, the in_isr
parameter is unused.
Definition at line 234 of file lock_queue.hpp.
|
inline |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function
data | 要覆盖写入的数据 The data to overwrite |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 173 of file lock_queue.hpp.
|
inline |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function
data | 要覆盖写入的数据 The data to overwrite |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 173 of file lock_queue.hpp.
|
inline |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function
data | 要覆盖写入的数据 The data to overwrite |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 173 of file lock_queue.hpp.
|
inline |
从回调函数中覆盖数据 Overwrites data in the queue from a callback function
data | 要覆盖写入的数据 The data to overwrite |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 173 of file lock_queue.hpp.
|
inline |
查看队列中的数据(非阻塞) Peeks at the data in the queue (non-blocking)
data | 存储数据的变量 Variable to store the peeked data |
Definition at line 246 of file lock_queue.hpp.
|
inline |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it
item | 存储查看数据的变量 Variable to store the peeked data |
Definition at line 185 of file lock_queue.hpp.
|
inline |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it
item | 存储查看数据的变量 Variable to store the peeked data |
Definition at line 185 of file lock_queue.hpp.
|
inline |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it
item | 存储查看数据的变量 Variable to store the peeked data |
Definition at line 185 of file lock_queue.hpp.
|
inline |
查看队列中的数据(不弹出) Peeks at the data in the queue without popping it
item | 存储查看数据的变量 Variable to store the peeked data |
Definition at line 185 of file lock_queue.hpp.
|
inline |
从 ISR 查看队列中的数据 Peeks at the data in the queue from an ISR
data | 存储数据的变量 Variable to store the peeked data |
in_isr | 是否在 ISR 环境中 Whether it is being called from an ISR |
Definition at line 266 of file lock_queue.hpp.
|
inline |
从回调函数中查看数据 Peeks at the data in the queue from a callback function
item | 存储查看数据的变量 Variable to store the peeked data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 200 of file lock_queue.hpp.
|
inline |
从回调函数中查看数据 Peeks at the data in the queue from a callback function
item | 存储查看数据的变量 Variable to store the peeked data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 200 of file lock_queue.hpp.
|
inline |
从回调函数中查看数据 Peeks at the data in the queue from a callback function
item | 存储查看数据的变量 Variable to store the peeked data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 200 of file lock_queue.hpp.
|
inline |
从回调函数中查看数据 Peeks at the data in the queue from a callback function
item | 存储查看数据的变量 Variable to store the peeked data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 200 of file lock_queue.hpp.
|
inline |
无参数弹出数据 Pops data from the queue without storing it
Definition at line 81 of file lock_queue.hpp.
|
inline |
无参数弹出数据 Pops data from the queue without storing it
Definition at line 81 of file lock_queue.hpp.
|
inline |
无参数弹出数据 Pops data from the queue without storing it
Definition at line 81 of file lock_queue.hpp.
|
inline |
无参数弹出数据 Pops data from the queue without storing it
Definition at line 81 of file lock_queue.hpp.
|
inline |
从队列中弹出数据(带超时) Pops data from the queue with timeout
data | 存储弹出数据的变量 Variable to store the popped data |
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 61 of file lock_queue.hpp.
|
inline |
从队列中弹出数据(带超时) Pops data from the queue with timeout
data | 存储弹出数据的变量 Variable to store the popped data |
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 61 of file lock_queue.hpp.
|
inline |
从队列中弹出数据(带超时) Pops data from the queue with timeout
data | 存储弹出数据的变量 Variable to store the popped data |
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 61 of file lock_queue.hpp.
|
inline |
从队列中弹出数据(带超时) Pops data from the queue with timeout
data | 存储弹出数据的变量 Variable to store the popped data |
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 61 of file lock_queue.hpp.
|
inline |
从队列弹出数据(阻塞) Pops data from the queue (blocking)
data | 存储弹出数据的变量 Variable to store the popped data |
timeout | 超时时间(默认值:无限等待) Timeout period (default: infinite wait) |
Definition at line 70 of file lock_queue.hpp.
|
inline |
从队列弹出数据(不关心数据值) Pops data from the queue without retrieving its value
timeout | 超时时间 Timeout period |
Definition at line 89 of file lock_queue.hpp.
|
inline |
带超时的弹出数据 Pops data from the queue with timeout
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 107 of file lock_queue.hpp.
|
inline |
带超时的弹出数据 Pops data from the queue with timeout
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 107 of file lock_queue.hpp.
|
inline |
带超时的弹出数据 Pops data from the queue with timeout
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 107 of file lock_queue.hpp.
|
inline |
带超时的弹出数据 Pops data from the queue with timeout
timeout | 超时时间(毫秒) Timeout in milliseconds |
Definition at line 107 of file lock_queue.hpp.
|
inline |
从 ISR(中断服务例程)弹出数据 Pops data from the queue in an ISR (Interrupt Service Routine)
in_isr | 是否在 ISR 环境中 Whether it is being called from an ISR |
该方法在 ISR 环境中执行非阻塞数据弹出操作。如果 in_isr
为 false
,则调用标准 Pop()
方法。 若 in_isr
为 true
,则使用 xQueueReceiveFromISR()
进行队列操作,并在需要时触发任务调度 (portYIELD()
)。
This method performs a non-blocking data pop operation in an ISR environment. If in_isr
is false
, it calls the standard Pop()
method. If in_isr
is true
, it uses xQueueReceiveFromISR()
for queue operations and triggers a task switch (portYIELD()
) if necessary.
Definition at line 195 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 95 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 95 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 95 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 95 of file lock_queue.hpp.
|
inline |
从 ISR(中断服务例程)弹出数据 Pops data from the queue in an ISR (Interrupt Service Routine)
data | 存储弹出数据的变量 Variable to store the popped data |
in_isr | 是否在 ISR 环境中 Whether it is being called from an ISR |
Definition at line 154 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
data | 存储弹出数据的变量 Variable to store the popped data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 160 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
data | 存储弹出数据的变量 Variable to store the popped data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 160 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
data | 存储弹出数据的变量 Variable to store the popped data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 160 of file lock_queue.hpp.
|
inline |
从回调函数中弹出数据 Pops data from the queue in a callback function
data | 存储弹出数据的变量 Variable to store the popped data |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 160 of file lock_queue.hpp.
将数据推入队列(非阻塞) Pushes data into the queue (non-blocking)
data | 需要推入的数据 The data to be pushed |
Definition at line 50 of file lock_queue.hpp.
向队列中推送数据 Pushes data into the queue
data | 要推送的数据 The data to be pushed |
Definition at line 42 of file lock_queue.hpp.
向队列中推送数据 Pushes data into the queue
data | 要推送的数据 The data to be pushed |
Definition at line 42 of file lock_queue.hpp.
向队列中推送数据 Pushes data into the queue
data | 要推送的数据 The data to be pushed |
Definition at line 42 of file lock_queue.hpp.
向队列中推送数据 Pushes data into the queue
data | 要推送的数据 The data to be pushed |
Definition at line 42 of file lock_queue.hpp.
|
inline |
从 ISR(中断服务例程)推入数据 Pushes data into the queue from an ISR (Interrupt Service Routine)
data | 需要推入的数据 The data to be pushed |
in_isr | 是否在 ISR 环境中 Whether it is being called from an ISR |
Definition at line 122 of file lock_queue.hpp.
|
inline |
从回调函数中推送数据 Pushes data into the queue from a callback function
data | 要推送的数据 The data to be pushed |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 147 of file lock_queue.hpp.
|
inline |
从回调函数中推送数据 Pushes data into the queue from a callback function
data | 要推送的数据 The data to be pushed |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 147 of file lock_queue.hpp.
|
inline |
从回调函数中推送数据 Pushes data into the queue from a callback function
data | 要推送的数据 The data to be pushed |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 147 of file lock_queue.hpp.
|
inline |
从回调函数中推送数据 Pushes data into the queue from a callback function
data | 要推送的数据 The data to be pushed |
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 147 of file lock_queue.hpp.
|
inline |
|
inline |
重置队列 Resets the queue
Definition at line 210 of file lock_queue.hpp.
|
inline |
重置队列 Resets the queue
Definition at line 210 of file lock_queue.hpp.
|
inline |
重置队列 Resets the queue
Definition at line 210 of file lock_queue.hpp.
|
inline |
重置队列 Resets the queue
Definition at line 210 of file lock_queue.hpp.
|
inline |
获取队列中的数据项数量 Gets the number of items in the queue
Definition at line 290 of file lock_queue.hpp.
|
inline |
获取队列中的数据项数量 Gets the number of items in the queue
Definition at line 225 of file lock_queue.hpp.
|
inline |
获取队列中的数据项数量 Gets the number of items in the queue
Definition at line 225 of file lock_queue.hpp.
|
inline |
获取队列中的数据项数量 Gets the number of items in the queue
Definition at line 225 of file lock_queue.hpp.
|
inline |
获取队列中的数据项数量 Gets the number of items in the queue
Definition at line 225 of file lock_queue.hpp.
从 ISR 获取队列大小 Gets the queue size from an ISR
in_isr | 是否在 ISR 环境中 Whether it is being called from an ISR |
Definition at line 305 of file lock_queue.hpp.
从回调函数中获取队列大小 Gets the queue size from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 252 of file lock_queue.hpp.
从回调函数中获取队列大小 Gets the queue size from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 252 of file lock_queue.hpp.
从回调函数中获取队列大小 Gets the queue size from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 252 of file lock_queue.hpp.
从回调函数中获取队列大小 Gets the queue size from a callback function
in_isr | 是否在中断上下文中 Whether the function is called from an ISR |
Definition at line 252 of file lock_queue.hpp.
队列最大长度 Maximum queue length
Definition at line 337 of file lock_queue.hpp.
|
private |
互斥锁 Mutex for thread safety
Definition at line 272 of file lock_queue.hpp.
FreeRTOS 队列句柄 FreeRTOS queue handle.
底层队列对象 Underlying queue object
Definition at line 336 of file lock_queue.hpp.
底层队列对象 Underlying queue object
Definition at line 271 of file lock_queue.hpp.
|
private |
信号量 Semaphore for synchronization
Definition at line 273 of file lock_queue.hpp.