add timer value to event trace
r2587 | dcl | 2008-05-29 14:49:26 +1000 (Thu, 29 May 2008) | 2 lines
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#include "fsm.h"
|
#include "fsm.h"
|
||||||
|
#include "nwatch.h"
|
||||||
|
|
||||||
char* fsm_textify(const char* pInp, int inp_len, char* pOut, int out_len) {
|
char* fsm_textify(const char* pInp, int inp_len, char* pOut, int out_len) {
|
||||||
int iInp = 0;
|
int iInp = 0;
|
||||||
@@ -74,7 +75,10 @@ int fsm_tmr_callback(void* ctx, int mode)
|
|||||||
{
|
{
|
||||||
pStateMachine self = (pStateMachine) ctx;
|
pStateMachine self = (pStateMachine) ctx;
|
||||||
EvtEvent event;
|
EvtEvent event;
|
||||||
|
pNWTimer timer;
|
||||||
event.event_type = eTimerEvent;
|
event.event_type = eTimerEvent;
|
||||||
|
timer = NetWatchGetActiveTimer();
|
||||||
|
event.event.tmr.timerValue = NetWatchGetTimerDelay(timer);
|
||||||
handle_event(self, &event);
|
handle_event(self, &event);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ enum eventtype {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef struct EvtState_s { } EvtState;
|
typedef struct EvtState_s { } EvtState;
|
||||||
typedef struct EvtTimer_s { } EvtTimer;
|
|
||||||
|
typedef struct EvtTimer_s {
|
||||||
|
int timerValue;
|
||||||
|
} EvtTimer;
|
||||||
|
|
||||||
typedef struct EvtMessage_s {
|
typedef struct EvtMessage_s {
|
||||||
pAsyncTxn cmd;
|
pAsyncTxn cmd;
|
||||||
|
|||||||
Reference in New Issue
Block a user