Revision 7d9678db inc/urt_core.h

View differences:

inc/urt_core.h
22 22
#ifndef URTWARE_CORE_H
23 23
#define URTWARE_CORE_H
24 24

  
25
#include <urt_types.h>
26
#include <urtware.h>
27

  
25 28
/******************************************************************************/
26 29
/* CONSTANTS                                                                  */
27 30
/******************************************************************************/
......
38 41
/* DATA STRUCTURES AND TYPES                                                  */
39 42
/******************************************************************************/
40 43

  
44
/**
45
 * @brief  core
46
 */
47
typedef struct urt_core
48
{
49
    urt_node_t* _nodes;
50
    urt_osEventSource_t* _evtSource;
51
    urt_osMutex_t _lock;
52
    urt_status_t _status;
53
    #if (URT_CFG_PUBSUB_ENABLED)
54
        urt_topic_t* _topics;
55
    #endif /* URT_CFG_PUBSUB_ENABLED */
56
    #if (URT_CFG_RPC_ENABLED)
57
        urt_service_t* _services;
58
    #endif /* URT_CFG_RPC_ENABLED */
59
}urt_core_t;
60

  
41 61
/******************************************************************************/
42 62
/* MACROS                                                                     */
43 63
/******************************************************************************/
......
46 66
/* EXTERN DECLARATIONS                                                        */
47 67
/******************************************************************************/
48 68

  
69
#if defined(__cplusplus)
70
extern "C" {
71
#endif /* defined(__cplusplus) */
72

  
73
    void urtCoreInit(void);
74
    urt_status_t urtCoreGetStatus(void);
75
    void urtCoreStartNodes(void);
76
    urt_status_t urtCoreSynchronize(urt_node_t* node);
77
    urt_status_t urtCoreStopNodes(urt_status_t reason);
78

  
79
#if (URT_CFG_PUBSUB_ENABLED)
80
    urt_topic_t* urtCoreGetTopic(urt_topicid_t id);
81
#endif /* URT_CFG_PUBSUB_ENABLED */
82

  
83
#if (URT_CFG_RPC_ENABLED)
84
    urt_service_t urtCoreGetService(urt_serviceid_t id);
85
#endif /* URT_CFG_RPC_ENABLED */
86

  
87
#if defined(__cplusplus)
88
}
89
#endif /* defined(__cplusplus) */
90

  
49 91
/******************************************************************************/
50 92
/* INLINE FUNCTIONS                                                           */
51 93
/******************************************************************************/

Also available in: Unified diff