Skip to content

Commit a1e47f0

Browse files
committed
Review changes. Minor changes applied
1 parent 68d3436 commit a1e47f0

29 files changed

+49
-51
lines changed

examples/routing_service/udp_socket_adapter_dynamic/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
# (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
#
44
# RTI grants Licensee a license to use, modify, compile, and create derivative
55
# works of the Software. Licensee has the right to distribute object form

examples/routing_service/udp_socket_adapter_dynamic/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ information beforehand.
1111
The code in this directory provides the following components:
1212

1313
- `src/SocketAdapter` implements the plugin that is loaded by *RTI Routing
14-
Service*. It is responsible to create and delete connections.
14+
Service*. It responsible for creating and deleting connections.
1515
- `src/SocketConnection` implements a connection. This component is
16-
responsible of the creation and deletion of `StreamReaders`.
16+
responsible for the creation and deletion of `StreamReaders`.
1717
- `src/SocketInputDiscoveryStreamReader` implements the logic necessary to
1818
propagate information about the discovered input streams (in this case
1919
sockets) to the Routing Service.
20-
- `src/SocketStreamReader` implements an `StreamReader` that reads sample
20+
- `src/SocketStreamReader` implements a `StreamReader` that reads sample
2121
information from a UDP socket.
22-
- `src/SocketStreamWriter` implements an `StreamWriter` that sends sample
22+
- `src/SocketStreamWriter` implements a `StreamWriter` that sends sample
2323
information to a UDP socket.
2424

2525

2626
For more details, please refer to the *RTI Routing Service SDK* documentation.
2727

28-
## Building C++ example
28+
## Building the C++ example
2929

3030
In order to build this example, you need to define the variables
3131
`CONNEXTDDS_DIR` and `CONNEXTDDS_ARCH`. You can do so by exporting them
@@ -97,7 +97,7 @@ cmake -DCONNEXTDDS_DIR=<connext dir> -DCMAKE_TOOLCHAIN_FILE=<toolchain file crea
9797
-DCONNEXTDDS_ARCH=<connext architecture> ..
9898
```
9999

100-
## Running C++ example
100+
## Running the C++ example
101101

102102
To run the example, you just need to run the following commands from the top
103103
level folder. This example has been written to allow easy experimentation with

examples/routing_service/udp_socket_adapter_dynamic/RsSocketAdapter.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<routing_service name="SocketAdapterToDDS">
1515
<domain_route name="SocketBridge">
1616
<connection name="SocketConnection" plugin_name="AdapterLib::SocketAdapter">
17-
<registered_type name="PingType" type_name="PingType" />
17+
<register_typename="PingType" type_name="PingType" />
1818
</connection>
1919
<participant name="DDSConnection">
2020
<domain_id>1</domain_id>
2121
<domain_participant_qos base_name="BuiltinQosLib::Generic.Common" />
22-
<registered_type name="PingType" type_name="PingType" />
22+
<register_typename="PingType" type_name="PingType" />
2323
</participant>
2424
<session name="session">
2525
<route>
@@ -57,12 +57,12 @@
5757
<routing_service name="DDSToSocketAdapter">
5858
<domain_route name="SocketBridge">
5959
<connection name="SocketConnection" plugin_name="AdapterLib::SocketAdapter">
60-
<registered_type name="PingType" type_name="PingType" />
60+
<register_typename="PingType" type_name="PingType" />
6161
</connection>
6262
<participant name="DDSConnection">
6363
<domain_id>0</domain_id>
6464
<domain_participant_qos base_name="BuiltinQosLib::Generic.Common" />
65-
<registered_type name="PingType" type_name="PingType" />
65+
<register_typename="PingType" type_name="PingType" />
6666
</participant>
6767
<session>
6868
<route>

examples/routing_service/udp_socket_adapter_dynamic/src/SocketAdapter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
* (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
*
44
* RTI grants Licensee a license to use, modify, compile, and create derivative
55
* works of the Software. Licensee has the right to distribute object form

examples/routing_service/udp_socket_adapter_dynamic/src/SocketAdapter.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
* (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
*
44
* RTI grants Licensee a license to use, modify, compile, and create derivative
55
* works of the Software. Licensee has the right to distribute object form

examples/routing_service/udp_socket_adapter_dynamic/src/SocketConnection.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
* (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
*
44
* RTI grants Licensee a license to use, modify, compile, and create derivative
55
* works of the Software. Licensee has the right to distribute object form
@@ -50,9 +50,11 @@ void SocketConnection::delete_stream_reader(StreamReader *reader)
5050
socket_reader->shutdown_socket_reader_thread();
5151
delete reader;
5252
}
53+
5354
void SocketConnection::delete_stream_writer(StreamWriter *writer)
5455
{
55-
SocketStreamWriter *socket_writer = dynamic_cast<SocketStreamWriter *>(writer);
56+
SocketStreamWriter *socket_writer =
57+
dynamic_cast<SocketStreamWriter *>(writer);
5658
delete writer;
5759
}
5860

examples/routing_service/udp_socket_adapter_dynamic/src/SocketConnection.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
* (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
*
44
* RTI grants Licensee a license to use, modify, compile, and create derivative
55
* works of the Software. Licensee has the right to distribute object form

examples/routing_service/udp_socket_adapter_dynamic/src/SocketInputDiscoveryStreamReader.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2019 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
* (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
*
44
* RTI grants Licensee a license to use, modify, compile, and create derivative
55
* works of the Software. Licensee has the right to distribute object form

examples/routing_service/udp_socket_adapter_dynamic/src/SocketInputDiscoveryStreamReader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2019 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
* (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
*
44
* RTI grants Licensee a license to use, modify, compile, and create derivative
55
* works of the Software. Licensee has the right to distribute object form

examples/routing_service/udp_socket_adapter_dynamic/src/SocketStreamReader.cxx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2019 Copyright, Real-Time Innovations, Inc. All rights reserved.
2+
* (c) 2025 Copyright, Real-Time Innovations, Inc. All rights reserved.
33
*
44
* RTI grants Licensee a license to use, modify, compile, and create derivative
55
* works of the Software. Licensee has the right to distribute object form
@@ -54,12 +54,8 @@ void SocketStreamReader::socket_reading_thread()
5454
std::this_thread::sleep_for(std::chrono::milliseconds(10));
5555
continue;
5656
}
57-
/**
58-
* Here we notify Routing Service, that there is data available
59-
* on the StreamReader, triggering a call to take().
60-
*/
6157

62-
received_bytes_ = received_bytes;
58+
received_bytes_ = received_bytes;
6359

6460
reader_listener_->on_data_available(this);
6561
}
@@ -100,7 +96,8 @@ void SocketStreamReader::take(
10096
std::vector<dds::sub::SampleInfo *> &infos)
10197
{
10298
dds::core::xtypes::DynamicData deserialized_sample(*adapter_type_);
103-
std::vector<char> received_buffer = std::vector<char>(received_buffer_, received_buffer_ + received_bytes_);
99+
std::vector<char> received_buffer = std::vector<char>(
100+
received_buffer_, received_buffer_ + received_bytes_);
104101
rti::core::xtypes::from_cdr_buffer(deserialized_sample, received_buffer);
105102

106103
samples.resize(1);

0 commit comments

Comments
 (0)