@@ -28,6 +28,11 @@ namespace eprosima {
2828namespace ddsenabler {
2929namespace participants {
3030
31+
32+ /* ********************/
33+ /* DDS */
34+ /* ********************/
35+
3136/* *
3237 * @brief Struct that contains information about a DDS topic.
3338 *
@@ -49,57 +54,6 @@ struct TopicInfo
4954 std::string serialized_qos;
5055};
5156
52- /* *
53- * @brief Struct that contains information about a DDS service.
54- *
55- * This struct is used to encapsulate the request and reply topics of a DDS service.
56- */
57- struct ServiceInfo
58- {
59- ServiceInfo () = default ;
60-
61- ServiceInfo (
62- const TopicInfo& _request,
63- const TopicInfo& _reply)
64- : request(_request)
65- , reply(_reply)
66- {
67- }
68-
69- TopicInfo request;
70- TopicInfo reply;
71- };
72-
73- /* *
74- * @brief Struct that contains information about a DDS action.
75- *
76- * This struct is used to encapsulate the goal, result and cancel services as well as the feedback and status topics of a DDS action.
77- */
78- struct ActionInfo
79- {
80- ActionInfo () = default ;
81-
82- ActionInfo (
83- const ServiceInfo& _goal,
84- const ServiceInfo& _result,
85- const ServiceInfo& _cancel,
86- const TopicInfo& _feedback,
87- const TopicInfo& _status)
88- : goal(_goal)
89- , result(_result)
90- , cancel(_cancel)
91- , feedback(_feedback)
92- , status(_status)
93- {
94- }
95-
96- ServiceInfo goal;
97- ServiceInfo result;
98- ServiceInfo cancel;
99- TopicInfo feedback;
100- TopicInfo status;
101- };
102-
10357/* *
10458 * DdsLogFunc - callback executed when consuming log messages
10559 *
@@ -178,10 +132,31 @@ typedef bool (* DdsTopicQuery)(
178132 const char * topic_name,
179133 TopicInfo& topic_info);
180134
135+
181136/* *********************/
182137/* SERVICES */
183138/* *********************/
184139
140+ /* *
141+ * @brief Struct that contains information about a DDS service.
142+ *
143+ * This struct is used to encapsulate the request and reply topics of a DDS service.
144+ */
145+ struct ServiceInfo
146+ {
147+ ServiceInfo () = default ;
148+
149+ ServiceInfo (
150+ const TopicInfo& _request,
151+ const TopicInfo& _reply)
152+ : request(_request)
153+ , reply(_reply)
154+ {
155+ }
156+
157+ TopicInfo request;
158+ TopicInfo reply;
159+ };
185160
186161/* *
187162 * @brief Callback for notification of service discovery and its request and reply types.
@@ -230,13 +205,13 @@ typedef void (* ServiceReplyNotification)(
230205 int64_t publish_time);
231206
232207/* *
233- * @brief Callback requesting the type information of a given service's request and reply.
208+ * @brief Callback requesting the information of a given service's request and reply.
234209 *
235- * This callback is used to request the type information for a service's request and reply.
210+ * This callback is used to request the information for a service's request and reply.
236211 *
237- * @param [in] service_name The name of the service for which the type information is requested.
212+ * @param [in] service_name The name of the service for which the information is requested.
238213 * @param [out] service_info Information about the service, including request and reply types and their serialized QoS.
239- * @return \c true if the service was found and the type information was retrieved successfully, \c false otherwise.
214+ * @return \c true if the service was found and the information was retrieved successfully, \c false otherwise.
240215 */
241216typedef bool (* ServiceQuery)(
242217 const char * service_name,
@@ -247,6 +222,35 @@ typedef bool (* ServiceQuery)(
247222/* ACTIONS */
248223/* *********************/
249224
225+ /* *
226+ * @brief Struct that contains information about a DDS action.
227+ *
228+ * This struct is used to encapsulate the goal, result and cancel services as well as the feedback and status topics of a DDS action.
229+ */
230+ struct ActionInfo
231+ {
232+ ActionInfo () = default ;
233+
234+ ActionInfo (
235+ const ServiceInfo& _goal,
236+ const ServiceInfo& _result,
237+ const ServiceInfo& _cancel,
238+ const TopicInfo& _feedback,
239+ const TopicInfo& _status)
240+ : goal(_goal)
241+ , result(_result)
242+ , cancel(_cancel)
243+ , feedback(_feedback)
244+ , status(_status)
245+ {
246+ }
247+
248+ ServiceInfo goal;
249+ ServiceInfo result;
250+ ServiceInfo cancel;
251+ TopicInfo feedback;
252+ TopicInfo status;
253+ };
250254
251255/* *
252256 * @brief Callback for notification of action discovery and its associated types.
@@ -351,13 +355,13 @@ typedef void (* ActionResultNotification)(
351355 int64_t publish_time);
352356
353357/* *
354- * @brief Callback for requesting the action types .
358+ * @brief Callback for requesting action's information .
355359 *
356- * This callback is used to request the action types for a specific action.
360+ * This callback is used to request information about a specific action.
357361 *
358- * @param [in] action_name The name of the action for which the types are being requested.
362+ * @param [in] action_name The name of the action for which the information is being requested.
359363 * @param [out] action_info Information about the action, including goal, result, cancel, feedback, and status types and their serialized QoS.
360- * @return \c true if the action was found and the types were retrieved successfully, \c false otherwise.
364+ * @return \c true if the action was found and the information was retrieved successfully, \c false otherwise.
361365 */
362366typedef bool (* ActionQuery)(
363367 const char * action_name,
0 commit comments