Skip to content

Commit ae71ddf

Browse files
TMP: second attempt
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
1 parent ff7dfe9 commit ae71ddf

2 files changed

Lines changed: 26 additions & 16 deletions

File tree

ddsenabler/include/ddsenabler/DDSEnabler.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <ddsenabler_yaml/EnablerConfiguration.hpp>
4343

4444
#include <ddsenabler/CallbackSet.hpp>
45+
#include <ddsenabler/library/library_dll.h>
4546

4647
namespace eprosima {
4748
namespace ddsenabler {
@@ -61,6 +62,7 @@ class DDSEnabler
6162
* @param configuration: Structure encapsulating all enabler configuration options.
6263
* @param callbacks: Set of callbacks to be used by the enabler.
6364
*/
65+
DDSENABLER_DllAPI
6466
DDSEnabler(
6567
const yaml::EnablerConfiguration& configuration,
6668
const CallbackSet& callbacks);
@@ -72,6 +74,7 @@ class DDSEnabler
7274
*
7375
* @return \c true if operation was succesful, \c false otherwise.
7476
*/
77+
DDSENABLER_DllAPI
7578
bool set_file_watcher(
7679
const std::string& file_path);
7780

@@ -84,6 +87,7 @@ class DDSEnabler
8487
* @return \c RETCODE_NO_DATA if new allowed topics list is the same as the previous one
8588
* @return \c RETCODE_ERROR if any other error has occurred.
8689
*/
90+
DDSENABLER_DllAPI
8791
utils::ReturnCode reload_configuration(
8892
yaml::EnablerConfiguration& new_configuration);
8993

@@ -94,6 +98,7 @@ class DDSEnabler
9498
* @param json: The JSON message to publish.
9599
* @return \c true if the message was published successfully, \c false otherwise.
96100
*/
101+
DDSENABLER_DllAPI
97102
bool publish(
98103
const std::string& topic_name,
99104
const std::string& json);

ddsenabler/include/ddsenabler/dds_enabler_runner.hpp

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,38 @@
1919

2020
#pragma once
2121

22-
#include <memory>
23-
#include <string>
24-
25-
#include <cpp_utils/event/FileWatcherHandler.hpp>
26-
#include <cpp_utils/event/PeriodicEventHandler.hpp>
27-
#include <cpp_utils/exception/ConfigurationException.hpp>
28-
#include <cpp_utils/exception/InitializationException.hpp>
29-
#include <cpp_utils/logging/BaseLogConfiguration.hpp>
30-
#include <cpp_utils/logging/StdLogConsumer.hpp>
31-
#include <cpp_utils/ReturnCode.hpp>
32-
#include <cpp_utils/time/time_utils.hpp>
33-
34-
#include <ddspipe_core/logging/DdsLogConsumer.hpp>
35-
3622
#include <ddsenabler_yaml/EnablerConfiguration.hpp>
3723

3824
#include <ddsenabler/CallbackSet.hpp>
3925
#include <ddsenabler/DDSEnabler.hpp>
4026

27+
#include <ddsenabler/library/library_dll.h>
28+
4129
namespace eprosima {
4230
namespace ddsenabler {
4331

32+
/**
33+
* @brief Create a DDS Enabler instance from a configuration file path.
34+
*
35+
* @param configuration_path Path to the configuration file.
36+
* @param callbacks Set of callbacks to be used by the DDS Enabler.
37+
* @param enabler Output parameter to hold the created DDS Enabler instance.
38+
* @return true if the DDS Enabler was created successfully, false otherwise.
39+
*/
40+
DDSENABLER_DllAPI
4441
bool create_dds_enabler(
45-
const char* ddsEnablerConfigFile,
42+
const char* configuration_path,
4643
const CallbackSet& callbacks,
4744
std::shared_ptr<DDSEnabler>& enabler);
48-
45+
/**
46+
* @brief Create a DDS Enabler instance from a configuration object.
47+
*
48+
* @param configuration DDS Enabler configuration object.
49+
* @param callbacks Set of callbacks to be used by the DDS Enabler.
50+
* @param enabler Output parameter to hold the created DDS Enabler instance.
51+
* @return true if the DDS Enabler was created successfully, false otherwise.
52+
*/
53+
DDSENABLER_DllAPI
4954
bool create_dds_enabler(
5055
yaml::EnablerConfiguration configuration,
5156
const CallbackSet& callbacks,

0 commit comments

Comments
 (0)