18#ifndef __VSF_MSG_TREE_H__
19#define __VSF_MSG_TREE_H__
24#if VSF_USE_MSG_TREE == ENABLED
33#define __PLOOC_CLASS_USE_STRICT_TEMPLATE__
35#if defined(__VSF_MSG_TREE_CLASS_IMPLEMENT)
36# define __PLOOC_CLASS_IMPLEMENT__
37# undef __VSF_MSG_TREE_CLASS_IMPLEMENT
38#elif defined(__VSF_MSG_TREE_CLASS_INHERIT__)
39# define __PLOOC_CLASS_INHERIT__
40# undef __VSF_MSG_TREE_CLASS_INHERIT__
50#ifndef VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING
51# define VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING DISABLED
54#ifndef VSF_MSGT_NODE_OFFSET_TYPE
55# define VSF_MSGT_NODE_OFFSET_TYPE intptr_t
58#ifndef VSF_MSG_TREE_CFG_SUPPORT_DUAL_LIST
59# define VSF_MSG_TREE_CFG_SUPPORT_DUAL_LIST DISABLED
149#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
182#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
189#if VSF_MSG_TREE_CFG_SUPPORT_DUAL_LIST == ENABLED
194#if VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING == ENABLED
203 implement(vsf_msgt_node_t)
205 vsf_msgt_node_t* node_ptr;
213 const vsf_msgt_node_t *node_ptr;
219 const i_msg_tree_node_t *interface_ptr;
227 implement_ex(vsf_msgt_cfg_t, NodeTypes)
239 __bfs_node_fifo_t
fifo;
249end_def_class(vsf_msgt_t)
256void vsf_msgt_init( vsf_msgt_t* obj_ptr, const vsf_msgt_cfg_t *cfg_ptr);
259const vsf_msgt_node_t* vsf_msgt_get_next_node_within_container(
260 const vsf_msgt_node_t* node_ptr);
263const vsf_msgt_node_t * vsf_msgt_shoot_top_node( vsf_msgt_t* obj_ptr,
264 const vsf_msgt_node_t *root_ptr,
267const vsf_msgt_node_t * vsf_msgt_shoot_node( vsf_msgt_t* obj_ptr,
268 const vsf_msgt_node_t *root_ptr,
272fsm_rt_t vsf_msgt_backward_propagate_msg( vsf_msgt_t* obj_ptr,
273 const vsf_msgt_node_t *node_ptr,
276const vsf_msgt_node_t *vsf_msgt_backward_propagate_msg_get_last_node(
277 vsf_msgt_t* obj_ptr);
280VSF_CAL_SECTION(".text.vsf.osa_service.msg_tree.vsf_msgt_offset_tree_init")
282void vsf_msgt_offset_tree_init(const vsf_msgt_container_t * root_ptr);
285 ".vsf_msgt_forward_propagate_msg_pre_order_traversal_init")
287void vsf_msgt_forward_propagate_msg_pre_order_traversal_init(vsf_msgt_t* obj_ptr,
291 ".vsf_msgt_forward_propagate_msg_pre_order_traversal_setting")
293void vsf_msgt_forward_propagate_msg_pre_order_traversal_setting(vsf_msgt_t* obj_ptr,
297 ".vsf_msgt_forward_propagate_msg_pre_order_traversal")
299fsm_rt_t vsf_msgt_forward_propagate_msg_pre_order_traversal(
301 const vsf_msgt_node_t* root_ptr,
305VSF_CAL_SECTION(".text.vsf.osa_service.msg_tree.vsf_msgt_forward_propagate_msg_bfs")
307void vsf_msgt_forward_propagate_msg_bfs_init( vsf_msgt_t* obj_ptr,
312VSF_CAL_SECTION(".text.vsf.osa_service.msg_tree.vsf_msgt_forward_propagate_msg_bfs_setting")
314void vsf_msgt_forward_propagate_msg_bfs_setting(vsf_msgt_t* obj_ptr,
317VSF_CAL_SECTION(".text.vsf.osa_service.msg_tree.vsf_msgt_forward_propagate_msg_bfs")
319fsm_rt_t vsf_msgt_forward_propagate_msg_bfs(vsf_msgt_t* obj_ptr,
320 const vsf_msgt_node_t* node_ptr,
324VSF_CAL_SECTION(".text.vsf.osa_service.msg_tree.vsf_msgt_forward_propagate_msg_dfs")
326void vsf_msgt_forward_propagate_msg_dfs_init(vsf_msgt_t* obj_ptr);
328VSF_CAL_SECTION(".text.vsf.osa_service.msg_tree.vsf_msgt_forward_propagate_msg_dfs")
330fsm_rt_t vsf_msgt_forward_propagate_msg_dfs(vsf_msgt_t* obj_ptr,
331 const vsf_msgt_node_t* node_ptr,
#define VSF_CAL_SECTION(__SEC)
Definition __compiler.h:181
#define VSF_BIT(__N)
Definition __type.h:188
@ fsm_rt_user
Definition __type.h:83
declare_class(vsf_tgui_t)
Definition __vk_tgui_slider.c:41
def_interface(i_adc_t) i_peripheral_t
end_def_interface(i_pm_wakeup_t) struct vsf_pm_pclk_cfg_t
Definition device.h:249
unsigned short uint16_t
Definition lvgl.h:41
unsigned char uint8_t
Definition lvgl.h:40
uint32_t uintptr_t
Definition stdint.h:38
unsigned char uint_fast8_t
Definition stdint.h:23
unsigned short uint_fast16_t
Definition stdint.h:25
#define INT16_MAX
Definition stdint.h:50
#define INT16_MIN
Definition stdint.h:45
Definition vsf_msg_tree.h:120
uint16_t u2_type
message handler type
Definition vsf_msg_tree.h:121
Definition vsf_msg_tree.h:114
uintptr_t target_ptr
Definition vsf_msg_tree.h:116
vsf_param_eda_evthandler_t * sub_routine_fn
Definition vsf_msg_tree.h:115
int16_t vsf_evt_t
Definition vsf_eda.h:654
void(* vsf_param_eda_evthandler_t)(uintptr_t target, vsf_evt_t evt)
Definition vsf_eda.h:658
fsm_rt_t
Definition vsf_fsm.h:315
__vsf_msgt_msg_handling_fsm_t msg_handling
Definition vsf_msg_tree.h:247
uint8_t state
Definition vsf_msg_tree.h:247
end_def_structure(vsf_msgt_cfg_t) declare_class(vsf_msgt_t) def_class(vsf_msgt_t
vsf_msgt_node_status_t
Definition vsf_msg_tree.h:82
@ VSF_MSGT_NODE_ACTIVE
Definition vsf_msg_tree.h:90
@ VSF_MSGT_NODE_VALID
whether the node is valid/initialised or not
Definition vsf_msg_tree.h:87
@ __VSF_MSGT_NODE_STATUS_LEAST_MIN
Definition vsf_msg_tree.h:85
@ __VSF_MSGT_NODE_STATUS_LEAST_MAX
Definition vsf_msg_tree.h:84
@ VSF_MSGT_NODE_VISIBLE
whether the node is visible
Definition vsf_msg_tree.h:89
@ VSF_MSGT_NODE_ENABLED
whether the node is enabled or not
Definition vsf_msg_tree.h:88
@ VSF_MSGT_NODE_HIDE_CONTENT
whether hide the content inside container
Definition vsf_msg_tree.h:91
bool is_support_container_post_handling
Definition vsf_msg_tree.h:247
uint8_t is_transparent
used together with is_container
Definition vsf_msg_tree.h:176
uint8_t is_container
whether it is a container or not
Definition vsf_msg_tree.h:177
uint8_t is_visited
Definition vsf_msg_tree.h:169
uint8_t value
Definition vsf_msg_tree.h:179
vsf_msgt_msg_t
Definition vsf_msg_tree.h:79
const char * node_name_ptr
Definition vsf_msg_tree.h:195
uint8_t is_top
Definition vsf_msg_tree.h:172
__vsf_msgt_msg_handling_fsm_t
Definition vsf_msg_tree.h:216
vsf_msgt_method_shoot_t * Shoot
range check
Definition vsf_msg_tree.h:139
uint8_t type_num
Definition vsf_msg_tree.h:220
vsf_msgt_node_offset_t previous
Definition vsf_msg_tree.h:190
declare_interface(i_msg_tree_node_t) def_interface(i_msg_tree_node_t) vsf_msgt_handler_t msg_handler
vsf_msgt_method_status_t * Status
get status of target node
Definition vsf_msg_tree.h:138
fsm_rt_t vsf_msgt_method_fsm_t(vsf_msgt_node_t *node_ptr, vsf_msgt_msg_t *msg_ptr)
Definition vsf_msg_tree.h:113
vsf_msgt_err_t
Definition vsf_msg_tree.h:103
@ VSF_MSGT_ERR_NONE
Definition vsf_msg_tree.h:106
@ VSF_MSGT_ERR_REQUEST_VISIT_PARENT
Definition vsf_msg_tree.h:105
@ VSF_MSGT_ERR_MSG_NOT_HANDLED
Definition vsf_msg_tree.h:107
@ VSF_MSGT_ERR_REUQEST_VISIT_AGAIN
Definition vsf_msg_tree.h:104
vsf_msgt_node_status_t vsf_msgt_method_status_t(vsf_msgt_node_t *)
Definition vsf_msg_tree.h:112
__bfs_node_fifo_t fifo
Definition vsf_msg_tree.h:247
def_structure(vsf_msgt_cfg_t) const i_msg_tree_node_t *interface_ptr
vsf_msgt_container_t * parent_ptr
parent node
Definition vsf_msg_tree.h:187
VSF_MSGT_NODE_OFFSET_TYPE vsf_msgt_node_offset_t
Definition vsf_msg_tree.h:65
vsf_msgt_handler_type_t
Definition vsf_msg_tree.h:94
@ VSF_MSGT_NODE_HANDLER_TYPE_FSM
use fsm (same as normal callback)
Definition vsf_msg_tree.h:96
@ VSF_MSGT_NODE_HANDLER_TYPE_EDA
pass msg to eda
Definition vsf_msg_tree.h:98
@ VSF_MSGT_NODE_HANDLER_TYPE_CALLBACK
use normal callback
Definition vsf_msg_tree.h:95
@ VSF_MSGT_NODE_HANDLER_TYPE_SUBCALL
eda sub call (pt subcall)
Definition vsf_msg_tree.h:97
#define VSF_MSGT_NODE_OFFSET_TYPE
Definition vsf_msg_tree.h:55
bool vsf_msgt_method_shoot_t(const vsf_msgt_node_t *, uintptr_t)
Definition vsf_msg_tree.h:111
vsf_msgt_node_offset_t next
Definition vsf_msg_tree.h:192
def_class(vsf_stream_fifo_t, which(vsf_stream_tx_t TX;vsf_stream_rx_t RX;), private:vsf_slist_queue_t union { vsf_stream_fifo_cfg_t cfg;struct { vsf_stream_dat_rdy_evt_t tDataReadyEventHandling;vsf_stream_dat_drn_evt_t tDataDrainEventHandling;vsf_stream_status_t Status;#if !defined(VSF_PBUF_QUEUE_CFG_ATOM_ACCESS) vsf_protect_region_t *pregion;#endif };};) end_def_class(vsf_stream_fifo_t) extern vsf_err_t vsf_stream_fifo_init(vsf_stream_fifo_t *obj_ptr
#define declare_vsf_rng_buf(__name)
Definition vsf_queue.h:175
#define def_vsf_rng_buf(__name, __type)
Definition vsf_queue.h:242
vsf_tgui_evt_t declare_structure(__vk_tgui_focus_t) def_structure(__vk_tgui_focus_t) const vsf_tgui_control_t *current_ptr