Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches

Class XMLProfileManager, used to make available profiles from XML file. More...

#include <XMLProfileManager.h>

Static Public Member Functions

static RTPS_DllAPI void loadDefaultXMLFile ()
 Load the default profiles XML file.
 
static RTPS_DllAPI XMLP_ret loadXMLFile (const std::string &filename)
 Load a profiles XML file.
 
static RTPS_DllAPI XMLP_ret loadXMLString (const char *data, size_t length)
 Load a profiles XML string.
 
static RTPS_DllAPI XMLP_ret loadXMLNode (tinyxml2::XMLDocument &doc)
 Load a profiles XML node.
 
static RTPS_DllAPI XMLP_ret loadXMLProfiles (tinyxml2::XMLElement &profiles)
 Load a profiles XML node.
 
static RTPS_DllAPI XMLP_ret loadXMLDynamicTypes (tinyxml2::XMLElement &types)
 Load a dynamic types XML node.
 
static RTPS_DllAPI void library_settings (const LibrarySettingsAttributes &library_settings)
 Library settings setter.
 
static RTPS_DllAPI const LibrarySettingsAttributeslibrary_settings ()
 Library settings getter.
 
static RTPS_DllAPI XMLP_ret fillParticipantAttributes (const std::string &profile_name, ParticipantAttributes &atts, bool log_error=true)
 Search for the profile specified and fill the structure.
 
static RTPS_DllAPI void getDefaultParticipantAttributes (ParticipantAttributes &participant_attributes)
 Fills participant_attributes with the default values.
 
static RTPS_DllAPI XMLP_ret fillDomainParticipantFactoryQos (const std::string &profile_name, fastdds::dds::DomainParticipantFactoryQos &qos, bool log_error=true)
 Search for the profile specified and fill the structure.
 
static RTPS_DllAPI void getDefaultDomainParticipantFactoryQos (fastdds::dds::DomainParticipantFactoryQos &qos)
 Fills input domain participant factory qos with the default values.
 
static RTPS_DllAPI XMLP_ret fillPublisherAttributes (const std::string &profile_name, PublisherAttributes &atts, bool log_error=true)
 Search for the profile specified and fill the structure.
 
static RTPS_DllAPI void getDefaultPublisherAttributes (PublisherAttributes &publisher_attributes)
 Fills publisher_attributes with the default values.
 
static RTPS_DllAPI XMLP_ret fillSubscriberAttributes (const std::string &profile_name, SubscriberAttributes &atts, bool log_error=true)
 Search for the profile specified and fill the structure.
 
static RTPS_DllAPI void getDefaultSubscriberAttributes (SubscriberAttributes &subscriber_attributes)
 Fills subscriber_attributes with the default values.
 
static RTPS_DllAPI bool insertTransportById (const std::string &transport_id, sp_transport_t transport)
 Add a new transport instance along with its id.
 
static RTPS_DllAPI sp_transport_t getTransportById (const std::string &transport_id)
 Retrieves a transport instance by its id.
 
static RTPS_DllAPI XMLP_ret fillTopicAttributes (const std::string &profile_name, TopicAttributes &atts)
 Search for the profile specified and fill the structure.
 
static RTPS_DllAPI void getDefaultTopicAttributes (TopicAttributes &topic_attributes)
 Fills topic_attributes with the default values.
 
static RTPS_DllAPI bool insertDynamicTypeByName (const std::string &type_name, p_dynamictypebuilder_t type)
 Add a new dynamic type instance along with its name.
 
static RTPS_DllAPI p_dynamictypebuilder_t getDynamicTypeByName (const std::string &type_name)
 Retrieves a transport instance by its name.
 
static RTPS_DllAPI XMLP_ret fillRequesterAttributes (const std::string &profile_name, RequesterAttributes &atts)
 Search for the profile specified and fill the structure.
 
static RTPS_DllAPI XMLP_ret fillReplierAttributes (const std::string &profile_name, ReplierAttributes &atts)
 Search for the profile specified and fill the structure.
 
static RTPS_DllAPI void DeleteInstance ()
 Deletes the XMLProfileManager instance.
 
static RTPS_DllAPI types::DynamicPubSubTypeCreateDynamicPubSubType (const std::string &type_name)
 Retrieves a DynamicPubSubType for the given dynamic type name.
 
static RTPS_DllAPI void DeleteDynamicPubSubType (types::DynamicPubSubType *type)
 Deletes the given DynamicPubSubType previously created by calling XMLProfileManager::CreateDynamicPubSubType method.
 

Detailed Description

Class XMLProfileManager, used to make available profiles from XML file.

Member Function Documentation

◆ CreateDynamicPubSubType()

static RTPS_DllAPI types::DynamicPubSubType * CreateDynamicPubSubType ( const std::string &  type_name)
static

Retrieves a DynamicPubSubType for the given dynamic type name.

Any instance retrieve by calling this method must be deleted calling the XMLProfileManager::DeleteDynamicPubSubType method.

◆ DeleteDynamicPubSubType()

static RTPS_DllAPI void DeleteDynamicPubSubType ( types::DynamicPubSubType type)
static

Deletes the given DynamicPubSubType previously created by calling XMLProfileManager::CreateDynamicPubSubType method.

◆ DeleteInstance()

static RTPS_DllAPI void DeleteInstance ( )
static

Deletes the XMLProfileManager instance.

FastDDS's Domain calls this method automatically on its destructor, but if using XMLProfileManager outside of FastDDS, it should be called manually.

◆ fillDomainParticipantFactoryQos()

static RTPS_DllAPI XMLP_ret fillDomainParticipantFactoryQos ( const std::string &  profile_name,
fastdds::dds::DomainParticipantFactoryQos &  qos,
bool  log_error = true 
)
static

Search for the profile specified and fill the structure.

Parameters
profile_nameName for the profile to be used to fill the structure.
qosStructure to be filled.
log_errorFlag to log an error if the profile_name is not found. Defaults true.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.

◆ fillParticipantAttributes()

static RTPS_DllAPI XMLP_ret fillParticipantAttributes ( const std::string &  profile_name,
ParticipantAttributes atts,
bool  log_error = true 
)
static

Search for the profile specified and fill the structure.

Parameters
profile_nameName for the profile to be used to fill the structure.
attsStructure to be filled.
log_errorFlag to log an error if the profile_name is not found.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case. Defaults true.

◆ fillPublisherAttributes()

static RTPS_DllAPI XMLP_ret fillPublisherAttributes ( const std::string &  profile_name,
PublisherAttributes atts,
bool  log_error = true 
)
static

Search for the profile specified and fill the structure.

Parameters
profile_nameName for the profile to be used to fill the structure.
attsStructure to be filled.
log_errorFlag to log an error if the profile_name is not found.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case. Defaults true.

◆ fillReplierAttributes()

static RTPS_DllAPI XMLP_ret fillReplierAttributes ( const std::string &  profile_name,
ReplierAttributes atts 
)
static

Search for the profile specified and fill the structure.

Parameters
profile_nameName for the profile to be used to fill the structure.
attsStructure to be filled.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.

◆ fillRequesterAttributes()

static RTPS_DllAPI XMLP_ret fillRequesterAttributes ( const std::string &  profile_name,
RequesterAttributes atts 
)
static

Search for the profile specified and fill the structure.

Parameters
profile_nameName for the profile to be used to fill the structure.
attsStructure to be filled.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.

◆ fillSubscriberAttributes()

static RTPS_DllAPI XMLP_ret fillSubscriberAttributes ( const std::string &  profile_name,
SubscriberAttributes atts,
bool  log_error = true 
)
static

Search for the profile specified and fill the structure.

Parameters
profile_nameName for the profile to be used to fill the structure.
attsStructure to be filled.
log_errorFlag to log an error if the profile_name is not found.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case. Defaults true.

◆ fillTopicAttributes()

static RTPS_DllAPI XMLP_ret fillTopicAttributes ( const std::string &  profile_name,
TopicAttributes atts 
)
static

Search for the profile specified and fill the structure.

Parameters
profile_nameName for the profile to be used to fill the structure.
attsStructure to be filled.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.

◆ getDefaultDomainParticipantFactoryQos()

static RTPS_DllAPI void getDefaultDomainParticipantFactoryQos ( fastdds::dds::DomainParticipantFactoryQos &  qos)
static

Fills input domain participant factory qos with the default values.

Parameters
qosStructure to be filled.

◆ getDefaultParticipantAttributes()

static RTPS_DllAPI void getDefaultParticipantAttributes ( ParticipantAttributes participant_attributes)
static

Fills participant_attributes with the default values.

◆ getDefaultPublisherAttributes()

static RTPS_DllAPI void getDefaultPublisherAttributes ( PublisherAttributes publisher_attributes)
static

Fills publisher_attributes with the default values.

◆ getDefaultSubscriberAttributes()

static RTPS_DllAPI void getDefaultSubscriberAttributes ( SubscriberAttributes subscriber_attributes)
static

Fills subscriber_attributes with the default values.

◆ getDefaultTopicAttributes()

static RTPS_DllAPI void getDefaultTopicAttributes ( TopicAttributes topic_attributes)
static

Fills topic_attributes with the default values.

◆ getDynamicTypeByName()

static RTPS_DllAPI p_dynamictypebuilder_t getDynamicTypeByName ( const std::string &  type_name)
static

Retrieves a transport instance by its name.

◆ getTransportById()

static RTPS_DllAPI sp_transport_t getTransportById ( const std::string &  transport_id)
static

Retrieves a transport instance by its id.

◆ insertDynamicTypeByName()

static RTPS_DllAPI bool insertDynamicTypeByName ( const std::string &  type_name,
p_dynamictypebuilder_t  type 
)
static

Add a new dynamic type instance along with its name.

◆ insertTransportById()

static RTPS_DllAPI bool insertTransportById ( const std::string &  transport_id,
sp_transport_t  transport 
)
static

Add a new transport instance along with its id.

◆ library_settings() [1/2]

static RTPS_DllAPI const LibrarySettingsAttributes & library_settings ( )
static

Library settings getter.

Returns
const ref to current library settings.

◆ library_settings() [2/2]

static RTPS_DllAPI void library_settings ( const LibrarySettingsAttributes library_settings)
static

Library settings setter.

Parameters
library_settingsNew value for library settings.

◆ loadDefaultXMLFile()

static RTPS_DllAPI void loadDefaultXMLFile ( )
static

Load the default profiles XML file.

◆ loadXMLDynamicTypes()

static RTPS_DllAPI XMLP_ret loadXMLDynamicTypes ( tinyxml2::XMLElement &  types)
static

Load a dynamic types XML node.

Parameters
typesNode to be loaded.
Returns
XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.

◆ loadXMLFile()

static RTPS_DllAPI XMLP_ret loadXMLFile ( const std::string &  filename)
static

Load a profiles XML file.

Parameters
filenameName for the file to be loaded.
Returns
XMLP_ret::XML_OK if all profiles are correct, XMLP_ret::XML_NOK if some are and some are not, XMLP_ret::XML_ERROR in other case.

◆ loadXMLNode()

static RTPS_DllAPI XMLP_ret loadXMLNode ( tinyxml2::XMLDocument &  doc)
static

Load a profiles XML node.

Parameters
docNode to be loaded.
Returns
XMLP_ret::XML_OK if all profiles are correct, XMLP_ret::XML_NOK if some are and some are not, XMLP_ret::XML_ERROR in other case.

◆ loadXMLProfiles()

static RTPS_DllAPI XMLP_ret loadXMLProfiles ( tinyxml2::XMLElement &  profiles)
static

Load a profiles XML node.

Parameters
profilesNode to be loaded.
Returns
XMLP_ret::XML_OK if all profiles are correct, XMLP_ret::XML_NOK if some are and some are not, XMLP_ret::XML_ERROR in other case.

◆ loadXMLString()

static RTPS_DllAPI XMLP_ret loadXMLString ( const char *  data,
size_t  length 
)
static

Load a profiles XML string.

Parameters
dataBuffer containing the data.
lengthLength of data.
Returns
XMLP_ret::XML_OK if all profiles are correct, XMLP_ret::XML_NOK if some are and some are not, XMLP_ret::XML_ERROR in other case.

The documentation for this class was generated from the following file: