rusEFI
The most advanced open source ECU
Public Member Functions | Private Attributes
action_s Class Reference

#include <scheduler.h>

Collaboration diagram for action_s:
Collaboration graph
[legend]

Public Member Functions

 action_s ()=default
 
 action_s (schfunc_t callback)
 
 action_s (schfunc_t callback, void *param)
 
template<typename TArg >
 action_s (void(*callback)(TArg *), TArg *param)
 
template<typename TArg >
 action_s (void(*callback)(TArg), TArg param)
 
void execute ()
 
schfunc_t getCallback () const
 
void * getArgument () const
 
 operator bool () const
 

Private Attributes

schfunc_t m_callback = nullptr
 
void * m_param = nullptr
 

Detailed Description

Definition at line 29 of file scheduler.h.

Constructor & Destructor Documentation

◆ action_s() [1/5]

action_s::action_s ( )
default

◆ action_s() [2/5]

action_s::action_s ( schfunc_t  callback)
inline

Definition at line 35 of file scheduler.h.

35 : action_s(callback, nullptr) { }
action_s()=default

◆ action_s() [3/5]

action_s::action_s ( schfunc_t  callback,
void *  param 
)
inline

Definition at line 36 of file scheduler.h.

36 : m_callback(callback), m_param(param) { }
schfunc_t m_callback
Definition: scheduler.h:55
void * m_param
Definition: scheduler.h:56
static tstrWifiInitParam param

◆ action_s() [4/5]

template<typename TArg >
action_s::action_s ( void(*)(TArg *)  callback,
TArg *  param 
)
inline

Definition at line 41 of file scheduler.h.

41 : m_callback((schfunc_t)callback), m_param(param) { }
void(* schfunc_t)(void *)
Definition: scheduler.h:9

◆ action_s() [5/5]

template<typename TArg >
action_s::action_s ( void(*)(TArg)  callback,
TArg  param 
)
inline

Definition at line 43 of file scheduler.h.

43 : m_callback(bit_cast<schfunc_t>(callback)), m_param(reinterpret_cast<void*>(param)) { }

Member Function Documentation

◆ execute()

void action_s::execute ( )

Definition at line 10 of file scheduler.cpp.

10  {
11  efiAssertVoid(ObdCode::CUSTOM_ERR_ASSERT, m_callback != NULL, "callback==null1");
13 }
@ CUSTOM_ERR_ASSERT

◆ getArgument()

void * action_s::getArgument ( ) const

Definition at line 19 of file scheduler.cpp.

19  {
20  return m_param;
21 }

◆ getCallback()

schfunc_t action_s::getCallback ( ) const

Definition at line 15 of file scheduler.cpp.

15  {
16  return m_callback;
17 }

Referenced by EventQueue::insertTask().

Here is the caller graph for this function:

◆ operator bool()

action_s::operator bool ( ) const
inline

Definition at line 50 of file scheduler.h.

50  {
51  return m_callback != nullptr;
52  }

Field Documentation

◆ m_callback

schfunc_t action_s::m_callback = nullptr
private

Definition at line 55 of file scheduler.h.

Referenced by execute(), getCallback(), and operator bool().

◆ m_param

void* action_s::m_param = nullptr
private

Definition at line 56 of file scheduler.h.

Referenced by execute(), and getArgument().


The documentation for this class was generated from the following files: