Revision 7d9678db inc/urt_publisher.h
| inc/urt_publisher.h | ||
|---|---|---|
| 22 | 22 |
#ifndef URTWARE_PUBLISHER_H |
| 23 | 23 |
#define URTWARE_PUBLISHER_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 publisher |
|
| 46 |
*/ |
|
| 47 |
typedef struct urt_publisher |
|
| 48 |
{
|
|
| 49 |
urt_topic_t* topic; |
|
| 50 |
#if (URT_CFG_PUBSUB_PROFILING) |
|
| 51 |
uint64_t publishAttempts; |
|
| 52 |
uint64_t publishFails; |
|
| 53 |
#endif /* URT_CFG_PUBSUB_PROFILING */ |
|
| 54 |
}urt_publisher_t; |
|
| 55 |
|
|
| 41 | 56 |
/******************************************************************************/ |
| 42 | 57 |
/* MACROS */ |
| 43 | 58 |
/******************************************************************************/ |
| ... | ... | |
| 46 | 61 |
/* EXTERN DECLARATIONS */ |
| 47 | 62 |
/******************************************************************************/ |
| 48 | 63 |
|
| 64 |
#if defined(__cplusplus) |
|
| 65 |
extern "C" {
|
|
| 66 |
#endif /* defined(__cplusplus) */ |
|
| 67 |
|
|
| 68 |
void urtPublisherInit(urt_publisher_t* publisher, urt_topic_t* topic, urt_message_t* message); |
|
| 69 |
urt_status_t urtPublisherPublish(urt_publisher_t* publisher, void* payload, size_t bytes, urt_osTime_t t, urt_delay_t timeout); |
|
| 70 |
#if defined(__cplusplus) |
|
| 71 |
} |
|
| 72 |
#endif /* defined(__cplusplus) */ |
|
| 73 |
|
|
| 49 | 74 |
/******************************************************************************/ |
| 50 | 75 |
/* INLINE FUNCTIONS */ |
| 51 | 76 |
/******************************************************************************/ |
Also available in: Unified diff