You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/07/03 19:01:12 UTC
[plc4x] branch develop updated: - Added some documentation change
to reflect the latest changes in the mspec format.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new af32c48 - Added some documentation change to reflect the latest changes in the mspec format.
af32c48 is described below
commit af32c481aa1f9a5040f6e4def2e5e0366fb5b897
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Jul 3 21:01:01 2019 +0200
- Added some documentation change to reflect the latest changes in the mspec format.
---
src/site/asciidoc/developers/code-gen/protocol/mspec.adoc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc b/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc
index 36b2026..22705d1 100644
--- a/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc
+++ b/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc
@@ -179,7 +179,7 @@ This way the application will not break in the future if devices start using the
['{vargument-1-value-2}', '{argument-2-value-1}' {subtype-2-name}
... Fields ...
]
- ['{vargument-1-value-3}', '{argument-2-value-2}' {subtype-2-name}
+ ['{vargument-1-value-3}', '{argument-2-value-2}' {subtype-2-name} [uint 8 'existing-attribute-1', uint 16 'existing-attribute-2']
... Fields ...
]
@@ -197,6 +197,10 @@ If no type is found, an exception is thrown.
Inside each sub-type can declare fields using a subset of the types (`discriminator` and `typeSwitch` can't be used here)
+The third case in above code-snippet also passes a named attribute to the sub-type.
+The name must be identical to any argument or named field parsed before the switchType.
+These arguments are then available for expressions or passing on in the subtypes.
+
==== Parameters
Some times it is necessary to pass along additional parameters.