40 #ifndef reda_sequenceNumber_h
41 #include "reda/reda_sequenceNumber.h"
46 #ifndef osapi_system_h
53 #include "cdr/cdr_stream.h"
55 #ifndef netio_common_h
58 #ifndef netio_common_h
61 #ifndef netio_address_h
62 #include "netio/netio_address.h"
65 #include "netio/netio_route.h"
67 #ifndef netio_interface_h
78 typedef RTI_UINT32 RTPS_ReturnCode_t;
82 #define RTPS_RETCODE_OK 0
84 #define RTPS_RETCODE_START 1000
88 #define RTPS_RETCODE_ERROR RTPS_RETCODE_START
92 #define RTPS_RETCODE_UNSUPPORTED RTPS_RETCODE_START + 1
96 #define RTPS_RETCODE_BAD_PARAMETER RTPS_RETCODE_START + 2
100 #define RTPS_RETCODE_PRECONDITION_NOT_MET RTPS_RETCODE_START + 3
104 #define RTPS_RETCODE_OUT_OF_RESOURCES RTPS_RETCODE_START + 4
108 #define RTPS_RETCODE_ALREADY_DELETED RTPS_RETCODE_START + 5
112 #define RTPS_PATHNAME_LEN_MAX (255)
118 typedef RTI_UINT16 RTPS_ParameterId;
125 #define RTPS_PID_INCOMPATIBLE_MASK (0x4000)
130 #define RTPS_PID_PAD (0x0000)
135 #define RTPS_PID_SENTINEL (0x0001)
143 #define RTPS_PID_TOPIC_NAME (0x0005)
152 #define RTPS_PID_TYPE_NAME (0x0007)
161 #define RTPS_PID_DURABILITY (0x001d)
170 #define RTPS_PID_DEADLINE (0x0023)
179 #define RTPS_PID_LIVELINESS (0x001b)
188 #define RTPS_PID_RELIABILITY (0x001a)
196 #define RTPS_PID_OWNERSHIP (0x001f)
204 #define RTPS_PID_OWNERSHIP_STRENGTH (0x0006)
212 #define RTPS_PID_PROTOCOL_VERSION (0x0015)
220 #define RTPS_PID_VENDOR_ID (0x0016)
224 #define RTPS_PID_USERDATA_IPADDRESS_COUNT_MAX (4)
231 #define RTPS_PID_UNICAST_LOCATOR6 (0x002f)
238 #define RTPS_PID_MULTICAST_LOCATOR6 (0x0030)
245 #define RTPS_PID_DEFAULT_UNICAST_LOCATOR6 (0x0031)
252 #define RTPS_PID_METATRAFFIC_UNICAST_LOCATOR6 (0x0032)
259 #define RTPS_PID_METATRAFFIC_MULTICAST_LOCATOR6 (0x0033)
264 #define RTPS_PID_LEASE_DURATION (0x0002)
271 #define RTPS_PID_PROPERTY_LIST (0x0059)
276 #define RTPS_PID_PARTICIPANT_GUID (0x0050)
284 #define RTPS_PID_BUILTIN_ENDPOINT_MASK (0x0058)
289 #define RTPS_PID_ENDPOINT_GUID (0x005A)
294 #define RTPS_PID_ENTITY_NAME (0x0062)
300 #define RTPS_PID_KEY_HASH (0x0070)
303 #define RTPS_KEY_HASH_PARAM_LENGTH (16)
308 #define RTPS_PID_STATUS_INFO (0x0071)
311 #define RTPS_STATUS_INFO_PARAM_LENGTH (4)
314 #define RTPS_PID_SEND_QUEUE_SIZE_DEPRECATED (0x0013)
320 typedef RTI_UINT32 RTPS_HostId;
325 #define RTPS_HOST_ID_UNKNOWN (0x00000000)
330 typedef RTI_UINT32 RTPS_AppId;
335 #define RTPS_APP_ID_UNKNOWN (0x00000000)
340 typedef RTI_UINT32 RTPS_InstanceId;
345 #define RTPS_INSTANCE_ID_UNKNOWN (0x00000000)
350 typedef RTI_UINT32 RTPS_ObjectId;
355 #define RTPS_OBJECT_ID_UNKNOWN (0x00000000)
360 #define RTPS_OBJECT_ID_MAX (0xFFFFFFFF)
369 struct RTPS_GuidPrefix
384 RTPS_InstanceId instanceId;
390 #define RTPS_GUID_PREFIX_UNKNOWN { \
391 RTPS_HOST_ID_UNKNOWN, \
392 RTPS_APP_ID_UNKNOWN, \
393 RTPS_INSTANCE_ID_UNKNOWN}
398 #define RTPS_GUID_PREFIX_SIZE (12)
406 struct RTPS_GuidPrefix prefix;
409 RTPS_ObjectId objectId;
415 #define RTPS_GUID_UNKNOWN { \
416 RTPS_GUID_PREFIX_UNKNOWN, \
417 RTPS_OBJECT_ID_UNKNOWN}
421 #define RTPS_OBJECT_ID_PARTICIPANT (0x000001C1)
424 #define RTPS_OBJECT_ID_WRITER_SDP_PARTICIPANT (0x000100C2)
427 #define RTPS_OBJECT_ID_WRITER_SDP_PUBLICATION (0x000003C2)
430 #define RTPS_OBJECT_ID_WRITER_SDP_SUBSCRIPTION (0x000004C2)
433 #define RTPS_OBJECT_ID_READER_SDP_PARTICIPANT (0x000100C7)
436 #define RTPS_OBJECT_ID_READER_SDP_PUBLICATION (0x000003C7)
439 #define RTPS_OBJECT_ID_READER_SDP_SUBSCRIPTION (0x000004C7)
443 #define RTPS_KEY_HASH_MAX_LENGTH 16
449 RTI_UINT8 value[RTPS_KEY_HASH_MAX_LENGTH];
456 #define RTPS_KEY_HASH_NIL {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
459 #define RTPS_KEY_HASH_DEFAULT { \
461 RTPS_KEY_HASH_MAX_LENGTH\
473 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
474 RTPS_Guid_equals(
struct RTPS_Guid *a,
struct RTPS_Guid *b);
484 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
485 RTPS_Guid_prefix_equals(
487 struct RTPS_Guid *b);
497 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
498 RTPS_Guid_suffix_equals(
500 struct RTPS_Guid *b);
504 typedef RTI_UINT16 RTPS_ProtocolVersion_T;
507 #define RTPS_PROTOCOL_VERSION_MAJOR (0x02)
510 #define RTPS_PROTOCOL_VERSION_MINOR (0x01)
513 typedef RTI_UINT16 RTPS_VendorId;
516 #define RTPS_VENDOR_ID_MAJOR (0x01)
519 #define RTPS_VENDOR_ID_MINOR (0x0A)
522 #define RTPS_VENDOR_ID_RTI_DDS (0x0101)
525 #define RTPS_VENDOR_ID_RTI_MICRO (0x010A)
529 RTPS_VendorId_getMajor(RTPS_VendorId *me);
533 RTPS_VendorId_getMinor(RTPS_VendorId *me);
537 typedef RTI_UINT32 RTPS_StatusInfo;
540 #define RTPS_NO_STATUS_INFO (0x00000000)
543 #define RTPS_DISPOSE_STATUS_INFO (0x00000001)
546 #define RTPS_UNREGISTER_STATUS_INFO (0X00000002)
549 #define RTPS_ENDIAN_FLAG (0x01)
564 RTPS_OBJECT_NORMAL_USER_UNKNOWN = 0x00,
565 RTPS_OBJECT_NORMAL_USER_APPLICATION = 0x01,
567 RTPS_OBJECT_NORMAL_USER_CST_WRITER = 0x02,
569 RTPS_OBJECT_NORMAL_USER_PUBLICATION = 0x03,
571 RTPS_OBJECT_NORMAL_USER_SUBSCRIPTION = 0x04,
573 RTPS_OBJECT_NORMAL_USER_CST_READER = 0x07,
574 RTPS_OBJECT_NORMAL_USER_VIRTUAL_SUBSCRIPTION = 0x3C,
575 RTPS_OBJECT_NORMAL_USER_VIRTUAL_CST_READER = 0x3D,
576 RTPS_OBJECT_RESERVED_USER_UNKNOWN = 0x40,
577 RTPS_OBJECT_RESERVED_USER_APPLICATION = 0x41,
578 RTPS_OBJECT_RESERVED_USER_CST_WRITER = 0x42,
579 RTPS_OBJECT_RESERVED_USER_PUBLICATION = 0x43,
580 RTPS_OBJECT_RESERVED_USER_SUBSCRIPTION = 0x44,
581 RTPS_OBJECT_RESERVED_USER_CST_READER = 0x47,
582 RTPS_OBJECT_NORMAL_META_UNKNOWN = 0x80,
583 RTPS_OBJECT_NORMAL_META_APPLICATION = 0x81,
584 RTPS_OBJECT_NORMAL_META_CST_WRITER = 0x82,
585 RTPS_OBJECT_NORMAL_META_PUBLICATION = 0x83,
586 RTPS_OBJECT_NORMAL_META_SUBSCRIPTION = 0x84,
587 RTPS_OBJECT_NORMAL_META_CST_READER = 0x87,
588 RTPS_OBJECT_RESERVED_META_UNKNOWN = 0xc0,
589 RTPS_OBJECT_RESERVED_META_APPLICATION = 0xc1,
590 RTPS_OBJECT_RESERVED_META_CST_WRITER = 0xc2,
591 RTPS_OBJECT_RESERVED_META_PUBLICATION = 0xc3,
592 RTPS_OBJECT_RESERVED_META_SUBSCRIPTION = 0xc4,
593 RTPS_OBJECT_RESERVED_META_CST_READER = 0xc7
601 #define RTPS_LOCATOR_ADDRESS_LENGTH_MAX 16
604 struct RTPS_Locator_t
613 RTI_UINT8 address[RTPS_LOCATOR_ADDRESS_LENGTH_MAX];
617 #define RTPS_LOCATOR_DEFAULT {\
620 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} \
624 #define RTPS_Locator RTPS_Locator_t
627 struct RTPS_LocatorUdpv4_t
640 #define RTPS_LOCATOR_UDPV4_DEFAULT {\
647 extern RTPSDllVariable
const struct RTPS_Locator_t RTPS_LOCATOR_INVALID;
650 extern RTPSDllVariable
const RTI_INT32 RTPS_LOCATOR_KIND_INVALID;
653 extern RTPSDllVariable
const RTI_UINT32 RTPS_LOCATOR_PORT_INVALID;
656 extern RTPSDllVariable
const RTI_UINT8
657 RTPS_LOCATOR_ADDRESS_INVALID[RTPS_LOCATOR_ADDRESS_LENGTH_MAX];
660 extern RTPSDllVariable
const RTI_INT32 RTPS_LOCATOR_KIND_UDPv4;
663 extern RTPSDllVariable
const RTI_INT32 RTPS_LOCATOR_KIND_UDPv6;
666 extern RTPSDllVariable
const RTI_INT32 RTPS_LOCATOR_KIND_RESERVED;
669 extern RTPSDllVariable
const RTI_INT32 RTPS_LOCATOR_KIND_SHMEM;
690 RTPS_SequenceNumber_deserialize(
char **srcBuffer,
691 struct REDA_SequenceNumber *instance,
704 MUST_CHECK_RETURN RTPSDllExport RTI_INT32
705 RTPS_SequenceNumber_getDistance(
706 const struct REDA_SequenceNumber *s1,
707 const struct REDA_SequenceNumber *s2);
712 #define RTPS_BITMAP_32BITS_ARRAY_SIZE_MAX (8)
724 struct REDA_SequenceNumber _lead;
743 RTI_UINT32 _32bits[RTPS_BITMAP_32BITS_ARRAY_SIZE_MAX];
747 #define RTPS_BITMAP_SIZE_MAX (256)
750 #define RTPS_BITMAP_DISTANCE_MAX (0x7FFFFFFF)
759 MUST_CHECK_RETURN
struct REDA_SequenceNumber*
760 RTPS_Bitmap_getLead(
const struct RTPS_Bitmap *me);
769 MUST_CHECK_RETURN RTI_INT32
770 RTPS_Bitmap_getBitCount(
const struct RTPS_Bitmap *me);
784 struct RTPS_Bitmap *me,
785 const struct REDA_SequenceNumber *seqNum,
803 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
804 RTPS_Bitmap_setBit(
struct RTPS_Bitmap *me,
806 const struct REDA_SequenceNumber *num,
824 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
826 const struct RTPS_Bitmap *me,
828 const struct REDA_SequenceNumber *num);
842 SHOULD_CHECK_RETURN RTPSDllExport
RTI_BOOL
843 RTPS_Bitmap_getFirstBit(
844 const struct RTPS_Bitmap *me,
845 struct REDA_SequenceNumber *position,
860 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
861 RTPS_Bitmap_getLastBit(
862 const struct RTPS_Bitmap *me,
863 struct REDA_SequenceNumber *position,
877 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
879 struct RTPS_Bitmap *me,
880 const struct REDA_SequenceNumber *firstSeqNum,
881 const struct REDA_SequenceNumber *lastSeqNum,
900 struct RTPS_Bitmap *me,
901 const struct RTPS_Bitmap *source);
915 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
917 struct RTPS_Bitmap *me,
918 const struct REDA_SequenceNumber *seqNum);
935 RTPS_Bitmap_truncate(
936 struct RTPS_Bitmap *me,
937 const struct REDA_SequenceNumber *seqNum);
950 RTPS_Bitmap_invert(
struct RTPS_Bitmap *me);
969 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
970 RTPS_Bitmap_deserialize(
971 struct RTPS_Bitmap *me,
972 const char **streamPtr,
973 RTI_UINT32 max_bits_len,
987 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
989 struct CDR_Stream_t *stream,
990 const struct RTPS_Guid *guid,
1003 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1004 RTPS_Guid_deserialize(
1005 struct CDR_Stream_t *stream,
1006 struct RTPS_Guid *guid,
1017 MUST_CHECK_RETURN RTPSDllExport RTI_UINT32
1018 RTPS_Guid_getMaxSizeSerialized(RTI_UINT32 size);
1031 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1032 RTPS_serializeRtiNtpTime(
1033 struct CDR_Stream_t *stream,
1047 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1048 RTPS_deserializeRtiNtpTime(
1049 struct CDR_Stream_t *stream,
1061 MUST_CHECK_RETURN RTPSDllExport RTI_UINT32
1062 RTPS_getRtiNtpTimeMaxSizeSerialized(RTI_UINT32 size);
1075 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1076 RTPS_serialize2Octets(
1077 struct CDR_Stream_t *stream,
1078 const RTI_UINT16 * in,
1091 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1092 RTPS_deserialize2Octets(
1093 struct CDR_Stream_t *stream,
1105 MUST_CHECK_RETURN RTPSDllExport RTI_UINT32
1106 RTPS_get2OctetsMaxSizeSerialized(RTI_UINT32 size);
1119 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1120 RTPS_serializeIpv6Locator(
1121 struct CDR_Stream_t *stream,
1122 const struct RTPS_Locator_t *loc,
1135 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1136 RTPS_deserializeIpv6Locator(
1137 struct CDR_Stream_t *stream,
1138 struct RTPS_Locator_t *loc,
1149 MUST_CHECK_RETURN RTPSDllExport RTI_UINT32
1150 RTPS_getIpv6LocatorMaxSizeSerialized(RTI_UINT32 size);
1162 MUST_CHECK_RETURN RTPSDllExport
RTI_BOOL
1163 RTPS_Epoch_deserialize(REDA_Epoch_T * me,
1164 const char **stream,
1169 typedef struct NETIO_Guid RTPS_GUID;
1172 typedef struct NETIO_GuidPrefix RTPS_GuidPrefix_T;
1175 typedef struct NETIO_GuidEntity RTPS_Entity_T;
1178 #define RTPS_GUIDPREFIX_UNKNOWN {{0,0,0,0,0,0,0,0,0,0,0,0}}
1181 #define RTPS_ENTITY_UNKNOWN {{0,0,0,0}}
1189 #define RTPSEntity_is_unknown(entity_) \
1191 ((entity_)->value[0]== 0) && ((entity_)->value[1] == 0) && \
1192 ((entity_)->value[2] == 0) && ((entity_)->value[3] == 0) \
1203 RTI_UINT32 fractions;
1210 RTI_UINT8 vendor_id[2];
1214 struct RTPS_ProtocolVersion
1233 struct RTPS_ProtocolVersion protocol_version;
1236 struct RTPS_Vendor vendor_id;
1239 RTPS_GuidPrefix_T guid_prefix;
1243 #define RTPS_HEADER_SIZE() sizeof(struct RTPS_Header)
1246 #ifdef RTI_ENDIAN_LITTLE
1247 #define VALID_RTPS_HEADER 0x53505452
1249 #define VALID_RTPS_HEADER 0x52545053
1259 #define RTPS_HEADER_SET(hdr_,prefix_)\
1261 (hdr_)->rtps = VALID_RTPS_HEADER;\
1262 (hdr_)->protocol_version.major = RTPS_PROTOCOL_VERSION_MAJOR;\
1263 (hdr_)->protocol_version.minor = RTPS_PROTOCOL_VERSION_MINOR;\
1264 (hdr_)->vendor_id.vendor_id[0] = RTPS_VENDOR_ID_MAJOR;\
1265 (hdr_)->vendor_id.vendor_id[1] = RTPS_VENDOR_ID_MINOR;\
1266 (hdr_)->guid_prefix = *(prefix_);\
1273 #define RTPS_PAD_KIND (0x01)
1276 #define RTPS_ACKNACK_KIND (0x06)
1279 #define RTPS_HEARTBEAT_KIND (0x07)
1282 #define RTPS_GAP_KIND (0x08)
1285 #define RTPS_INFO_TS_KIND (0x09)
1288 #define RTPS_INFO_SRC_KIND (0x0c)
1291 #define RTPS_INFO_REPLY_IP4_KIND (0x0d)
1294 #define RTPS_INFO_DST_KIND (0x0e)
1297 #define RTPS_INFO_REPLY_KIND (0x0f)
1300 #define RTPS_DATA_KIND (0x15)
1303 #define RTPS_LARGEST_SUBMSG_KIND RTPS_DATA_KIND
1306 #define RTPS_SUBMESSAGE_HEADER_LENGTH 4
1315 struct RTPS_SubmsgHdr
1328 #define RTPS_SUBMSG_FLAG_E 0x1
1337 #ifdef RTI_ENDIAN_LITTLE
1338 #define RTPS_SubmsgHdr_set(subhdr_,kind_,flags_,length_) \
1340 (subhdr_)->kind = kind_;\
1341 (subhdr_)->flags = flags_ | RTPS_SUBMSG_FLAG_E;\
1342 (subhdr_)->length = length_ - 4;\
1345 #define RTPS_SubmsgHdr_set(subhdr_,kind_,flags_,length_) \
1347 (subhdr_)->kind = kind_;\
1348 (subhdr_)->flags = flags_ & ~RTPS_SUBMSG_FLAG_E;\
1349 (subhdr_)->length = length_ - 4;\
1354 #define RTPSSubmessage_is_info(kind_) \
1355 ((kind_ == RTPS_INFO_DST_KIND) || \
1356 (kind_ == RTPS_INFO_TS_KIND) || \
1357 (kind_ == RTPS_INFO_SRC_KIND) || \
1358 (kind_ == RTPS_INFO_REPLY_IP4_KIND) || \
1359 (kind_ == RTPS_INFO_REPLY_KIND))
1362 #define RTPSSubmessage_from_writer(kind_) \
1363 ((kind_ == RTPS_GAP_KIND) || \
1364 (kind_ == RTPS_DATA_KIND) || \
1365 (kind_ == RTPS_HEARTBEAT_KIND))
1372 struct RTPS_SubmsgHdr hdr;
1375 RTPS_Entity_T reader;
1378 RTPS_Entity_T writer;
1381 struct RTPS_Bitmap bitmap;
1388 #define RTPS_BITMAP_INT_COUNT(bitCount_) \
1389 ((RTI_UINT32)((bitCount_ + 31)/32))
1392 #define RTPS_ACKNACKFLAGS_F 0x2
1395 #define RTPS_ACKNACK_FINAL(flags) (flags & RTPS_ACKNACKFLAGS_F)
1398 #define RTPS_ACKNACK_SIZE(bitCount_) \
1400 (sizeof(struct RTPS_ACKNACK) - sizeof(struct RTPS_Bitmap)) + \
1401 (sizeof(struct REDA_SequenceNumber)) + \
1402 4 + (4 * RTPS_BITMAP_INT_COUNT(bitCount_)) \
1415 #define RTPS_ACKNACK_SET(ack_,flags_,length_,reader_,writer_,bitmap_,count_) \
1417 RTI_UINT32 int_count, *epoch_ref; \
1418 epoch_ref = &((ack_)->bitmap._32bits[0]); \
1419 RTPS_SubmsgHdr_set(&(ack_)->hdr,RTPS_ACKNACK_KIND,flags_,length_); \
1420 (ack_)->reader = reader_; \
1421 (ack_)->writer = writer_; \
1422 (ack_)->bitmap._lead = (bitmap_)->_lead; \
1423 (ack_)->bitmap._bitCount = (bitmap_)->_bitCount; \
1424 for (int_count = 0; \
1425 int_count < RTPS_BITMAP_INT_COUNT((bitmap_)->_bitCount); ++int_count) \
1427 (ack_)->bitmap._32bits[int_count] = (bitmap_)->_32bits[int_count]; \
1428 epoch_ref = &((ack_)->bitmap._32bits[int_count+1]); \
1430 *epoch_ref = count_; \
1443 struct RTPS_SubmsgHdr hdr;
1449 RTI_UINT16 inlineQosOffset;
1452 RTPS_Entity_T reader;
1455 RTPS_Entity_T writer;
1458 struct REDA_SequenceNumber sn;
1472 #define RTPS_DATA_SET(data_,flags_,length_,eflags_,qlength_,reader_,writer_,sn_) \
1474 RTPS_SubmsgHdr_set(&(data_)->hdr,RTPS_DATA_KIND,flags_,length_); \
1475 (data_)->flags = eflags_;\
1476 (data_)->inlineQosOffset = qlength_;\
1477 (data_)->reader = reader_;\
1478 (data_)->writer = writer_;\
1483 #define RTPS_FLAGS_NONE 0x0
1486 #define RTPS_DATAFLAGS_Q 0x2
1489 #define RTPS_DATAFLAGS_D 0x4
1492 #define RTPS_DATA_INLINEQOS_OFFSET 16
1495 #define RTPS_DATA_SIZE(payload_size) (sizeof(struct RTPS_DATA)+payload_size)
1502 struct RTPS_SubmsgHdr hdr;
1505 RTPS_Entity_T reader;
1508 RTPS_Entity_T writer;
1511 struct REDA_SequenceNumber sn_start;
1514 struct RTPS_Bitmap bitmap;
1518 #define RTPS_GAP_SIZE(bitCount_) \
1520 (sizeof(struct RTPS_GAP)) - (sizeof(struct RTPS_Bitmap)) + \
1521 (sizeof(struct REDA_SequenceNumber)) + \
1522 4 + (4 * RTPS_BITMAP_INT_COUNT(bitCount_)) \
1534 #define RTPS_GAP_SET(gap_,length_,reader_,writer_,sn_start_,bitmap_) \
1536 RTI_UINT32 int_count; \
1537 RTPS_SubmsgHdr_set(&(gap_)->hdr,RTPS_GAP_KIND,0,length_); \
1538 (gap_)->reader = reader_; \
1539 (gap_)->writer = writer_; \
1540 (gap_)->sn_start = sn_start_; \
1541 (gap_)->bitmap._lead = (bitmap_)->_lead; \
1542 (gap_)->bitmap._bitCount = (bitmap_)->_bitCount; \
1543 for (int_count = 0; \
1544 int_count < RTPS_BITMAP_INT_COUNT((bitmap_)->_bitCount); ++int_count) \
1546 (gap_)->bitmap._32bits[int_count] = (bitmap_)->_32bits[int_count]; \
1552 struct RTPS_HEARTBEAT
1555 struct RTPS_SubmsgHdr hdr;
1558 RTPS_Entity_T reader;
1561 RTPS_Entity_T writer;
1564 struct REDA_SequenceNumber sn_first;
1567 struct REDA_SequenceNumber sn_last;
1583 #define RTPS_HB_SET(hb_,flags_,reader_,writer_,sn_first_,sn_last_,count_) \
1585 RTPS_SubmsgHdr_set(&(hb_)->hdr,RTPS_HEARTBEAT_KIND,flags_,RTPS_HB_SIZE());\
1586 (hb_)->reader = (reader_);\
1587 (hb_)->writer = (writer_);\
1588 (hb_)->sn_first = (sn_first_);\
1589 (hb_)->sn_last = (sn_last_);\
1590 (hb_)->count = (count_);\
1594 #define RTPS_HBFLAGS_F 0x02
1597 #define RTPS_HBFLAGS_L 0x04
1600 #define RTPS_HB_SIZE() (sizeof(struct RTPS_HEARTBEAT))
1604 struct RTPS_INFO_DST
1607 struct RTPS_SubmsgHdr hdr;
1610 RTPS_GuidPrefix_T guid_prefix;
1614 #define RTPS_INFO_DST_SIZE() (sizeof(struct RTPS_INFO_DST))
1621 #define RTPS_INFO_DST_SET(info_,dst_) \
1623 RTPS_SubmsgHdr_set(&(info_)->hdr,RTPS_INFO_DST_KIND,0,RTPS_INFO_DST_SIZE());\
1624 (info_)->guid_prefix = *(dst_);\
1632 struct RTPS_SubmsgHdr hdr;
1635 struct RTPS_Time timestamp;
1639 #define RTPS_INFO_TSFLAGS_I (0x2)
1642 #define RTPS_INFO_TS_SIZE(i_) \
1643 ((i_) ? sizeof(struct RTPS_SubmsgHdr) : sizeof(struct RTPS_INFO_TS))
1653 #define RTPS_INFO_TS_SET(info_ts_,flags_,sec_,frac_) \
1655 RTPS_SubmsgHdr_set(&(info_ts_)->hdr,RTPS_INFO_TS_KIND,flags_,\
1656 RTPS_INFO_TS_SIZE(flags_));\
1657 if (!((flags_) & RTPS_INFO_TSFLAGS_I))\
1659 (info_ts_)->timestamp.seconds = sec_;\
1660 (info_ts_)->timestamp.fractions = frac_;\
1673 struct RTPS_SubmsgHdr submsg;
1676 struct RTPS_Header header;
1679 struct RTPS_DATA data;
1682 struct RTPS_GAP gap;
1685 struct RTPS_HEARTBEAT hb;
1688 struct RTPS_ACKNACK acknack;
1691 struct RTPS_INFO_TS info_ts;
1694 struct RTPS_INFO_DST info_dst;
1702 RTPS_INTERFACEMODE_UNDEFINED,
1705 RTPS_INTERFACEMODE_WRITER,
1708 RTPS_INTERFACEMODE_READER,
1711 RTPS_INTERFACEMODE_EXTERNAL_RECEIVER
1712 } RTPS_InterfaceMode_t;
1715 struct RTPS_InterfaceProperty
1718 struct NETIO_InterfaceProperty _parent;
1721 RTPS_InterfaceMode_t mode;
1724 struct NETIO_Address intf_address;
1727 RTI_INT32 max_peer_count;
1730 RTI_SIZE_T max_transport_count;
1733 RTI_SIZE_T max_message_buffer_count;
1750 RTI_SIZE_T samples_per_hb;
1753 RTI_UINT32 max_window_size;
1764 RTI_INT32 max_hb_retries;
1767 RTI_INT32 max_samples;
1771 #define RTPS_RETRIES_UNLIMITED (-1)
1774 #define RTPS_RECEIVE_WINDOW_MAX_SIZE (256)
1777 #define RTPS_InterfaceProperty_INITIALIZER \
1779 NETIO_InterfaceProperty_INITIALIZER,\
1780 RTPS_INTERFACEMODE_UNDEFINED,\
1781 NETIO_Address_INITIALIZER, \
1790 RTPS_RETRIES_UNLIMITED, \
1795 struct RTPS_RouteProperty
1798 struct NETIORouteProperty _parent;
1806 struct REDA_SequenceNumber first_sn;
1811 struct REDA_SequenceNumber last_sn;
1816 struct REDA_SequenceNumber last_acked_sn;
1820 #define RTPSRouteProperty_INITIALIZER \
1822 NETIORouteProperty_INITIALIZER, \
1824 REDA_SEQUENCE_NUMBER_ZERO,\
1825 REDA_SEQUENCE_NUMBER_ZERO, \
1826 REDA_SEQUENCE_NUMBER_ZERO \
1832 MUST_CHECK_RETURN RTPSDllExport
struct RT_ComponentFactoryI*
1833 RTPS_InterfaceFactory_get_interface(
void);
1836 #define RTPS_MAX_DESTINATION_PER_PEER (4)
1842 #include "rtps/rtps_rtps_impl.h"