Skip to content

Commit 8ea07b2

Browse files
committed
Fixing debugging messages
1 parent d7ec022 commit 8ea07b2

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

srcCxx/shape_main.cxx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,9 @@ class ShapeOptions {
905905
"\n TimeBasedFilterInterval = " + std::to_string(timebasedfilter_interval_us / 1000) + "ms" +
906906
"\n DeadlineInterval = " + std::to_string(deadline_interval_us / 1000) + "ms" +
907907
"\n Shapesize = " + std::to_string(shapesize) +
908-
"\n Reading method = " + (use_read ? "read_next_instance" : "take_next_instance") +
908+
"\n Reading method = " + (use_read
909+
? (take_read_next_instance ? "read_next_instance" : "read")
910+
: (take_read_next_instance ? "take_next_instance" : "take")) +
909911
"\n Write period = " + std::to_string(write_period_us / 1000) + "ms" +
910912
"\n Read period = " + std::to_string(read_period_us / 1000) + "ms" +
911913
"\n Lifespan = " + std::to_string(lifespan_us / 1000) + "ms" +
@@ -1166,7 +1168,7 @@ class ShapeApplication {
11661168
logger.log_message("Topics created:", Verbosity::DEBUG);
11671169
for (unsigned int i = 0; i < options->num_topics; ++i) {
11681170
if (logger.verbosity() == Verbosity::DEBUG) {
1169-
printf(" topic[%d]=%p\n",i,(void*)topics[i]);
1171+
printf(" topic(%d)=%p\n",i,(void*)topics[i]);
11701172
}
11711173
}
11721174

@@ -1330,9 +1332,9 @@ class ShapeApplication {
13301332
dw_qos.deadline FIELD_ACCESSOR.period.SECONDS_FIELD_NAME = options->deadline_interval_us / 1000000;
13311333
dw_qos.deadline FIELD_ACCESSOR.period.nanosec = (options->deadline_interval_us % 1000000) * 1000;
13321334
}
1333-
logger.log_message(" DeadlinePeriod = " + std::to_string(dw_qos.deadline FIELD_ACCESSOR.period.SECONDS_FIELD_NAME) + "secs",
1335+
logger.log_message(" DeadlinePeriod = " + std::to_string(dw_qos.deadline FIELD_ACCESSOR.period.SECONDS_FIELD_NAME) + " secs",
13341336
Verbosity::DEBUG);
1335-
logger.log_message(" " + std::to_string(dw_qos.deadline FIELD_ACCESSOR.period.nanosec) + "nanosecs",
1337+
logger.log_message(" " + std::to_string(dw_qos.deadline FIELD_ACCESSOR.period.nanosec) + " nanosecs",
13361338
Verbosity::DEBUG);
13371339

13381340
// options->history_depth < 0 means leave default value
@@ -1405,7 +1407,7 @@ class ShapeApplication {
14051407
logger.log_message("DataWriters created:", Verbosity::DEBUG);
14061408
for (unsigned int i = 0; i < options->num_topics; ++i) {
14071409
if (logger.verbosity() == Verbosity::DEBUG) {
1408-
printf(" dws[%d]=%p\n",i,(void*)dws[i]);
1410+
printf(" dws(%d)=%p\n",i,(void*)dws[i]);
14091411
}
14101412
}
14111413

@@ -1664,7 +1666,7 @@ class ShapeApplication {
16641666
logger.log_message("DataReaders created:", Verbosity::DEBUG);
16651667
for (unsigned int i = 0; i < options->num_topics; ++i) {
16661668
if (logger.verbosity() == Verbosity::DEBUG) {
1667-
printf(" drs[%d]=%p\n",i,(void*)drs[i]);
1669+
printf(" drs(%d)=%p\n",i,(void*)drs[i]);
16681670
}
16691671
}
16701672

@@ -1732,17 +1734,17 @@ class ShapeApplication {
17321734
DataSeq samples;
17331735
#endif
17341736

1737+
#if defined(RTI_CONNEXT_DDS) || defined(TWINOAKS_COREDX) || defined(INTERCOM_DDS)
17351738
if (options->coherent_set_enabled) {
17361739
printf("Reading coherent sets, iteration %d\n",n);
17371740
}
17381741
if (options->ordered_access_enabled) {
17391742
printf("Reading with ordered access, iteration %d\n",n);
17401743
}
17411744
if (options->coherent_set_enabled || options->ordered_access_enabled) {
1742-
#if !defined(RTI_CONNEXT_MICRO)
17431745
sub->begin_access();
1744-
#endif
17451746
}
1747+
#endif
17461748
for (unsigned int i = 0; i < options->num_topics; ++i) {
17471749
previous_handles[i] = HANDLE_NIL;
17481750
do {
@@ -1836,8 +1838,7 @@ class ShapeApplication {
18361838
#if defined(EPROSIMA_FAST_DDS)
18371839
instance_handle_color[sample_info->instance_handle] = sample->color FIELD_ACCESSOR STRING_IN;
18381840
#elif defined(RTI_CONNEXT_MICRO)
1839-
instance_handle_color[sample_info->instance_handle] =
1840-
std::string(sample->color FIELD_ACCESSOR STRING_IN);
1841+
instance_handle_color[sample_info->instance_handle] = std::string(sample->color);
18411842
#endif
18421843
} else {
18431844
ShapeType shape_key;
@@ -1873,11 +1874,11 @@ class ShapeApplication {
18731874
} while (retval == RETCODE_OK);
18741875
}
18751876

1877+
#if defined(RTI_CONNEXT_DDS) || defined(TWINOAKS_COREDX) || defined(INTERCOM_DDS)
18761878
if (options->coherent_set_enabled || options->ordered_access_enabled) {
1877-
#if !defined(RTI_CONNEXT_MICRO)
18781879
sub->end_access();
1879-
#endif
18801880
}
1881+
#endif
18811882

18821883
// increasing number of iterations
18831884
n++;

0 commit comments

Comments
 (0)