Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into igtd/cmake-cxx-std
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Apr 11, 2024
2 parents 3b1cf38 + a42aca9 commit a6b01d0
Show file tree
Hide file tree
Showing 91 changed files with 2,899 additions and 1,857 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/Wireshark_CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"generator": "Ninja",
"binaryDir": "$env{WIRESHARK_BUILD_DIR}",
"cacheVariables": {
"BUILD_wireshark": "OFF",
"MAKENSIS_EXECUTABLE": "OFF",
"WIX_CANDLE_EXECUTABLE": "OFF",
"LEX_EXECUTABLE": "$env{WINFLEXBISON_ROOT}/bin/Debug/win_flex.exe"
}
}
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,7 @@ jobs:
- name: configure OpenDDS
run: |
cd OpenDDS
./configure --compiler=g++-11 --std=c++20 --no-inline --tests --rapidjson --ace=$GITHUB_WORKSPACE/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC
./configure --compiler=g++-11 --std=c++20 --no-inline --tests --rapidjson --boottime --ace=$GITHUB_WORKSPACE/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC
- name: check build configuration
shell: bash
run: |
Expand Down Expand Up @@ -9618,17 +9618,6 @@ jobs:
with:
path: ${{ github.job }}.tar.xz
key: c02_${{ github.job }}_${{ env.WIRESHARK_COMMIT }}_${{ env.COMPILER_VERSION }}
- name: setup for run-vcpkg
shell: bash
run: |
echo '{ "name": "opendds", "version-string": "github-actions", "dependencies": [ "qt5-winextras", "qt5-tools", "qt5-svg", "qt5-multimedia", "qt5-declarative" ] }' > vcpkg.json
- name: install vcpkg packages
if: steps.cache-artifact.outputs.cache-hit != 'true'
id: runvcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '${{ env.VCPKG_GIT_COMMIT }}'
runVcpkgInstall: true
- name: checkout WinFlexBison
if: steps.cache-artifact.outputs.cache-hit != 'true'
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
-DCMAKE_UNITY_BUILD=TRUE \
-DBUILD_SHARED_LIBS=TRUE \
-DCMAKE_BUILD_TYPE=Debug \
-DOPENDDS_BOOTTIME_TIMERS=TRUE \
-DOPENDDS_SECURITY=TRUE \
-DOPENDDS_ACE_TAO_SRC=$GITHUB_WORKSPACE/OpenDDS/build/ACE_TAO \
-DOPENDDS_MPC=$GITHUB_WORKSPACE/MPC \
Expand Down
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Read [the documentation for this release on Read the Docs](https://opendds.readt
### Fixes

- Updated the [read](https://opendds.readthedocs.io/en/dds-3.27/devguide/xtypes.html#xtypes-interpreting-data-samples-with-dynamicdata) and [write](https://opendds.readthedocs.io/en/dds-3.27/devguide/xtypes.html#xtypes-populating-data-samples-with-dynamicdata) semantics of DynamicData for union, expandable collections (sequence and string), and optional member of an aggregated type. ([PR #4278](https://github.com/OpenDDS/OpenDDS/pull/4278))
- Fixed memory leak where instances were not cleaned up with exlusive ownership. ([PR #4343](https://github.com/OpenDDS/OpenDDS/pull/4343))
- Fixed memory leak where instances were not cleaned up with exclusive ownership. ([PR #4343](https://github.com/OpenDDS/OpenDDS/pull/4343))
- Removed the special handling for sequence members with length code of 5,6, or 7. ([PR #4376](https://github.com/OpenDDS/OpenDDS/pull/4376))
- Reading data from a dynamic data object for a primitive type now must use MEMBER_ID_INVALID id. ([PR #4376](https://github.com/OpenDDS/OpenDDS/pull/4376))
- Reading data from a dynamic data object for a primitive type now must use `MEMBER_ID_INVALID` id. ([PR #4376](https://github.com/OpenDDS/OpenDDS/pull/4376))
- `create_datawriter` and `create_datareader` check if the topic belongs to the same participant as the publisher/subscriber. ([PR #4398](https://github.com/OpenDDS/OpenDDS/pull/4398))
- Fixed uninitialized `durability_service` in Topic QoS when using QoS-XML. ([PR #4424](https://github.com/OpenDDS/OpenDDS/pull/4424))
- Fixed a bug where compiling IDL with `-Lc++11 -Gequality` produced code outside of a namespace that didn't compile. ([PR #4450](https://github.com/OpenDDS/OpenDDS/pull/4450))
Expand Down Expand Up @@ -105,7 +105,7 @@ Read [the documentation for this release on Read the Docs](https://opendds.readt

### Documentation

* Remove -Grapidjson flag [opendds_idl] ([PR #4231](https://github.com/OpenDDS/OpenDDS/pull/4231))
* Removed documentation for `-Grapidjson` option of `opendds_idl` that was removed in 3.20.0 ([PR #4231](https://github.com/OpenDDS/OpenDDS/pull/4231))
* Remove reference to mailing lists ([PR #4234](https://github.com/OpenDDS/OpenDDS/pull/4234))
* Restructured parts of [DDS Security](https://opendds.readthedocs.io/en/dds-3.26/devguide/dds_security.html#dds-security) page and expanded documentation of some XML security document elements. ([PR #4281](https://github.com/OpenDDS/OpenDDS/pull/4281))
* OS-specific instructions will now be automatically selected based on the browser's user agent. ([PR #4281](https://github.com/OpenDDS/OpenDDS/pull/4281))
Expand Down
1 change: 1 addition & 0 deletions cmake/init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ _opendds_feature(SECURITY OFF CONFIG DOC "Build with RTPS Security support")
_opendds_feature(SAFETY_PROFILE OFF CONFIG MPC_INVERTED_NAME no_opendds_safety_profile
DOC "Build using Safety Profile (Not for CMake-built OpenDDS)")
_opendds_feature(COVERAGE OFF MPC_INVERTED_NAME dds_non_coverage)
_opendds_feature(BOOTTIME_TIMERS OFF CONFIG DOC "Use CLOCK_BOOTTIME for timers")

# ACE Features
_opendds_feature(VERSIONED_NAMESPACE OFF MPC DOC "Namespaces include versions")
Expand Down
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ my @specs = # Array of array-refs, each inner array is an option group which
'macros=s@', 'Extra text for platform_macros.GNU',
'features=s@', 'Extra text for default.features',
'mpcopts=s@', 'Extra command-line args for MPC',
'boottime!', 'Use CLOCK_BOOTTIME for timers (no)',
],
['Optional dependencies for OpenDDS (disabled by default unless noted otherwise):',
'java:s', 'Java development kit (use JAVA_HOME)',
Expand Down Expand Up @@ -1361,6 +1362,7 @@ sub write_opendds_configh {

my %config = (
'OPENDDS_CONFIG_AUTO_STATIC_INCLUDES' => 0,
'OPENDDS_CONFIG_BOOTTIME_TIMERS' => $opts{'boottime'} // 0,
);

my $replace_value = sub {
Expand Down
4 changes: 4 additions & 0 deletions dds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ add_library(OpenDDS_Dcps
DCPS/MessageBlock.cpp
DCPS/MessageTracker.cpp
DCPS/MonitorFactory.cpp
DCPS/MultiTask.cpp
DCPS/MultiTopicDataReaderBase.cpp
DCPS/MultiTopicImpl.cpp
DCPS/MulticastManager.cpp
Expand All @@ -65,6 +66,7 @@ add_library(OpenDDS_Dcps
DCPS/Observer.cpp
DCPS/OwnershipManager.cpp
DCPS/PeriodicEvent.cpp
DCPS/PeriodicTask.cpp
DCPS/PublisherImpl.cpp
DCPS/Qos_Helper.cpp
DCPS/QueryConditionImpl.cpp
Expand All @@ -91,6 +93,7 @@ add_library(OpenDDS_Dcps
DCPS/ServiceEventDispatcher.cpp
DCPS/Service_Participant.cpp
DCPS/SporadicEvent.cpp
DCPS/SporadicTask.cpp
DCPS/StaticDiscovery.cpp
DCPS/StatusConditionImpl.cpp
DCPS/SubscriberImpl.cpp
Expand All @@ -99,6 +102,7 @@ add_library(OpenDDS_Dcps
DCPS/ThreadStatusManager.cpp
DCPS/TimeDuration.cpp
DCPS/Time_Helper.cpp
DCPS/Timers.cpp
DCPS/TopicDescriptionImpl.cpp
DCPS/TopicImpl.cpp
DCPS/Transient_Kludge.cpp
Expand Down
6 changes: 0 additions & 6 deletions dds/DCPS/DataCollector_T.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ OPENDDS_END_VERSIONED_NAMESPACE_DECL
#include "DataCollector_T.inl"
#endif /* __ACE_INLINE__ */

#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "DataCollector_T.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("DataCollector_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */

#endif /* DATA_COLLECTOR_H */
9 changes: 1 addition & 8 deletions dds/DCPS/DataReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3231,15 +3231,8 @@ DataReaderImpl::add_link(const DataLink_rch& link, const GUID_t& peer)
}
}
TransportClient::add_link(link, peer);
OPENDDS_STRING type;
{
TransportImpl_rch impl = link->impl();
if (impl) {
type = impl->transport_type();
}
}

if (type == "rtps_udp" || type == "multicast") {
if (!link->uses_end_historic_control_messages()) {
resume_sample_processing(peer);
}
}
Expand Down
4 changes: 4 additions & 0 deletions dds/DCPS/Definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
# define OPENDDS_DO_MANUAL_STATIC_INCLUDES 0
#endif

#ifndef OPENDDS_CONFIG_BOOTTIME_TIMERS
# define OPENDDS_CONFIG_BOOTTIME_TIMERS 0
#endif

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL

namespace OpenDDS {
Expand Down
92 changes: 92 additions & 0 deletions dds/DCPS/MultiTask.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/

#include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/

#include "MultiTask.h"

#include "Timers.h"

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL

namespace OpenDDS {
namespace DCPS {

void MultiTask::enable(const TimeDuration& delay)
{
bool worth_passing_along = false;
{
ACE_Guard<ACE_Thread_Mutex> guard(mutex_);
worth_passing_along = (timer_ == Timers::InvalidTimerId) ||
((MonotonicTimePoint::now() + delay + cancel_estimate_) < next_time_);
}
if (worth_passing_along) {
RcHandle<ReactorInterceptor> interceptor = interceptor_.lock();
if (interceptor) {
interceptor->execute_or_enqueue(make_rch<ScheduleEnableCommand>(rchandle_from(this), delay));
}
}
}

void MultiTask::enable_i(const TimeDuration& per)
{
ACE_Guard<ACE_Thread_Mutex> guard(mutex_);
const MonotonicTimePoint now = MonotonicTimePoint::now();
if (timer_ == Timers::InvalidTimerId) {
timer_ = Timers::schedule(reactor(), *this, 0, per, delay_);

if (timer_ == Timers::InvalidTimerId) {
if (log_level >= LogLevel::Error) {
ACE_ERROR((LM_ERROR, "(%P|%t) MultiTask::enable_i: "
"failed to schedule timer %p\n", ACE_TEXT("")));
}
} else {
next_time_ = now + per;
}
} else {
const MonotonicTimePoint estimated_next_time = now + per + cancel_estimate_;
if (estimated_next_time < next_time_) {
Timers::cancel(reactor(), timer_);
const MonotonicTimePoint now2 = MonotonicTimePoint::now();
timer_ = Timers::schedule(reactor(), *this, 0, per, delay_);
cancel_estimate_ = now2 - now;

if (timer_ == Timers::InvalidTimerId) {
if (log_level >= LogLevel::Error) {
ACE_ERROR((LM_ERROR, "(%P|%t) MultiTask::enable_i: "
"failed to reschedule timer %p\n", ACE_TEXT("")));
}
} else {
next_time_ = now2 + per;
}
}
}
}

int MultiTask::handle_timeout(const ACE_Time_Value& tv, const void*)
{
ThreadStatusManager::Event ev(TheServiceParticipant->get_thread_status_manager());

const MonotonicTimePoint now(tv);
{
ACE_Guard<ACE_Thread_Mutex> guard(mutex_);
next_time_ = now + delay_;
}
execute(now);
return 0;
}

void MultiTask::disable_i()
{
ACE_Guard<ACE_Thread_Mutex> guard(mutex_);
if (timer_ != Timers::InvalidTimerId) {
Timers::cancel(reactor(), timer_);
timer_ = Timers::InvalidTimerId;
}
}

}
}
OPENDDS_END_VERSIONED_NAMESPACE_DECL
Loading

0 comments on commit a6b01d0

Please sign in to comment.