68 __attribute__((always_inline))
78 __attribute__((always_inline))
96 void get(uint16_t& param)
const 105 void get(
void*& param)
const 107 param = (
void*) m_param;
115 void send(uint8_t type, uint16_t value = 0)
116 __attribute__((always_inline))
126 void send(uint8_t type,
void* value)
127 __attribute__((always_inline))
137 if ((m_period != 0) && (m_period != TIMEOUT_REQUEST)) {
159 __attribute__((always_inline))
161 m_period = TIMEOUT_REQUEST;
171 __attribute__((always_inline))
173 if (
UNLIKELY(m_period == 0))
return;
179 static const uint16_t TIMEOUT_REQUEST = 0xffff;
191 virtual void on_event(uint8_t type, uint16_t value)
196 if ((m_period != 0) && (m_period != TIMEOUT_REQUEST)) {
StateHandler state() const
bool(* StateHandler)(FSM *fsm, uint8_t type)
int32_t expire_after() const
void state(StateHandler fn)
void send(uint8_t type, void *value)
void set_timer(uint16_t ms)
static bool push(uint8_t type, Handler *target, uint16_t value=0)
FSM(StateHandler init, Job::Scheduler *scheduler=NULL, uint16_t period=0)
void send(uint8_t type, uint16_t value=0)