teste de publish

Dependencies:   DS1820 HighSpeedAnalogIn devices mbed

Embed: (wiki syntax)

« Back to documentation index

Queue< T, queue_sz > Class Template Reference

Queue< T, queue_sz > Class Template Reference

The Queue class allow to control, send, receive, or wait for messages. More...

#include <Queue.h>

Public Member Functions

 Queue ()
 Create and initialise a message Queue.
osStatus put (T *data, uint32_t millisec=0)
 Put a message in a Queue.
osEvent get (uint32_t millisec=osWaitForever)
 Get a message or Wait for a message from a Queue.

Detailed Description

template<typename T, uint32_t queue_sz>
class rtos::Queue< T, queue_sz >

The Queue class allow to control, send, receive, or wait for messages.

A message can be a integer or pointer value to a certain type T that is send to a thread or interrupt service routine.

Template Parameters:
Tdata type of a single message element.
queue_szmaximum number of messages in queue.

Definition at line 40 of file Queue.h.


Constructor & Destructor Documentation

Queue (  )

Create and initialise a message Queue.

Definition at line 43 of file Queue.h.


Member Function Documentation

osEvent get ( uint32_t  millisec = osWaitForever )

Get a message or Wait for a message from a Queue.

Parameters:
millisectimeout value or 0 in case of no time-out. (default: osWaitForever).
Returns:
event information that includes the message and the status code.

Definition at line 68 of file Queue.h.

osStatus put ( T *  data,
uint32_t  millisec = 0 
)

Put a message in a Queue.

Parameters:
datamessage pointer.
millisectimeout value or 0 in case of no time-out. (default: 0)
Returns:
status code that indicates the execution status of the function.

Definition at line 60 of file Queue.h.