Skip to content

Commit 9e1fdbc

Browse files
authored
Merge pull request omg-dds#68 from ornulfs-kda/master
Fixed InterCOM DDS build
2 parents 8cc2e5c + 5784c59 commit 9e1fdbc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

srcCxx/shape_configurator_intercom_dds.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
#define STRING_ASSIGN(a, b) a = b
1010
#define STRING_FREE static_cast<void>
1111

12+
#define DDS_UInt8Seq_get_length(s) (s)->size()
13+
#define DDS_UInt8Seq_ensure_length(s,l,x) (s)->resize(l)
14+
#define DDS_UInt8Seq_get_reference(s,l) &( (*s)[l] )
15+
1216
inline const char *get_qos_policy_name(DDS::QosPolicyId_t policy_id) {
1317
switch (policy_id) {
1418
case DDS::USERDATA_QOS_POLICY_ID:

srcCxx/shape_main.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ class ShapeApplication {
12591259
logger.log_message(" HistoryDepth = " + std::to_string(dw_qos.history FIELD_ACCESSOR.depth), Verbosity::DEBUG);
12601260
}
12611261

1262-
#if defined(RTI_CONNEXT_DDS) || defined(OPENDDS) || defined(TWINOAKS_COREDX)
1262+
#if defined(RTI_CONNEXT_DDS) || defined(OPENDDS) || defined(TWINOAKS_COREDX) || defined(INTERCOM_DDS)
12631263
if (options->lifespan_us > 0) {
12641264
dw_qos.lifespan FIELD_ACCESSOR.duration.SECONDS_FIELD_NAME = options->lifespan_us / 1000000;
12651265
dw_qos.lifespan FIELD_ACCESSOR.duration.nanosec = (options->lifespan_us % 1000000) * 1000;
@@ -1287,11 +1287,11 @@ class ShapeApplication {
12871287
? "ASYNCHRONOUS_PUBLISH_MODE_QOS" : "SYNCHRONOUS_PUBLISH_MODE_QOS"), Verbosity::DEBUG);
12881288
#endif
12891289

1290-
#if defined(RTI_CONNEXT_DDS) || defined(OPENDDS) || defined(TWINOAKS_COREDX)
1290+
#if defined(RTI_CONNEXT_DDS) || defined(OPENDDS) || defined(TWINOAKS_COREDX) || defined(INTERCOM_DDS)
12911291
if (options->unregister) {
12921292
#if defined(RTI_CONNEXT_DDS) || defined(TWINOAKS_COREDX)
12931293
dw_qos.writer_data_lifecycle.autodispose_unregistered_instances = DDS_BOOLEAN_FALSE;
1294-
#elif defined(OPENDDS)
1294+
#elif defined(OPENDDS) || defined(INTERCOM_DDS)
12951295
dw_qos.writer_data_lifecycle.autodispose_unregistered_instances = false;
12961296
#endif
12971297
}
@@ -1669,7 +1669,11 @@ class ShapeApplication {
16691669
}
16701670

16711671
if (retval == RETCODE_OK) {
1672+
#if defined(INTERCOM_DDS)
1673+
auto n_samples = samples.size();
1674+
#else
16721675
auto n_samples = samples.length();
1676+
#endif
16731677
logger.log_message("Read " + std::to_string(n_samples)
16741678
+ " sample(s), printing them...", Verbosity::DEBUG);
16751679
for (decltype(n_samples) n_sample = 0; n_sample < n_samples; n_sample++) {
@@ -1800,7 +1804,7 @@ class ShapeApplication {
18001804
xvel = ((random() % 5) + 1) * ((random()%2)?-1:1);
18011805
yvel = ((random() % 5) + 1) * ((random()%2)?-1:1);
18021806

1803-
#if defined(RTI_CONNEXT_DDS) || defined(TWINOAKS_COREDX)
1807+
#if defined(RTI_CONNEXT_DDS) || defined(TWINOAKS_COREDX) || defined(INTERCOM_DDS)
18041808
if (options->additional_payload_size > 0) {
18051809
int size = options->additional_payload_size;
18061810
DDS_UInt8Seq_ensure_length(&shape.additional_payload_size FIELD_ACCESSOR, size, size);

0 commit comments

Comments
 (0)