VSF Documented
|
Go to the source code of this file.
Macros | |
#define | VSF_KERNEL_CFG_EDA_SUPPORT_SIMPLE_FSM DISABLED |
#define | vsf_this (*vsf_pthis) |
#define | def_states(...) |
#define | def_params(...) __VA_ARGS__ |
#define | vsf_args(...) ,__VA_ARGS__ |
#define | vsf_fsm(__name) vsf_task(__name) |
#define | __def_fsm(__fsm_type, ...) |
#define | def_fsm(__name, ...) __def_fsm(__name, __VA_ARGS__) |
#define | def_simple_fsm(__name, ...) |
#define | end_def_simple_fsm(...) |
#define | __declare_fsm(__name) declare_vsf_task(__name) |
#define | declare_vsf_fsm(__name) __declare_fsm(__name) |
#define | __extern_fsm_initialiser(__name, ...) |
extern fsm initialisation function and provide function prototype as <__name>_fn, E.g extern_vsf_fsm_initialiser( demo_fsm ); we extern a function called: extern fsm_demo_fsm_t *demo_fsm_init( fsm_demo_fsm_t *fsm_ptr ); and a prototype definition: typedef fsm_demo_fsm_t *demo_fsm_init_fn( fsm_demo_fsm_t *fsm_ptr ); We can then use demo_fsm_init_fn to define function pointer | |
#define | extern_vsf_fsm_initialiser(__name, ...) __extern_fsm_initialiser(__name, __VA_ARGS__) |
#define | call_vsf_fsm(__name, __fsm) vsf_task_call_task(__name, __fsm) |
#define | ____state(__state, ...) |
#define | vsf_state(__state, ...) break; ____state(__state, __VA_ARGS__) |
#define | on_start(...) {__VA_ARGS__;} |
#define | reset_vsf_fsm() do { vsf_this.fsm_state = 0; } while(0); |
#define | vsf_fsm_cpl() do {reset_vsf_fsm(); return fsm_rt_cpl;} while(0); |
#define | vsf_fsm_report(__ERROR) do {reset_vsf_fsm(); return (fsm_rt_t)(__ERROR); } while(0); |
#define | vsf_fsm_wait_for_obj() return fsm_rt_wait_for_obj; |
#define | vsf_fsm_on_going() return fsm_rt_on_going; |
#define | update_state_to(__state) { vsf_this.fsm_state = (__state); goto __state_entry_##__state;} |
fsm_continue is deprecated, should not be used anymore | |
#define | transfer_to(__state) { vsf_this.fsm_state = (__state); vsf_fsm_on_going() } |
#define | __fsm_initialiser(__name, ...) |
#define | vsf_fsm_initialiser(__name, ...) __fsm_initialiser(__name, __VA_ARGS__) |
#define | abort_vsf_fsm_init() return NULL; |
#define | vsf_fsm_init_body(...) |
#define | init_vsf_fsm(__name, __fsm, ...) __name##_init(__fsm __VA_ARGS__) |
#define | init_simple_fsm(__name, __fsm, ...) init_vsf_fsm(__fsm __VA_ARGS__) |
#define | start_vsf_fsm(__name, __fsm, __pri, ...) init_vsf_task(__name, (__fsm), (__pri), __VA_ARGS__) |
#define | start_simple_fsm(__name, __fsm, __pri, ...) start_vsf_fsm(__name, (__fsm), (__pri), __VA_ARGS__) |
#define | __implement_fsm_ex(__name, __type) |
#define | __body(...) |
#define | vsf_fsm_body(...) __body(__VA_ARGS__) |
#define | vsf_fsm_begin() |
#define | vsf_fsm_end() |
#define | implement_fsm_ex(__name, __type) __implement_fsm_ex(__name, __type) |
#define | __implement_fsm(__name) implement_fsm_ex(__name, __name) |
#define | implement_vsf_fsm(__name, ...) __implement_fsm(__name) |
#define | __privilege_state(__state, ...) |
#define | privilege_state(__state, ...) __privilege_state(__state, __VA_ARGS__) |
#define | privilege_group(...) { __VA_ARGS__;} |
#define | privilege_body(...) |
#define | __FSM_RT_TYPE__ |
#define | __extern_fsm_implementation_ex(__name, __type) |
extern fsm task function and provide function prototype as <__name>_fn, E.g extern_vsf_fsm_implementation( demo_fsm ); we extern a function called: fsm_rt_t demo_fsm( fsm_demo_fsm_t *fsm_ptr ) and a prototype definition: typedef fsm_rt_t demo_fsm_fn (fsm_demo_fsm_t *fsm_ptr); We can then use demo_fsm_fn to define function pointer | |
#define | declare_vsf_fsm_implementation_ex(__name, __type) __extern_fsm_implementation_ex(__name, __type) |
#define | extern_vsf_fsm_implementation_ex(__name, __type) __extern_fsm_implementation_ex(__name, __type) |
#define | extern_vsf_fsm_implementation(__name) __extern_fsm_implementation_ex(__name, __name) |
#define | declare_vsf_fsm_implementation(__name) __extern_fsm_implementation_ex(__name, __name) |
Enumerations | |
finit vsf_state machine vsf_state | |
enum | fsm_rt_t { fsm_rt_err = -1 , fsm_rt_cpl = 0 , fsm_rt_on_going = 1 , fsm_rt_wait_for_obj = 2 , fsm_rt_asyn = 3 } |
#define VSF_KERNEL_CFG_EDA_SUPPORT_SIMPLE_FSM DISABLED |
#define vsf_this (*vsf_pthis) |
#define def_states | ( | ... | ) |
#define def_params | ( | ... | ) | __VA_ARGS__ |
#define vsf_args | ( | ... | ) | ,__VA_ARGS__ |
#define __def_fsm | ( | __fsm_type, | |
... | |||
) |
#define def_simple_fsm | ( | __name, | |
... | |||
) |
#define end_def_simple_fsm | ( | ... | ) |
#define __declare_fsm | ( | __name | ) | declare_vsf_task(__name) |
#define declare_vsf_fsm | ( | __name | ) | __declare_fsm(__name) |
#define __extern_fsm_initialiser | ( | __name, | |
... | |||
) |
extern fsm initialisation function and provide function prototype as <__name>_fn, E.g extern_vsf_fsm_initialiser( demo_fsm ); we extern a function called: extern fsm_demo_fsm_t *demo_fsm_init( fsm_demo_fsm_t *fsm_ptr ); and a prototype definition: typedef fsm_demo_fsm_t *demo_fsm_init_fn( fsm_demo_fsm_t *fsm_ptr ); We can then use demo_fsm_init_fn to define function pointer
#define extern_vsf_fsm_initialiser | ( | __name, | |
... | |||
) | __extern_fsm_initialiser(__name, __VA_ARGS__) |
extern fsm task function and provide function prototype as <__name>_fn, E.g extern_vsf_fsm_implementation( demo_fsm ); we extern a function called: fsm_rt_t demo_fsm( fsm_demo_fsm_t *fsm_ptr ) and a prototype definition: typedef fsm_rt_t demo_fsm_fn (fsm_demo_fsm_t *fsm_ptr); We can then use demo_fsm_fn to define function pointer
#define declare_vsf_fsm_implementation_ex | ( | __name, | |
__type | |||
) | __extern_fsm_implementation_ex(__name, __type) |
#define extern_vsf_fsm_implementation_ex | ( | __name, | |
__type | |||
) | __extern_fsm_implementation_ex(__name, __type) |
#define extern_vsf_fsm_implementation | ( | __name | ) | __extern_fsm_implementation_ex(__name, __name) |
#define declare_vsf_fsm_implementation | ( | __name | ) | __extern_fsm_implementation_ex(__name, __name) |
#define call_vsf_fsm | ( | __name, | |
__fsm | |||
) | vsf_task_call_task(__name, __fsm) |
#define ____state | ( | __state, | |
... | |||
) |
#define vsf_state | ( | __state, | |
... | |||
) | break; ____state(__state, __VA_ARGS__) |
#define on_start | ( | ... | ) | {__VA_ARGS__;} |
#define reset_vsf_fsm | ( | ) | do { vsf_this.fsm_state = 0; } while(0); |
#define vsf_fsm_cpl | ( | ) | do {reset_vsf_fsm(); return fsm_rt_cpl;} while(0); |
#define vsf_fsm_report | ( | __ERROR | ) | do {reset_vsf_fsm(); return (fsm_rt_t)(__ERROR); } while(0); |
#define vsf_fsm_wait_for_obj | ( | ) | return fsm_rt_wait_for_obj; |
#define vsf_fsm_on_going | ( | ) | return fsm_rt_on_going; |
#define update_state_to | ( | __state | ) | { vsf_this.fsm_state = (__state); goto __state_entry_##__state;} |
fsm_continue is deprecated, should not be used anymore
#define transfer_to | ( | __state | ) | { vsf_this.fsm_state = (__state); vsf_fsm_on_going() } |
#define __fsm_initialiser | ( | __name, | |
... | |||
) |
#define vsf_fsm_initialiser | ( | __name, | |
... | |||
) | __fsm_initialiser(__name, __VA_ARGS__) |
#define abort_vsf_fsm_init | ( | ) | return NULL; |
#define vsf_fsm_init_body | ( | ... | ) |
#define init_simple_fsm | ( | __name, | |
__fsm, | |||
... | |||
) | init_vsf_fsm(__fsm __VA_ARGS__) |
#define start_vsf_fsm | ( | __name, | |
__fsm, | |||
__pri, | |||
... | |||
) | init_vsf_task(__name, (__fsm), (__pri), __VA_ARGS__) |
#define start_simple_fsm | ( | __name, | |
__fsm, | |||
__pri, | |||
... | |||
) | start_vsf_fsm(__name, (__fsm), (__pri), __VA_ARGS__) |
#define __body | ( | ... | ) |
#define vsf_fsm_body | ( | ... | ) | __body(__VA_ARGS__) |
#define vsf_fsm_end | ( | ) |
#define implement_fsm_ex | ( | __name, | |
__type | |||
) | __implement_fsm_ex(__name, __type) |
vsf_fsm_begin() vsf_state(xxxxx,the range no debug is allowed )
vsf_state(xxxxx){ the range you can debug with }
#define __implement_fsm | ( | __name | ) | implement_fsm_ex(__name, __name) |
#define implement_vsf_fsm | ( | __name, | |
... | |||
) | __implement_fsm(__name) |
#define __privilege_state | ( | __state, | |
... | |||
) |
#define privilege_state | ( | __state, | |
... | |||
) | __privilege_state(__state, __VA_ARGS__) |
#define privilege_group | ( | ... | ) | { __VA_ARGS__;} |
#define privilege_body | ( | ... | ) |
#define __FSM_RT_TYPE__ |
enum fsm_rt_t |