Skip to content

Commit 1024475

Browse files
Change config format of topic allow/denylists to XML elements
1 parent b636313 commit 1024475

File tree

11 files changed

+280
-171
lines changed

11 files changed

+280
-171
lines changed

docs/manual/config/config_file_reference.rst

Lines changed: 74 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,8 @@ The default value is: ``default``
654654
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange
655655
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
656656

657-
Attributes: :ref:`config<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@config]>`, :ref:`forbiddenTopics<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@forbiddenTopics]>`, :ref:`library<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@library]>`, :ref:`name<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@name]>`, :ref:`onlyForTopics<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@onlyForTopics]>`, :ref:`priority<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]>`
657+
Attributes: :ref:`config<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@config]>`, :ref:`library<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@library]>`, :ref:`name<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@name]>`, :ref:`priority<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]>`
658+
Children: :ref:`forbiddenTopics<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics>`, :ref:`onlyForTopics<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics>`
658659

659660
This element defines a PSMX.
660661

@@ -671,18 +672,6 @@ This attribute specifies any configuration data for the PSMX instance.This has n
671672
The default value is: ``<empty>``
672673

673674

674-
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@forbiddenTopics]`:
675-
676-
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@forbiddenTopics]
677-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
678-
679-
Text
680-
681-
A comma-separated list of topics that should never use this psmx.Mutually exclusive with onlyForTopics.
682-
683-
The default value is: ``<empty>``
684-
685-
686675
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@library]`:
687676

688677
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@library]
@@ -707,28 +696,86 @@ This attribute specifies the name of the interface.
707696
The default value is: ``<empty>``
708697

709698

710-
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@onlyForTopics]`:
699+
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]`:
711700

712-
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@onlyForTopics]
713-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
701+
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]
702+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
714703

715704
Text
716705

717-
A comma-separated list of all the topics that should use this PSMX.This option can be used to restrict the PSMX to a selected list of topics.Mutually exclusive with forbiddenTopics.
706+
This attribute specifies the interface priority (decimal integer or default). The default value for a PSMX is 0.
707+
708+
The default value is: ``default``
709+
710+
711+
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics`:
712+
713+
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics
714+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
715+
716+
Children: :ref:`Pattern<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern>`
717+
718+
A list of topics that should never use this psmx. Mutually exclusive with onlyForTopics.
719+
720+
721+
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern`:
722+
723+
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern
724+
____________________________________________________________________________________
725+
726+
Attributes: :ref:`value<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]>`
727+
728+
Text
729+
730+
A pattern (with ? and \* wildcards) that is matched against topics.
718731

719732
The default value is: ``<empty>``
720733

721734

722-
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]`:
735+
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]`:
723736

724-
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]
725-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
737+
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]
738+
____________________________________________________________________________________________
726739

727740
Text
728741

729-
This attribute specifies the interface priority (decimal integer or default). The default value for a PSMX is 0.
730742

731-
The default value is: ``default``
743+
The default value is: ``<empty>``
744+
745+
746+
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics`:
747+
748+
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics
749+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
750+
751+
Children: :ref:`Pattern<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics/Pattern>`
752+
753+
A list of topics that should never use this psmx. Mutually exclusive with onlyForTopics.
754+
755+
756+
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics/Pattern`:
757+
758+
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics/Pattern
759+
__________________________________________________________________________________
760+
761+
Attributes: :ref:`value<//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]>`
762+
763+
Text
764+
765+
A pattern (with ? and \* wildcards) that is matched against topics.
766+
767+
The default value is: ``<empty>``
768+
769+
770+
.. _`//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]`:
771+
772+
//CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]
773+
____________________________________________________________________________________________
774+
775+
Text
776+
777+
778+
The default value is: ``<empty>``
732779

733780

734781
.. _`//CycloneDDS/Domain/General/MaxMessageSize`:
@@ -2728,14 +2775,14 @@ The categorisation of tracing output is incomplete and hence most of the verbosi
27282775
The default value is: ``none``
27292776

27302777
..
2731-
generated from ddsi_config.h[99b38dad99d609bd1f2e2aa7b43cf2a3aa10948d]
2778+
generated from ddsi_config.h[58d1dd144dc0e8f3c3ef331fd4472eec7f797c71]
27322779
generated from ddsi__cfgunits.h[bd22f0c0ed210501d0ecd3b07c992eca549ef5aa]
2733-
generated from ddsi__cfgelems.h[fdfcbecb910d6a859d5e5ab25d81065aaca18ae8]
2734-
generated from ddsi_config.c[3f9cdfe5934118aeb3e6f7e8d9b71f815e8021c2]
2735-
generated from _confgen.h[b3b98385ecc752860a55e126b3893423730f53ab]
2780+
generated from ddsi__cfgelems.h[714f801d2988b476694a198097d36169f7e5e129]
2781+
generated from ddsi_config.c[4a1074588af66b81f8fd45393cdecff2b5d55b4d]
2782+
generated from _confgen.h[e32eabfc35e9f3a7dcb63b19ed148c0d17c6e5fc]
27362783
generated from _confgen.c[237308acd53897a34e8c643e16e05a61d73ffd65]
27372784
generated from generate_rnc.c[b50e4b7ab1d04b2bc1d361a0811247c337b74934]
27382785
generated from generate_md.c[789b92e422631684352909cfb8bf43f6ceb16a01]
27392786
generated from generate_rst.c[3c4b523fbb57c8e4a7e247379d06a8021ccc21c4]
27402787
generated from generate_xsd.c[6b6818d7f17a35d56c376c04ec1410427f34c0f0]
2741-
generated from generate_defconfig.c[0ef1411470804c3db386c20c8752b161eb8418ae]
2788+
generated from generate_defconfig.c[63ca9d8ae2f1ce2e761c9d4c0510a45eb062d830]

docs/manual/options.md

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ The default value is: `default`
437437

438438

439439
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange
440-
Attributes: [config](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeconfig), [forbiddenTopics](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeforbiddentopics), [library](#cycloneddsdomaingeneralinterfacespubsubmessageexchangelibrary), [name](#cycloneddsdomaingeneralinterfacespubsubmessageexchangename), [onlyForTopics](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeonlyfortopics), [priority](#cycloneddsdomaingeneralinterfacespubsubmessageexchangepriority)
440+
Attributes: [config](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeconfig), [library](#cycloneddsdomaingeneralinterfacespubsubmessageexchangelibrary), [name](#cycloneddsdomaingeneralinterfacespubsubmessageexchangename), [priority](#cycloneddsdomaingeneralinterfacespubsubmessageexchangepriority)
441+
Children: [forbiddenTopics](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeforbiddentopics), [onlyForTopics](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeonlyfortopics)
441442

442443
This element defines a PSMX.
443444

@@ -450,44 +451,74 @@ This attribute specifies any configuration data for the PSMX instance.This has n
450451
The default value is: `<empty>`
451452

452453

453-
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@forbiddenTopics]
454+
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@library]
454455
Text
455456

456-
A comma-separated list of topics that should never use this psmx.Mutually exclusive with onlyForTopics.
457+
This attribute specifies the filename of the interface library.
457458

458459
The default value is: `<empty>`
459460

460461

461-
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@library]
462+
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@name]
462463
Text
463464

464-
This attribute specifies the filename of the interface library.
465+
This attribute specifies the name of the interface.
465466

466467
The default value is: `<empty>`
467468

468469

469-
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@name]
470+
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]
470471
Text
471472

472-
This attribute specifies the name of the interface.
473+
This attribute specifies the interface priority (decimal integer or default). The default value for a PSMX is 0.
474+
475+
The default value is: `default`
476+
477+
478+
###### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics
479+
Children: [Pattern](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeforbiddentopicspattern)
480+
481+
A list of topics that should never use this psmx. Mutually exclusive with onlyForTopics.
482+
483+
484+
####### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern
485+
Attributes: [value](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeforbiddentopicspatternvalue)
486+
487+
Text
488+
489+
A pattern (with ? and \* wildcards) that is matched against topics.
473490

474491
The default value is: `<empty>`
475492

476493

477-
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@onlyForTopics]
494+
####### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]
478495
Text
479496

480-
A comma-separated list of all the topics that should use this PSMX.This option can be used to restrict the PSMX to a selected list of topics.Mutually exclusive with forbiddenTopics.
481497

482498
The default value is: `<empty>`
483499

484500

485-
##### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange[@priority]
501+
###### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics
502+
Children: [Pattern](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeonlyfortopicspattern)
503+
504+
A list of topics that should never use this psmx. Mutually exclusive with onlyForTopics.
505+
506+
507+
####### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/onlyForTopics/Pattern
508+
Attributes: [value](#cycloneddsdomaingeneralinterfacespubsubmessageexchangeforbiddentopicspatternvalue)
509+
486510
Text
487511

488-
This attribute specifies the interface priority (decimal integer or default). The default value for a PSMX is 0.
512+
A pattern (with ? and \* wildcards) that is matched against topics.
489513

490-
The default value is: `default`
514+
The default value is: `<empty>`
515+
516+
517+
####### //CycloneDDS/Domain/General/Interfaces/PubSubMessageExchange/forbiddenTopics/Pattern[@value]
518+
Text
519+
520+
521+
The default value is: `<empty>`
491522

492523

493524
#### //CycloneDDS/Domain/General/MaxMessageSize
@@ -1914,14 +1945,14 @@ While none prevents any message from being written to a DDSI2 log file.
19141945
The categorisation of tracing output is incomplete and hence most of the verbosity levels and categories are not of much use in the current release. This is an ongoing process and here we describe the target situation rather than the current situation. Currently, the most useful verbosity levels are config, fine and finest.
19151946

19161947
The default value is: `none`
1917-
<!--- generated from ddsi_config.h[99b38dad99d609bd1f2e2aa7b43cf2a3aa10948d] -->
1948+
<!--- generated from ddsi_config.h[58d1dd144dc0e8f3c3ef331fd4472eec7f797c71] -->
19181949
<!--- generated from ddsi__cfgunits.h[bd22f0c0ed210501d0ecd3b07c992eca549ef5aa] -->
1919-
<!--- generated from ddsi__cfgelems.h[fdfcbecb910d6a859d5e5ab25d81065aaca18ae8] -->
1920-
<!--- generated from ddsi_config.c[3f9cdfe5934118aeb3e6f7e8d9b71f815e8021c2] -->
1921-
<!--- generated from _confgen.h[b3b98385ecc752860a55e126b3893423730f53ab] -->
1950+
<!--- generated from ddsi__cfgelems.h[714f801d2988b476694a198097d36169f7e5e129] -->
1951+
<!--- generated from ddsi_config.c[4a1074588af66b81f8fd45393cdecff2b5d55b4d] -->
1952+
<!--- generated from _confgen.h[e32eabfc35e9f3a7dcb63b19ed148c0d17c6e5fc] -->
19221953
<!--- generated from _confgen.c[237308acd53897a34e8c643e16e05a61d73ffd65] -->
19231954
<!--- generated from generate_rnc.c[b50e4b7ab1d04b2bc1d361a0811247c337b74934] -->
19241955
<!--- generated from generate_md.c[789b92e422631684352909cfb8bf43f6ceb16a01] -->
19251956
<!--- generated from generate_rst.c[3c4b523fbb57c8e4a7e247379d06a8021ccc21c4] -->
19261957
<!--- generated from generate_xsd.c[6b6818d7f17a35d56c376c04ec1410427f34c0f0] -->
1927-
<!--- generated from generate_defconfig.c[0ef1411470804c3db386c20c8752b161eb8418ae] -->
1958+
<!--- generated from generate_defconfig.c[63ca9d8ae2f1ce2e761c9d4c0510a45eb062d830] -->

etc/cyclonedds.rnc

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,6 @@ CycloneDDS configuration""" ] ]
317317
text
318318
}?
319319
& [ a:documentation [ xml:lang="en" """
320-
<p>A comma-separated list of topics that should never use this psmx.Mutually exclusive with onlyForTopics.</p>
321-
<p>The default value is: <code>&lt;empty&gt;</code></p>""" ] ]
322-
attribute forbiddenTopics {
323-
text
324-
}?
325-
& [ a:documentation [ xml:lang="en" """
326320
<p>This attribute specifies the filename of the interface library. </p>
327321
<p>The default value is: <code>&lt;empty&gt;</code></p>""" ] ]
328322
attribute library {
@@ -335,17 +329,41 @@ CycloneDDS configuration""" ] ]
335329
text
336330
}?
337331
& [ a:documentation [ xml:lang="en" """
338-
<p>A comma-separated list of all the topics that should use this PSMX.This option can be used to restrict the PSMX to a selected list of topics.Mutually exclusive with forbiddenTopics.</p>
339-
<p>The default value is: <code>&lt;empty&gt;</code></p>""" ] ]
340-
attribute onlyForTopics {
341-
text
342-
}?
343-
& [ a:documentation [ xml:lang="en" """
344332
<p>This attribute specifies the interface priority (decimal integer or <i>default</i>). The default value for a PSMX is 0.</p>
345333
<p>The default value is: <code>default</code></p>""" ] ]
346334
attribute priority {
347335
text
348336
}?
337+
& [ a:documentation [ xml:lang="en" """
338+
<p>A list of topics that should never use this psmx. Mutually exclusive with onlyForTopics. </p>""" ] ]
339+
element forbiddenTopics {
340+
[ a:documentation [ xml:lang="en" """
341+
<p>A pattern (with ? and * wildcards) that is matched against topics. </p>
342+
<p>The default value is: <code>&lt;empty&gt;</code></p>""" ] ]
343+
element Pattern {
344+
[ a:documentation [ xml:lang="en" """
345+
346+
<p>The default value is: <code>&lt;empty&gt;</code></p>""" ] ]
347+
attribute value {
348+
text
349+
}
350+
}*
351+
}?
352+
& [ a:documentation [ xml:lang="en" """
353+
<p>A list of topics that should never use this psmx. Mutually exclusive with onlyForTopics. </p>""" ] ]
354+
element onlyForTopics {
355+
[ a:documentation [ xml:lang="en" """
356+
<p>A pattern (with ? and * wildcards) that is matched against topics. </p>
357+
<p>The default value is: <code>&lt;empty&gt;</code></p>""" ] ]
358+
element Pattern {
359+
[ a:documentation [ xml:lang="en" """
360+
361+
<p>The default value is: <code>&lt;empty&gt;</code></p>""" ] ]
362+
attribute value {
363+
text
364+
}
365+
}*
366+
}?
349367
}*
350368
}?
351369
& [ a:documentation [ xml:lang="en" """
@@ -1325,14 +1343,14 @@ MIIEpAIBAAKCAQEA3HIh...AOBaaqSV37XBUJg==<br>
13251343
duration_inf = xsd:token { pattern = "inf|0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([num]?s|min|hr|day)" }
13261344
memsize = xsd:token { pattern = "0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([kMG]i?)?B" }
13271345
}
1328-
# generated from ddsi_config.h[99b38dad99d609bd1f2e2aa7b43cf2a3aa10948d]
1346+
# generated from ddsi_config.h[58d1dd144dc0e8f3c3ef331fd4472eec7f797c71]
13291347
# generated from ddsi__cfgunits.h[bd22f0c0ed210501d0ecd3b07c992eca549ef5aa]
1330-
# generated from ddsi__cfgelems.h[fdfcbecb910d6a859d5e5ab25d81065aaca18ae8]
1331-
# generated from ddsi_config.c[3f9cdfe5934118aeb3e6f7e8d9b71f815e8021c2]
1332-
# generated from _confgen.h[b3b98385ecc752860a55e126b3893423730f53ab]
1348+
# generated from ddsi__cfgelems.h[714f801d2988b476694a198097d36169f7e5e129]
1349+
# generated from ddsi_config.c[4a1074588af66b81f8fd45393cdecff2b5d55b4d]
1350+
# generated from _confgen.h[e32eabfc35e9f3a7dcb63b19ed148c0d17c6e5fc]
13331351
# generated from _confgen.c[237308acd53897a34e8c643e16e05a61d73ffd65]
13341352
# generated from generate_rnc.c[b50e4b7ab1d04b2bc1d361a0811247c337b74934]
13351353
# generated from generate_md.c[789b92e422631684352909cfb8bf43f6ceb16a01]
13361354
# generated from generate_rst.c[3c4b523fbb57c8e4a7e247379d06a8021ccc21c4]
13371355
# generated from generate_xsd.c[6b6818d7f17a35d56c376c04ec1410427f34c0f0]
1338-
# generated from generate_defconfig.c[0ef1411470804c3db386c20c8752b161eb8418ae]
1356+
# generated from generate_defconfig.c[63ca9d8ae2f1ce2e761c9d4c0510a45eb062d830]

0 commit comments

Comments
 (0)