Skip to content

Commit

Permalink
Refs #20352: Update ChainingTransport API
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed May 13, 2024
1 parent 827bc03 commit 1cdab80
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <fastdds/rtps/transport/TCPv6TransportDescriptor.h>
#include <fastdds/rtps/transport/UDPv4TransportDescriptor.h>
#include <fastdds/rtps/transport/UDPv6TransportDescriptor.h>
#include <fastdds/rtps/network/NetworkBuffer.hpp>
#include <fastdds/statistics/dds/domain/DomainParticipant.hpp>
#include <fastdds/statistics/dds/publisher/qos/DataWriterQos.hpp>
#include <fastdds/statistics/topic_names.hpp>
Expand Down Expand Up @@ -105,8 +106,8 @@ class CustomChainingTransport : public eprosima::fastdds::rtps::ChainingTranspor

bool send(
eprosima::fastrtps::rtps::SenderResource* low_sender_resource,
const eprosima::fastrtps::rtps::octet* send_buffer,
uint32_t send_buffer_size,
const std::list<eprosima::fastdds::rtps::NetworkBuffer>& buffers,
uint32_t total_bytes,
eprosima::fastrtps::rtps::LocatorsIterator* destination_locators_begin,
eprosima::fastrtps::rtps::LocatorsIterator* destination_locators_end,
const std::chrono::steady_clock::time_point& timeout) override
Expand All @@ -116,7 +117,7 @@ class CustomChainingTransport : public eprosima::fastdds::rtps::ChainingTranspor
//

// Call low level transport
return low_sender_resource->send(send_buffer, send_buffer_size, destination_locators_begin,
return low_sender_resource->send(buffers, total_bytes, destination_locators_begin,
destination_locators_end, timeout);
}

Expand Down Expand Up @@ -4986,10 +4987,10 @@ void dynamictypes_examples()
sequence_member_descriptor->type(DynamicTypeBuilderFactory::get_instance()->create_type(
type_descriptor)->build());
*/

// Add the sequence member to the struct
struct_builder->add_member(sequence_member_descriptor);

sequence_member_descriptor = traits<MemberDescriptor>::make_shared();
sequence_member_descriptor->name("short_sequence");
sequence_member_descriptor->type(DynamicTypeBuilderFactory::get_instance()->create_sequence_type(
Expand Down Expand Up @@ -5027,7 +5028,7 @@ void dynamictypes_examples()
int16_t out_simple_value;
sequence_data->set_int16_value(2, in_simple_value);
sequence_data->get_int16_value(out_simple_value, 2);

data->return_loaned_value(sequence_data);
//!--
}
Expand Down Expand Up @@ -5080,7 +5081,7 @@ void dynamictypes_examples()
int32_t out_simple_value;
array_data->set_int32_value(2, in_simple_value);
array_data->get_int32_value(out_simple_value, 2);

data->return_loaned_value(array_data);
//!--
}
Expand Down Expand Up @@ -5351,7 +5352,7 @@ void dynamictypes_examples()
// Get the loan for the bitset member
DynamicData::_ref_type bitset_data = data->loan_value(data->get_member_id_by_name("my_bitset"));

// Set and retrieve bitfield values
// Set and retrieve bitfield values
int16_t in_value {2};
int16_t out_value;
bitset_data->set_int16_value(bitset_data->get_member_id_by_name("d"), in_value);
Expand Down

0 comments on commit 1cdab80

Please sign in to comment.