Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Functions
Event<void()> class

Data Structures

class  Event< void(ArgTs...)>
 Event. More...
 
class  UserAllocatedEvent< F, void(ArgTs...)>
 UserAllocatedEvent. More...
 

Functions

template<typename F , typename... ArgTs>
constexpr UserAllocatedEvent< F, void(ArgTs...)> make_user_allocated_event (F f, ArgTs...args)
 Creates a UserAllocatedEvent object, deducing the target type from the types of arguments. More...
 
template<typename T , typename R , typename... ArgTs>
constexpr UserAllocatedEvent< mbed::Callback< void(ArgTs...)>, void(ArgTs...)> make_user_allocated_event (T *obj, R(T::*method)(ArgTs...args), ArgTs...args)
 Creates a UserAllocatedEvent object, deducing the target type from the types of arguments. More...
 
template<typename T , typename R , typename... ArgTs>
constexpr UserAllocatedEvent< mbed::Callback< void(ArgTs...)>, void(ArgTs...)> make_user_allocated_event (const T *obj, R(T::*method)(ArgTs...args) const, ArgTs...args)
 Creates a UserAllocatedEvent object, deducing the target type from the types of arguments. More...
 
template<typename T , typename R , typename... ArgTs>
constexpr UserAllocatedEvent< mbed::Callback< void(ArgTs...)>, void(ArgTs...)> make_user_allocated_event (volatile T *obj, R(T::*method)(ArgTs...args) volatile, ArgTs...args)
 Creates a UserAllocatedEvent object, deducing the target type from the types of arguments. More...
 
template<typename T , typename R , typename... ArgTs>
constexpr UserAllocatedEvent< mbed::Callback< void(ArgTs...)>, void(ArgTs...)> make_user_allocated_event (const volatile T *obj, R(T::*method)(ArgTs...args) const volatile, ArgTs...args)
 Creates a UserAllocatedEvent object, deducing the target type from the types of arguments. More...
 
template<typename F , typename... ArgTs>
UserAllocatedEvent< F, void(ArgTs...)> make_user_allocated_event (F f, ArgTs...args)
 Creates an user allocated event bound to the event queue. More...
 
template<typename T , typename R , typename... ArgTs>
UserAllocatedEvent< mbed::Callback< void(ArgTs...)>, void(ArgTs...)> make_user_allocated_event (T *obj, R(T::*method)(ArgTs...args), ArgTs...args)
 Creates an user allocated event bound to the event queue. More...
 

Detailed Description

Function Documentation

constexpr UserAllocatedEvent<F, void(ArgTs...)> events::make_user_allocated_event ( f,
ArgTs...  args 
)

Creates a UserAllocatedEvent object, deducing the target type from the types of arguments.

UserAllocatedEvent doesn't utilize EventQueue internal memory, therefore it can be posted on the queue without being afraid of post fail due to queue memory exhaustion

Returns
UserAllocatedEvent object instance

Definition at line 399 of file UserAllocatedEvent.h.

constexpr UserAllocatedEvent<mbed::Callback<void(ArgTs...)>, void(ArgTs...)> events::make_user_allocated_event ( T *  obj,
R(T::*)(ArgTs...args)  method,
ArgTs...  args 
)

Creates a UserAllocatedEvent object, deducing the target type from the types of arguments.

UserAllocatedEvent doesn't utilize EventQueue internal memory, therefore it can be posted on the queue without being afraid of post fail due to queue memory exhaustion

Returns
UserAllocatedEvent object instance

Definition at line 414 of file UserAllocatedEvent.h.

constexpr UserAllocatedEvent<mbed::Callback<void(ArgTs...)>, void(ArgTs...)> events::make_user_allocated_event ( const T *  obj,
R(T::*)(ArgTs...args) const  method,
ArgTs...  args 
)

Creates a UserAllocatedEvent object, deducing the target type from the types of arguments.

UserAllocatedEvent doesn't utilize EventQueue internal memory, therefore it can be posted on the queue without being afraid of post fail due to queue memory exhaustion

Returns
UserAllocatedEvent object instance

Definition at line 429 of file UserAllocatedEvent.h.

constexpr UserAllocatedEvent<mbed::Callback<void(ArgTs...)>, void(ArgTs...)> events::make_user_allocated_event ( volatile T *  obj,
R(T::*)(ArgTs...args) volatile  method,
ArgTs...  args 
)

Creates a UserAllocatedEvent object, deducing the target type from the types of arguments.

UserAllocatedEvent doesn't utilize EventQueue internal memory, therefore it can be posted on the queue without being afraid of post fail due to queue memory exhaustion

Returns
UserAllocatedEvent object instance

Definition at line 444 of file UserAllocatedEvent.h.

constexpr UserAllocatedEvent<mbed::Callback<void(ArgTs...)>, void(ArgTs...)> events::make_user_allocated_event ( const volatile T *  obj,
R(T::*)(ArgTs...args) const volatile  method,
ArgTs...  args 
)

Creates a UserAllocatedEvent object, deducing the target type from the types of arguments.

UserAllocatedEvent doesn't utilize EventQueue internal memory, therefore it can be posted on the queue without being afraid of post fail due to queue memory exhaustion

Returns
UserAllocatedEvent object instance

Definition at line 459 of file UserAllocatedEvent.h.

UserAllocatedEvent< F, void(ArgTs...)> make_user_allocated_event ( f,
ArgTs...  args 
)

Creates an user allocated event bound to the event queue.

Constructs an user allocated 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.

#include "mbed.h"
void handler(int data) { ... }
class Device {
public:
void handler(int data) { ... }
};
Device dev;
// queue with not internal storage for dynamic events
// accepts only user allocated events
static EventQueue queue(0);
// Create events
static auto e1 = make_user_allocated_event(&dev, Device::handler, 2);
static auto e2 = queue.make_user_allocated_event(handler, 3);
int main()
{
e1.call_on(&queue);
e2.call();
queue.dispatch(1);
}
Parameters
fFunction to execute when the event is dispatched
Returns
Event that will dispatch on the specific queue

Definition at line 359 of file UserAllocatedEvent.h.

UserAllocatedEvent< mbed::Callback< void(ArgTs...)>, void(ArgTs...)> make_user_allocated_event ( T *  obj,
R(T::*)(ArgTs...args)  method,
ArgTs...  args 
)

Creates an user allocated event bound to the event queue.

See also
EventQueue::make_user_allocated_event

Definition at line 365 of file UserAllocatedEvent.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.