Skip to content

Commit edb152b

Browse files
Core: Final API renaming for 5.12
* Core: Final API renaming for 5.12 GetTopicInformation -> GetDataTypeInformation SetTopicInformation -> SetDataTypeInformation SDataTypeInformation * rename monitoring struct header to ecal/types/monitoring.h
1 parent 579644a commit edb152b

File tree

66 files changed

+667
-661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+667
-661
lines changed

app/mon/mon_cli/src/ecal_mon_cli.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ void ProcProto(const std::string& topic_name, int msg_count)
352352
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
353353

354354
// get topic type
355-
eCAL::STopicInformation topic_info;
356-
eCAL::Util::GetTopicInformation(topic_name, topic_info);
357-
if(topic_info.type.empty())
355+
eCAL::SDataTypeInformation topic_info;
356+
eCAL::Util::GetTopicDataTypeInformation(topic_name, topic_info);
357+
if(topic_info.name.empty())
358358
{
359-
std::cout << "could not get type for topic " << topic_name << std::endl;
359+
std::cout << "could not get type name for topic " << topic_name << std::endl;
360360
return;
361361
}
362362

app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
8484
{
8585
// When the monitor didn't tell us the topic encoding, we ask eCAL::Util instead
8686
// Why this logic only for type, not descriptor? (and thus encoding?)
87-
const std::string monitor_topic_encoding = topic_.tinfo().encoding();
87+
const std::string monitor_topic_encoding = topic_.tdatatype().encoding();
8888
if (!monitor_topic_encoding.empty())
8989
{
9090
return monitor_topic_encoding.c_str();
@@ -94,8 +94,8 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
9494
const std::string monitor_topic_name = topic_.tname();
9595
if (!monitor_topic_name.empty())
9696
{
97-
eCAL::STopicInformation topic_info;
98-
eCAL::Util::GetTopicInformation(monitor_topic_name, topic_info);
97+
eCAL::SDataTypeInformation topic_info;
98+
eCAL::Util::GetTopicDataTypeInformation(monitor_topic_name, topic_info);
9999
return topic_info.encoding.c_str();
100100
}
101101
}
@@ -104,7 +104,7 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
104104
{
105105
// When the monitor didn't tell us the topic type, we ask eCAL::Util instead
106106
// Why this logic only for type, not descriptor? (and thus encoding?)
107-
const std::string monitor_topic_type = topic_.tinfo().type();
107+
const std::string monitor_topic_type = topic_.tdatatype().name();
108108
if (!monitor_topic_type.empty())
109109
{
110110
return monitor_topic_type.c_str();
@@ -114,15 +114,15 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
114114
const std::string monitor_topic_name = topic_.tname();
115115
if (!monitor_topic_name.empty())
116116
{
117-
eCAL::STopicInformation topic_info;
118-
eCAL::Util::GetTopicInformation(monitor_topic_name, topic_info);
119-
return topic_info.type.c_str();
117+
eCAL::SDataTypeInformation topic_info;
118+
eCAL::Util::GetTopicDataTypeInformation(monitor_topic_name, topic_info);
119+
return topic_info.name.c_str();
120120
}
121121
}
122122
}
123123
else if (column == Columns::TDESC)
124124
{
125-
return topic_.tinfo().desc().c_str();
125+
return topic_.tdatatype().desc().c_str();
126126
}
127127
else if (column == Columns::TQOS)
128128
{

ecal/core/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,6 @@ set(ecal_header_cmn
325325
include/ecal/ecal_log.h
326326
include/ecal/ecal_log_level.h
327327
include/ecal/ecal_monitoring.h
328-
include/ecal/ecal_monitoring_entity.h
329-
include/ecal/ecal_monitoring_struct.h
330328
include/ecal/ecal_os.h
331329
include/ecal/ecal_payload_writer.h
332330
include/ecal/ecal_process.h
@@ -345,7 +343,8 @@ set(ecal_header_cmn
345343
include/ecal/ecal_util.h
346344
include/ecal/ecalc.h
347345
include/ecal/ecalc_types.h
348-
include/ecal/types/topic_information.h
346+
include/ecal/ecal_types.h
347+
include/ecal/types/monitoring.h
349348
)
350349

351350
set(ecal_header_cimpl

ecal/core/include/ecal/ecal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include <ecal/ecal_log.h>
3636
#include <ecal/ecal_process.h>
3737
#include <ecal/ecal_monitoring.h>
38-
#include <ecal/ecal_monitoring_struct.h>
3938
#include <ecal/ecal_publisher.h>
4039
#include <ecal/ecal_qos.h>
4140
#include <ecal/ecal_server.h>

ecal/core/include/ecal/ecal_callback.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include <ecal/ecal_deprecate.h>
2828
#include <ecal/cimpl/ecal_callback_cimpl.h>
29-
#include <ecal/types/topic_information.h>
29+
#include <ecal/ecal_types.h>
3030

3131
#include <functional>
3232
#include <string>
@@ -64,15 +64,15 @@ namespace eCAL
6464
time = 0;
6565
clock = 0;
6666
};
67-
eCAL_Publisher_Event type; //!< publisher event type
68-
long long time; //!< publisher event time in µs
69-
long long clock; //!< publisher event clock
70-
std::string tid; //!< topic id of the of the connected subscriber (for pub_event_update_connection only)
71-
ECAL_DEPRECATE_SINCE_5_13("Use the separate infos encoding and type in member tinfo instead of ttype.")
72-
std::string ttype; //!< topic type information of the connected publisher (for sub_event_update_connection only)
73-
ECAL_DEPRECATE_SINCE_5_13("Use the tinfo.descriptor instead of tdesc.")
74-
std::string tdesc; //!< topic descriptor information of the connected publisher (for sub_event_update_connection only)
75-
STopicInformation tinfo; //!< topic information of the connected subscriber (for pub_event_update_connection only)
67+
eCAL_Publisher_Event type; //!< publisher event type
68+
long long time; //!< publisher event time in µs
69+
long long clock; //!< publisher event clock
70+
std::string tid; //!< topic id of the of the connected subscriber (for pub_event_update_connection only)
71+
ECAL_DEPRECATE_SINCE_5_13("Use the separate infos encoding and type in member tdatatype instead of ttype.")
72+
std::string ttype; //!< topic type information of the connected publisher (for sub_event_update_connection only)
73+
ECAL_DEPRECATE_SINCE_5_13("Use the tdatatype.descriptor instead of tdesc.")
74+
std::string tdesc; //!< topic descriptor information of the connected publisher (for sub_event_update_connection only)
75+
SDataTypeInformation tdatatype; //!< datatype description of the connected subscriber (for pub_event_update_connection only)
7676
};
7777

7878
/**
@@ -86,15 +86,15 @@ namespace eCAL
8686
time = 0;
8787
clock = 0;
8888
};
89-
eCAL_Subscriber_Event type; //!< subscriber event type
90-
long long time; //!< subscriber event time in µs
91-
long long clock; //!< subscriber event clock
92-
std::string tid; //!< topic id of the of the connected publisher (for sub_event_update_connection only)
93-
ECAL_DEPRECATE_SINCE_5_13("Use the separate infos encoding and type in member tinfo instead of ttype.")
94-
std::string ttype; //!< topic type information of the connected publisher (for sub_event_update_connection only)
95-
ECAL_DEPRECATE_SINCE_5_13("Use the tinfo.descriptor instead of tdesc.")
96-
std::string tdesc; //!< topic descriptor information of the connected publisher (for sub_event_update_connection only)
97-
STopicInformation tinfo; //!< topic information of the connected subscriber (for pub_event_update_connection only)
89+
eCAL_Subscriber_Event type; //!< subscriber event type
90+
long long time; //!< subscriber event time in µs
91+
long long clock; //!< subscriber event clock
92+
std::string tid; //!< topic id of the of the connected publisher (for sub_event_update_connection only)
93+
ECAL_DEPRECATE_SINCE_5_13("Use the separate infos encoding and type in member tdatatype instead of ttype.")
94+
std::string ttype; //!< topic type information of the connected publisher (for sub_event_update_connection only)
95+
ECAL_DEPRECATE_SINCE_5_13("Use the tdatatype.descriptor instead of tdesc.")
96+
std::string tdesc; //!< topic descriptor information of the connected publisher (for sub_event_update_connection only)
97+
SDataTypeInformation tdatatype; //!< topic information of the connected subscriber (for pub_event_update_connection only)
9898
};
9999

100100
/**

ecal/core/include/ecal/ecal_monitoring.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include <ecal/ecal_os.h>
2828
#include <ecal/ecal_deprecate.h>
29-
#include <ecal/ecal_monitoring_entity.h>
29+
#include <ecal/types/monitoring.h>
3030
#include <string>
3131

3232
namespace eCAL
@@ -78,6 +78,17 @@ namespace eCAL
7878
* @return Zero if succeeded.
7979
**/
8080
ECAL_API int GetMonitoring(std::string& mon_, unsigned int entities_);
81+
82+
/**
83+
* @brief Get monitoring as a struct.
84+
*
85+
* @param [out] mon_ Target struct to store monitoring information.
86+
* @param entities_ Entities definition.
87+
*
88+
* @return Number of struct elements if succeeded.
89+
**/
90+
ECAL_API int GetMonitoring(eCAL::Monitoring::SMonitoring& mon_, unsigned int entities_ = Entity::All);
91+
8192

8293
/**
8394
* @brief Get logging as serialized protobuf string.

ecal/core/include/ecal/ecal_monitoring_entity.h

Lines changed: 0 additions & 50 deletions
This file was deleted.

ecal/core/include/ecal/ecal_publisher.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <ecal/ecal_payload_writer.h>
3131
#include <ecal/ecal_qos.h>
3232
#include <ecal/ecal_tlayer.h>
33-
#include <ecal/types/topic_information.h>
33+
#include <ecal/ecal_types.h>
3434

3535
#include <chrono>
3636
#include <memory>
@@ -86,7 +86,7 @@ namespace eCAL
8686
* @param topic_type_ Type name.
8787
* @param topic_desc_ Type description (optional).
8888
**/
89-
ECAL_DEPRECATE_SINCE_5_13("Please use the constructor CPublisher(const std::string& topic_name_, const STopicInformation& topic_info_) instead. This function will be removed in eCAL6.")
89+
ECAL_DEPRECATE_SINCE_5_13("Please use the constructor CPublisher(const std::string& topic_name_, const SDataTypeInformation& topic_info_) instead. This function will be removed in eCAL6.")
9090
ECAL_API CPublisher(const std::string& topic_name_, const std::string& topic_type_, const std::string& topic_desc_ = "");
9191

9292
/**
@@ -95,7 +95,7 @@ namespace eCAL
9595
* @param topic_name_ Unique topic name.
9696
* @param topic_info_ Topic information (encoding, type, descriptor)
9797
**/
98-
ECAL_API CPublisher(const std::string& topic_name_, const STopicInformation& topic_info_);
98+
ECAL_API CPublisher(const std::string& topic_name_, const SDataTypeInformation& topic_info_);
9999

100100
/**
101101
* @brief Constructor.
@@ -139,7 +139,7 @@ namespace eCAL
139139
*
140140
* @return True if it succeeds, false if it fails.
141141
**/
142-
ECAL_DEPRECATE_SINCE_5_13("Please use the create method bool Create(const std::string& topic_name_, const STopicInformation& topic_info_) instead. This function will be removed in eCAL6.")
142+
ECAL_DEPRECATE_SINCE_5_13("Please use the create method bool Create(const std::string& topic_name_, const SDataTypeInformation& topic_info_) instead. This function will be removed in eCAL6.")
143143
ECAL_API bool Create(const std::string& topic_name_, const std::string& topic_type_, const std::string& topic_desc_ = "");
144144

145145
/**
@@ -150,7 +150,7 @@ namespace eCAL
150150
*
151151
* @return True if it succeeds, false if it fails.
152152
**/
153-
ECAL_API bool Create(const std::string& topic_name_, const STopicInformation& topic_info_);
153+
ECAL_API bool Create(const std::string& topic_name_, const SDataTypeInformation& topic_info_);
154154

155155
/**
156156
* @brief Creates this object.
@@ -162,10 +162,9 @@ namespace eCAL
162162
**/
163163
ECAL_API bool Create(const std::string& topic_name_)
164164
{
165-
return Create(topic_name_, STopicInformation());
165+
return Create(topic_name_, SDataTypeInformation());
166166
}
167167

168-
169168
/**
170169
* @brief Destroys this object.
171170
*
@@ -180,7 +179,7 @@ namespace eCAL
180179
*
181180
* @return True if it succeeds, false if it fails.
182181
**/
183-
ECAL_DEPRECATE_SINCE_5_13("Please use the method bool SetTopicInformation(const STopicInformation& topic_info_) instead. This function will be removed in eCAL6")
182+
ECAL_DEPRECATE_SINCE_5_13("Please use the method bool SetDataTypeInformation(const SDataTypeInformation& topic_info_) instead. This function will be removed in eCAL6")
184183
ECAL_API bool SetTypeName(const std::string& topic_type_name_);
185184

186185
/**
@@ -190,7 +189,7 @@ namespace eCAL
190189
*
191190
* @return True if it succeeds, false if it fails.
192191
**/
193-
ECAL_DEPRECATE_SINCE_5_13("Please use the method bool SetTopicInformation(const STopicInformation& topic_info_) instead. This function will be removed in eCAL6")
192+
ECAL_DEPRECATE_SINCE_5_13("Please use the method bool SetDataTypeInformation(const SDataTypeInformation& topic_info_) instead. This function will be removed in eCAL6")
194193
ECAL_API bool SetDescription(const std::string& topic_desc_);
195194

196195
/**
@@ -200,7 +199,7 @@ namespace eCAL
200199
*
201200
* @return True if it succeeds, false if it fails.
202201
**/
203-
ECAL_API bool SetTopicInformation(const STopicInformation& topic_info_);
202+
ECAL_API bool SetDataTypeInformation(const SDataTypeInformation& topic_info_);
204203

205204
/**
206205
* @brief Sets publisher attribute.
@@ -507,23 +506,23 @@ namespace eCAL
507506
*
508507
* @return The type name.
509508
**/
510-
ECAL_DEPRECATE_SINCE_5_13("Please use the method STopicInformation GetTopicInformation() instead. You can extract the typename from the STopicInformation variable. This function will be removed in eCAL6.")
509+
ECAL_DEPRECATE_SINCE_5_13("Please use the method SDataTypeInformation GetDataTypeInformation() instead. You can extract the typename from the STopicInformation variable. This function will be removed in eCAL6.")
511510
ECAL_API std::string GetTypeName() const;
512511

513512
/**
514513
* @brief Gets description of the connected topic.
515514
*
516515
* @return The description.
517516
**/
518-
ECAL_DEPRECATE_SINCE_5_13("Please use the method STopicInformation GetTopicInformation() instead. You can extract the descriptor from the STopicInformation variable. This function will be removed in eCAL6.")
517+
ECAL_DEPRECATE_SINCE_5_13("Please use the method SDataTypeInformation GetDataTypeInformation() instead. You can extract the descriptor from the STopicInformation variable. This function will be removed in eCAL6.")
519518
ECAL_API std::string GetDescription() const;
520519

521520
/**
522521
* @brief Gets description of the connected topic.
523522
*
524523
* @return The topic information.
525524
**/
526-
ECAL_API STopicInformation GetTopicInformation() const;
525+
ECAL_API SDataTypeInformation GetDataTypeInformation() const;
527526

528527
/**
529528
* @brief Dump the whole class state into a string.
@@ -537,7 +536,7 @@ namespace eCAL
537536
protected:
538537
void InitializeQOS();
539538
void InitializeTLayer();
540-
bool ApplyTopicToDescGate(const std::string& topic_name_, const STopicInformation& topic_info_);
539+
bool ApplyTopicToDescGate(const std::string& topic_name_, const SDataTypeInformation& topic_info_);
541540

542541
// class members
543542
std::shared_ptr<CDataWriter> m_datawriter;

ecal/core/include/ecal/ecal_server.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#pragma once
2626

27+
#include <ecal/ecal_deprecate.h>
2728
#include <ecal/ecal_os.h>
2829
#include <ecal/ecal_callback.h>
2930
#include <ecal/ecal_service_info.h>

0 commit comments

Comments
 (0)