ビヘイビア
クラス定義 (.hpp)
class MY_APP_CLASS: MWX_APPDEFS_CRTP(MY_APP_CLASS)
{
public:
static const uint8_t TYPE_ID = 0x01;
// load common definition for handlers
#define __MWX_APP_CLASS_NAME MY_APP_CLASS
#include "_mwx_cbs_hpphead.hpp"
#undef __MWX_APP_CLASS_NAME
public:
// constructor
MY_APP_CLASS() {}
void _setup() {}
void _begin() {}
public:
// TWENET callback handler (mandate)
void loop() {}
void on_sleep(uint32_t & val) {}
void warmboot(uint32_t & val) {}
void wakeup(uint32_t & val) {}
void on_create(uint32_t& val) { _setup(); }
void on_begin(uint32_t& val) { _begin(); }
void on_message(uint32_t& val) { }
public:
void network_event(mwx::packet_ev_nwk& pEvNwk) {}
void receive(mwx::packet_rx& rx) {}
void transmit_complete(mwx::packet_ev_tx& evTx) {}
};メソッド
loop()
on_create()
on_begin()
on_sleep()
warmboot()
wakeup()
receive()
transmit_complete()
ハンドラの定義 (.cpp)
割り込み・イベントハンドラ
DIO
TICKTIMER
TIMER
その他
状態マシン
PEV_SetState()
PEV_u32Elaspsed_ms()
PEV_Process()
PEV_KeepStateOnWakeup()
PEV_is_coldboot()
PEV_is_warmboot()
最終更新