@@ -2230,27 +2230,55 @@ XMLP_ret XMLParser::fillDataNode(
22302230 DataNode<fastdds::xmlparser::ParticipantAttributes>& participant_node)
22312231{
22322232 /*
2233- <xs:complexType name="rtpsParticipantAttributesType">
2234- <xs:all minOccurs="0">
2235- <xs:element name="domainId" type="uint32Type" minOccurs="0"/>
2236- <xs:element name="allocation" type="rtpsParticipantAllocationAttributesType" minOccurs="0"/>
2237- <xs:element name="prefix" type="guid" minOccurs="0"/>
2238- <xs:element name="default_external_unicast_locators" type="externalLocatorListType" minOccurs="0"/>
2239- <xs:element name="ignore_non_matching_locators" type="boolType" minOccurs="0"/>
2240- <xs:element name="defaultUnicastLocatorList" type="locatorListType" minOccurs="0"/>
2241- <xs:element name="defaultMulticastLocatorList" type="locatorListType" minOccurs="0"/>
2242- <xs:element name="sendSocketBufferSize" type="uint32Type" minOccurs="0"/>
2243- <xs:element name="listenSocketBufferSize" type="uint32Type" minOccurs="0"/>
2244- <xs:element name="netmask_filter" type="netmaskFilterType" minOccurs="0" maxOccurs="1"/>
2245- <xs:element name="builtin" type="builtinAttributesType" minOccurs="0"/>
2246- <xs:element name="port" type="portType" minOccurs="0"/>
2247- <xs:element name="userData" type="octetVectorType" minOccurs="0"/>
2248- <xs:element name="participantID" type="int32Type" minOccurs="0"/>
2249- <xs:element name="flow_controller_descriptors" type="flowControllerDescriptorsType" minOccurs="0"/>
2250- <xs:element name="userTransports" type="stringListType" minOccurs="0"/>
2251- <xs:element name="useBuiltinTransports" type="boolType" minOccurs="0"/>
2252- <xs:element name="propertiesPolicy" type="propertyPolicyType" minOccurs="0"/>
2253- <xs:element name="name" type="stringType" minOccurs="0"/>
2233+ <xs:complexType name="participantProfileType">
2234+ <xs:all>
2235+ <xs:element name="domainId" type="domainIDType" minOccurs="0" maxOccurs="1"/>
2236+ <xs:element name="rtps" minOccurs="0" maxOccurs="1">
2237+ <xs:complexType>
2238+ <xs:all>
2239+ <xs:element name="name" type="string" minOccurs="0" maxOccurs="1"/>
2240+ <xs:element name="defaultUnicastLocatorList" type="locatorListType" minOccurs="0" maxOccurs="1"/>
2241+ <xs:element name="defaultMulticastLocatorList" type="locatorListType" minOccurs="0" maxOccurs="1"/>
2242+ <xs:element name="default_external_unicast_locators" type="externalLocatorListType" minOccurs="0" maxOccurs="1"/>
2243+ <xs:element name="ignore_non_matching_locators" type="boolean" minOccurs="0" maxOccurs="1"/>
2244+ <xs:element name="sendSocketBufferSize" type="uint32" minOccurs="0" maxOccurs="1"/>
2245+ <xs:element name="listenSocketBufferSize" type="uint32" minOccurs="0" maxOccurs="1"/>
2246+ <xs:element name="netmask_filter" minOccurs="0" maxOccurs="1">
2247+ <xs:simpleType>
2248+ <xs:restriction base="xs:string">
2249+ <xs:enumeration value="OFF"/>
2250+ <xs:enumeration value="AUTO"/>
2251+ <xs:enumeration value="ON"/>
2252+ </xs:restriction>
2253+ </xs:simpleType>
2254+ </xs:element>
2255+ <xs:element name="builtin" type="builtinAttributesType" minOccurs="0" maxOccurs="1"/>
2256+ <xs:element name="port" type="portType" minOccurs="0" maxOccurs="1"/>
2257+ <xs:element name="participantID" type="int32" minOccurs="0" maxOccurs="1"/>
2258+ <xs:element name="easy_mode_ip" type="string" minOccurs="0" maxOccurs="1"/>
2259+ <xs:element name="userTransports" minOccurs="0" maxOccurs="1">
2260+ <xs:complexType>
2261+ <xs:sequence>
2262+ <xs:element name="transport_id" type="string" minOccurs="1" maxOccurs="unbounded"/>
2263+ </xs:sequence>
2264+ </xs:complexType>
2265+ </xs:element>
2266+ <xs:element name="useBuiltinTransports" type="boolean" minOccurs="0" maxOccurs="1"/>
2267+ <xs:element name="builtinTransports" type="builtinTransportsType" minOccurs="0" maxOccurs="1"/>
2268+ <xs:element name="propertiesPolicy" type="propertyPolicyType" minOccurs="0" maxOccurs="1"/>
2269+ <xs:element name="allocation" type="rtpsParticipantAllocationAttributesType" minOccurs="0" maxOccurs="1"/>
2270+ <xs:element name="userData" type="octectVectorQosPolicyType" minOccurs="0" maxOccurs="1"/>
2271+ <xs:element name="prefix" type="prefixType" minOccurs="0" maxOccurs="1"/>
2272+ <xs:element name="flow_controller_descriptor_list" type="flowControllerDescriptorListType" minOccurs="0" maxOccurs="1"/>
2273+ <xs:element name="builtin_controllers_sender_thread" type="threadSettingsType" minOccurs="0" maxOccurs="1"/>
2274+ <xs:element name="timed_events_thread" type="threadSettingsType" minOccurs="0" maxOccurs="1"/>
2275+ <xs:element name="discovery_server_thread" type="threadSettingsType" minOccurs="0" maxOccurs="1"/>
2276+ <xs:element name="typelookup_service_thread" type="threadSettingsType" minOccurs="0" maxOccurs="1"/>
2277+ <xs:element name="builtin_transports_reception_threads" type="threadSettingsType" minOccurs="0" maxOccurs="1"/>
2278+ <xs:element name="security_log_thread" type="threadSettingsType" minOccurs="0" maxOccurs="1"/>
2279+ </xs:all>
2280+ </xs:complexType>
2281+ </xs:element>
22542282 </xs:all>
22552283 </xs:complexType>
22562284 */
@@ -2286,7 +2314,7 @@ XMLP_ret XMLParser::fillDataNode(
22862314
22872315 if (strcmp (p_element->Name (), DOMAIN_ID) == 0 )
22882316 {
2289- // domainId - uint32Type
2317+ // domainId - uint32
22902318 if (XMLP_ret::XML_OK != getXMLUint (p_element, &participant_node.get ()->domainId , ident))
22912319 {
22922320 return XMLP_ret::XML_ERROR;
@@ -2343,7 +2371,7 @@ XMLP_ret XMLParser::fillDataNode(
23432371 }
23442372 else if (strcmp (name, IGN_NON_MATCHING_LOCS) == 0 )
23452373 {
2346- // ignore_non_matching_locators - boolType
2374+ // ignore_non_matching_locators - boolean
23472375 if (XMLP_ret::XML_OK !=
23482376 getXMLBool (p_aux0, &participant_node.get ()->rtps .ignore_non_matching_locators , ident))
23492377 {
@@ -2380,15 +2408,15 @@ XMLP_ret XMLParser::fillDataNode(
23802408 }
23812409 else if (strcmp (name, SEND_SOCK_BUF_SIZE) == 0 )
23822410 {
2383- // sendSocketBufferSize - uint32Type
2411+ // sendSocketBufferSize - uint32
23842412 if (XMLP_ret::XML_OK != getXMLUint (p_aux0, &participant_node.get ()->rtps .sendSocketBufferSize , ident))
23852413 {
23862414 return XMLP_ret::XML_ERROR;
23872415 }
23882416 }
23892417 else if (strcmp (name, LIST_SOCK_BUF_SIZE) == 0 )
23902418 {
2391- // listenSocketBufferSize - uint32Type
2419+ // listenSocketBufferSize - uint32
23922420 if (XMLP_ret::XML_OK != getXMLUint (p_aux0, &participant_node.get ()->rtps .listenSocketBufferSize , ident))
23932421 {
23942422 return XMLP_ret::XML_ERROR;
@@ -2440,12 +2468,30 @@ XMLP_ret XMLParser::fillDataNode(
24402468 }
24412469 else if (strcmp (name, PART_ID) == 0 )
24422470 {
2443- // participantID - int32Type
2471+ // participantID - int32
24442472 if (XMLP_ret::XML_OK != getXMLInt (p_aux0, &participant_node.get ()->rtps .participantID , ident))
24452473 {
24462474 return XMLP_ret::XML_ERROR;
24472475 }
24482476 }
2477+ else if (strcmp (name, EASY_MODE_IP) == 0 )
2478+ {
2479+ // easy_mode_ip - string
2480+ std::string str_aux;
2481+ if (XMLP_ret::XML_OK != getXMLString (p_aux0, &str_aux, ident))
2482+ {
2483+ return XMLP_ret::XML_ERROR;
2484+ }
2485+
2486+ // Check that the string is a valid IPv4 address
2487+ if (!fastdds::rtps::IPLocator::isIPv4 (str_aux))
2488+ {
2489+ EPROSIMA_LOG_ERROR (XMLPARSER, " 'easy_mode_ip' is not a valid IPv4 address." );
2490+ return XMLP_ret::XML_ERROR;
2491+ }
2492+
2493+ participant_node.get ()->rtps .easy_mode_ip = str_aux;
2494+ }
24492495 else if (strcmp (name, FLOW_CONTROLLER_DESCRIPTOR_LIST) == 0 )
24502496 {
24512497 // flow_controller_descriptors
@@ -2465,7 +2511,7 @@ XMLP_ret XMLParser::fillDataNode(
24652511 }
24662512 else if (strcmp (name, USE_BUILTIN_TRANS) == 0 )
24672513 {
2468- // useBuiltinTransports - boolType
2514+ // useBuiltinTransports - boolean
24692515 if (XMLP_ret::XML_OK != getXMLBool (p_aux0, &participant_node.get ()->rtps .useBuiltinTransports , ident))
24702516 {
24712517 return XMLP_ret::XML_ERROR;
@@ -2492,7 +2538,7 @@ XMLP_ret XMLParser::fillDataNode(
24922538 }
24932539 else if (strcmp (name, NAME) == 0 )
24942540 {
2495- // name - stringType
2541+ // name - string
24962542 std::string s;
24972543 if (XMLP_ret::XML_OK != getXMLString (p_aux0, &s, ident))
24982544 {
0 commit comments