Miosix  2.0alpha1
miosix::FixedEventQueueBase< SlotSize > Class Template Reference

#include <e20.h>

Inheritance diagram for miosix::FixedEventQueueBase< SlotSize >:

Protected Member Functions

 FixedEventQueueBase ()
 
void postImpl (Callback< SlotSize > &event, Callback< SlotSize > *events, unsigned int size)
 
bool IRQpostImpl (Callback< SlotSize > &event, Callback< SlotSize > *events, unsigned int size, bool *hppw=0)
 
void runImpl (Callback< SlotSize > *events, unsigned int size)
 
void runOneImpl (Callback< SlotSize > *events, unsigned int size)
 
unsigned int sizeImpl () const
 

Detailed Description

template<unsigned SlotSize>
class miosix::FixedEventQueueBase< SlotSize >

This class is to extract from FixedEventQueue code that does not depend on the NumSlots template parameters.

Constructor & Destructor Documentation

template<unsigned SlotSize>
miosix::FixedEventQueueBase< SlotSize >::FixedEventQueueBase ( )
inlineprotected

Constructor.

Member Function Documentation

template<unsigned SlotSize>
bool miosix::FixedEventQueueBase< SlotSize >::IRQpostImpl ( Callback< SlotSize > &  event,
Callback< SlotSize > *  events,
unsigned int  size,
bool *  hppw = 0 
)
protected

Post an event from an interrupt, or with interrupts disabled.

Parameters
eventevent to post
eventspointer to event queue
sizeevent queue size
hppwset to true if a higher priority thread is awakened, otherwise the variable is not modified
template<unsigned SlotSize>
void miosix::FixedEventQueueBase< SlotSize >::postImpl ( Callback< SlotSize > &  event,
Callback< SlotSize > *  events,
unsigned int  size 
)
protected

Post an event. Blocks if event queue is full.

Parameters
eventevent to post
eventspointer to event queue
sizeevent queue size
template<unsigned SlotSize>
void miosix::FixedEventQueueBase< SlotSize >::runImpl ( Callback< SlotSize > *  events,
unsigned int  size 
)
protected

This function blocks waiting for events being posted, and when available it calls the event function. To return from this event loop an event function must throw an exception.

Parameters
eventspointer to event queue
sizeevent queue size
Exceptions
anyexception that is thrown by the event functions
template<unsigned SlotSize>
void miosix::FixedEventQueueBase< SlotSize >::runOneImpl ( Callback< SlotSize > *  events,
unsigned int  size 
)
protected

Run at most one event. This function does not block.

Parameters
eventspointer to event queue
sizeevent queue size
Exceptions
anyexception that is thrown by the event functions
template<unsigned SlotSize>
unsigned int miosix::FixedEventQueueBase< SlotSize >::sizeImpl ( ) const
inlineprotected
Returns
the number of events in the queue

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