![]() |
ChibiOS/RT Architecture - Reference Manual - Guides |
Class encapsulating an event source. More...
#include <ch.hpp>
Public Member Functions | |
| Event (void) | |
| Event constructor. | |
| void | Register (EventListener *elp, eventid_t eid) |
| Registers a listener on the event source. | |
| void | RegisterMask (EventListener *elp, eventmask_t emask) |
| Registers an Event Listener on an Event Source. | |
| void | Unregister (EventListener *elp) |
| Unregisters a listener. | |
| void | Broadcast (void) |
| Broadcasts an event. | |
Static Public Member Functions | |
| static eventmask_t | Clear (eventmask_t mask) |
| Clears specified events from the pending events mask. | |
| static eventmask_t | Pend (eventmask_t mask) |
| Makes an events mask pending in the current thread. | |
| static void | Dispatch (const evhandler_t handlers[], eventmask_t mask) |
| Invokes the event handlers associated with a mask. | |
| static eventmask_t | WaitOne (eventmask_t ewmask) |
| Waits for a single event. | |
| static eventmask_t | WaitAny (eventmask_t ewmask) |
| Waits for any of the specified events. | |
| static eventmask_t | WaitAll (eventmask_t ewmask) |
| Waits for all the specified event flags then clears them. | |
| static eventmask_t | WaitOneTimeout (eventmask_t ewmask, systime_t time) |
| Waits for a single event. | |
| static eventmask_t | WaitAnyTimeout (eventmask_t ewmask, systime_t time) |
| Waits for any of the specified events. | |
| static eventmask_t | WaitAllTimeout (eventmask_t ewmask, systime_t time) |
| Waits for all the specified event flags then clears them. | |
Data Fields | |
| struct::EventSource | event |
Embedded EventSource structure. | |
Class encapsulating an event source.
Definition at line 465 of file ch.hpp.
| chibios_rt::Event::Event | ( | void | ) |
| void chibios_rt::Event::Register | ( | EventListener * | elp, | |
| eventid_t | eid | |||
| ) |
Registers a listener on the event source.
| elp | pointer to the EventListener structure | |
| eid | numeric identifier assigned to the Event Listener |
Definition at line 272 of file ch.cpp.
References chEvtRegister, and event.
| void chibios_rt::Event::RegisterMask | ( | EventListener * | elp, | |
| eventmask_t | emask | |||
| ) |
Registers an Event Listener on an Event Source.
| elp | pointer to the EventListener structure | |
| emask | the mask of event flags to be pended to the thread when the event source is broadcasted |
Definition at line 277 of file ch.cpp.
References chEvtRegisterMask(), and event.

| void chibios_rt::Event::Unregister | ( | EventListener * | elp | ) |
Unregisters a listener.
The specified listeners is no more signaled by the event source.
| elp | the listener to be unregistered |
Definition at line 282 of file ch.cpp.
References chEvtUnregister(), and event.

| void chibios_rt::Event::Broadcast | ( | void | ) |
Broadcasts an event.
All the listeners registered on the event source are signaled.
Definition at line 287 of file ch.cpp.
References chEvtBroadcast(), and event.

| eventmask_t chibios_rt::Event::Clear | ( | eventmask_t | mask | ) | [static] |
Clears specified events from the pending events mask.
| mask | the events to be cleared |
Definition at line 292 of file ch.cpp.
References chEvtClear().

| eventmask_t chibios_rt::Event::Pend | ( | eventmask_t | mask | ) | [static] |
Makes an events mask pending in the current thread.
This functon is much faster than using Broadcast().
| mask | the events to be pended |
Definition at line 297 of file ch.cpp.
References chEvtPend().

| void chibios_rt::Event::Dispatch | ( | const evhandler_t | handlers[], | |
| eventmask_t | mask | |||
| ) | [static] |
Invokes the event handlers associated with a mask.
| mask | mask of the events to be dispatched | |
| handlers | an array of evhandler_t. The array must be have indexes from zero up the higher registered event identifier. |
Definition at line 302 of file ch.cpp.
References chEvtDispatch().

| eventmask_t chibios_rt::Event::WaitOne | ( | eventmask_t | ewmask | ) | [static] |
Waits for a single event.
A pending event among those specified in ewmask is selected, cleared and its mask returned.
| ewmask | mask of the events that the function should wait for, ALL_EVENTS enables all the events |
Definition at line 307 of file ch.cpp.
References chEvtWaitOne().

| eventmask_t chibios_rt::Event::WaitAny | ( | eventmask_t | ewmask | ) | [static] |
Waits for any of the specified events.
The function waits for any event among those specified in ewmask to become pending then the events are cleared and returned.
| ewmask | mask of the events that the function should wait for, ALL_EVENTS enables all the events |
Definition at line 312 of file ch.cpp.
References chEvtWaitAny().

| eventmask_t chibios_rt::Event::WaitAll | ( | eventmask_t | ewmask | ) | [static] |
Waits for all the specified event flags then clears them.
The function waits for all the events specified in ewmask to become pending then the events are cleared and returned.
| ewmask | mask of the event ids that the function should wait for |
Definition at line 317 of file ch.cpp.
References chEvtWaitAll().

| eventmask_t chibios_rt::Event::WaitOneTimeout | ( | eventmask_t | ewmask, | |
| systime_t | time | |||
| ) | [static] |
Waits for a single event.
A pending event among those specified in ewmask is selected, cleared and its mask returned.
| ewmask | mask of the events that the function should wait for, ALL_EVENTS enables all the events | |
| time | the number of ticks before the operation timouts |
| 0 | if the specified timeout expired. |
Definition at line 323 of file ch.cpp.
References chEvtWaitOneTimeout().

| eventmask_t chibios_rt::Event::WaitAnyTimeout | ( | eventmask_t | ewmask, | |
| systime_t | time | |||
| ) | [static] |
Waits for any of the specified events.
The function waits for any event among those specified in ewmask to become pending then the events are cleared and returned.
| ewmask | mask of the events that the function should wait for, ALL_EVENTS enables all the events | |
| time | the number of ticks before the operation timouts |
| 0 | if the specified timeout expired. |
Definition at line 328 of file ch.cpp.
References chEvtWaitAnyTimeout().

| eventmask_t chibios_rt::Event::WaitAllTimeout | ( | eventmask_t | ewmask, | |
| systime_t | time | |||
| ) | [static] |
Waits for all the specified event flags then clears them.
The function waits for all the events specified in ewmask to become pending then the events are cleared and returned.
| ewmask | mask of the event ids that the function should wait for | |
| time | the number of ticks before the operation timouts |
| 0 | if the specified timeout expired. |
Definition at line 333 of file ch.cpp.
References chEvtWaitAllTimeout().

| struct ::EventSource chibios_rt::Event::event |
Embedded EventSource structure.
Definition at line 470 of file ch.hpp.
Referenced by Broadcast(), Event(), Register(), RegisterMask(), and Unregister().
1.7.1