Revision 64fde4ba inc/urt_node.h
inc/urt_node.h | ||
---|---|---|
22 | 22 |
#ifndef URTWARE_NODE_H |
23 | 23 |
#define URTWARE_NODE_H |
24 | 24 |
|
25 |
#include <urt_types.h> |
|
26 | 25 |
#include <urtware.h> |
27 | 26 |
|
28 | 27 |
/******************************************************************************/ |
... | ... | |
42 | 41 |
/******************************************************************************/ |
43 | 42 |
|
44 | 43 |
/** |
45 |
* @brief node |
|
46 |
*/ |
|
47 |
typedef struct urt_node |
|
48 |
{ |
|
49 |
urt_node_t* next; |
|
50 |
urt_osThread_t* thread; |
|
51 |
urt_nodeSetupCallback_t* setupcallback; |
|
52 |
void* setupparams; |
|
53 |
urt_nodeLoopCallback_t* loopcallback; |
|
54 |
void* loopparams; |
|
55 |
urt_nodeShutdownCallback_t* shutdowncallback; |
|
56 |
void* shutdownparams; |
|
57 |
urt_nodestage_t stage; |
|
58 |
urt_osEventListener_t listener; |
|
59 |
#if (URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING) |
|
60 |
uint64_t loops; |
|
61 |
#endif /* URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING */ |
|
62 |
}urt_node_t; |
|
63 |
|
|
64 |
|
|
65 |
/** |
|
66 | 44 |
* @brief |
67 | 45 |
* |
68 | 46 |
* @param[in] node . |
... | ... | |
72 | 50 |
* @return . |
73 | 51 |
* |
74 | 52 |
*/ |
75 |
typedef void (*urt_nodeShutdownCallback_t)(urt_node_t* node, urt_status_t cause, void* arg);
|
|
53 |
typedef void (*urt_nodeShutdownCallback_t)(struct urt_node* node, urt_status_t cause, void* arg);
|
|
76 | 54 |
|
77 | 55 |
|
78 | 56 |
/** |
... | ... | |
84 | 62 |
* @return . |
85 | 63 |
* |
86 | 64 |
*/ |
87 |
typedef urt_osEventMask_t (*urt_nodeSetupCallback_t)(urt_node_t* node, void* arg);
|
|
65 |
typedef urt_osEventMask_t (*urt_nodeSetupCallback_t)(struct urt_node* node, void* arg);
|
|
88 | 66 |
|
89 | 67 |
|
90 | 68 |
/** |
... | ... | |
96 | 74 |
* |
97 | 75 |
* @return . |
98 | 76 |
*/ |
99 |
typedef urt_osEventMask_t (*urt_nodeLoopCallback_t)(urt_node_t* node, urt_osEventMask_t events, void* arg); |
|
77 |
typedef urt_osEventMask_t (*urt_nodeLoopCallback_t)(struct urt_node* node, urt_osEventMask_t events, void* arg); |
|
78 |
|
|
79 |
/** |
|
80 |
* @brief node |
|
81 |
*/ |
|
82 |
typedef struct urt_node |
|
83 |
{ |
|
84 |
struct urt_node* next; |
|
85 |
urt_osThread_t* thread; |
|
86 |
urt_nodeSetupCallback_t* setupcallback; |
|
87 |
void* setupparams; |
|
88 |
urt_nodeLoopCallback_t* loopcallback; |
|
89 |
void* loopparams; |
|
90 |
urt_nodeShutdownCallback_t* shutdowncallback; |
|
91 |
void* shutdownparams; |
|
92 |
urt_nodestage_t stage; |
|
93 |
urt_osEventListener_t listener; |
|
94 |
#if (URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING) |
|
95 |
uint64_t loops; |
|
96 |
#endif /* URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING */ |
|
97 |
}urt_node_t; |
|
98 |
|
|
100 | 99 |
|
101 | 100 |
/******************************************************************************/ |
102 | 101 |
/* MACROS */ |
Also available in: Unified diff