C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches
QueueInterface Struct Reference

Queue object interface. More...

Data Fields

bool(* send )(INSTANCE(this), const unsigned char *data)
 Send data via the queue.
 
bool(* receive )(INSTANCE(this), unsigned char *data)
 Receive data from queue.
 
bool(* empty )(INSTANCE(this), bool *out)
 Returns queue status.
 
void(* destroy )(INSTANCE(this))
 Destroy queue.
 

Detailed Description

Queue object interface.

This API allows use of queue previously allocated via QueueServiceInterface.

Field Documentation

◆ destroy

void(* QueueInterface::destroy) (INSTANCE(this))

Destroy queue.

This will destroy this queue. Further calls to this queue will fail. Queue can be allocated to another process in the future.

◆ empty

bool(* QueueInterface::empty) (INSTANCE(this), bool *out)

Returns queue status.

Parameters
[in]thiswill be provided by the RPC call mechanism
Returns
true if queue is empty, false otherwise

◆ receive

bool(* QueueInterface::receive) (INSTANCE(this), unsigned char *data)

Receive data from queue.

This will copy the oldest data out of the queue. If queue is empty then this call will block until queue is filled with at least one entry of data.

Parameters
[in]thiswill be provided by the RPC call mechanism
[out]datapointer to place where data will be written
Returns
true. Returns false in case spurious interrupt occurred and queue is still empty.

◆ send

bool(* QueueInterface::send) (INSTANCE(this), const unsigned char *data)

Send data via the queue.

This will copy data into queue. Queue must be initialized before this call is made. The size of data is determined based on value of item_size used during queue initialization.

Parameters
[in]thiswill be provided by the RPC call mechanism
[in]datapointer to data.
Returns
true if data was copied into queue and false if queue is already full