Revision 155b0443
src/subscriber/nrtsubscriber.c | ||
---|---|---|
1 |
#include "subscriber.h" |
|
2 |
|
|
3 |
void urtNrtSubscriberInit (urt_nrtsubscriber_t* subscriber) {} |
|
4 |
|
|
5 |
urt_status_t urtNrtSubscriberSubscribe (urt_nrtsubscriber_t* subscriber, urt_topic_t* topic, urt_message_t* messages) { |
|
6 |
return 0; |
|
7 |
} |
|
8 |
|
|
9 |
urt_status_t urtNrtSubscriberFetchNextMessage (urt_nrtsubscriber_t* subscriber, void* payload, size_t bytes, urt_delay_t* latency) { |
|
10 |
return 0; |
|
11 |
} |
|
12 |
|
|
13 |
urt_status_t urtNrtSubscriberFetchLatestMessage (urt_nrtsubscriber_t* subscriber, void* payload, size_t bytes, urt_delay_t* latency) { |
|
14 |
return 0; |
|
15 |
} |
|
16 |
|
|
17 |
urt_status_t urtNrtSubscriberUnsubscribe (urt_nrtsubscriber_t* subscriber) { |
|
18 |
return 0; |
|
19 |
} |
|
20 |
|
|
21 |
int main () { |
|
22 |
return 0; |
|
23 |
} |
src/subscriber/subscriber.h | ||
---|---|---|
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_ */ |
Also available in: Unified diff