diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml
index d436ed6bc8a..685fe3e6675 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -2636,14 +2636,11 @@ jobs:
cat "$GITHUB_WORKSPACE/OpenDDS/${{ github.job }}_autobuild_workspace/logs/latest.txt"
grep -q 'Failures: 0' "$GITHUB_WORKSPACE/OpenDDS/${{ github.job }}_autobuild_workspace/logs/latest.txt"
- ACE_TAO_u22_gcc11_i0_xer0:
+ ACE_TAO_u22_i0_xer0:
runs-on: ubuntu-22.04
steps:
- - name: install gcc and g++
- run: |
- sudo apt-get install g++-11
- name: checkout OpenDDS
uses: actions/checkout@v4
with:
@@ -2664,7 +2661,7 @@ jobs:
- name: get compiler version
shell: bash
run: |
- export COMPILER_VERSION=$(g++-11 --version 2>&1 | head -n 1)
+ export COMPILER_VERSION=$(g++ --version 2>&1 | head -n 1)
echo "COMPILER_VERSION=$COMPILER_VERSION" >> $GITHUB_ENV
- name: Cache Artifact
id: cache-artifact
@@ -2682,7 +2679,7 @@ jobs:
if: steps.cache-artifact.outputs.cache-hit != 'true'
run: |
cd OpenDDS
- ./configure --compiler=g++-11 --std=c++20 --no-inline --tests --ace=$GITHUB_WORKSPACE/OpenDDS/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC --compile-warnings=WARNING
+ ./configure --std=c++20 --no-inline --tests --ace=$GITHUB_WORKSPACE/OpenDDS/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC --compile-warnings=WARNING
- name: build ACE and TAO
if: steps.cache-artifact.outputs.cache-hit != 'true'
run: |
@@ -2708,16 +2705,13 @@ jobs:
name: ${{ github.job }}_artifact
path: ${{ github.job }}.tar.xz
- build_u22_gcc11_i0_xer0:
+ build_u22_i0_xer0:
runs-on: ubuntu-22.04
- needs: ACE_TAO_u22_gcc11_i0_xer0
+ needs: ACE_TAO_u22_i0_xer0
steps:
- - name: install gcc and g++
- run: |
- sudo apt-get install g++-11
- name: checkout MPC
uses: actions/checkout@v4
with:
@@ -2732,13 +2726,13 @@ jobs:
- name: download ACE_TAO artifact
uses: actions/download-artifact@v4
with:
- name: ACE_TAO_u22_gcc11_i0_xer0_artifact
+ name: ACE_TAO_u22_i0_xer0_artifact
path: ACE_TAO
- name: extract ACE_TAO artifact
shell: bash
run: |
cd ACE_TAO
- tar xvfJ ACE_TAO_u22_gcc11_i0_xer0.tar.xz
+ tar xvfJ ACE_TAO_u22_i0_xer0.tar.xz
- name: checkout OpenDDS
uses: actions/checkout@v4
with:
@@ -2747,7 +2741,7 @@ jobs:
- name: configure OpenDDS
run: |
cd OpenDDS
- ./configure --compiler=g++-11 --std=c++20 --no-inline --tests --rapidjson --boottime --ace=$GITHUB_WORKSPACE/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC --compile-warnings=WARNING
+ ./configure --std=c++20 --no-inline --tests --rapidjson --boottime --ace=$GITHUB_WORKSPACE/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC --compile-warnings=WARNING
- name: check build configuration
shell: bash
run: |
@@ -2766,7 +2760,7 @@ jobs:
source OpenDDS/setenv.sh
mkdir OpenDDS/tests/cmake/build
cd OpenDDS/tests/cmake/build
- cmake -DCMAKE_CXX_COMPILER=g++-11 ..
+ cmake ..
cmake --build . -- -j4
- name: create OpenDDS tar.xz artifact
shell: bash
@@ -2783,11 +2777,11 @@ jobs:
name: ${{ github.job }}_artifact
path: ${{ github.job }}.tar.xz
- cmake_u22_gcc11_i0_xer0:
+ test_u22_i0_xer0:
runs-on: ubuntu-22.04
- needs: build_u22_gcc11_i0_xer0
+ needs: build_u22_i0_xer0
permissions:
contents: read
@@ -2813,13 +2807,13 @@ jobs:
- name: download ACE_TAO artifact
uses: actions/download-artifact@v4
with:
- name: ACE_TAO_u22_gcc11_i0_xer0_artifact
+ name: ACE_TAO_u22_i0_xer0_artifact
path: ACE_TAO
- name: extract ACE_TAO artifact
shell: bash
run: |
cd ACE_TAO
- tar xvfJ ACE_TAO_u22_gcc11_i0_xer0.tar.xz
+ tar xvfJ ACE_TAO_u22_i0_xer0.tar.xz
- name: checkout OpenDDS
uses: actions/checkout@v4
with:
@@ -2828,13 +2822,13 @@ jobs:
- name: download OpenDDS artifact
uses: actions/download-artifact@v4
with:
- name: build_u22_gcc11_i0_xer0_artifact
+ name: build_u22_i0_xer0_artifact
path: OpenDDS
- name: extract OpenDDS artifact
shell: bash
run: |
cd OpenDDS
- tar xvfJ build_u22_gcc11_i0_xer0.tar.xz
+ tar xvfJ build_u22_i0_xer0.tar.xz
- name: check build configuration
shell: bash
run: |
@@ -2881,7 +2875,7 @@ jobs:
-
+
diff --git a/configure b/configure
index 1c5a8e08856..04cd667db6e 100755
--- a/configure
+++ b/configure
@@ -62,7 +62,7 @@ my %platforminfo =
'cl_versions' => {13.1 => 'vc71', 14 => 'vc8', 15 => 'vc9',
16 => 'vc10', 17 => 'vc11', 18 => 'vc12',
19 => 'vc14', 19.1 => 'vs2017',
- 19.2 => 'vs2019', 19.3 => 'vs2022'},
+ 19.2 => 'vs2019', 19.3 => 'vs2022', 19.4 => 'vs2022'},
'cl_archs' => {'x64' => 1, 'Win32' => 1, 'ARM64' => 0, 'ARM' => 0}, # 1 if supported
},
'macos' => {
diff --git a/dds/DCPS/DataReaderImpl_T.h b/dds/DCPS/DataReaderImpl_T.h
index 6b656b7d367..82e58bafcd5 100644
--- a/dds/DCPS/DataReaderImpl_T.h
+++ b/dds/DCPS/DataReaderImpl_T.h
@@ -850,7 +850,7 @@ namespace OpenDDS {
bool filtered = false;
SubscriptionInstance_rch instance;
- const DDS::Time_t now = timestamp.to_dds_time();
+ const DDS::Time_t now = timestamp.to_idl_struct();
DataSampleHeader header;
header.source_timestamp_sec_ = now.sec;
header.source_timestamp_nanosec_ = now.nanosec;
@@ -898,7 +898,7 @@ namespace OpenDDS {
SubscriptionInstance_rch si = get_handle_instance(instance);
if (si && state != DDS::ALIVE_INSTANCE_STATE) {
- const DDS::Time_t now = timestamp.to_dds_time();
+ const DDS::Time_t now = timestamp.to_idl_struct();
DataSampleHeader header;
header.publication_id_ = publication_id;
header.source_timestamp_sec_ = now.sec;
diff --git a/dds/DCPS/DataWriterImpl.cpp b/dds/DCPS/DataWriterImpl.cpp
index 4624a389fa0..041e0265852 100644
--- a/dds/DCPS/DataWriterImpl.cpp
+++ b/dds/DCPS/DataWriterImpl.cpp
@@ -543,7 +543,7 @@ DataWriterImpl::association_complete_i(const GUID_t& remote_id)
Message_Block_Ptr end_historic_samples(
create_control_message(
END_HISTORIC_SAMPLES, header, move(data),
- SystemTimePoint::now().to_dds_time()));
+ SystemTimePoint::now().to_idl_struct()));
this->controlTracker.message_sent();
guard.release();
@@ -776,7 +776,7 @@ void DataWriterImpl::replay_durable_data_for(const GUID_t& remote_id)
DataSampleHeader header;
Message_Block_Ptr end_historic_samples(create_control_message(END_HISTORIC_SAMPLES, header, move(data),
- SystemTimePoint::now().to_dds_time()));
+ SystemTimePoint::now().to_idl_struct()));
this->controlTracker.message_sent();
guard.release();
@@ -1075,7 +1075,7 @@ DataWriterImpl::send_request_ack()
REQUEST_ACK,
element->get_header(),
move(blk),
- SystemTimePoint::now().to_dds_time()));
+ SystemTimePoint::now().to_idl_struct()));
element->set_sample(move(sample));
@@ -2426,7 +2426,7 @@ DataWriterImpl::end_coherent_changes(const GroupCoherentSamples& group_samples)
Message_Block_Ptr control(
create_control_message(
END_COHERENT_CHANGES, header, move(data),
- SystemTimePoint::now().to_dds_time()));
+ SystemTimePoint::now().to_idl_struct()));
this->coherent_ = false;
this->coherent_samples_ = 0;
@@ -2550,7 +2550,7 @@ DataWriterImpl::send_liveliness(const MonotonicTimePoint& now)
Message_Block_Ptr liveliness_msg(
create_control_message(
DATAWRITER_LIVELINESS, header, move(empty),
- SystemTimePoint::now().to_dds_time()));
+ SystemTimePoint::now().to_idl_struct()));
if (this->send_control(header, move(liveliness_msg)) == SEND_CONTROL_ERROR) {
ACE_ERROR_RETURN((LM_ERROR,
@@ -2582,7 +2582,7 @@ DataWriterImpl::prepare_to_delete()
#endif
// Unregister all registered instances prior to deletion.
- unregister_instances(SystemTimePoint::now().to_dds_time());
+ unregister_instances(SystemTimePoint::now().to_idl_struct());
const Observer_rch observer = get_observer(Observer::e_DELETED);
if (observer) {
diff --git a/dds/DCPS/DataWriterImpl_T.h b/dds/DCPS/DataWriterImpl_T.h
index 73d1aa7c31c..86b902a8adc 100644
--- a/dds/DCPS/DataWriterImpl_T.h
+++ b/dds/DCPS/DataWriterImpl_T.h
@@ -52,7 +52,7 @@ DataWriterImpl_T
DDS::InstanceHandle_t register_instance(const MessageType& instance)
{
- return register_instance_w_timestamp(instance, SystemTimePoint::now().to_dds_time());
+ return register_instance_w_timestamp(instance, SystemTimePoint::now().to_idl_struct());
}
DDS::InstanceHandle_t register_instance_w_timestamp(
@@ -64,7 +64,7 @@ DataWriterImpl_T
DDS::ReturnCode_t unregister_instance(const MessageType& instance, DDS::InstanceHandle_t handle)
{
- return unregister_instance_w_timestamp(instance, handle, SystemTimePoint::now().to_dds_time());
+ return unregister_instance_w_timestamp(instance, handle, SystemTimePoint::now().to_idl_struct());
}
DDS::ReturnCode_t unregister_instance_w_timestamp(
@@ -81,7 +81,7 @@ DataWriterImpl_T
// This lack of safety helps performance.
DDS::ReturnCode_t write(const MessageType& instance_data, DDS::InstanceHandle_t handle)
{
- return write_w_timestamp(instance_data, handle, SystemTimePoint::now().to_dds_time());
+ return write_w_timestamp(instance_data, handle, SystemTimePoint::now().to_idl_struct());
}
//WARNING: If the handle is non-nil and the instance is not registered
@@ -98,7 +98,7 @@ DataWriterImpl_T
DDS::ReturnCode_t dispose(const MessageType& instance_data, DDS::InstanceHandle_t instance_handle)
{
- return dispose_w_timestamp(instance_data, instance_handle, SystemTimePoint::now().to_dds_time());
+ return dispose_w_timestamp(instance_data, instance_handle, SystemTimePoint::now().to_idl_struct());
}
DDS::ReturnCode_t dispose_w_timestamp(
diff --git a/dds/DCPS/DomainParticipantImpl.cpp b/dds/DCPS/DomainParticipantImpl.cpp
index 5719b5b5155..175e82191e7 100644
--- a/dds/DCPS/DomainParticipantImpl.cpp
+++ b/dds/DCPS/DomainParticipantImpl.cpp
@@ -1518,7 +1518,7 @@ DomainParticipantImpl::get_default_topic_qos(
DDS::ReturnCode_t
DomainParticipantImpl::get_current_time(DDS::Time_t& current_time)
{
- current_time = SystemTimePoint::now().to_dds_time();
+ current_time = SystemTimePoint::now().to_idl_struct();
return DDS::RETCODE_OK;
}
diff --git a/dds/DCPS/Hash.cpp b/dds/DCPS/Hash.cpp
index fbf4846112e..9aeae185226 100644
--- a/dds/DCPS/Hash.cpp
+++ b/dds/DCPS/Hash.cpp
@@ -251,7 +251,7 @@ void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
}
memcpy(&ctx->buffer[used], data, free);
- data = (unsigned char *)data + free;
+ data = (const unsigned char *)data + free;
size -= free;
body(ctx, ctx->buffer, 64);
}
diff --git a/dds/DCPS/InternalDataReader.h b/dds/DCPS/InternalDataReader.h
index db078975a32..22db3515d15 100644
--- a/dds/DCPS/InternalDataReader.h
+++ b/dds/DCPS/InternalDataReader.h
@@ -340,7 +340,7 @@ class InternalDataReader : public InternalEntity {
{
if (instance_state_ == DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE &&
!is_infinite(qos.reader_data_lifecycle.autopurge_disposed_samples_delay) &&
- SystemTimePoint::now().to_dds_time() > disposed_expiration_date_) {
+ SystemTimePoint::now().to_idl_struct() > disposed_expiration_date_) {
not_read_samples_.clear();
read_samples_.clear();
}
@@ -357,7 +357,7 @@ class InternalDataReader : public InternalEntity {
if (instance_state_ == DDS::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE &&
!is_infinite(qos.reader_data_lifecycle.autopurge_nowriter_samples_delay) &&
- SystemTimePoint::now().to_dds_time() > no_writers_expiration_date_) {
+ SystemTimePoint::now().to_idl_struct() > no_writers_expiration_date_) {
return true;
}
@@ -511,7 +511,7 @@ class InternalDataReader : public InternalEntity {
if (instance_state_ == DDS::ALIVE_INSTANCE_STATE) {
instance_state_ = DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE;
- disposed_expiration_date_ = SystemTimePoint::now().to_dds_time() + qos.reader_data_lifecycle.autopurge_disposed_samples_delay;
+ disposed_expiration_date_ = SystemTimePoint::now().to_idl_struct() + qos.reader_data_lifecycle.autopurge_disposed_samples_delay;
informed_of_not_alive_ = false;
return true;
}
@@ -526,7 +526,7 @@ class InternalDataReader : public InternalEntity {
if (publication_set_.empty() && instance_state_ == DDS::ALIVE_INSTANCE_STATE) {
instance_state_ = DDS::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE;
- no_writers_expiration_date_ = SystemTimePoint::now().to_dds_time() + qos.reader_data_lifecycle.autopurge_nowriter_samples_delay;
+ no_writers_expiration_date_ = SystemTimePoint::now().to_idl_struct() + qos.reader_data_lifecycle.autopurge_nowriter_samples_delay;
informed_of_not_alive_ = false;
return true;
}
diff --git a/dds/DCPS/Logging.cpp b/dds/DCPS/Logging.cpp
index 8cde3732a79..5dd2389e0a9 100644
--- a/dds/DCPS/Logging.cpp
+++ b/dds/DCPS/Logging.cpp
@@ -25,7 +25,7 @@ void OpenDDS_Dcps_Export log_progress(const char* activity,
{
ACE_DEBUG((LM_INFO, "(%P|%t) {transport_debug.log_progress} local: %C remote: %C reference: %C time(ms): %Lu activity: %C\n",
DCPS::LogGuid(local).c_str(), DCPS::LogGuid(remote).c_str(), DCPS::LogGuid(reference).c_str(),
- duration_to_time_value(MonotonicTimePoint::now().to_monotonic_time() - start_time).msec(),
+ duration_to_time_value(MonotonicTimePoint::now().to_idl_struct() - start_time).msec(),
activity));
}
diff --git a/dds/DCPS/RTPS/Spdp.cpp b/dds/DCPS/RTPS/Spdp.cpp
index aa9b6d3541f..4a3cb6f7f6b 100644
--- a/dds/DCPS/RTPS/Spdp.cpp
+++ b/dds/DCPS/RTPS/Spdp.cpp
@@ -247,7 +247,7 @@ Spdp::Spdp(DDS::DomainId_t domain,
#endif
, domain_(domain)
, guid_(guid)
- , participant_discovered_at_(MonotonicTimePoint::now().to_monotonic_time())
+ , participant_discovered_at_(MonotonicTimePoint::now().to_idl_struct())
, is_application_participant_(false)
, ipv4_participant_port_id_(0)
#ifdef ACE_HAS_IPV6
@@ -310,7 +310,7 @@ Spdp::Spdp(DDS::DomainId_t domain,
, secure_participant_user_data_(disco->config()->secure_participant_user_data())
, domain_(domain)
, guid_(guid)
- , participant_discovered_at_(MonotonicTimePoint::now().to_monotonic_time())
+ , participant_discovered_at_(MonotonicTimePoint::now().to_idl_struct())
, is_application_participant_(false)
, ipv4_participant_port_id_(0)
#ifdef ACE_HAS_IPV6
@@ -561,56 +561,56 @@ void Spdp::process_location_updates_i(const DiscoveredParticipantIter& iter, con
case DCPS::LOCATION_LOCAL:
address_change = addr.compare(location_data.local_addr.in()) != 0;
location_data.local_addr = addr.c_str();
- location_data.local_timestamp = pos->timestamp_.to_dds_time();
+ location_data.local_timestamp = pos->timestamp_.to_idl_struct();
break;
case DCPS::LOCATION_ICE:
address_change = addr.compare(location_data.ice_addr.in()) != 0;
location_data.ice_addr = addr.c_str();
- location_data.ice_timestamp = pos->timestamp_.to_dds_time();
+ location_data.ice_timestamp = pos->timestamp_.to_idl_struct();
break;
case DCPS::LOCATION_RELAY:
address_change = addr.compare(location_data.relay_addr.in()) != 0;
location_data.relay_addr = addr.c_str();
- location_data.relay_timestamp = pos->timestamp_.to_dds_time();
+ location_data.relay_timestamp = pos->timestamp_.to_idl_struct();
break;
case DCPS::LOCATION_LOCAL6:
address_change = addr.compare(location_data.local6_addr.in()) != 0;
location_data.local6_addr = addr.c_str();
- location_data.local6_timestamp = pos->timestamp_.to_dds_time();
+ location_data.local6_timestamp = pos->timestamp_.to_idl_struct();
break;
case DCPS::LOCATION_ICE6:
address_change = addr.compare(location_data.ice6_addr.in()) != 0;
location_data.ice6_addr = addr.c_str();
- location_data.ice6_timestamp = pos->timestamp_.to_dds_time();
+ location_data.ice6_timestamp = pos->timestamp_.to_idl_struct();
break;
case DCPS::LOCATION_RELAY6:
address_change = addr.compare(location_data.relay6_addr.in()) != 0;
location_data.relay6_addr = addr.c_str();
- location_data.relay6_timestamp = pos->timestamp_.to_dds_time();
+ location_data.relay6_timestamp = pos->timestamp_.to_idl_struct();
break;
}
- const DDS::Time_t expr = (pos->timestamp_ - leaseDuration).to_dds_time();
+ const DDS::Time_t expr = (pos->timestamp_ - leaseDuration).to_idl_struct();
if ((location_data.location & DCPS::LOCATION_LOCAL) && DCPS::operator<(location_data.local_timestamp, expr)) {
location_data.location &= ~(DCPS::LOCATION_LOCAL);
location_data.change_mask |= DCPS::LOCATION_LOCAL;
- location_data.local_timestamp = pos->timestamp_.to_dds_time();
+ location_data.local_timestamp = pos->timestamp_.to_idl_struct();
}
if ((location_data.location & DCPS::LOCATION_RELAY) && DCPS::operator<(location_data.relay_timestamp, expr)) {
location_data.location &= ~(DCPS::LOCATION_RELAY);
location_data.change_mask |= DCPS::LOCATION_RELAY;
- location_data.relay_timestamp = pos->timestamp_.to_dds_time();
+ location_data.relay_timestamp = pos->timestamp_.to_idl_struct();
}
if ((location_data.location & DCPS::LOCATION_LOCAL6) && DCPS::operator<(location_data.local6_timestamp, expr)) {
location_data.location &= ~(DCPS::LOCATION_LOCAL6);
location_data.change_mask |= DCPS::LOCATION_LOCAL6;
- location_data.local6_timestamp = pos->timestamp_.to_dds_time();
+ location_data.local6_timestamp = pos->timestamp_.to_idl_struct();
}
if ((location_data.location & DCPS::LOCATION_RELAY6) && DCPS::operator<(location_data.relay6_timestamp, expr)) {
location_data.location &= ~(DCPS::LOCATION_RELAY6);
location_data.change_mask |= DCPS::LOCATION_RELAY6;
- location_data.relay6_timestamp = pos->timestamp_.to_dds_time();
+ location_data.relay6_timestamp = pos->timestamp_.to_idl_struct();
}
if (old_mask != location_data.location || address_change) {
@@ -870,7 +870,7 @@ Spdp::handle_participant_data(DCPS::MessageId id,
}
if (DCPS::transport_debug.log_progress) {
- log_progress("participant discovery", guid_, guid, iter->second.discovered_at_.to_monotonic_time());
+ log_progress("participant discovery", guid_, guid, iter->second.discovered_at_.to_idl_struct());
}
#ifndef DDS_HAS_MINIMUM_BIT
@@ -957,7 +957,7 @@ Spdp::handle_participant_data(DCPS::MessageId id,
} else { // Existing Participant
if (from_sedp && DCPS::transport_debug.log_progress) {
- log_progress("secure participant discovery", guid_, guid, iter->second.discovered_at_.to_monotonic_time());
+ log_progress("secure participant discovery", guid_, guid, iter->second.discovered_at_.to_idl_struct());
}
#ifndef DDS_HAS_MINIMUM_BIT
@@ -1096,7 +1096,7 @@ Spdp::data_received(const DataSubmessage& data,
ParticipantData_t pdata;
pdata.participantProxy.domainId = domain_;
- pdata.discoveredAt = now.to_monotonic_time();
+ pdata.discoveredAt = now.to_idl_struct();
#if OPENDDS_CONFIG_SECURITY
pdata.ddsParticipantDataSecure.base.base.key = DCPS::BUILTIN_TOPIC_KEY_UNKNOWN;
#endif
@@ -1950,7 +1950,7 @@ Spdp::handle_participant_crypto_tokens(const DDS::Security::ParticipantVolatileM
}
if (DCPS::transport_debug.log_progress) {
- log_progress("participant crypto token", guid_, src_participant, iter->second.discovered_at_.to_monotonic_time());
+ log_progress("participant crypto token", guid_, src_participant, iter->second.discovered_at_.to_idl_struct());
}
const DDS::Security::ParticipantCryptoTokenSeq& inboundTokens =
@@ -2117,7 +2117,7 @@ Spdp::match_authenticated(const DCPS::GUID_t& guid, DiscoveredParticipantIter& i
}
if (DCPS::transport_debug.log_progress) {
- log_progress("authentication", guid_, guid, iter->second.discovered_at_.to_monotonic_time());
+ log_progress("authentication", guid_, guid, iter->second.discovered_at_.to_idl_struct());
}
DDS::Security::ParticipantCryptoHandle dp_crypto_handle =
@@ -4430,6 +4430,7 @@ void Spdp::SpdpTransport::thread_status_task(const DCPS::MonotonicTimePoint& now
DCPS::InternalThreadBuiltinTopicData data;
data.thread_id = i->bit_key().c_str();
data.utilization = i->utilization(now);
+ data.monotonic_timestamp = i->last_update().to_idl_struct();
outer->bit_subscriber_->add_thread_status(data, DDS::NEW_VIEW_STATE, i->timestamp());
}
@@ -4596,7 +4597,7 @@ DCPS::MonotonicTime_t Spdp::get_participant_discovered_at(const DCPS::GUID_t& gu
{
const DiscoveredParticipantConstIter iter = participants_.find(make_part_guid(guid));
if (iter != participants_.end()) {
- return iter->second.discovered_at_.to_monotonic_time();
+ return iter->second.discovered_at_.to_idl_struct();
}
return DCPS::MonotonicTime_t();
diff --git a/dds/DCPS/ReactorTask.cpp b/dds/DCPS/ReactorTask.cpp
index bc0660576ad..4fd70265ca5 100644
--- a/dds/DCPS/ReactorTask.cpp
+++ b/dds/DCPS/ReactorTask.cpp
@@ -13,6 +13,7 @@
#endif /* __ACE_INLINE__ */
#include "Service_Participant.h"
+#include "Timers.h"
#include
#include
@@ -159,18 +160,29 @@ int ReactorTask::svc()
condition_.notify_all();
}
- // Tell the reactor to handle events.
+ Timers::TimerId thread_status_timer = Timers::InvalidTimerId;
+ RcHandle tsm_updater_handler;
+
if (thread_status_manager_->update_thread_status()) {
- while (state() == STATE_RUNNING) {
- ACE_Time_Value t = thread_status_manager_->thread_status_interval().value();
- ThreadStatusManager::Sleeper sleeper(*thread_status_manager_);
- reactor_->run_reactor_event_loop(t, 0);
+ tsm_updater_handler = make_rch();
+ const TimeDuration period = thread_status_manager_->thread_status_interval();
+ thread_status_timer = Timers::schedule(reactor_, *tsm_updater_handler, thread_status_manager_,
+ period, period);
+
+ if (thread_status_timer == Timers::InvalidTimerId) {
+ if (log_level >= LogLevel::Notice) {
+ ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: ReactorTask::svc: failed to "
+ "schedule timer for ThreadStatusManager::Updater\n"));
+ }
}
-
- } else {
- reactor_->run_reactor_event_loop();
}
+ ThreadStatusManager::Sleeper sleeper(thread_status_manager_);
+ reactor_->run_reactor_event_loop();
+
+ if (thread_status_timer != Timers::InvalidTimerId) {
+ Timers::cancel(reactor_, thread_status_timer);
+ }
return 0;
}
diff --git a/dds/DCPS/ReactorTask.h b/dds/DCPS/ReactorTask.h
index 6b1464250dd..aa9a415bb57 100644
--- a/dds/DCPS/ReactorTask.h
+++ b/dds/DCPS/ReactorTask.h
@@ -111,11 +111,10 @@ class OpenDDS_Dcps_Export ReactorTask : public virtual ACE_Task_Base,
#endif
TimerQueueType* timer_queue_;
+ ReactorInterceptor_rch interceptor_;
// thread status reporting
String name_;
-
- ReactorInterceptor_rch interceptor_;
ThreadStatusManager* thread_status_manager_;
};
diff --git a/dds/DCPS/ReceivedDataElementList.h b/dds/DCPS/ReceivedDataElementList.h
index b97cf12dea2..c6bedde00fd 100644
--- a/dds/DCPS/ReceivedDataElementList.h
+++ b/dds/DCPS/ReceivedDataElementList.h
@@ -36,6 +36,7 @@ class OpenDDS_Dcps_Export ReceivedDataElement {
: pub_(header.publication_id_),
registered_data_(received_data),
sample_state_(DDS::NOT_READ_SAMPLE_STATE),
+ destination_timestamp_(SystemTimePoint::now().to_idl_struct()),
#ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE
coherent_change_(header.coherent_change_),
group_coherent_(header.group_coherent_),
@@ -51,8 +52,6 @@ class OpenDDS_Dcps_Export ReceivedDataElement {
ref_count_(1),
mx_(mx)
{
- destination_timestamp_ = SystemTimePoint::now().to_dds_time();
-
source_timestamp_.sec = header.source_timestamp_sec_;
source_timestamp_.nanosec = header.source_timestamp_nanosec_;
diff --git a/dds/DCPS/RecorderImpl.cpp b/dds/DCPS/RecorderImpl.cpp
index 25f053bbaaa..6cb024d17ff 100644
--- a/dds/DCPS/RecorderImpl.cpp
+++ b/dds/DCPS/RecorderImpl.cpp
@@ -364,7 +364,7 @@ RecorderImpl::add_association(const WriterAssociation& writer,
//
// if (where->second->should_ack(now)) {
// const SequenceNumber sequence = where->second->ack_sequence();
- // if (send_sample_ack(writer.writerId, sequence, now.to_dds_time())) {
+ // if (send_sample_ack(writer.writerId, sequence, now.to_idl_struct())) {
// where->second->clear_acks(sequence);
// }
// }
diff --git a/dds/DCPS/ReplayerImpl.cpp b/dds/DCPS/ReplayerImpl.cpp
index 5fb7f51308f..b035b213968 100644
--- a/dds/DCPS/ReplayerImpl.cpp
+++ b/dds/DCPS/ReplayerImpl.cpp
@@ -102,7 +102,7 @@ ReplayerImpl::cleanup()
{
// // Unregister all registered instances prior to deletion.
- // // this->unregister_instances(SystemTimePoint::now().to_dds_time());
+ // // this->unregister_instances(SystemTimePoint::now().to_idl_struct());
//
// // CORBA::String_var topic_name = this->get_Atopic_name();
{
diff --git a/dds/DCPS/ThreadStatusManager.h b/dds/DCPS/ThreadStatusManager.h
index a848232e4d0..c0c917933d8 100644
--- a/dds/DCPS/ThreadStatusManager.h
+++ b/dds/DCPS/ThreadStatusManager.h
@@ -9,6 +9,7 @@
#define OPENDDS_DCPS_THREADSTATUSMANAGER_H
#include "dcps_export.h"
+#include "RcEventHandler.h"
#include "TimeTypes.h"
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -158,6 +159,16 @@ class OpenDDS_Dcps_Export ThreadStatusManager {
ThreadStatusManager* const thread_status_manager_;
};
+ struct Updater : RcEventHandler {
+ int handle_timeout(const ACE_Time_Value&, const void* arg)
+ {
+ const ThreadStatusManager* const tsmConst = static_cast(arg);
+ ThreadStatusManager* const tsm = const_cast(tsmConst);
+ tsm->idle();
+ return 0;
+ }
+ };
+
/// Copy active and idle threads to running and finished threads to
/// finished. Only threads updated after start are considered.
void harvest(const MonotonicTimePoint& start,
diff --git a/dds/DCPS/TimePoint_T.cpp b/dds/DCPS/TimePoint_T.cpp
index 92ce6621460..77a9689bf99 100644
--- a/dds/DCPS/TimePoint_T.cpp
+++ b/dds/DCPS/TimePoint_T.cpp
@@ -11,19 +11,19 @@ OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
namespace OpenDDS {
namespace DCPS {
-template
-const TimePoint_T TimePoint_T::zero_value(ACE_Time_Value(0, 0));
+template
+const TimePoint_T TimePoint_T::zero_value(ACE_Time_Value(0, 0));
#ifdef ACE_HAS_CPP11
-template
-const TimePoint_T TimePoint_T::max_value(ACE_Time_Value(std::numeric_limits::max(), ACE_ONE_SECOND_IN_USECS - 1));
+template
+const TimePoint_T TimePoint_T::max_value(ACE_Time_Value(std::numeric_limits::max(), ACE_ONE_SECOND_IN_USECS - 1));
#else
-template
-const TimePoint_T TimePoint_T::max_value(ACE_Time_Value(ACE_Numeric_Limits::max(), ACE_ONE_SECOND_IN_USECS - 1));
+template
+const TimePoint_T TimePoint_T::max_value(ACE_Time_Value(ACE_Numeric_Limits::max(), ACE_ONE_SECOND_IN_USECS - 1));
#endif /* ACE_HAS_CPP11 */
-template
-AceClock TimePoint_T::clock;
+template
+AceClock TimePoint_T::clock;
}
}
diff --git a/dds/DCPS/TimePoint_T.h b/dds/DCPS/TimePoint_T.h
index 783edc8d132..b508770f917 100644
--- a/dds/DCPS/TimePoint_T.h
+++ b/dds/DCPS/TimePoint_T.h
@@ -4,8 +4,6 @@
#include "TimeDuration.h"
#include "SafeBool_T.h"
-#include
-
#include
#if !defined (ACE_LACKS_PRAGMA_ONCE)
@@ -31,14 +29,15 @@ namespace DCPS {
* (or docs/internal/dev_guidelines.rst) for background and reasoning for this
* class.
*/
-template
-class TimePoint_T : public SafeBool_T > {
+template
+class TimePoint_T : public SafeBool_T > {
public:
typedef AceClock ClockType;
+ typedef IdlType IdlStruct;
typedef ACE_Time_Value_T ValueType;
- const static TimePoint_T zero_value;
- const static TimePoint_T max_value;
+ const static TimePoint_T zero_value;
+ const static TimePoint_T max_value;
/**
* Set to zero_value, which is equal to the epoch (the starting point) of the
@@ -51,19 +50,18 @@ class TimePoint_T : public SafeBool_T > {
* necessary.
*
* \warning Use these carefully. Make sure ACE_Time_Value is a point in time
- * and of the right clock type. DDS::Time_t should be in system clock time
- * and so shouldn't be used with MonotonicTimePoint.
+ * and of the right clock type.
*/
///@{
explicit TimePoint_T(const ACE_Time_Value& ace_time_value);
- explicit TimePoint_T(const ACE_Time_Value_T& ace_time_value);
- explicit TimePoint_T(const DDS::Time_t& dds_time);
+ explicit TimePoint_T(const ValueType& ace_time_value);
+ explicit TimePoint_T(const IdlType& from_idl);
///@}
/**
* Get a TimePoint representing the current time of the AceClock.
*/
- static TimePoint_T now();
+ static TimePoint_T now();
/**
* Get and set the inner ACE_Time_Value based value. Use value() to pass this
@@ -71,8 +69,8 @@ class TimePoint_T : public SafeBool_T > {
* type.
*/
///@{
- const ACE_Time_Value_T& value() const;
- void value(const ACE_Time_Value_T& ace_time_value);
+ const ValueType& value() const;
+ void value(const ValueType& ace_time_value);
///@}
/**
@@ -96,18 +94,12 @@ class TimePoint_T : public SafeBool_T > {
void set_to_now();
/**
- * Convert to DDS::Time_t. This is probably only desirable for the system
- * time version of this template class, SystemTimePoint.
- */
- DDS::Time_t to_dds_time() const;
-
- /**
- * Convert to OpenDDS::DCPS::MonotonicTime_t.
+ * Convert to the corresponding IDL struct type.
*/
- MonotonicTime_t to_monotonic_time() const;
+ IdlType to_idl_struct() const;
- TimePoint_T& operator+=(const TimeDuration& td);
- TimePoint_T& operator-=(const TimeDuration& td);
+ TimePoint_T& operator+=(const TimeDuration& td);
+ TimePoint_T& operator-=(const TimeDuration& td);
protected:
/**
@@ -119,35 +111,35 @@ class TimePoint_T : public SafeBool_T > {
ValueType value_;
};
-template
-TimePoint_T operator+(const TimeDuration& x, const TimePoint_T& y);
+template
+TimePoint_T operator+(const TimeDuration& x, const TimePoint_T& y);
-template
-TimePoint_T operator+(const TimePoint_T& x, const TimeDuration& y);
+template
+TimePoint_T operator+(const TimePoint_T& x, const TimeDuration& y);
-template
-TimeDuration operator-(const TimePoint_T& x, const TimePoint_T& y);
+template
+TimeDuration operator-(const TimePoint_T& x, const TimePoint_T& y);
-template
-TimePoint_T operator-(const TimePoint_T& x, const TimeDuration& y);
+template
+TimePoint_T operator-(const TimePoint_T& x, const TimeDuration& y);
-template
-bool operator<(const TimePoint_T& x, const TimePoint_T& y);
+template
+bool operator<(const TimePoint_T& x, const TimePoint_T& y);
-template
-bool operator>(const TimePoint_T& x, const TimePoint_T& y);
+template
+bool operator>(const TimePoint_T& x, const TimePoint_T& y);
-template
-bool operator<=(const TimePoint_T& x, const TimePoint_T& y);
+template
+bool operator<=(const TimePoint_T& x, const TimePoint_T& y);
-template
-bool operator>=(const TimePoint_T& x, const TimePoint_T& y);
+template
+bool operator>=(const TimePoint_T& x, const TimePoint_T& y);
-template
-bool operator==(const TimePoint_T& x, const TimePoint_T& y);
+template
+bool operator==(const TimePoint_T& x, const TimePoint_T& y);
-template
-bool operator!=(const TimePoint_T& x, const TimePoint_T& y);
+template
+bool operator!=(const TimePoint_T& x, const TimePoint_T& y);
} // namespace DCPS
} // namespace OpenDDS
diff --git a/dds/DCPS/TimePoint_T.inl b/dds/DCPS/TimePoint_T.inl
index 8567f6a0eab..176a9e4cd53 100644
--- a/dds/DCPS/TimePoint_T.inl
+++ b/dds/DCPS/TimePoint_T.inl
@@ -7,192 +7,186 @@ OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
namespace OpenDDS {
namespace DCPS {
-template
+template
ACE_INLINE
-TimePoint_T::TimePoint_T()
+TimePoint_T::TimePoint_T()
: value_(zero_value.value())
{
}
-template
+template
ACE_INLINE
-TimePoint_T::TimePoint_T(const ACE_Time_Value& ace_time_value)
+TimePoint_T::TimePoint_T(const ACE_Time_Value& ace_time_value)
: value_(ace_time_value)
{
}
-template
+template
ACE_INLINE
-TimePoint_T::TimePoint_T(const ACE_Time_Value_T& ace_time_value)
+TimePoint_T::TimePoint_T(const ACE_Time_Value_T& ace_time_value)
: value_(ace_time_value)
{
}
-template
+template
ACE_INLINE
-TimePoint_T::TimePoint_T(const DDS::Time_t& dds_time)
-: value_(time_to_time_value(dds_time))
+TimePoint_T::TimePoint_T(const IdlType& idl_time)
+: value_(time_to_time_value(idl_time))
{
}
-template
+template
ACE_INLINE
-TimePoint_T
-TimePoint_T::now()
+TimePoint_T
+TimePoint_T::now()
{
- return TimePoint_T(clock());
+ return TimePoint_T(clock());
}
-template
+template
ACE_INLINE
const ACE_Time_Value_T&
-TimePoint_T::value() const
+TimePoint_T::value() const
{
return value_;
}
-template
+template
ACE_INLINE
void
-TimePoint_T::value(const ACE_Time_Value_T& ace_time_value)
+TimePoint_T::value(const ACE_Time_Value_T& ace_time_value)
{
value_ = ace_time_value;
}
-template
+template
ACE_INLINE
bool
-TimePoint_T::is_zero() const
+TimePoint_T::is_zero() const
{
return *this == zero_value;
}
-template
+template
ACE_INLINE
bool
-TimePoint_T::is_max() const
+TimePoint_T::is_max() const
{
return *this == max_value;
}
-template
+template
ACE_INLINE
void
-TimePoint_T::set_to_now()
+TimePoint_T::set_to_now()
{
value_ = clock();
}
-template
+template
ACE_INLINE
-DDS::Time_t
-TimePoint_T::to_dds_time() const
+IdlType
+TimePoint_T::to_idl_struct() const
{
- return time_value_to_time(value_);
+ IdlType i;
+ time_value_to_time(i, value_);
+ return i;
}
-template
+template
ACE_INLINE
-MonotonicTime_t
-TimePoint_T::to_monotonic_time() const
-{
- return time_value_to_monotonic_time(value_);
-}
-
-template
-ACE_INLINE
-TimePoint_T&
-TimePoint_T::operator+=(const TimeDuration& td)
+TimePoint_T&
+TimePoint_T::operator+=(const TimeDuration& td)
{
value_ += td.value();
return *this;
}
-template
+template
ACE_INLINE
-TimePoint_T&
-TimePoint_T::operator-=(const TimeDuration& td)
+TimePoint_T&
+TimePoint_T::operator-=(const TimeDuration& td)
{
value_ -= td.value();
return *this;
}
-template
+template
ACE_INLINE
-TimePoint_T
-operator+(const TimeDuration& x, const TimePoint_T& y)
+TimePoint_T
+operator+(const TimeDuration& x, const TimePoint_T& y)
{
- return TimePoint_T(x.value() + y.value());
+ return TimePoint_T(x.value() + y.value());
}
-template
+template
ACE_INLINE
-TimePoint_T
-operator+(const TimePoint_T& x, const TimeDuration& y)
+TimePoint_T
+operator+(const TimePoint_T& x, const TimeDuration& y)
{
- return TimePoint_T(x.value() + y.value());
+ return TimePoint_T(x.value() + y.value());
}
-template
+template
ACE_INLINE
TimeDuration
-operator-(const TimePoint_T& x, const TimePoint_T& y)
+operator-(const TimePoint_T& x, const TimePoint_T& y)
{
return TimeDuration(x.value() - y.value());
}
-template
+template
ACE_INLINE
-TimePoint_T
-operator-(const TimePoint_T& x, const TimeDuration& y)
+TimePoint_T
+operator-(const TimePoint_T& x, const TimeDuration& y)
{
- return TimePoint_T(x.value() - y.value());
+ return TimePoint_T(x.value() - y.value());
}
-template
+template
ACE_INLINE
bool
-operator<(const TimePoint_T& x, const TimePoint_T& y)
+operator<(const TimePoint_T& x, const TimePoint_T& y)
{
return x.value() < y.value();
}
-template
+template
ACE_INLINE
bool
-operator>(const TimePoint_T& x, const TimePoint_T& y)
+operator>(const TimePoint_T& x, const TimePoint_T& y)
{
return x.value() > y.value();
}
-template
+template
ACE_INLINE
bool
-operator<=(const TimePoint_T& x, const TimePoint_T& y)
+operator<=(const TimePoint_T& x, const TimePoint_T& y)
{
return x.value() <= y.value();
}
-template
+template
ACE_INLINE
bool
-operator>=(const TimePoint_T& x, const TimePoint_T& y)
+operator>=(const TimePoint_T& x, const TimePoint_T& y)
{
return x.value() >= y.value();
}
-template
+template
ACE_INLINE
bool
-operator==(const TimePoint_T& x, const TimePoint_T& y)
+operator==(const TimePoint_T& x, const TimePoint_T& y)
{
return x.value() == y.value();
}
-template
+template
ACE_INLINE
bool
-operator!=(const TimePoint_T& x, const TimePoint_T& y)
+operator!=(const TimePoint_T& x, const TimePoint_T& y)
{
return x.value() != y.value();
}
diff --git a/dds/DCPS/TimeTypes.h b/dds/DCPS/TimeTypes.h
index 3b627108317..6404d2fc0f1 100644
--- a/dds/DCPS/TimeTypes.h
+++ b/dds/DCPS/TimeTypes.h
@@ -11,6 +11,8 @@
#include "TimeDuration.h"
#include "TimePoint_T.h"
+#include
+
#include
#include
@@ -29,7 +31,7 @@ namespace DCPS {
*/
///@{
typedef ACE_System_Time_Policy SystemClock;
-typedef TimePoint_T SystemTimePoint;
+typedef TimePoint_T SystemTimePoint;
///@}
/**
@@ -48,7 +50,7 @@ typedef ACE_Monotonic_Time_Policy MonotonicClock;
#else
typedef SystemClock MonotonicClock;
#endif
-typedef TimePoint_T MonotonicTimePoint;
+typedef TimePoint_T MonotonicTimePoint;
///@}
} // namespace DCPS
diff --git a/dds/DCPS/Time_Helper.h b/dds/DCPS/Time_Helper.h
index aa20ab12445..07874ae5434 100644
--- a/dds/DCPS/Time_Helper.h
+++ b/dds/DCPS/Time_Helper.h
@@ -12,6 +12,7 @@
#include
#include
+#include
#include