42 #if FREERTOSCPP_USE_NAMESPACE 142 #if __cplusplus < 201101L 148 #endif // __cplusplus 171 bool push(T
const& item, TickType_t time = portMAX_DELAY){
172 return xQueueSendToFront(
queueHandle, &item, time);
174 #if FREERTOSCPP_USE_CHRONO 193 bool add(T
const& item, TickType_t time = portMAX_DELAY){
196 #if FREERTOSCPP_USE_CHRONO 215 bool pop(T& var, TickType_t time = portMAX_DELAY) {
218 #if FREERTOSCPP_USE_CHRONO 238 bool peek(T& var, TickType_t time = 0) {
241 #if FREERTOSCPP_USE_CHRONO 263 bool push_ISR(T
const& item, portBASE_TYPE& waswoken){
264 return xQueueSendToFrontFromISR(
queueHandle, &item, &waswoken);
276 bool add_ISR(T
const& item, portBASE_TYPE& waswoken){
277 return xQueueSendToBackFromISR(
queueHandle, &item, &waswoken);
289 bool pop_ISR(T& var, portBASE_TYPE& waswoken) {
290 return xQueueReceiveFromISR(
queueHandle, &var, &waswoken);
324 template<
class T,
unsigned queueLength
325 #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) 338 #if( configSUPPORT_STATIC_ALLOCATION == 1 )
339 xQueueCreateStatic(queueLength, sizeof(T), reinterpret_cast<uint8_t*>(&queueStore), &queueBuff)
341 xQueueCreate(queueLength, sizeof(T))
345 #if configQUEUE_REGISTRY_SIZE > 0 352 #if( configSUPPORT_STATIC_ALLOCATION == 1 ) 353 StaticQueue_t queueBuff;
354 T queueStore[queueLength];
358 #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) 368 Queue(
unsigned portBASE_TYPE length,
char const* name = 0) :
371 #if configQUEUE_REGISTRY_SIZE > 0 381 #if FREERTOSCPP_USE_NAMESPACE bool full_ISR()
Is Queue Full.
Definition: QueueCPP.h:116
unsigned available() const
Return number of spaces available in Queue.
Definition: QueueCPP.h:83
Base Queue Wrapper.
Definition: QueueCPP.h:54
Typed Queue Wrapper.
Definition: QueueCPP.h:159
bool push_ISR(T const &item, portBASE_TYPE &waswoken)
Push an item onto the Queue.
Definition: QueueCPP.h:263
constexpr TickType_t ms2ticks(Time_ms ms)
Definition: FreeRTOScpp.h:81
std::chrono::milliseconds Time_ms
Definition: FreeRTOScpp.h:79
bool add(T const &item, TickType_t time=portMAX_DELAY)
add an item at end of the Queue.
Definition: QueueCPP.h:193
Definition: CallBack.h:63
bool add(T const &item, Time_ms time)
add an item at end of the Queue.
Definition: QueueCPP.h:204
virtual ~QueueBase()
Destructor.
Definition: QueueCPP.h:67
bool empty_ISR()
Is Queue Empty.
Definition: QueueCPP.h:125
bool peek_ISR(T &var, portBASE_TYPE &waswoken)
Look at the first item in the Queue.
Definition: QueueCPP.h:302
bool push(T const &item, TickType_t time=portMAX_DELAY)
Push an item onto the Queue.
Definition: QueueCPP.h:171
QueueBase(QueueHandle_t handle_)
Constructor.
Definition: QueueCPP.h:62
bool push(T const &item, Time_ms time)
Push an item onto the Queue.
Definition: QueueCPP.h:182
bool pop(T &var, TickType_t time=portMAX_DELAY)
Get an item from the Queue.
Definition: QueueCPP.h:215
QueueHandle_t queueHandle
Definition: QueueCPP.h:139
bool peek(T &var, TickType_t time=0)
Look at the first item in the Queue.
Definition: QueueCPP.h:238
bool full()
Check if Queue is Full.
Definition: QueueCPP.h:99
void operator=(QueueBase const &)=delete
We are not assignable.
void reset()
Reset the Queue.
Definition: QueueCPP.h:91
unsigned waiting_ISR()
Get number of message waiting.
Definition: QueueCPP.h:134
bool empty()
Check if Queue is Empty.
Definition: QueueCPP.h:107
bool peek(T &var, Time_ms time)
Look at the first item in the Queue.
Definition: QueueCPP.h:249
bool pop(T &var, Time_ms time)
Get an item from the Queue.
Definition: QueueCPP.h:226
QueueTypeBase(QueueHandle_t handle_)
Definition: QueueCPP.h:161
unsigned waiting() const
Get number of items in the Queue.
Definition: QueueCPP.h:75
Queue Wrapper.
Definition: QueueCPP.h:328
bool add_ISR(T const &item, portBASE_TYPE &waswoken)
add an item at end of the Queue.
Definition: QueueCPP.h:276
bool pop_ISR(T &var, portBASE_TYPE &waswoken)
Get an item from the Queue.
Definition: QueueCPP.h:289
Queue(char const *name=0)
Constructor.
Definition: QueueCPP.h:335