| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#include "dds/ddsc/dds_public_impl.h" |
| 11 |
|
| 12 |
#ifndef _DDSL_DDS_PROPS_H_ |
| 13 |
#define _DDSL_DDS_PROPS_H_ |
| 14 |
|
| 15 |
|
| 16 |
#ifdef __cplusplus |
| 17 |
extern "C" { |
| 18 |
#endif |
| 19 |
|
| 20 |
#define FG_DDS_PROP_VERSION 0 |
| 21 |
#define FG_DDS_PROP_REQUEST -1 |
| 22 |
#define FG_DDS_MODE_READ (0) |
| 23 |
#define FG_DDS_MODE_WRITE (1) |
| 24 |
typedef enum FG_propType |
| 25 |
{ |
| 26 |
FG_DDS_NONE, |
| 27 |
FG_DDS_ALIAS, |
| 28 |
FG_DDS_BOOL, |
| 29 |
FG_DDS_INT, |
| 30 |
FG_DDS_LONG, |
| 31 |
FG_DDS_FLOAT, |
| 32 |
FG_DDS_DOUBLE, |
| 33 |
FG_DDS_STRING, |
| 34 |
FG_DDS_UNSPECIFIED |
| 35 |
} FG_propType; |
| 36 |
|
| 37 |
#define FG_propType__alloc() \ |
| 38 |
((FG_propType*) dds_alloc (sizeof (FG_propType))); |
| 39 |
|
| 40 |
|
| 41 |
typedef struct FG_propValue |
| 42 |
{ |
| 43 |
FG_propType _d; |
| 44 |
union |
| 45 |
{ |
| 46 |
char Bool; |
| 47 |
int32_t Int32; |
| 48 |
int64_t Int64; |
| 49 |
float Float32; |
| 50 |
double Float64; |
| 51 |
char * String; |
| 52 |
} _u; |
| 53 |
} FG_propValue; |
| 54 |
|
| 55 |
#define FG_propValue__alloc() \ |
| 56 |
((FG_propValue*) dds_alloc (sizeof (FG_propValue))); |
| 57 |
|
| 58 |
|
| 59 |
typedef struct FG_DDS_prop |
| 60 |
{ |
| 61 |
int32_t id; |
| 62 |
uint8_t version; |
| 63 |
char mode; |
| 64 |
FG_propValue val; |
| 65 |
uint8_t guid[16]; |
| 66 |
} FG_DDS_prop; |
| 67 |
|
| 68 |
extern const dds_topic_descriptor_t FG_DDS_prop_desc; |
| 69 |
|
| 70 |
#define FG_DDS_prop__alloc() \ |
| 71 |
((FG_DDS_prop*) dds_alloc (sizeof (FG_DDS_prop))); |
| 72 |
|
| 73 |
#define FG_DDS_prop_free(d,o) \ |
| 74 |
dds_sample_free ((d), &FG_DDS_prop_desc, (o)) |
| 75 |
|
| 76 |
#ifdef __cplusplus |
| 77 |
} |
| 78 |
#endif |
| 79 |
#endif |