Revision 408a606c src/urt_core.c
src/urt_core.c | ||
---|---|---|
33 | 33 |
/* LOCAL TYPES */ |
34 | 34 |
/******************************************************************************/ |
35 | 35 |
|
36 |
/** |
|
37 |
* @brief core |
|
38 |
*/ |
|
39 |
typedef struct urt_core |
|
40 |
{ |
|
41 |
urt_node_t* _nodes; |
|
42 |
urt_osEventSource_t* _evtSource; |
|
43 |
urt_osMutex_t _lock; |
|
44 |
urt_status_t _status; |
|
45 |
#if (URT_CFG_PUBSUB_ENABLED) |
|
46 |
urt_topic_t* _topics; |
|
47 |
#endif /* URT_CFG_PUBSUB_ENABLED */ |
|
48 |
#if (URT_CFG_RPC_ENABLED) |
|
49 |
urt_service_t* _services; |
|
50 |
#endif /* URT_CFG_RPC_ENABLED */ |
|
51 |
}urt_core_t; |
|
52 |
|
|
53 |
static urt_core_t core; |
|
54 |
|
|
36 | 55 |
/******************************************************************************/ |
37 | 56 |
/* LOCAL VARIABLES */ |
38 | 57 |
/******************************************************************************/ |
... | ... | |
74 | 93 |
} |
75 | 94 |
|
76 | 95 |
/** |
96 |
* @brief Get Core mutex. |
|
97 |
* |
|
98 |
* @return Current system mutex. |
|
99 |
*/ |
|
100 |
urt_osMutex_t urtCoreGetMutex(void) |
|
101 |
{ |
|
102 |
return core._lock; |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* @brief Get Core event source. |
|
107 |
* |
|
108 |
* @return Current system event source. |
|
109 |
*/ |
|
110 |
urt_osEventSource_t* urtCoreGetEvtSource(void) |
|
111 |
{ |
|
112 |
return core._evtSource; |
|
113 |
} |
|
114 |
|
|
115 |
urt_node_t* urtCoreGetNodes(void) |
|
116 |
{ |
|
117 |
return core._nodes; |
|
118 |
} |
|
119 |
|
|
120 |
/** |
|
77 | 121 |
* @brief Start threads of all nodes of the Core. |
78 | 122 |
*/ |
79 | 123 |
void urtCoreStartNodes(void) |
Also available in: Unified diff