Skip to content

Commit 72cdce5

Browse files
Update Security and services
1 parent 23457bc commit 72cdce5

File tree

8 files changed

+67
-67
lines changed

8 files changed

+67
-67
lines changed

examples/connext_secure/cds/c++11/CDS_publisher.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void run_publisher_application(
4848
!application::shutdown_requested && samples_written < sample_count;
4949
samples_written++) {
5050
// Modify the data to be written here
51-
data.value(static_cast<int32_t>(samples_written));
51+
data.value = static_cast<int32_t>(samples_written);
5252
std::cout << "Writing CDS, count " << samples_written << std::endl;
5353

5454
writer.write(data);

examples/connext_secure/certificate_revocation_list/c++11/Crl_publisher.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void run_publisher_application(
4848
!application::shutdown_requested && samples_written < sample_count;
4949
samples_written++) {
5050
// Modify the data to be written here
51-
data.value(static_cast<int32_t>(samples_written));
51+
data.value = static_cast<int32_t>(samples_written);
5252
std::cout << "Writing Crl, count " << samples_written << std::endl;
5353

5454
writer.write(data);

examples/connext_secure/lightweight/c++11/Lws_publisher.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,24 @@ void run_publisher_application(
4545
dds::pub::DataWriter<Shape> writer2(publisher, topic2);
4646

4747
Shape data1, data2;
48-
data1.color("BLUE");
49-
data2.color("RED");
48+
data1.color = "BLUE";
49+
data2.color = "RED";
5050
// Main loop, write data
5151
for (unsigned int samples_written = 0;
5252
!application::shutdown_requested && samples_written < sample_count;
5353
samples_written++) {
5454
// Modify the data to be written here
55-
data1.x(static_cast<int32_t>(samples_written));
56-
data1.y(static_cast<int32_t>(samples_written));
57-
data1.shapesize(static_cast<int32_t>(samples_written));
55+
data1.x = static_cast<int32_t>(samples_written);
56+
data1.y = static_cast<int32_t>(samples_written);
57+
data1.shapesize = static_cast<int32_t>(samples_written);
5858
std::cout << "Writing BLUE Shape, count " << samples_written
5959
<< std::endl;
6060

6161
writer1.write(data1);
6262

63-
data2.x(static_cast<int32_t>(samples_written));
64-
data2.y(static_cast<int32_t>(samples_written));
65-
data2.shapesize(static_cast<int32_t>(samples_written));
63+
data2.x = static_cast<int32_t>(samples_written);
64+
data2.y = static_cast<int32_t>(samples_written);
65+
data2.shapesize = static_cast<int32_t>(samples_written);
6666
std::cout << "Writing RED Shape, count " << samples_written
6767
<< std::endl;
6868

examples/connext_secure/whitelist/c++11/Whitelist_publisher.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void run_publisher_application(
5050
!application::shutdown_requested && samples_written < sample_count;
5151
samples_written++) {
5252
// Modify the data to be written here
53-
data.value(static_cast<int32_t>(samples_written));
53+
data.value = static_cast<int32_t>(samples_written);
5454
std::cout << "Writing Whitelist, count " << samples_written
5555
<< std::endl;
5656

examples/persistence_service/persistent_storage/c++11/hello_world_publisher.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void publisher_main(
5050
hello_world sample;
5151
for (int count = 0; count < sample_count || sample_count == 0; count++) {
5252
std::cout << "Writing hello_world, count " << count << std::endl;
53-
sample.data(initial_value++);
53+
sample.data = initial_value++;
5454
writer.write(sample);
5555

5656
std::this_thread::sleep_for(std::chrono::seconds(1));

examples/recording_service/pluggable_storage/c++11/HelloMsg_publisher.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ void publisher_main(int domain_id, int sample_count)
3636
// Modify the data to be written here
3737
std::stringstream string_builder;
3838
string_builder << std::string("Sample string ") << count << std::endl;
39-
sample.id(count);
40-
sample.msg(string_builder.str());
39+
sample.id = count;
40+
sample.msg = string_builder.str();
4141

4242

4343
std::cout << "Writing HelloMsg, count " << count << std::endl;

examples/routing_service/monitoring/c++11/RoutingServiceMonitoring_subscriber.cxx

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -69,46 +69,46 @@ int processPeriodicData(
6969
for (const auto &sample : samples) {
7070
if (sample.info().valid()) {
7171
count++;
72-
switch (sample.data().value()._d()) {
72+
switch (sample.data().value._d()) {
7373
case (RTI::Service::Monitoring::ResourceKind::
7474
ROUTING_DOMAIN_ROUTE): {
7575
auto config = getConfig(
7676
configReader,
7777
sample.info().instance_handle());
7878
std::cout << "Periodic data:\n\tDomain Route: ";
79-
if (config.value()
79+
if (config.value
8080
.routing_domain_route()
81-
.connections()
81+
.connections
8282
.value()
8383
.size()
8484
> 0) {
8585
std::cout << " { ";
8686
for (const auto &connection :
87-
config.value()
87+
config.value
8888
.routing_domain_route()
89-
.connections()
89+
.connections
9090
.value()) {
91-
std::cout << connection.name() << ", ";
91+
std::cout << connection.name << ", ";
9292
}
9393
std::cout << " } " << std::endl;
9494
}
9595

9696
std::cout << "\n\t\t in samples/s (mean): "
9797
<< sample.data()
98-
.value()
98+
.value
9999
.routing_domain_route()
100-
.in_samples_per_sec()
100+
.in_samples_per_sec
101101
.value()
102-
.publication_period_metrics()
103-
.mean()
102+
.publication_period_metrics
103+
.mean
104104
<< ", out samples/s (mean): "
105105
<< sample.data()
106-
.value()
106+
.value
107107
.routing_domain_route()
108-
.out_samples_per_sec()
108+
.out_samples_per_sec
109109
.value()
110-
.publication_period_metrics()
111-
.mean()
110+
.publication_period_metrics
111+
.mean
112112
<< std::endl;
113113
break;
114114
}
@@ -118,19 +118,19 @@ int processPeriodicData(
118118
configReader,
119119
sample.info().instance_handle());
120120
std::cout << "Periodic data:\n\t > Routing Service "
121-
<< config.value()
121+
<< config.value
122122
.routing_service()
123-
.application_name()
123+
.application_name
124124
<< "\n\t\t cpu usage (mean): "
125125
<< sample.data()
126-
.value()
126+
.value
127127
.routing_service()
128-
.process()
128+
.process
129129
.value()
130-
.cpu_usage_percentage()
130+
.cpu_usage_percentage
131131
.value()
132-
.publication_period_metrics()
133-
.mean()
132+
.publication_period_metrics
133+
.mean
134134
<< " %" << std::endl;
135135
break;
136136
}
@@ -171,31 +171,31 @@ int processEventData(
171171
for (const auto &sample : samples) {
172172
if (sample.info().valid()) {
173173
count++;
174-
switch (sample.data().value()._d()) {
174+
switch (sample.data().value._d()) {
175175
case (RTI::Service::Monitoring::ResourceKind::
176176
ROUTING_DOMAIN_ROUTE): {
177177
std::cout << "\t > The Domain Route status is "
178178
<< sample.data()
179-
.value()
179+
.value
180180
.routing_domain_route()
181-
.state()
181+
.state
182182
<< std::endl;
183183
if (sample.data()
184-
.value()
184+
.value
185185
.routing_domain_route()
186-
.connections()
186+
.connections
187187
.value()
188188
.size()
189189
> 0) {
190190
std::cout << "\t\t Connections available: { ";
191191
for (const auto &connection :
192192
sample.data()
193-
.value()
193+
.value
194194
.routing_domain_route()
195-
.connections()
195+
.connections
196196
.value()) {
197197
std::cout << " Participant name: "
198-
<< connection.name() << ", ";
198+
<< connection.name << ", ";
199199
}
200200
std::cout << " } " << std::endl;
201201
}
@@ -205,28 +205,28 @@ int processEventData(
205205
auto config = getConfig(
206206
configReader,
207207
sample.info().instance_handle());
208-
if (config.value()._d()
208+
if (config.value._d()
209209
== RTI::Service::Monitoring::ResourceKind::
210210
ROUTING_INPUT) {
211211
std::cout
212212
<< "\t > The Input "
213-
<< config.value().routing_input().resource_id()
213+
<< config.value.routing_input().resource_id
214214
<< std::endl;
215215
std::cout
216216
<< "\t\t status is "
217-
<< sample.data().value().routing_input().state()
217+
<< sample.data().value.routing_input().state
218218
<< std::endl;
219219
std::cout
220220
<< "\t\t Topic: "
221-
<< config.value().routing_input().stream_name()
221+
<< config.value.routing_input().stream_name
222222
<< ", Type: "
223-
<< config.value()
223+
<< config.value
224224
.routing_input()
225-
.registered_type_name()
225+
.registered_type_name
226226
<< ", Participant name: "
227-
<< config.value()
227+
<< config.value
228228
.routing_input()
229-
.connection_name()
229+
.connection_name
230230
<< std::endl;
231231
}
232232
break;
@@ -235,30 +235,30 @@ int processEventData(
235235
auto config = getConfig(
236236
configReader,
237237
sample.info().instance_handle());
238-
if (config.value()._d()
238+
if (config.value._d()
239239
== RTI::Service::Monitoring::ResourceKind::
240240
ROUTING_OUTPUT) {
241241
std::cout
242242
<< "\t > The Output "
243-
<< config.value().routing_output().resource_id()
243+
<< config.value.routing_output().resource_id
244244
<< std::endl;
245245
std::cout << "\t > status is "
246246
<< sample.data()
247-
.value()
247+
.value
248248
.routing_output()
249-
.state()
249+
.state
250250
<< std::endl;
251251
std::cout
252252
<< "\t\t Topic: "
253-
<< config.value().routing_output().stream_name()
253+
<< config.value.routing_output().stream_name
254254
<< ", Type: "
255-
<< config.value()
255+
<< config.value
256256
.routing_output()
257-
.registered_type_name()
257+
.registered_type_name
258258
<< ", Participant name: "
259-
<< config.value()
259+
<< config.value
260260
.routing_output()
261-
.connection_name()
261+
.connection_name
262262
<< std::endl;
263263
}
264264
break;

examples/routing_service/remote_admin/c++11/src/Requester.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ static void send(
3535
CommandRequest &request)
3636
{
3737
dds::topic::topic_type_support<EntityState>::to_cdr_buffer(
38-
reinterpret_cast<std::vector<char> &>(request.octet_body()),
38+
reinterpret_cast<std::vector<char> &>(request.octet_body),
3939
EntityState(EntityStateKind::DISABLED));
4040
/*
4141
* Send disable
4242
*/
4343
requester.send_request(request);
4444
CommandReply reply =
4545
requester.receive_replies(Duration(WAIT_TIMEOUT_SEC_MAX))[0];
46-
if (reply.retcode() == CommandReplyRetcode::OK_RETCODE) {
47-
std::cout << "Command returned: " << reply.string_body() << std::endl;
46+
if (reply.retcode == CommandReplyRetcode::OK_RETCODE) {
47+
std::cout << "Command returned: " << reply.string_body << std::endl;
4848
} else {
49-
std::cout << "Unsuccessful command returned value " << reply.retcode()
49+
std::cout << "Unsuccessful command returned value " << reply.retcode
5050
<< "." << std::endl;
5151
throw dds::core::Error("Error in replier");
5252
}
@@ -94,10 +94,10 @@ int main(int argc, char *argv[])
9494
* Setup command
9595
*/
9696
CommandRequest request;
97-
request.action(args_parser.command_kind());
98-
request.resource_identifier(args_parser.resource_identifier());
97+
request.action = args_parser.command_kind();
98+
request.resource_identifier = args_parser.resource_identifier();
9999
if (args_parser.body_str() != "") {
100-
request.string_body(args_parser.body_str());
100+
request.string_body = args_parser.body_str();
101101
}
102102
send(requester, request);
103103

0 commit comments

Comments
 (0)