Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: tempate <[email protected]>
  • Loading branch information
Tempate committed Mar 19, 2024
1 parent dd4cd33 commit d38439b
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ struct SpecsConfiguration : public ddspipe::core::IConfiguration
//! Configuration of the DDS Pipe's Log consumers.
ddspipe::core::DdsPipeLogConfiguration log_configuration;

//! TODO
ddspipe::core::MonitorConfiguration monitor{};
//! Configuration of the DDS Pipe's Monitor.
ddspipe::core::MonitorConfiguration monitor_configuration{};
};

} /* namespace core */
Expand Down
2 changes: 0 additions & 2 deletions ddsrouter_test/compose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ set(TESTS
discovery_trigger/none
discovery_trigger/any/reader
discovery_trigger/any/writer

monitoring
)

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test_cases DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
Expand Down
51 changes: 0 additions & 51 deletions ddsrouter_test/compose/test_cases/monitoring/compose.yml

This file was deleted.

18 changes: 0 additions & 18 deletions ddsrouter_test/compose/test_cases/monitoring/ddsrouter.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion ddsrouter_yaml/src/cpp/YamlReader_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void YamlReader::fill(
// Get optional monitor tag
if (YamlReader::is_tag_present(yml, MONITOR_TAG))
{
object.monitor = YamlReader::get<core::MonitorConfiguration>(yml, MONITOR_TAG, version);
object.monitor_configuration = YamlReader::get<core::MonitorConfiguration>(yml, MONITOR_TAG, version);
}
}

Expand Down
7 changes: 6 additions & 1 deletion docs/rst/notes/forthcoming_version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
Forthcoming Version
###################

This release will include the following **Configuration features**:
The next release will include the following **Features**:

* Publish the :ref:`Logs <router_specs_logging>`.
* :ref:`Monitor <user_manual_configuration_specs_monitor>`.

The next release will include the following **Configuration features**:

* New configuration option ``logging`` to configure the :ref:`Logs <router_specs_logging>`.
6 changes: 3 additions & 3 deletions docs/rst/user_manual/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ Monitor
-------

``specs`` supports a ``monitor`` **optional** tag to publish internal data from the |ddsrouter|.
The monitor can be configured to publish this data on a ``domain``, under a ``topic-name``, once every ``period`` (in milliseconds).
The monitor publishes (and logs) the *DDS Router's* internal data on a ``domain``, under a ``topic-name``, once every ``period`` (in milliseconds).
If the monitor is not enabled, the |ddsrouter| will not collect or publish any data.

.. note::
Expand Down Expand Up @@ -545,8 +545,8 @@ The type of the data published is defined as follows:
monitor:
topics:
enable: true
domain: 10
period: 1000
domain: 10
topic-name: "DdsRouterTopicData"
Participant Configuration
Expand Down Expand Up @@ -1007,8 +1007,8 @@ A complete example of all the configurations described on this page can be found
monitor:
topics:
enable: true
domain: 10
period: 1000
domain: 10
topic-name: "DdsRouterTopicStatistics"
# XML configurations to load
Expand Down
8 changes: 5 additions & 3 deletions tools/ddsrouter_tool/src/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <ddspipe_core/logging/DdsLogConsumer.hpp>
#include <ddspipe_core/monitoring/Monitor.hpp>
#include <ddspipe_core/monitoring/producers/TopicsMonitorProducer.hpp>
#include <ddspipe_participants/xml/XmlHandler.hpp>

#include <ddsrouter_core/configuration/DdsRouterConfiguration.hpp>
Expand Down Expand Up @@ -232,10 +233,11 @@ int main(
commandline_args.reload_time);
}

// Monitoring
ddspipe::core::Monitor monitor{router_configuration.advanced_options.monitor};
// Monitor
auto monitor_configuration = router_configuration.advanced_options.monitor_configuration;
ddspipe::core::Monitor monitor{monitor_configuration};

if (router_configuration.advanced_options.monitor.producers["topics"].enabled)
if (monitor_configuration.producers[ddspipe::core::TOPICS_MONITOR_PRODUCER_ID].enabled)
{
monitor.monitor_topics();
}
Expand Down

0 comments on commit d38439b

Please sign in to comment.