urtware / src / subscriber / subscriber.h @ 5dfd7422
History | View | Annotate | Download (662 Bytes)
1 |
#ifndef SUBSCRIBER_H_
|
---|---|
2 |
#define SUBSCRIBER_H_
|
3 |
#define URT_CFG_PUBSUB_PROFILING 0 |
4 |
|
5 |
// Base subscriber which is included in each specialised subscriber
|
6 |
struct urt_basesubscriber_t {
|
7 |
urt_topic_t *topic; |
8 |
urt_osEventListener_t evtListener; |
9 |
urt_message_t *lastMessage; |
10 |
urt_osTime_t lastMessageTime; |
11 |
#if (URT_CFG_PUBSUB_PROFILING)
|
12 |
uint64_t sumLatencies; |
13 |
uint64_t numMessagesReceived; |
14 |
#endif /* URT_CFG_PUBSUB_PROFILING */ |
15 |
}; |
16 |
|
17 |
struct urt_nrtsubscriber_t {
|
18 |
struct urt_basesubscriber_t base;
|
19 |
#if (URT_CFG_PUBSUB_PROFILING)
|
20 |
urt_delay_t minLatency; |
21 |
urt_delay_t maxLatency; |
22 |
#endif /* URT_CFG_PUBSUB_PROFILING */ |
23 |
}; |
24 |
|
25 |
#endif /* SUBSCRIBER_H_ */ |