@@ -1519,27 +1519,32 @@ class ShapeApplication {
15191519#if defined(EPROSIMA_FAST_DDS)
15201520 logger.log_message (" DataRepresentation = " + QosUtils::to_string (dr_qos.representation ().m_value [0 ]), Verbosity::DEBUG);
15211521#else
1522- logger.log_message (" DataRepresentation = " + QosUtils::to_string (dr_qos.representation FIELD_ACCESSOR.value [0 ]), Verbosity::DEBUG);
1522+ logger.log_message (" DataRepresentation = " + QosUtils::to_string (dr_qos.representation FIELD_ACCESSOR.value [0 ]), Verbosity::DEBUG);
15231523#endif
15241524 if ( options->ownership_strength != -1 ) {
15251525 dr_qos.ownership FIELD_ACCESSOR.kind = EXCLUSIVE_OWNERSHIP_QOS;
15261526 }
15271527 logger.log_message (" Ownership = " + QosUtils::to_string (dr_qos.ownership FIELD_ACCESSOR.kind ), Verbosity::DEBUG);
1528+
1529+
15281530 if ( options->timebasedfilter_interval_us > 0 ) {
15291531#if defined(EPROSIMA_FAST_DDS) || defined(RTI_CONNEXT_MICRO)
15301532 logger.log_message (" TimeBasedFilter = not supported" , Verbosity::ERROR);
15311533#else
15321534 dr_qos.time_based_filter FIELD_ACCESSOR.minimum_separation .SECONDS_FIELD_NAME = options->timebasedfilter_interval_us / 1000000 ;
15331535 dr_qos.time_based_filter FIELD_ACCESSOR.minimum_separation .nanosec = (options->timebasedfilter_interval_us % 1000000 ) * 1000 ;
1534-
1535- logger.log_message (" TimeBasedFilter = " +
1536- std::to_string (dr_qos.time_based_filter FIELD_ACCESSOR.minimum_separation .SECONDS_FIELD_NAME ) + " secs" ,
1537- Verbosity::DEBUG);
1538- logger.log_message (" " +
1539- std::to_string (dr_qos.time_based_filter FIELD_ACCESSOR.minimum_separation .nanosec ) + " nanosecs" ,
1540- Verbosity::DEBUG);
15411536#endif
15421537 }
1538+
1539+ #if !defined(EPROSIMA_FAST_DDS) && !defined(RTI_CONNEXT_MICRO)
1540+ logger.log_message (" TimeBasedFilter = " +
1541+ std::to_string (dr_qos.time_based_filter FIELD_ACCESSOR.minimum_separation .SECONDS_FIELD_NAME ) + " secs" ,
1542+ Verbosity::DEBUG);
1543+ logger.log_message (" " +
1544+ std::to_string (dr_qos.time_based_filter FIELD_ACCESSOR.minimum_separation .nanosec ) + " nanosecs" ,
1545+ Verbosity::DEBUG);
1546+ #endif
1547+
15431548 if ( options->deadline_interval_us > 0 ) {
15441549 dr_qos.deadline FIELD_ACCESSOR.period .SECONDS_FIELD_NAME = options->deadline_interval_us / 1000000 ;
15451550 dr_qos.deadline FIELD_ACCESSOR.period .nanosec = (options->deadline_interval_us % 1000000 ) * 1000 ;;
@@ -1730,10 +1735,10 @@ class ShapeApplication {
17301735 logger.log_message (" Calling take() function" , Verbosity::DEBUG);
17311736 retval = drs[i]->take ( samples,
17321737 sample_infos,
1733- DDS_LENGTH_UNLIMITED ,
1734- DDS_ANY_SAMPLE_STATE ,
1735- DDS_ANY_VIEW_STATE ,
1736- DDS_ANY_INSTANCE_STATE );
1738+ LENGTH_UNLIMITED ,
1739+ ANY_SAMPLE_STATE ,
1740+ ANY_VIEW_STATE ,
1741+ ANY_INSTANCE_STATE );
17371742 if (retval == DDS_RETCODE_OK) {
17381743 logger.log_message (" Taken " + std::to_string (samples.length ())
17391744 + " sample(s)" , Verbosity::DEBUG);
@@ -1813,7 +1818,8 @@ class ShapeApplication {
18131818#if defined(EPROSIMA_FAST_DDS)
18141819 shape_key.color FIELD_ACCESSOR = instance_handle_color[sample_info->instance_handle ] NAME_ACCESSOR;
18151820#elif defined(RTI_CONNEXT_MICRO)
1816- strncpy (shape_key.color , instance_handle_color[sample_info->instance_handle ].c_str (), sizeof (shape_key.color ));
1821+ // 128 is the max length of the color string
1822+ strncpy (shape_key.color , instance_handle_color[sample_info->instance_handle ].c_str (), 128 );
18171823#else
18181824 drs[i]->get_key_value (shape_key, sample_info->instance_handle );
18191825#endif
0 commit comments