ZTIMER_tsTimer

The ZigBee timer structure is shown below. It is used to represent a single software timer that may be used by the application.

typedef struct
{
     ZTIMER_teState      eState;
     uint32             u32Time;
     void               *pvParameters;
     ZTIMER_tpfCallback pfCallback;
} ZTIMER_tsTimer;

where:

  • eStaterepresents the current state of the timer, as one of:

    • E_ZTIMER_STATE_CLOSED

    • E_ZTIMER_STATE_STOPPED

    • E_ZTIMER_STATE_RUNNING

    • E_ZTIMER_STATE_EXPIRED

  • u32Timeis the remaining time, in milliseconds, that the timer still has to run

  • pvParametersis a pointer to a set of parameters used by the timer

  • pfCallbackis a pointer to the user-defined callback function that will be called when the timer expires - this function has the prototype:

    typedef void \(\*ZTIMER\_tpfCallback\)\(void \pvParam*\);
    

    where pvParam is a pointer to the timer parameters.

Parent topic:ZigBee timer structures