LoRa node acquiring random float value and sending to LoRa Server - Working ok
Fork of SX1276GenericLib by
Callback< R()> Class Template Reference
[Platform]
Callback class based on template specialization. More...
#include <Callback-A.h>
Public Member Functions | |
Callback (R(*func)()=0) | |
Create a Callback with a static function. | |
Callback (const Callback< R()> &func) | |
Attach a Callback. | |
template<typename T , typename U > | |
Callback (U *obj, R(T::*method)()) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (const U *obj, R(T::*method)() const) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (volatile U *obj, R(T::*method)() volatile) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (const volatile U *obj, R(T::*method)() const volatile) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (R(*func)(T *), U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (R(*func)(const T *), const U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (R(*func)(volatile T *), volatile U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (R(*func)(const volatile T *), const volatile U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename F > | |
Callback (F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)())) | |
Create a Callback with a function object. | |
template<typename F > | |
Callback (const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const)) | |
Create a Callback with a function object. | |
template<typename F > | |
Callback (volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() volatile)) | |
Create a Callback with a function object. | |
template<typename F > | |
Callback (const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const volatile)) | |
Create a Callback with a function object. | |
template<typename T , typename U > | |
Callback (U *obj, R(*func)(T *)) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (const U *obj, R(*func)(const T *)) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (volatile U *obj, R(*func)(volatile T *)) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (const volatile U *obj, R(*func)(const volatile T *)) | |
Create a Callback with a static function and bound pointer. | |
~Callback () | |
Destroy a callback. | |
void | attach (R(*func)()) |
Attach a static function. | |
void | attach (const Callback< R()> &func) |
Attach a Callback. | |
template<typename T , typename U > | |
void | attach (U *obj, R(T::*method)()) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (const U *obj, R(T::*method)() const) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (volatile U *obj, R(T::*method)() volatile) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (const volatile U *obj, R(T::*method)() const volatile) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (R(*func)(T *), U *arg) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (R(*func)(const T *), const U *arg) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (R(*func)(volatile T *), volatile U *arg) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (R(*func)(const volatile T *), const volatile U *arg) |
Attach a static function with a bound pointer. | |
template<typename F > | |
void | attach (F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)())) |
Attach a function object. | |
template<typename F > | |
void | attach (const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const)) |
Attach a function object. | |
template<typename F > | |
void | attach (volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() volatile)) |
Attach a function object. | |
template<typename F > | |
void | attach (const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const volatile)) |
Attach a function object. | |
template<typename T , typename U > | |
void | attach (U *obj, R(*func)(T *)) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (const U *obj, R(*func)(const T *)) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (volatile U *obj, R(*func)(volatile T *)) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (const volatile U *obj, R(*func)(const volatile T *)) |
Attach a static function with a bound pointer. | |
Callback & | operator= (const Callback &that) |
Assign a callback. | |
R | call () const |
Call the attached function. | |
R | operator() () const |
Call the attached function. | |
operator bool () const | |
Test if function has been attached. | |
Static Public Member Functions | |
static R | thunk (void *func) |
Static thunk for passing as C-style function. | |
Friends | |
bool | operator== (const Callback &l, const Callback &r) |
Test for equality. | |
bool | operator!= (const Callback &l, const Callback &r) |
Test for inequality. |
Detailed Description
template<typename R>
class Callback< R()>
Callback class based on template specialization.
- Note:
- Synchronization level: Not protected
Definition at line 79 of file Callback-A.h.
Constructor & Destructor Documentation
Callback | ( | R(*)() | func = 0 ) |
Create a Callback with a static function.
- Parameters:
-
func Static function to attach
Definition at line 84 of file Callback-A.h.
Callback | ( | const Callback< R()> & | func ) |
Attach a Callback.
- Parameters:
-
func The Callback to attach
Definition at line 95 of file Callback-A.h.
Callback | ( | U * | obj, |
R(T::*)() | method | ||
) |
Create a Callback with a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 107 of file Callback-A.h.
Callback | ( | const U * | obj, |
R(T::*)() const | method | ||
) |
Create a Callback with a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 116 of file Callback-A.h.
Callback | ( | volatile U * | obj, |
R(T::*)() volatile | method | ||
) |
Create a Callback with a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 125 of file Callback-A.h.
Callback | ( | const volatile U * | obj, |
R(T::*)() const volatile | method | ||
) |
Create a Callback with a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 134 of file Callback-A.h.
Callback | ( | R(*)(T *) | func, |
U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 143 of file Callback-A.h.
Callback | ( | R(*)(const T *) | func, |
const U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 152 of file Callback-A.h.
Callback | ( | R(*)(volatile T *) | func, |
volatile U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 161 of file Callback-A.h.
Callback | ( | R(*)(const volatile T *) | func, |
const volatile U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 170 of file Callback-A.h.
Callback | ( | F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)()) | |||
) |
Create a Callback with a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 179 of file Callback-A.h.
Callback | ( | const F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const) | |||
) |
Create a Callback with a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 188 of file Callback-A.h.
Callback | ( | volatile F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() volatile) | |||
) |
Create a Callback with a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 197 of file Callback-A.h.
Callback | ( | const volatile F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const volatile) | |||
) |
Create a Callback with a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 206 of file Callback-A.h.
Callback | ( | U * | obj, |
R(*)(T *) | func | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 217 of file Callback-A.h.
Callback | ( | const U * | obj, |
R(*)(const T *) | func | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 228 of file Callback-A.h.
Callback | ( | volatile U * | obj, |
R(*)(volatile T *) | func | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 239 of file Callback-A.h.
Callback | ( | const volatile U * | obj, |
R(*)(const volatile T *) | func | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 250 of file Callback-A.h.
~Callback | ( | ) |
Destroy a callback.
Definition at line 256 of file Callback-A.h.
Member Function Documentation
void attach | ( | R(*)() | func ) |
Attach a static function.
- Parameters:
-
func Static function to attach
Definition at line 267 of file Callback-A.h.
void attach | ( | const Callback< R()> & | func ) |
Attach a Callback.
- Parameters:
-
func The Callback to attach
Definition at line 277 of file Callback-A.h.
void attach | ( | const U * | obj, |
R(T::*)() const | method | ||
) |
Attach a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 301 of file Callback-A.h.
void attach | ( | R(*)(const T *) | func, |
const U * | arg | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 349 of file Callback-A.h.
void attach | ( | const U * | obj, |
R(*)(const T *) | func | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 445 of file Callback-A.h.
void attach | ( | volatile U * | obj, |
R(*)(volatile T *) | func | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 457 of file Callback-A.h.
void attach | ( | R(*)(volatile T *) | func, |
volatile U * | arg | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 361 of file Callback-A.h.
void attach | ( | const volatile U * | obj, |
R(*)(const volatile T *) | func | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 469 of file Callback-A.h.
void attach | ( | volatile U * | obj, |
R(T::*)() volatile | method | ||
) |
Attach a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 313 of file Callback-A.h.
void attach | ( | U * | obj, |
R(*)(T *) | func | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 433 of file Callback-A.h.
void attach | ( | const volatile F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const volatile) | |||
) |
Attach a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 421 of file Callback-A.h.
void attach | ( | volatile F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() volatile) | |||
) |
Attach a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 409 of file Callback-A.h.
void attach | ( | const F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const) | |||
) |
Attach a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 397 of file Callback-A.h.
void attach | ( | R(*)(const volatile T *) | func, |
const volatile U * | arg | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 373 of file Callback-A.h.
void attach | ( | F | f, |
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)()) | |||
) |
Attach a function object.
- Parameters:
-
f Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 385 of file Callback-A.h.
void attach | ( | U * | obj, |
R(T::*)() | method | ||
) |
Attach a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 289 of file Callback-A.h.
void attach | ( | const volatile U * | obj, |
R(T::*)() const volatile | method | ||
) |
Attach a member function.
- Parameters:
-
obj Pointer to object to invoke member function on method Member function to attach
Definition at line 325 of file Callback-A.h.
void attach | ( | R(*)(T *) | func, |
U * | arg | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
func Static function to attach arg Pointer argument to function
Definition at line 337 of file Callback-A.h.
R call | ( | ) | const |
Call the attached function.
Definition at line 487 of file Callback-A.h.
operator bool | ( | ) | const |
Test if function has been attached.
Definition at line 499 of file Callback-A.h.
R operator() | ( | ) | const |
Call the attached function.
Definition at line 493 of file Callback-A.h.
Callback& operator= | ( | const Callback< R()> & | that ) |
Assign a callback.
Definition at line 476 of file Callback-A.h.
static R thunk | ( | void * | func ) | [static] |
Static thunk for passing as C-style function.
- Parameters:
-
func Callback to call passed as void pointer
- Returns:
- the value as determined by func which is of type and determined by the signiture of func
Definition at line 520 of file Callback-A.h.
Friends And Related Function Documentation
bool operator!= | ( | const Callback< R()> & | l, |
const Callback< R()> & | r | ||
) | [friend] |
Test for inequality.
Definition at line 511 of file Callback-A.h.
bool operator== | ( | const Callback< R()> & | l, |
const Callback< R()> & | r | ||
) | [friend] |
Test for equality.
Definition at line 505 of file Callback-A.h.
Generated on Tue Jul 12 2022 18:32:30 by 1.7.2