Skip to content

Commit 2d16fdf

Browse files
committed
Update to use distributed condition
1 parent d64d0ba commit 2d16fdf

File tree

6 files changed

+424
-472
lines changed

6 files changed

+424
-472
lines changed

dds/DCPS/Recorder.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,30 +72,30 @@ class OpenDDS_Dcps_Export Recorder
7272
/**
7373
* Find the bit key for a given repo id.
7474
*/
75-
virtual DDS::ReturnCode_t repoid_to_bit_key(const DCPS::GUID_t& id,
75+
virtual DDS::ReturnCode_t repoid_to_bit_key(const DCPS::GUID_t& id,
7676
DDS::BuiltinTopicKey_t& key) = 0;
7777
#endif
7878

7979
/**
8080
* Set the Quality of Service settings for the Recorder.
8181
*
8282
*/
83-
virtual DDS::ReturnCode_t set_qos (const DDS::SubscriberQos & subscriber_qos,
84-
const DDS::DataReaderQos & datareader_qos)=0;
83+
virtual DDS::ReturnCode_t set_qos(const DDS::SubscriberQos& subscriber_qos,
84+
const DDS::DataReaderQos& datareader_qos) = 0;
8585

8686
/**
8787
* Get the Quality of Service settings for the Recorder.
8888
*
8989
*/
90-
virtual DDS::ReturnCode_t get_qos (DDS::SubscriberQos & subscriber_qos,
91-
DDS::DataReaderQos & datareader_qos)=0;
90+
virtual DDS::ReturnCode_t get_qos(DDS::SubscriberQos& subscriber_qos,
91+
DDS::DataReaderQos& datareader_qos) = 0;
9292

9393
/**
9494
* Change the listener for this Recorder.
9595
*
9696
*/
97-
virtual DDS::ReturnCode_t set_listener (const RecorderListener_rch & a_listener,
98-
DDS::StatusMask mask = DEFAULT_STATUS_MASK )=0;
97+
virtual DDS::ReturnCode_t set_listener(const RecorderListener_rch& a_listener,
98+
DDS::StatusMask mask = DEFAULT_STATUS_MASK) = 0;
9999

100100
/**
101101
* Get the listener for this Recorder.

tests/DCPS/RecorderReplayer/Args.h

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
*
3-
*
42
* Distributed under the OpenDDS License.
53
* See: http://www.opendds.org/license.html
64
*/
@@ -9,7 +7,6 @@
97
#define MESSENGER_TEST_ARGS_H
108

119
#include <dds/DCPS/transport/framework/TransportRegistry.h>
12-
1310
#include <dds/DCPS/transport/framework/TransportConfig.h>
1411
#include <dds/DCPS/transport/framework/TransportInst.h>
1512

@@ -18,6 +15,17 @@
1815
#include <ace/Log_Msg.h>
1916
#include <ace/OS_NS_stdlib.h>
2017

18+
const char* ACTOR_PUBLISHER = "Publisher";
19+
const char* ACTOR_RECORDER = "Recorder";
20+
const char* ACTOR_REPLAYER = "Replayer";
21+
const char* ACTOR_SUBSCRIBER = "Subscriber";
22+
23+
const char* EVENT_RECORDER_JOINED = "RecorderJoined";
24+
const char* EVENT_RECEIVED_ALL_SAMPLES = "ReceivedAllSamples";
25+
const char* EVENT_SUBSCRIBER_JOINED = "SubscriberJoined";
26+
27+
const int NUM_SAMPLES = 10;
28+
2129
inline int
2230
parse_args(int argc, ACE_TCHAR *argv[])
2331
{
@@ -29,18 +37,13 @@ parse_args(int argc, ACE_TCHAR *argv[])
2937
while ((c = get_opts()) != -1) {
3038
switch (c) {
3139
case 't':
32-
3340
if (ACE_OS::strcmp(get_opts.opt_arg(), ACE_TEXT("udp")) == 0) {
3441
transport_type = "udp";
35-
3642
} else if (ACE_OS::strcmp(get_opts.opt_arg(), ACE_TEXT("multicast")) == 0) {
3743
transport_type = "multicast";
38-
3944
} else if (ACE_OS::strcmp(get_opts.opt_arg(), ACE_TEXT("tcp")) == 0) {
4045
transport_type = "tcp";
41-
4246
}
43-
4447
break;
4548
case 'p':
4649
thread_per_connection = true;
@@ -49,7 +52,7 @@ parse_args(int argc, ACE_TCHAR *argv[])
4952
default:
5053
ACE_ERROR_RETURN((LM_ERROR,
5154
ACE_TEXT("usage: %s [-t transport]\n"), argv[0]),
52-
-1);
55+
-1);
5356
}
5457
}
5558

@@ -61,19 +64,16 @@ parse_args(int argc, ACE_TCHAR *argv[])
6164
}
6265

6366
if (thread_per_connection) {
64-
OpenDDS::DCPS::TransportConfig_rch config =
65-
TheTransportRegistry->fix_empty_default();
67+
OpenDDS::DCPS::TransportConfig_rch config = TheTransportRegistry->fix_empty_default();
6668
if (config.in() == 0) {
6769
ACE_ERROR_RETURN((LM_ERROR,
6870
ACE_TEXT("no default config\n"), argv[0]),
69-
-1);
70-
}
71-
else if (config->instances_.size() < 1) {
71+
-1);
72+
} else if (config->instances_.size() < 1) {
7273
ACE_ERROR_RETURN((LM_ERROR,
7374
ACE_TEXT("no instances on default config\n"), argv[0]),
74-
-1);
75-
}
76-
else if (config->instances_.size() > 1) {
75+
-1);
76+
} else if (config->instances_.size() > 1) {
7777
ACE_ERROR((LM_ERROR,
7878
ACE_TEXT("too many instances on default config, using first\n"), argv[0]));
7979
}
@@ -84,5 +84,4 @@ parse_args(int argc, ACE_TCHAR *argv[])
8484
return 0;
8585
}
8686

87-
8887
#endif

0 commit comments

Comments
 (0)