Revision 7d9678db inc/urt_topic.h

View differences:

inc/urt_topic.h
22 22
#ifndef URTWARE_TOPIC_H
23 23
#define URTWARE_TOPIC_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  topic
46
 */
47
typedef struct urt_topic
48
{
49
    urt_topic_t* next;
50
    urt_topicid_t id;
51
    urt_osMutex_t lock;
52
    urt_osEventSource_t evtSource;
53
    unsigned int numHrtSubscribers;
54
    urt_osCondvar_t hrtReleased;
55
    urt_message_t mandatoryMessage;
56
    urt_message_t* latestMessage;
57
    #if (URT_CFG_PUBSUB_QOS_RATECHECKS)
58
        urt_hrtsubscriber_t* hrtSubscribers;
59
        urt_osTimer_t qosRateTimer;
60
    #endif /* URT_CFG_PUBSUB_QOS_RATECHECKS */
61
    #if (URT_CFG_PUBSUB_PROFILING)
62
        uint64_t numMessagesPublished;
63
        uint64_t numMessagesDiscarded;
64
        unsigned int numSubscribers;
65
    #endif /* URT_CFG_PUBSUB_PROFILING */
66
}urt_topic_t;
67

  
41 68
/******************************************************************************/
42 69
/* MACROS                                                                     */
43 70
/******************************************************************************/
......
46 73
/* EXTERN DECLARATIONS                                                        */
47 74
/******************************************************************************/
48 75

  
76
#if defined(__cplusplus)
77
extern "C" {
78
#endif /* defined(__cplusplus) */
79

  
80
    urt_status_t urtTopicInit(urt_topic_t* topic, urt_topicid_t id);
81
#if defined(__cplusplus)
82
}
83
#endif /* defined(__cplusplus) */
84

  
49 85
/******************************************************************************/
50 86
/* INLINE FUNCTIONS                                                           */
51 87
/******************************************************************************/

Also available in: Unified diff