LoRa node acquiring random float value and sending to LoRa Server - Working ok

Fork of SX1276GenericLib by Helmut Tschemernjak

Embed: (wiki syntax)

« Back to documentation index

Callback< R(A0, A1, A2)> Class Template Reference

Callback< R(A0, A1, A2)> Class Template Reference
[Platform]

Callback class based on template specialization. More...

#include <Callback-A.h>

Public Member Functions

 Callback (R(*func)(A0, A1, A2)=0)
 Create a Callback with a static function.
 Callback (const Callback< R(A0, A1, A2)> &func)
 Attach a Callback.
template<typename T , typename U >
 Callback (U *obj, R(T::*method)(A0, A1, A2))
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (const U *obj, R(T::*method)(A0, A1, A2) const)
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (volatile U *obj, R(T::*method)(A0, A1, A2) volatile)
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (const volatile U *obj, R(T::*method)(A0, A1, A2) const volatile)
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (R(*func)(T *, A0, A1, A2), U *arg)
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (R(*func)(const T *, A0, A1, A2), const U *arg)
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (R(*func)(volatile T *, A0, A1, A2), volatile U *arg)
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (R(*func)(const volatile T *, A0, A1, A2), 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::*)(A0, A1, A2)))
 Create a Callback with a function object.
template<typename F >
 Callback (const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const))
 Create a Callback with a function object.
template<typename F >
 Callback (volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) volatile))
 Create a Callback with a function object.
template<typename F >
 Callback (const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const volatile))
 Create a Callback with a function object.
template<typename T , typename U >
 Callback (U *obj, R(*func)(T *, A0, A1, A2))
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (const U *obj, R(*func)(const T *, A0, A1, A2))
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (volatile U *obj, R(*func)(volatile T *, A0, A1, A2))
 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 *, A0, A1, A2))
 Create a Callback with a static function and bound pointer.
 ~Callback ()
 Destroy a callback.
void attach (R(*func)(A0, A1, A2))
 Attach a static function.
void attach (const Callback< R(A0, A1, A2)> &func)
 Attach a Callback.
template<typename T , typename U >
void attach (U *obj, R(T::*method)(A0, A1, A2))
 Attach a member function.
template<typename T , typename U >
void attach (const U *obj, R(T::*method)(A0, A1, A2) const)
 Attach a member function.
template<typename T , typename U >
void attach (volatile U *obj, R(T::*method)(A0, A1, A2) volatile)
 Attach a member function.
template<typename T , typename U >
void attach (const volatile U *obj, R(T::*method)(A0, A1, A2) const volatile)
 Attach a member function.
template<typename T , typename U >
void attach (R(*func)(T *, A0, A1, A2), U *arg)
 Attach a static function with a bound pointer.
template<typename T , typename U >
void attach (R(*func)(const T *, A0, A1, A2), const U *arg)
 Attach a static function with a bound pointer.
template<typename T , typename U >
void attach (R(*func)(volatile T *, A0, A1, A2), volatile U *arg)
 Attach a static function with a bound pointer.
template<typename T , typename U >
void attach (R(*func)(const volatile T *, A0, A1, A2), 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::*)(A0, A1, A2)))
 Attach a function object.
template<typename F >
void attach (const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const))
 Attach a function object.
template<typename F >
void attach (volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) volatile))
 Attach a function object.
template<typename F >
void attach (const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const volatile))
 Attach a function object.
template<typename T , typename U >
void attach (U *obj, R(*func)(T *, A0, A1, A2))
 Attach a static function with a bound pointer.
template<typename T , typename U >
void attach (const U *obj, R(*func)(const T *, A0, A1, A2))
 Attach a static function with a bound pointer.
template<typename T , typename U >
void attach (volatile U *obj, R(*func)(volatile T *, A0, A1, A2))
 Attach a static function with a bound pointer.
template<typename T , typename U >
void attach (const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2))
 Attach a static function with a bound pointer.
Callback & operator= (const Callback &that)
 Assign a callback.
call (A0 a0, A1 a1, A2 a2) const
 Call the attached function.
operator() (A0 a0, A1 a1, A2 a2) const
 Call the attached function.
 operator bool () const
 Test if function has been attached.

Static Public Member Functions

static R thunk (void *func, A0 a0, A1 a1, A2 a2)
 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, typename A0, typename A1, typename A2>
class Callback< R(A0, A1, A2)>

Callback class based on template specialization.

Note:
Synchronization level: Not protected

Definition at line 1665 of file Callback-A.h.


Constructor & Destructor Documentation

Callback ( R(*)(A0, A1, A2)  func = 0 )

Create a Callback with a static function.

Parameters:
funcStatic function to attach

Definition at line 1670 of file Callback-A.h.

Callback ( const Callback< R(A0, A1, A2)> &  func )

Attach a Callback.

Parameters:
funcThe Callback to attach

Definition at line 1681 of file Callback-A.h.

Callback ( U *  obj,
R(T::*)(A0, A1, A2)  method 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1693 of file Callback-A.h.

Callback ( const U *  obj,
R(T::*)(A0, A1, A2) const   method 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1702 of file Callback-A.h.

Callback ( volatile U *  obj,
R(T::*)(A0, A1, A2) volatile  method 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1711 of file Callback-A.h.

Callback ( const volatile U *  obj,
R(T::*)(A0, A1, A2) const volatile  method 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1720 of file Callback-A.h.

Callback ( R(*)(T *, A0, A1, A2)  func,
U *  arg 
)

Create a Callback with a static function and bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1729 of file Callback-A.h.

Callback ( R(*)(const T *, A0, A1, A2)  func,
const U *  arg 
)

Create a Callback with a static function and bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1738 of file Callback-A.h.

Callback ( R(*)(volatile T *, A0, A1, A2)  func,
volatile U *  arg 
)

Create a Callback with a static function and bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1747 of file Callback-A.h.

Callback ( R(*)(const volatile T *, A0, A1, A2)  func,
const volatile U *  arg 
)

Create a Callback with a static function and bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1756 of file Callback-A.h.

Callback ( f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2))   
)

Create a Callback with a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 1765 of file Callback-A.h.

Callback ( const F  f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const)   
)

Create a Callback with a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 1774 of file Callback-A.h.

Callback ( volatile F  f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) volatile)   
)

Create a Callback with a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 1783 of file Callback-A.h.

Callback ( const volatile F  f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const volatile)   
)

Create a Callback with a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 1792 of file Callback-A.h.

Callback ( U *  obj,
R(*)(T *, A0, A1, A2)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1803 of file Callback-A.h.

Callback ( const U *  obj,
R(*)(const T *, A0, A1, A2)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1814 of file Callback-A.h.

Callback ( volatile U *  obj,
R(*)(volatile T *, A0, A1, A2)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1825 of file Callback-A.h.

Callback ( const volatile U *  obj,
R(*)(const volatile T *, A0, A1, A2)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1836 of file Callback-A.h.

~Callback (  )

Destroy a callback.

Definition at line 1842 of file Callback-A.h.


Member Function Documentation

void attach ( R(*)(A0, A1, A2)  func )

Attach a static function.

Parameters:
funcStatic function to attach

Definition at line 1853 of file Callback-A.h.

void attach ( const Callback< R(A0, A1, A2)> &  func )

Attach a Callback.

Parameters:
funcThe Callback to attach

Definition at line 1863 of file Callback-A.h.

void attach ( const U *  obj,
R(T::*)(A0, A1, A2) const   method 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1887 of file Callback-A.h.

void attach ( R(*)(const T *, A0, A1, A2)  func,
const U *  arg 
)

Attach a static function with a bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1935 of file Callback-A.h.

void attach ( const U *  obj,
R(*)(const T *, A0, A1, A2)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 2031 of file Callback-A.h.

void attach ( volatile U *  obj,
R(*)(volatile T *, A0, A1, A2)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 2043 of file Callback-A.h.

void attach ( R(*)(volatile T *, A0, A1, A2)  func,
volatile U *  arg 
)

Attach a static function with a bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1947 of file Callback-A.h.

void attach ( const volatile U *  obj,
R(*)(const volatile T *, A0, A1, A2)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 2055 of file Callback-A.h.

void attach ( volatile U *  obj,
R(T::*)(A0, A1, A2) volatile  method 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1899 of file Callback-A.h.

void attach ( U *  obj,
R(*)(T *, A0, A1, A2)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 2019 of file Callback-A.h.

void attach ( const volatile F  f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const volatile)   
)

Attach a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 2007 of file Callback-A.h.

void attach ( volatile F  f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) volatile)   
)

Attach a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 1995 of file Callback-A.h.

void attach ( const F  f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const)   
)

Attach a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 1983 of file Callback-A.h.

void attach ( R(*)(const volatile T *, A0, A1, A2)  func,
const volatile U *  arg 
)

Attach a static function with a bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1959 of file Callback-A.h.

void attach ( f,
MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2))   
)

Attach a function object.

Parameters:
fFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 1971 of file Callback-A.h.

void attach ( U *  obj,
R(T::*)(A0, A1, A2)  method 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1875 of file Callback-A.h.

void attach ( const volatile U *  obj,
R(T::*)(A0, A1, A2) const volatile  method 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
methodMember function to attach

Definition at line 1911 of file Callback-A.h.

void attach ( R(*)(T *, A0, A1, A2)  func,
U *  arg 
)

Attach a static function with a bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function

Definition at line 1923 of file Callback-A.h.

R call ( A0  a0,
A1  a1,
A2  a2 
) const

Call the attached function.

Definition at line 2073 of file Callback-A.h.

operator bool (  ) const

Test if function has been attached.

Definition at line 2086 of file Callback-A.h.

R operator() ( A0  a0,
A1  a1,
A2  a2 
) const

Call the attached function.

Definition at line 2080 of file Callback-A.h.

Callback& operator= ( const Callback< R(A0, A1, A2)> &  that )

Assign a callback.

Definition at line 2062 of file Callback-A.h.

static R thunk ( void *  func,
A0  a0,
A1  a1,
A2  a2 
) [static]

Static thunk for passing as C-style function.

Parameters:
funcCallback to call passed as void pointer
a0An argument to be called with function func
a1An argument to be called with function func
a2An argument to be called with function func
Returns:
the value as determined by func which is of type and determined by the signiture of func

Definition at line 2110 of file Callback-A.h.


Friends And Related Function Documentation

bool operator!= ( const Callback< R(A0, A1, A2)> &  l,
const Callback< R(A0, A1, A2)> &  r 
) [friend]

Test for inequality.

Definition at line 2098 of file Callback-A.h.

bool operator== ( const Callback< R(A0, A1, A2)> &  l,
const Callback< R(A0, A1, A2)> &  r 
) [friend]

Test for equality.

Definition at line 2092 of file Callback-A.h.