1- // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
1+ // Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
1313// limitations under the License.
1414
1515/* *
16- * @file ServerAttributes.h
16+ * @file ServerAttributes.hpp
1717 *
1818 */
1919
2929#include < list>
3030
3131namespace eprosima {
32-
3332namespace fastdds {
3433namespace rtps {
34+
3535class ParticipantProxyData ;
3636
3737/* *
@@ -43,27 +43,27 @@ class RemoteServerAttributes
4343{
4444public:
4545
46- FASTDDS_EXPORTED_API inline bool operator ==(
46+ inline bool operator ==(
4747 const RemoteServerAttributes& r) const
4848 {
4949 return guidPrefix == r.guidPrefix
5050 && metatrafficUnicastLocatorList == r.metatrafficUnicastLocatorList
5151 && metatrafficMulticastLocatorList == r.metatrafficMulticastLocatorList ;
5252 }
5353
54- FASTDDS_EXPORTED_API void clear ()
54+ void clear ()
5555 {
5656 guidPrefix = fastdds::rtps::GuidPrefix_t::unknown ();
5757 metatrafficUnicastLocatorList.clear ();
5858 metatrafficMulticastLocatorList.clear ();
5959 }
6060
61- FASTDDS_EXPORTED_API fastdds::rtps::GUID_t GetParticipant () const ;
61+ fastdds::rtps::GUID_t GetParticipant () const ;
6262
63- FASTDDS_EXPORTED_API fastdds::rtps::GUID_t GetPDPReader () const ;
64- FASTDDS_EXPORTED_API fastdds::rtps::GUID_t GetPDPWriter () const ;
63+ fastdds::rtps::GUID_t GetPDPReader () const ;
64+ fastdds::rtps::GUID_t GetPDPWriter () const ;
6565
66- FASTDDS_EXPORTED_API inline bool ReadguidPrefix (
66+ inline bool ReadguidPrefix (
6767 const char * pfx)
6868 {
6969 return bool (std::istringstream (pfx) >> guidPrefix);
@@ -92,8 +92,8 @@ typedef std::list<RemoteServerAttributes> RemoteServerList_t;
9292template <class charT >
9393struct server_ostream_separators
9494{
95- FASTDDS_EXPORTED_API static const charT* list_separator;
96- FASTDDS_EXPORTED_API static const charT* locator_separator;
95+ static const charT* list_separator;
96+ static const charT* locator_separator;
9797};
9898
9999#ifndef _MSC_VER
@@ -133,12 +133,8 @@ std::basic_ostream<charT>& operator <<(
133133 return output;
134134}
135135
136- // port used if the ros environment variable doesn't specify one
137- constexpr uint16_t DEFAULT_ROS2_SERVER_PORT = 11811 ;
138- // default server base guidPrefix
136+ // Default server base guidPrefix
139137const char * const DEFAULT_ROS2_SERVER_GUIDPREFIX = " 44.53.00.5f.45.50.52.4f.53.49.4d.41" ;
140- // port used by default for tcp transport
141- constexpr uint16_t DEFAULT_TCP_SERVER_PORT = 42100 ;
142138
143139/* Environment variable to specify a semicolon-separated list of locators ([transport]ip:port) that define remote server
144140 * locators. The [transport] specification is optional. The default transport is UDPv4.
@@ -166,7 +162,7 @@ const char* const ROS_SUPER_CLIENT = "ROS_SUPER_CLIENT";
166162 * @param[out] servers_list reference to a LocatorList_t to populate.
167163 * @return true if parsing succeeds, false otherwise (or if the list is empty)
168164 */
169- FASTDDS_EXPORTED_API bool load_environment_server_info (
165+ bool load_environment_server_info (
170166 const std::string& list,
171167 LocatorList& servers_list);
172168
@@ -181,30 +177,20 @@ FASTDDS_EXPORTED_API bool load_environment_server_info(
181177 * @param[out] servers_list reference to a LocatorList_t to populate.
182178 * @return true if parsing succeeds, false otherwise
183179 */
184- FASTDDS_EXPORTED_API bool load_environment_server_info (
180+ bool load_environment_server_info (
185181 LocatorList& servers_list);
186182
187183/* *
188184 * Get the value of environment variable DEFAULT_ROS2_MASTER_URI
189185 * @return The value of environment variable DEFAULT_ROS2_MASTER_URI. Empty string if the variable is not defined.
190186 */
191- FASTDDS_EXPORTED_API const std::string& ros_discovery_server_env ();
187+ const std::string& ros_discovery_server_env ();
192188
193189/* *
194190 * Get the value of environment variable ROS_SUPER_CLIENT
195191 * @return The value of environment variable ROS_SUPER_CLIENT. False if the variable is not defined.
196192 */
197- FASTDDS_EXPORTED_API bool ros_super_client_env ();
198-
199- /* *
200- * Returns the guidPrefix associated to the given server id
201- * @param[in] id of the default server whose guidPrefix we want to retrieve
202- * @param[out] guid reference to the guidPrefix to modify
203- * @return true if the server guid can be delivered
204- */
205- FASTDDS_EXPORTED_API bool get_server_client_default_guidPrefix (
206- int id,
207- fastdds::rtps::GuidPrefix_t& guid);
193+ bool ros_super_client_env ();
208194
209195} // rtps
210196} // fastdds
0 commit comments