Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Events
[Public API]
Modules | |
Event<void()> class | |
EventQueue class | |
Functions | |
events::EventQueue * | mbed_event_queue () |
Return a pointer to an EventQueue, on which normal tasks can be queued. | |
events::EventQueue * | mbed_highprio_event_queue () |
Return a pointer to an EventQueue, on which small high-priority tasks can be queues, such as simple deferrals from interrupt. | |
template<typename R , typename... ArgTs> | |
Event< void(ArgTs...)> | event (R(*func)(ArgTs...)) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename... ArgTs> | |
Event< void(ArgTs...)> | event (T *obj, R(T::*method)(ArgTs...)) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const T *obj, R(T::*method)(ArgTs...) const) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename... ArgTs> | |
Event< void(ArgTs...)> | event (volatile T *obj, R(T::*method)(ArgTs...) volatile) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const volatile T *obj, R(T::*method)(ArgTs...) const volatile) |
Creates an event bound to the event queue. | |
template<typename R , typename... ArgTs> | |
Event< void(ArgTs...)> | event (mbed::Callback< R(ArgTs...)> cb) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename C0 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (R(*func)(B0, ArgTs...), C0 c0) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename C0 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (T *obj, R(T::*method)(B0, ArgTs...), C0 c0) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename C0 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const T *obj, R(T::*method)(B0, ArgTs...) const, C0 c0) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename C0 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (volatile T *obj, R(T::*method)(B0, ArgTs...) volatile, C0 c0) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename C0 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const volatile T *obj, R(T::*method)(B0, ArgTs...) const volatile, C0 c0) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename C0 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (mbed::Callback< R(B0, ArgTs...)> cb, C0 c0) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename C0 , typename C1 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (R(*func)(B0, B1, ArgTs...), C0 c0, C1 c1) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename C0 , typename C1 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (T *obj, R(T::*method)(B0, B1, ArgTs...), C0 c0, C1 c1) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename C0 , typename C1 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const T *obj, R(T::*method)(B0, B1, ArgTs...) const, C0 c0, C1 c1) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename C0 , typename C1 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (volatile T *obj, R(T::*method)(B0, B1, ArgTs...) volatile, C0 c0, C1 c1) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename C0 , typename C1 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const volatile T *obj, R(T::*method)(B0, B1, ArgTs...) const volatile, C0 c0, C1 c1) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename C0 , typename C1 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (mbed::Callback< R(B0, B1, ArgTs...)> cb, C0 c0, C1 c1) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename B2 , typename C0 , typename C1 , typename C2 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (R(*func)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename C0 , typename C1 , typename C2 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (T *obj, R(T::*method)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename C0 , typename C1 , typename C2 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const, C0 c0, C1 c1, C2 c2) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename C0 , typename C1 , typename C2 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) volatile, C0 c0, C1 c1, C2 c2) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename C0 , typename C1 , typename C2 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename B2 , typename C0 , typename C1 , typename C2 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (mbed::Callback< R(B0, B1, B2, ArgTs...)> cb, C0 c0, C1 c1, C2 c2) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename C0 , typename C1 , typename C2 , typename C3 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (R(*func)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename C0 , typename C1 , typename C2 , typename C3 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename C0 , typename C1 , typename C2 , typename C3 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const, C0 c0, C1 c1, C2 c2, C3 c3) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename C0 , typename C1 , typename C2 , typename C3 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) volatile, C0 c0, C1 c1, C2 c2, C3 c3) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename C0 , typename C1 , typename C2 , typename C3 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2, C3 c3) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename C0 , typename C1 , typename C2 , typename C3 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (mbed::Callback< R(B0, B1, B2, B3, ArgTs...)> cb, C0 c0, C1 c1, C2 c2, C3 c3) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename B4 , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (R(*func)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename B4 , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename B4 , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename B4 , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) |
Creates an event bound to the event queue. | |
template<typename T , typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename B4 , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (const volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) |
Creates an event bound to the event queue. | |
template<typename R , typename B0 , typename B1 , typename B2 , typename B3 , typename B4 , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename... ArgTs> | |
Event< void(ArgTs...)> | event (mbed::Callback< R(B0, B1, B2, B3, B4, ArgTs...)> cb, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) |
Creates an event bound to the event queue. |
Function Documentation
Event< void(ArgTs...)> event | ( | volatile T * | obj, |
R(T::*)(B0, B1, ArgTs...) volatile | method, | ||
C0 | c0, | ||
C1 | c1 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const T * | obj, |
R(T::*)(B0, B1, ArgTs...) const | method, | ||
C0 | c0, | ||
C1 | c1 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | T * | obj, |
R(T::*)(B0, B1, ArgTs...) | method, | ||
C0 | c0, | ||
C1 | c1 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const volatile T * | obj, |
R(T::*)(B0, B1, ArgTs...) const volatile | method, | ||
C0 | c0, | ||
C1 | c1 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | mbed::Callback< R(B0, ArgTs...)> | cb, |
C0 | c0 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const volatile T * | obj, |
R(T::*)(B0, ArgTs...) const volatile | method, | ||
C0 | c0 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | volatile T * | obj, |
R(T::*)(B0, ArgTs...) volatile | method, | ||
C0 | c0 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | mbed::Callback< R(B0, B1, ArgTs...)> | cb, |
C0 | c0, | ||
C1 | c1 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | T * | obj, |
R(T::*)(B0, ArgTs...) | method, | ||
C0 | c0 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const volatile T * | obj, |
R(T::*)(B0, B1, B2, B3, ArgTs...) const volatile | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | mbed::Callback< R(ArgTs...)> | cb ) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const volatile T * | obj, |
R(T::*)(ArgTs...) const volatile | method | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | volatile T * | obj, |
R(T::*)(ArgTs...) volatile | method | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const T * | obj, |
R(T::*)(ArgTs...) const | method | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | T * | obj, |
R(T::*)(ArgTs...) | method | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | R(*)(ArgTs...) | func ) | [inherited] |
Creates an event bound to the event queue.
Constructs an event bound to the specified event queue. The specified callback acts as the target for the event and is executed in the context of the event queue's dispatch loop once posted.
- Parameters:
-
func Function to execute when the event is dispatched
- Returns:
- Event that will dispatch on the specific queue
Event< void(ArgTs...)> event | ( | const volatile T * | obj, |
R(T::*)(B0, B1, B2, ArgTs...) const volatile | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const T * | obj, |
R(T::*)(B0, B1, B2, ArgTs...) const | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | mbed::Callback< R(B0, B1, B2, B3, B4, ArgTs...)> | cb, |
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3, | ||
C4 | c4 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | mbed::Callback< R(B0, B1, B2, B3, ArgTs...)> | cb, |
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | T * | obj, |
R(T::*)(B0, B1, B2, B3, ArgTs...) | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | R(*)(B0, B1, ArgTs...) | func, |
C0 | c0, | ||
C1 | c1 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const T * | obj, |
R(T::*)(B0, B1, B2, B3, B4, ArgTs...) const | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3, | ||
C4 | c4 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const T * | obj, |
R(T::*)(B0, ArgTs...) const | method, | ||
C0 | c0 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | R(*)(B0, ArgTs...) | func, |
C0 | c0 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | volatile T * | obj, |
R(T::*)(B0, B1, B2, B3, B4, ArgTs...) volatile | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3, | ||
C4 | c4 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | T * | obj, |
R(T::*)(B0, B1, B2, B3, B4, ArgTs...) | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3, | ||
C4 | c4 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | R(*)(B0, B1, B2, B3, ArgTs...) | func, |
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const T * | obj, |
R(T::*)(B0, B1, B2, B3, ArgTs...) const | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | volatile T * | obj, |
R(T::*)(B0, B1, B2, B3, ArgTs...) volatile | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | const volatile T * | obj, |
R(T::*)(B0, B1, B2, B3, B4, ArgTs...) const volatile | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3, | ||
C4 | c4 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | R(*)(B0, B1, B2, B3, B4, ArgTs...) | func, |
C0 | c0, | ||
C1 | c1, | ||
C2 | c2, | ||
C3 | c3, | ||
C4 | c4 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | T * | obj, |
R(T::*)(B0, B1, B2, ArgTs...) | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | volatile T * | obj, |
R(T::*)(B0, B1, B2, ArgTs...) volatile | method, | ||
C0 | c0, | ||
C1 | c1, | ||
C2 | c2 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | mbed::Callback< R(B0, B1, B2, ArgTs...)> | cb, |
C0 | c0, | ||
C1 | c1, | ||
C2 | c2 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
Event< void(ArgTs...)> event | ( | R(*)(B0, B1, B2, ArgTs...) | func, |
C0 | c0, | ||
C1 | c1, | ||
C2 | c2 | ||
) | [inherited] |
Creates an event bound to the event queue.
- See also:
- EventQueue::event
EventQueue * mbed_event_queue | ( | ) |
Return a pointer to an EventQueue, on which normal tasks can be queued.
All calls to this return the same EventQueue - it and its dispatch thread are created on the first call to this function. The dispatch thread runs at default priority (currently osPriorityNormal).
The EventQueue returned may be used to call() Events, or to chain() other EventQueues so that they are run in the same context.
Events (or chained EventQueues) executing on the normal event queue should normally take less than 10ms to execute, to avoid starving other users. As such, users can expect that event latency will typically be 10ms or less, but could occasionally be significantly higher if many events are queued.
If an RTOS is not present or the configuration option `events.shared-dispatch-from-application` is set to true, then this does not create a dedicated dispatch thread - instead the application is expected to run the EventQueue's dispatch, for example from main. This is necessary for the event loop to work without an RTOS, or an RTOS system can save memory by reusing the main stack.
- Note:
- mbed_event_queue is not itself IRQ safe. To use the mbed_event_queue in interrupt context, you must first call `mbed_event_queue()` in threaded context and store the pointer for later use.
- Returns:
- pointer to event queue
Definition at line 56 of file mbed_shared_queues.cpp.
EventQueue * mbed_highprio_event_queue | ( | ) |
Return a pointer to an EventQueue, on which small high-priority tasks can be queues, such as simple deferrals from interrupt.
All calls to this return the same EventQueue - it and its thread are created on the first call to this function. The dispatch thread runs at a high priority (currently osPriorityHigh).
The EventQueue returned may be used to call() Events, or to chain() other EventQueues so that they are run in the same context.
Events (or chained EventQueues) executing on the high-priority event queue should normally take less than 100us to execute, to avoid starving other users. As such, users can expect that event latency will typically be 100us or less, but could occasionally be significantly higher if many events are queued.
- Note:
- mbed_highprio_event_queue is not itself IRQ safe. To use the mbed_highprio_event_queue in interrupt context, you must first call `mbed_highprio_event_queue()` in threaded context and store the pointer for later use.
- Returns:
- pointer to high-priority event queue
Definition at line 70 of file mbed_shared_queues.cpp.
Generated on Tue Jul 12 2022 13:55:20 by
