@@ -2230,27 +2230,55 @@ XMLP_ret XMLParser::fillDataNode(
2230
2230
DataNode<fastdds::xmlparser::ParticipantAttributes>& participant_node)
2231
2231
{
2232
2232
/*
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>
2254
2282
</xs:all>
2255
2283
</xs:complexType>
2256
2284
*/
@@ -2286,7 +2314,7 @@ XMLP_ret XMLParser::fillDataNode(
2286
2314
2287
2315
if (strcmp (p_element->Name (), DOMAIN_ID) == 0 )
2288
2316
{
2289
- // domainId - uint32Type
2317
+ // domainId - uint32
2290
2318
if (XMLP_ret::XML_OK != getXMLUint (p_element, &participant_node.get ()->domainId , ident))
2291
2319
{
2292
2320
return XMLP_ret::XML_ERROR;
@@ -2343,7 +2371,7 @@ XMLP_ret XMLParser::fillDataNode(
2343
2371
}
2344
2372
else if (strcmp (name, IGN_NON_MATCHING_LOCS) == 0 )
2345
2373
{
2346
- // ignore_non_matching_locators - boolType
2374
+ // ignore_non_matching_locators - boolean
2347
2375
if (XMLP_ret::XML_OK !=
2348
2376
getXMLBool (p_aux0, &participant_node.get ()->rtps .ignore_non_matching_locators , ident))
2349
2377
{
@@ -2380,15 +2408,15 @@ XMLP_ret XMLParser::fillDataNode(
2380
2408
}
2381
2409
else if (strcmp (name, SEND_SOCK_BUF_SIZE) == 0 )
2382
2410
{
2383
- // sendSocketBufferSize - uint32Type
2411
+ // sendSocketBufferSize - uint32
2384
2412
if (XMLP_ret::XML_OK != getXMLUint (p_aux0, &participant_node.get ()->rtps .sendSocketBufferSize , ident))
2385
2413
{
2386
2414
return XMLP_ret::XML_ERROR;
2387
2415
}
2388
2416
}
2389
2417
else if (strcmp (name, LIST_SOCK_BUF_SIZE) == 0 )
2390
2418
{
2391
- // listenSocketBufferSize - uint32Type
2419
+ // listenSocketBufferSize - uint32
2392
2420
if (XMLP_ret::XML_OK != getXMLUint (p_aux0, &participant_node.get ()->rtps .listenSocketBufferSize , ident))
2393
2421
{
2394
2422
return XMLP_ret::XML_ERROR;
@@ -2440,12 +2468,30 @@ XMLP_ret XMLParser::fillDataNode(
2440
2468
}
2441
2469
else if (strcmp (name, PART_ID) == 0 )
2442
2470
{
2443
- // participantID - int32Type
2471
+ // participantID - int32
2444
2472
if (XMLP_ret::XML_OK != getXMLInt (p_aux0, &participant_node.get ()->rtps .participantID , ident))
2445
2473
{
2446
2474
return XMLP_ret::XML_ERROR;
2447
2475
}
2448
2476
}
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
+ }
2449
2495
else if (strcmp (name, FLOW_CONTROLLER_DESCRIPTOR_LIST) == 0 )
2450
2496
{
2451
2497
// flow_controller_descriptors
@@ -2465,7 +2511,7 @@ XMLP_ret XMLParser::fillDataNode(
2465
2511
}
2466
2512
else if (strcmp (name, USE_BUILTIN_TRANS) == 0 )
2467
2513
{
2468
- // useBuiltinTransports - boolType
2514
+ // useBuiltinTransports - boolean
2469
2515
if (XMLP_ret::XML_OK != getXMLBool (p_aux0, &participant_node.get ()->rtps .useBuiltinTransports , ident))
2470
2516
{
2471
2517
return XMLP_ret::XML_ERROR;
@@ -2492,7 +2538,7 @@ XMLP_ret XMLParser::fillDataNode(
2492
2538
}
2493
2539
else if (strcmp (name, NAME) == 0 )
2494
2540
{
2495
- // name - stringType
2541
+ // name - string
2496
2542
std::string s;
2497
2543
if (XMLP_ret::XML_OK != getXMLString (p_aux0, &s, ident))
2498
2544
{
0 commit comments