/** * @author ${author} * @version 1.0.0 * @date ${date} * @file ${filename_lc}.h */ #ifndef ${filename}_H #define ${filename}_H #include "../xf/xf.h" typedef enum { ST${fn}_INIT, ${STATES_ENUM} } ${filename}_STATES; typedef enum { ${EVENTS_ENUM} } ${filename}_EVENTS; typedef void (*${filename}_CALLBACK_FUNCTION)(void*); typedef struct { ${filename}_CALLBACK_FUNCTION f; // function void* p; // param(s) } ${filename}_CALLBACK; typedef struct { ${filename}_STATES state; ${VARS_STRUCT} ${STATES_CBS_STRUCT} } ${filename}; /** * Initialize the ${filename} * @param me the ${filename} itself */ void ${filename}_init(${filename}* me); /** * Start the ${filename} state machine * @param me the ${filename} itself */ void ${filename}_startBehaviour(${filename}* me); /** * Process the event * @param ev the event to process * @return true if the event is processed */ bool ${filename}_processEvent(Event* ev); /************* * Callbacks * *************/ ${CALLBACKS_DEC} /************ * EMITTERS * ************/ ${EVENTS_EMITS_DEC} /*********** * SETTERS * ***********/ ${VARS_SETTERS_DEC} #endif