Skip to content

Commit 5575b05

Browse files
committed
Release v7.0
2 parents 9d14bc8 + 0f344a0 commit 5575b05

33 files changed

+699
-222
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ if (NOT ASCIIDOCTOR_PDF_EXE)
1111
message(FATAL_ERROR "asciidoctor-pdf is not found")
1212
endif ()
1313

14-
set (VERSION "v6.1")
1514
set (MAIN_FILE "${PROJECT_SOURCE_DIR}/commsdsl_spec.adoc")
15+
file (READ "${MAIN_FILE}" main_file_contents)
16+
string (REGEX MATCH "v([0-9\.]*)\," _ ${main_file_contents})
17+
set (VERSION "v${CMAKE_MATCH_1}")
1618

1719
add_custom_target("pdf" ALL
1820
COMMAND ${ASCIIDOCTOR_PDF_EXE} ${MAIN_FILE}

aliases/aliases.adoc

Lines changed: 28 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ traffic reuse the same byte occupied by the `SomeEnum` field, like below.
7272
<?xml version="1.0" encoding="UTF-8"?>
7373
<schema ...>
7474
<message name="Msg1" id="0x1">
75-
<bitfield name="F1"
75+
<bitfield name="F1">
7676
<enum name="SomeEnum" type="uint8" bitLength="2">
7777
<validValue name="V1" val="0" />
7878
<validValue name="V2" val="1" />
@@ -93,7 +93,7 @@ like this:
9393
<schema ...>
9494
<message name="Msg1" id="0x1">
9595
<fields>
96-
<bitfield name="F1"
96+
<bitfield name="F1">
9797
<enum name="SomeEnum" type="uint8" bitLength="2">
9898
...
9999
</enum>
@@ -109,6 +109,7 @@ There can be any number of different **&lt;alias&gt;** nodes. The elements
109109
that are allowed to have **&lt;alias&gt;**-es are <<messages-messages, &lt;message&gt; >>,
110110
<<interfaces-interfaces, &lt;interface&gt; >>, and <<fields-bundle, &lt;bundle&gt; >>.
111111

112+
[[aliases-description]]
112113
=== Description ===
113114
The **&lt;alias&gt;** node may also have **description**
114115
<<intro-properties, property>> which is expected to find its way into
@@ -130,76 +131,52 @@ the generated code as a comment for the relevant access functions.
130131
</schema>
131132
----
132133

133-
=== More on Aliases in &lt;message&gt;-es ===
134-
When a new <<messages-messages, &lt;message&gt; >> is defined, it can
135-
copy all the fields from other already defined <<messages-messages, &lt;message&gt; >> or <<fields-bundle, &lt;bundle&gt; >>
136-
(using **copyFieldsFrom** <<intro-properties, property>>).
137-
By default all the <<aliases-aliases, &lt;alias&gt; >> definitions are also copied.
138-
It is possible to modify this default behavior by using **copyFieldsAliases**
134+
[[aliases-reuse]]
135+
=== Reusing Definition ===
136+
By default when the original definition is <<fields-common-reusing-other-fields, reused>> its aliases are also copied.
137+
It is possible to modify this default behavior by using **reuseAliases**
139138
<<intro-properties, property>> with <<intro-boolean, boolean>> value.
140139
[source,xml]
141140
----
142141
<?xml version="1.0" encoding="UTF-8"?>
143142
<schema ...>
144-
<message name="Msg1" id="1">
145-
...
146-
</message>
143+
<fields>
144+
<bundle name="B1">
145+
...
146+
<alias .../>
147+
<alias .../>
148+
</bundle>
147149
148-
<message name="Msg2" id="2" copyFieldsAliases="false">
149-
...
150-
</message>
151-
150+
<bundle name="B2" reuse="B1" reuseAliases="false">
151+
...
152+
</bundle>
153+
</fields>
152154
</schema>
153155
----
154156

155-
=== More on Aliases in &lt;interface&gt;-es ===
156-
Similar to <<messages-messages, &lt;message&gt; >>-es
157-
<<interfaces-interfaces, &lt;interface&gt; >> can also use **copyFieldsFrom**
158-
<<intro-properties, property>> to copy its field from some other
159-
<<interfaces-interfaces, &lt;interface&gt; >> or <<fields-bundle, &lt;bundle&gt; >> definition and have all
160-
the aliases copied by default. The control of such default copying behavior
161-
is also done by using **copyFieldsAliases**
157+
[[aliases-copy]]
158+
=== Copying Fields ===
159+
When a new <<messages-messages, &lt;message&gt; >> or <<interfaces-interfaces, &lt;interface&gt; >> is defined, it can
160+
copy all the fields from other already defined <<messages-messages, &lt;message&gt; >>, <<interfaces-interfaces, &lt;interface&gt; >>, or <<fields-bundle, &lt;bundle&gt; >>
161+
(using **copyFieldsFrom** <<intro-properties, property>>).
162+
By default all the <<aliases-aliases, &lt;alias&gt; >> definitions are also copied.
163+
It is possible to modify this default behavior by using **copyFieldsAliases**
162164
<<intro-properties, property>> with <<intro-boolean, boolean>> value.
163165
[source,xml]
164166
----
165167
<?xml version="1.0" encoding="UTF-8"?>
166168
<schema ...>
167-
<interface name="Interface1">
169+
<message name="Msg1" id="1">
168170
...
169-
</interface>
171+
</message>
170172
171-
<interface name="Interface2" copyFieldsAliases="false">
173+
<message name="Msg2" id="2" copyFieldsAliases="false">
172174
...
173-
</interface>
175+
</message>
174176
175177
</schema>
176178
----
177179

178-
=== More on Aliases in &lt;bundle&gt;-es ===
179-
When a new <<fields-bundle, &lt;bundle&gt; >> field is defined it can
180-
reuse definition of already defined other <<fields-bundle, &lt;bundle&gt; >>
181-
(using **reuse** <<intro-properties, property>>).
182-
By default all the <<aliases-aliases, &lt;alias&gt; >> definitions are also copied.
183-
It is possible to modify this default behavior by using **reuseAliases**
184-
<<intro-properties, property>> with <<intro-boolean, boolean>> value.
185-
[source,xml]
186-
----
187-
<?xml version="1.0" encoding="UTF-8"?>
188-
<schema ...>
189-
<fields>
190-
<bundle name="B1">
191-
...
192-
<alias .../>
193-
<alias .../>
194-
</bundle>
195-
196-
<bundle name="B2" reuse="B1" reuseAliases="false">
197-
...
198-
</bundle>
199-
</fields>
200-
</schema>
201-
----
202-
203180
Use <<appendix-alias, properties table>> for future references.
204181

205182

appendix/bitfield.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ for detailed description.
99
|===
1010
|Property Name|Allowed Type / Value|DSL Version|Required|Default Value ^.^|Description
1111

12-
|**endian**|"big" or "little"|1|no|endian of <<schema-schema, schema>>|Endian of the field.|
12+
|**copyValidCondFrom**|<<intro-references, reference>> string|7|no||<<fields-bitfield, &lt;bitfield&gt; >> field definition from which extra validity condition needs to be copied.
13+
|**endian**|"big" or "little"|1|no|endian of <<schema-schema, schema>>|Endian of the field.
14+
|**validCond**|string|7|no||Extra validity check operation condition.
1315
|===
1416

1517
Extra child XML elements allowed:
@@ -20,4 +22,5 @@ Extra child XML elements allowed:
2022

2123
|**&lt;members&gt;**|1|Wraps member fields.
2224
|**&lt;replace&gt;**|5|Wraps replacing member fields after copying using **reuse** property.
25+
|**&lt;validCond&gt;**|7|Multiple extra validity check operation conditions.
2326
|===

appendix/bundle.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ for detailed description.
99
|===
1010
|Property Name|Allowed Type / Value|DSL Version|Required|Default Value ^.^|Description
1111

12-
|**reuseAliases**|<<intro-boolean, bool>>|3|no|true|Control copy of the defined <<aliases-aliases, aliases>> from reused other <<fields-bundle, &lt;bundle&gt; >> when **reuse** property is used.
12+
|**copyValidCondFrom**|<<intro-references, reference>> string|7|no||<<fields-bundle, &lt;bundle&gt; >> field definition from which extra validity condition needs to be copied.
13+
|**reuseAliases**|<<intro-boolean, bool>>|3|no|true|Control copy of the defined <<aliases-aliases, aliases>> from reused other <<fields-bundle, &lt;bundle&gt; >> when **reuse** property is used.
14+
|**validCond**|string|7|no||Extra validity check operation condition.
1315
|===
1416

1517
Extra child XML elements allowed:
@@ -21,4 +23,5 @@ Extra child XML elements allowed:
2123
|**&lt;alias&gt;**|3|Alias names for other member fields. See <<aliases-aliases, Aliases>> for more info.
2224
|**&lt;members&gt;**|1|Wraps member fields.
2325
|**&lt;replace&gt;**|5|Wraps replacing member fields after copying using **reuse** property.
26+
|**&lt;validCond&gt;**|7|Multiple extra validity check operation conditions.
2427
|===

appendix/data.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ for detailed description.
1010
|Property Name|Allowed Type / Value|DSL Version|Required|Default Value ^.^|Description
1111

1212
|**defaultValue**|string|1|no||Default value. Case-insensitive hexadecimal string.
13+
|**defaultValidValue**|string|7|no||Default valid value. Case-insensitive hexadecimal string.
1314
|**length**|<<intro-numeric, unsigned>>|1|no|0|Fixed serialization length. **0** means no length limit. Cannot be used tegether with **lengthPrefix**.
1415
|**lengthPrefix**|<<fields-fields, field>> or <<intro-references, reference>>|1|no||Prefix field containing length of the data. Cannot be used tegether with **length**.
16+
|**validValue**|string|7|no||Valid value. Case-insensitive hexadecimal string.
1517
|===
1618

1719

appendix/enum.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ for detailed description.
2828
|**deprecated**|<<intro-numeric, unsigned>>|1|no|max unsigned|Version of the protocol in which value was deprecated. +
2929
Must be greater than value of **sinceVersion**.
3030
|**description**|string|1|no||Human readable description of the value.
31-
|**displayName**|string|1|no||Human readable name of the value to display in various analysis tools.
31+
|**displayName**|string|1|no||Human readable name of the value.
3232
|**name**|<<intro-names, name>> string|1|yes||Name of the value.
3333
|**sinceVersion**|<<intro-numeric, unsigned>>|1|no|0|Version of the protocol in which value was introduced.
3434
|**val**|<<intro-numeric, numeric>>|1|yes||Numeric value.

appendix/fields.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ Refer to <<fields-common, Common Properties of Fields>> chapter for detailed des
1414
Must be greater than value of **sinceVersion**. +
1515
Applipable only to members of the <<messages-messages, &lt;message&gt; >> or <<fields-bundle, &lt;bundle&gt; >>.
1616
|**description**|string|1|no||Human readable description of the field.
17-
|**displayHidden**|<<intro-boolean, bool>>|1|no|false|Don't display field at all in visual analysis tool(s).
1817
|**displayName**|string|1|no||Name of the field to display. If empty, the code generator must use value of property **name** instead. In order to force empty name to display, use "_" (underscore).
19-
|**displayReadOnly**|<<intro-boolean, bool>>|1|no|false|Disable modification of the field in visual analysis tool(s).
2018
|**failOnInvalid**|<<intro-boolean, bool>>|1|no|false|Fail *read* operation if read value is invalid.
19+
|**fixedValue**|<<intro-boolean, bool>>|7|no|false|Remove an ability to update field's value after the object construction.
2120
|**forceGen**|<<intro-boolean, bool>>|3|no|false|Force generation of field's code regardless of it's being referenced or not.
2221
|**lengthOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **length** retrieval.
2322
|**name**|<<intro-names, name>> string|1|yes||Name of the field.
@@ -32,6 +31,7 @@ Applicable only to members of the <<messages-messages, &lt;message&gt; >> or <<f
3231
|**semanticType**|"none", "messageId", "version", "length"|1|no|none|Specify semantic type of the field. It allows code generator to generate special code for special cases. Value "length" was introduced in **v2** of this specification.
3332
|**sinceVersion**|<<intro-numeric, unsigned>>|1|no|0|Version of the protocol in which field was introduced. +
3433
Applicable only to members of the <<messages-messages, &lt;message&gt; >> or <<fields-bundle, &lt;bundle&gt; >>.
34+
|**validateMinLength**|<<intro-numeric, numeric>>|7|no||Specify expected minimal serialization length of the field.
3535
|**validOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **valid** retrieval.
3636
|**valueOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **value** operation.
3737
|**writeOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **write** operation.

appendix/float.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ for detailed description.
1010
|Property Name|Allowed Type / Value|DSL Version|Required|Default Value ^.^|Description
1111

1212
|**defaultValue**|floating point value, **nan**, **inf**, **-inf**|1|no|0.0|Default value. Must fit the underlying **type**.
13-
|**displayDecimals**|<<intro-numeric, numeric>>|1|no|0|Indicates to GUI analysis how many digits need to be displayed after the fraction point.
14-
|**displaySpecials**|<<intro-boolean, bool>>|2|no|true|Control displaying **&lt;special&gt;** values in analysis tools.
13+
|**displayDecimals**|<<intro-numeric, numeric>>|1|no|0|Specifies number of digits to be displayed after the fraction point.
1514
|**endian**|"big" or "little"|1|no|endian of <<schema-schema, schema>>|Endian of the field.
1615
|**nonUniqueSpecialsAllowed**|<<intro-boolean, bool>>|2|no|false|Allow non unique **&lt;special&gt;**-s.
1716
|**type**|"float", "double"|1|yes||Underlying primitive type
@@ -32,7 +31,7 @@ for detailed description.
3231
|**deprecated**|<<intro-numeric, unsigned>>|1|no|max unsigned|Version of the protocol in which value was deprecated. +
3332
Must be greater than value of **sinceVersion**.
3433
|**description**|string|1|no||Human readable description of the value.
35-
|**displayName**|string|2|no||Name to display in various analysis tools.
34+
|**displayName**|string|2|no||Human readable name of the value.
3635
|**name**|<<intro-names, name>> string|1|yes||Name of the value.
3736
|**sinceVersion**|<<intro-numeric, unsigned>>|1|no|0|Version of the protocol in which value was introduced.
3837
|**val**|floating point value, **nan**, **inf**, **-inf**|1|yes||Numeric value.

appendix/int.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ for detailed description.
1313
|**bitLength**|<<intro-numeric, unsigned>>|1|no|length of **type** in bits|Serialization length in bits, applicable only to a member of <<fields-bitfield, &lt;bitfield&gt; >>.
1414
|**defaultValidValue**|<<intro-numeric, numeric>> or <<intro-names, name>>|4|no||Convenience bunding of the **defaultValue** and **validValue** into a single property.
1515
|**defaultValue**|<<intro-numeric, numeric>> or <<intro-names, name>>|1|no|0|Default value. Must fit the underlying **type**.
16-
|**displayDecimals**|<<intro-numeric, numeric>>|1|no|0|Indicates to GUI analysis tools to display this field as floating point value with specified number of digits after the fraction point.
17-
|**displayOffset**|<<intro-numeric, numeric>>|1|no|0|Indicates to GUI analysis tools to add specified offset value to a field's value when displaying it.
18-
|**displaySpecials**|<<intro-boolean, bool>>|2|no|true|Control displaying **&lt;special&gt;** values in analysis tools.
16+
|**displayDecimals**|<<intro-numeric, numeric>>|1|no|0|Use specified number of digits after the fraction point when displaying the field's value as floating point.
17+
|**displayOffset**|<<intro-numeric, numeric>>|1|no|0|Add specified offset value to a field's value when displaying it.
1918
|**endian**|"big" or "little"|1|no|endian of <<schema-schema, schema>>|Endian of the field.
2019
|**length**|<<intro-numeric, unsigned>>|1|no|length of **type**|Forced serialization length.
2120
|**nonUniqueSpecialsAllowed**|<<intro-boolean, bool>>|2|no|false|Allow non unique **&lt;special&gt;**-s.
@@ -39,7 +38,7 @@ for detailed description.
3938
|**deprecated**|<<intro-numeric, unsigned>>|1|no|max unsigned|Version of the protocol in which value was deprecated. +
4039
Must be greater than value of **sinceVersion**.
4140
|**description**|string|1|no||Human readable description of the value.
42-
|**displayName**|string|2|no||Name to display in various analysis tools.
41+
|**displayName**|string|2|no||Human readable name of the value.
4342
|**name**|<<intro-names, name>> string|1|yes||Name of the value.
4443
|**sinceVersion**|<<intro-numeric, unsigned>>|1|no|0|Version of the protocol in which value was introduced.
4544
|**val**|<<intro-numeric, numeric>>|1|yes||Numeric value.

appendix/interface.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ for detailed description.
1212
|**copyFieldsFrom**|<<intro-references, reference>> string|1|no||Interface or bundle field definition from which fields need to be copied.
1313
|**description**|string|1|no||Human readable description of the interface.
1414
|**name**|<<intro-names, name>> string|1|yes||Name of the interface.
15+
|**reuse**|<<intro-references, reference>> string|7|no||Interface definition of which to copy.
16+
|**reuseAliases**|<<intro-boolean, bool>>|7|no|true|Control copy of the defined <<aliases-aliases, aliases>> from reused other <<interfaces-interfaces, &lt;interface&gt; >> when **reuse** property is used.
17+
|**reuseCode**|<<intro-boolean, bool>>|7|no|false|In case of **reuse** apply **copyCodeFrom** with the same <<intro-references, reference>> string.
1518
|===
1619

1720

@@ -20,7 +23,5 @@ Extra child XML elements allowed:
2023
[cols="^.^28,^.^10,62", options="header"]
2124
|===
2225
|XML Element|DSL Version ^.^|Description
23-
24-
|**copyFieldsAliases**|<<intro-boolean, bool>>|3|no|true|Control copy of the defined <<aliases-aliases, aliases>> when **copyFieldsFrom** property is used to copy fields from the other <<interfaces-interfaces, &lt;interface&gt; >> or <<fields-bundle, &lt;bundle&gt; >>.
2526
|**&lt;fields&gt;**|1|Wraps member fields.
2627
|===

appendix/message.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ for detailed description.
1111
|**construct**|string|6|no||Construction requirement.
1212
|**constructAsReadCond**|bool|6|no|false|Copy **construct** value(s) to **readCond**.
1313
|**constructAsValidCond**|bool|6|no|false|Copy **construct** value(s) to **validCond**.
14-
|**copyCodeFrom**|<<intro-references, reference>> string|5|no||Specify message, overriding or other extra code of which needs to be copied.
14+
|**copyCodeFrom**|<<intro-references, reference>> string|5|no||Message from which overriding or other extra code needs to be copied.
15+
|**copyConstructFrom**|<<intro-references, reference>> string|7|no||Message from which to copy construction requirements.
1516
|**copyFieldsAliases**|<<intro-boolean, bool>>|3|no|true|Control copy of the defined <<aliases-aliases, aliases>> when **copyFieldsFrom** property is used to copy fields from the other <<messages-messages, &lt;message&gt; >> or <<fields-bundle, &lt;bundle&gt; >>.
1617
|**copyFieldsFrom**|<<intro-references, reference>> string|1|no||Message or bundle field definition from which fields need to be copied.
18+
|**copyReadCondFrom**|<<intro-references, reference>> string|7|no||Message from which to copy read conditions.
19+
|**copyValidCondFrom**|<<intro-references, reference>> string|7|no||Message from which to copy validity conditions.
1720
|**customizable**|<<intro-boolean, bool>>|1|no|false|Mark the message to allow compile time customization regardless of code generator's level of customization.
1821
|**deprecated**|<<intro-numeric, unsigned>>|1|no|max unsigned|Version of the protocol in which message was deprecated. +
1922
Must be greater than value of **sinceVersion**.
@@ -28,13 +31,16 @@ Must be greater than value of **sinceVersion**.
2831
|**readCond**|string|6|no||Extra read operation condition.
2932
|**readOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **read** operation.
3033
|**refreshOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **refresh** operation.
34+
|**reuse**|<<intro-references, reference>> string|7|no||Message definition of which to copy.
35+
|**reuseAliases**|<<intro-boolean, bool>>|7|no|true|Control copy of the defined <<aliases-aliases, aliases>> from reused other <<messages-messages, &lt;message&gt; >> when **reuse** property is used.
36+
|**reuseCode**|<<intro-boolean, bool>>|7|no|false|In case of **reuse** apply **copyCodeFrom** with the same <<intro-references, reference>> string.
3137
|**removed**|<<intro-boolean, bool>>|1|no|false|Indicates whether deprecated message has been removed from being supported.
3238
|**sender**|"both", "client", "server"|1|no|both|Endpoint that sends the message.
3339
|**sinceVersion**|<<intro-numeric, unsigned>>|1|no|0|Version of the protocol in which message was introduced.
3440
|**validateMinLength**|<<intro-numeric, numeric>>|4|no||Specify expected minimal serialization length of the message fields.
35-
|**writeOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **write** operation.
3641
|**validCond**|string|6|no||Extra validity check operation condition.
3742
|**validOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **valid** retrieval.
43+
|**writeOverride**|"any", "replace", "extend", "none"|4|no|any|Control the overriding code for **write** operation.
3844
|===
3945

4046
Extra child XML elements allowed:

appendix/optional.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ for detailed description.
1111

1212
|**cond**|string|1|no||Condition when the field exists.
1313
|**defaultMode**|"tentative", "missing", "exist"|1|no|tentative|Default mode of the field. See also <<appendix-optional-default-mode, Default Mode Strings>> below.
14-
|**displayExtModeCtrl**|<<intro-boolean, bool>>|1|no|false|Disable manual update of the mode in GUI analysis tools.
1514
|**field**|<<fields-fields, field>>|1|no||Wrapped field.
1615
|**missingOnInvalid**|<<intro-boolean, bool>>|5|no|false|Mark the field as "missing" if the field's value is invalid.
1716
|**missingOnReadFail**|<<intro-boolean, bool>>|5|no|false|Mark the field as "missing" if its read operation fails.

0 commit comments

Comments
 (0)