You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/11/04 09:41:55 UTC
[plc4x] 01/02: feat(plc4x/codegen): remove obsolete ticks
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch feature/mspec-ng
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 2448edab8ae7fec526924ca8d9cda1f97a3e4b29
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Nov 4 10:28:33 2021 +0100
feat(plc4x/codegen): remove obsolete ticks
---
.../src/test/resources/mspec.example | 28 +++----
.../src/test/resources/mspec.example2 | 76 ++++++++---------
.../src/main/resources/protocols/test/test.mspec | 78 +++++++++---------
.../main/resources/protocols/abeth/ab-eth.mspec | 8 +-
.../resources/protocols/ads/ads-discovery.mspec | 12 +--
.../ads/src/main/resources/protocols/ads/ads.mspec | 32 ++++----
.../resources/protocols/bacnetip/bacnetip.mspec | 38 ++++-----
.../src/main/resources/protocols/can/canopen.mspec | 36 ++++-----
.../df1/src/main/resources/protocols/df1/df1.mspec | 4 +-
.../eip/src/main/resources/protocols/eip/eip.mspec | 2 +-
.../main/resources/protocols/firmata/firmata.mspec | 8 +-
.../main/resources/protocols/can/genericcan.mspec | 2 +-
.../resources/protocols/knxnetip/device-info.mspec | 2 +-
.../resources/protocols/knxnetip/knxnetip.mspec | 94 +++++++++++-----------
protocols/knxnetip/src/main/xslt/knx-types.xsl | 14 ++--
.../protocol/knxnetip/KnxDefinitionsGenerator.java | 2 +-
.../main/resources/protocols/modbus/modbus.mspec | 22 ++---
protocols/opcua/src/main/xslt/opc-common.xsl | 8 +-
protocols/opcua/src/main/xslt/opc-manual.xsl | 38 ++++-----
protocols/opcua/src/main/xslt/opc-services.xsl | 2 +-
protocols/opcua/src/main/xslt/opc-status.xsl | 2 +-
.../src/main/resources/protocols/plc4x/plc4x.mspec | 4 +-
.../resources/protocols/profinet/profinet.mspec | 92 ++++++++++-----------
.../s7/src/main/resources/protocols/s7/s7.mspec | 88 ++++++++++----------
.../resources/protocols/simulated/simulated.mspec | 4 +-
.../main/resources/protocols/can/socketcan.mspec | 2 +-
.../asciidoc/developers/code-gen/protocol/df1.adoc | 4 +-
.../developers/code-gen/protocol/mspec.adoc | 6 +-
28 files changed, 354 insertions(+), 354 deletions(-)
diff --git a/code-generation/protocol-base-mspec/src/test/resources/mspec.example b/code-generation/protocol-base-mspec/src/test/resources/mspec.example
index 653a325..72386e6 100644
--- a/code-generation/protocol-base-mspec/src/test/resources/mspec.example
+++ b/code-generation/protocol-base-mspec/src/test/resources/mspec.example
@@ -21,7 +21,7 @@
// AMS/TCP Packet
////////////////////////////////////////////////////////////////
-[type 'AmsTCPPacket'
+[type AmsTCPPacket
// The ams - tcp to be sent.
[simple AmsTcpHeader 'amsTcpHeader']
// The AMS packet to be sent.
@@ -29,7 +29,7 @@
]
// AMS/TCP Header 6 bytes contains the tcpLength of the data packet.
-[type 'AmsTcpHeader'
+[type AmsTcpHeader
// These bytes must be set to 0.
[reserved uint 16 '0x0000' ]
// This array contains the length of the data packet.
@@ -47,7 +47,7 @@
*
* @see <a href="https://infosys.beckhoff.com/content/1033/tcadsamsserialspec/html/tcamssericalspec_amsframe.htm?id=8115637053270715044">TwinCAT AMS via RS232 Specification</a>
*/
-[type 'AmsSerialAcknowledgeFrame'
+[type AmsSerialAcknowledgeFrame
// Id for detecting an AMS serial frame.
[simple uint 16 'magicCookie' ]
// Address of the sending participant. This value can always be set to 0 for an RS232 communication,
@@ -75,7 +75,7 @@
* exceeded. The CRC16 algorithm is used for calculating the checksum.
* @see <a href="https://infosys.beckhoff.com/content/1033/tcadsamsserialspec/html/tcamssericalspec_amsframe.htm?id=8115637053270715044">TwinCAT AMS via RS232 Specification</a>
*/
-[type 'AmsSerialFrame'
+[type AmsSerialFrame
// Id for detecting an AMS serial frame.
[simple uint 16 'magicCookie' ]
// Address of the sending participant. This value can always be set to 0 for an RS232 communication,
@@ -100,7 +100,7 @@
* sent. In this way the receiver is informed that a new communication is running and the receiver then accepts the
* fragment number during the next AMS-Frame, without carrying out a check.
*/
-[type 'AmsSerialResetFrame'
+[type AmsSerialResetFrame
// Id for detecting an AMS serial frame.
[simple uint 16 'magicCookie' ]
// Address of the sending participant. This value can always be set to 0 for an RS232 communication,
@@ -122,13 +122,13 @@
// AMS Common
////////////////////////////////////////////////////////////////
-[type 'AmsPacket'
+[type AmsPacket
[simple AmsHeader 'amsHeader' ]
[simple ADSData('amsHeader.commandId', 'amsHeader.state.response') 'data' ]
]
// AMS Header 32 bytes The AMS/TCP-Header contains the addresses of the transmitter and receiver. In addition the AMS error code , the ADS command Id and some other information.
-[type 'AmsHeader'
+[type AmsHeader
// This is the AmsNetId of the station, for which the packet is intended. Remarks see below.
[simple AmsNetId 'targetAmsNetId' ]
// This is the AmsPort of the station, for which the packet is intended.
@@ -150,7 +150,7 @@
[simple uint 32 'invokeId' ]
]
-[enum uint 16 'CommandId'
+[enum uint 16 CommandId
['0x00' INVALID]
['0x01' ADS_READ_DEVICE_INFO]
['0x02' ADS_READ]
@@ -163,7 +163,7 @@
['0x09' ADS_READ_WRITE]
]
-[type 'State'
+[type State
[simple bit 'broadcast' ]
[reserved int 7 '0x0' ]
[simple bit 'initCommand' ]
@@ -197,7 +197,7 @@
* documentation for notes about settings of the AMS NetId.
* @see <a href="https://infosys.beckhoff.com/content/1033/tcadscommon/html/tcadscommon_identadsdevice.htm?id=3991659524769593444">ADS device identification</a>
*/
-[type 'AmsNetId'
+[type AmsNetId
[simple uint 8 'octet1' ]
[simple uint 8 'octet2' ]
[simple uint 8 'octet3' ]
@@ -206,7 +206,7 @@
[simple uint 8 'octet6' ]
]
-[discriminatedType 'ADSData' (CommandId 'commandId', bit 'response')
+[discriminatedType ADSData(CommandId 'commandId', bit 'response')
[typeSwitch 'commandId', 'response'
['INVALID', 'true' AdsInvalidResponse]
['INVALID', 'false' AdsInvalidRequest]
@@ -339,7 +339,7 @@
]
]
-[type 'AdsStampHeader'
+[type AdsStampHeader
// 8 bytes The timestamp is coded after the Windows FILETIME format. I.e. the value contains the number of the nano seconds, which passed since 1.1.1601. In addition, the local time change is not considered. Thus the time stamp is present as universal Coordinated time (UTC).
[simple uint 64 'timestamp']
// 4 bytes Number of elements of type AdsNotificationSample.
@@ -348,7 +348,7 @@
[array AdsNotificationSample 'adsNotificationSamples' count 'samples']
]
-[type 'AdsNotificationSample'
+[type AdsNotificationSample
// 4 bytes Handle of notification
[simple uint 32 'notificationHandle']
// 4 Bytes Size of data range in bytes.
@@ -358,7 +358,7 @@
]
//Specific Case for variable string length
-[type 'VariableStringType'
+[type VariableStringType
//Confirm implicit can be used in string length
[implicit uint 32 'stringLength' 'stringValue.lengthInBytes']
[simple vstring 'stringLength' 'stringValue']
diff --git a/code-generation/protocol-base-mspec/src/test/resources/mspec.example2 b/code-generation/protocol-base-mspec/src/test/resources/mspec.example2
index 2052ac8..edf7a78 100644
--- a/code-generation/protocol-base-mspec/src/test/resources/mspec.example2
+++ b/code-generation/protocol-base-mspec/src/test/resources/mspec.example2
@@ -25,12 +25,12 @@
// Bit Field Test Single
// Java +, C +, Go +
// tag::SimpleBitTypeTest[]
-[type 'SimpleBitTypeTest'
+[type SimpleBitTypeTest
[simple bit 'bitField']
]
// end::SimpleBitTypeTest[]
-[type 'FieldTypeTest'
+[type FieldTypeTest
[simple uint 8 'simpleField']
//Abstract fields can only be used within discriminated base types.
//[abstract unit 8 'abstractField']
@@ -50,7 +50,7 @@
]
// If a type has an unknown field, the entire serializer is reduced to firing an exception
-[type 'FieldTypeTestWithUnknownField'
+[type FieldTypeTestWithUnknownField
[simple uint 8 'simpleField']
//Abstract fields can only be used within discriminated base types.
//[abstract unit 8 'abstractField']
@@ -72,7 +72,7 @@
/*
* TODO: doesn't compile in java
-[type 'UFloatTypeTest'
+[type UFloatTypeTest
[simple ufloat 32 'ufloatField']
[simple ufloat 64 'udoubleField']
]
@@ -80,14 +80,14 @@
/*
* TODO: doesn't compile in java
-[type 'TimeTypeTest'
+[type TimeTypeTest
[simple time 8 'timeField']
[simple date 8 'dateField']
[simple dateTime 8 'dateTimeField']
]
*/
-[type 'SimpleTypeTest'
+[type SimpleTypeTest
[simple bit 'bitField']
[simple byte 'byteField']
[simple int 8 'intField']
@@ -97,7 +97,7 @@
[simple string 8 'stringField' encoding='UTF-8']
]
-[type 'AbstractTypeTest'
+[type AbstractTypeTest
//Abstract fields can only be used within discriminated base types.
[simple uint 8 'simpleField']
[abstract bit 'abstractBitField']
@@ -118,7 +118,7 @@
]
]
-[type 'AbstractTypeTest'
+[type AbstractTypeTest
//Abstract fields can only be used within discriminated base types.
[simple uint 8 'simpleField']
[abstract bit 'abstractBitField']
@@ -140,7 +140,7 @@
]
]
-[type 'ArrayTypeTest'
+[type ArrayTypeTest
[array bit 'bitField' count '5']
[array int 8 'intField' count '5']
[array uint 8 'uintField' count '5']
@@ -150,7 +150,7 @@
]
//TODO: Checksums fields are not supported in C
-//[type 'CheckSumTypeTest'
+//[type CheckSumTypeTest
//Bit field cannot be used for a checksum
//[checksum bit 'bitField' true]
//[checksum int 8 'intField' '100']
@@ -162,7 +162,7 @@
//[checksum vstring '11 * 8' 'stringField' '"HELLO TODDY"' encoding='UTF-8']
//]
-[type 'ConstTypeTest'
+[type ConstTypeTest
[const bit 'bitField' 'true']
[const int 8 'intField' '100']
[const uint 8 'uintField' '100']
@@ -171,21 +171,21 @@
[const string 8 'stringField' '"HELLO TODDY"' encoding='UTF-8']
]
-[type 'EnumTypeTest'
+[type EnumTypeTest
[enum EnumType 'enumField' 'lalala']
]
-[type 'PascalStringTypeTest'
+[type PascalStringTypeTest
[simple int 8 'stringLength']
[simple vstring 'stringLength' 'stringField' encoding='UTF-8']
]
-[type 'ImplicitPascalStringTypeTest'
+[type ImplicitPascalStringTypeTest
[implicit int 8 'stringLength' 'stringField.length']
[simple vstring 'stringLength' 'stringField' encoding='UTF-8']
]
-[type 'ImplicitTypeTest'
+[type ImplicitTypeTest
//Implicit types have the requirement that the expression is of a similar type to the field
//TODO: i.e Integers can't be cast to Booleans
[simple uint 8 'simpleField']
@@ -199,22 +199,22 @@
//[implicit string 8 'stringField' 'simpleField > 0 ? "HELLO TODDY" : "BYE TODDY"' encoding='UTF-8']
]
-[type 'OptionalTypeTest'
+[type OptionalTypeTest
[simple uint 8 'simpleField']
[optional uint 8 'optionalField' 'simpleField == 5']
]
-[type 'PaddingTypeTest'
+[type PaddingTypeTest
[simple uint 8 'simpleField']
[padding uint 8 'paddingField' '0x00' 'simpleField']
]
-[type 'ReservedTypeTest'
+[type ReservedTypeTest
[reserved uint 8 '0x00']
]
//TODO: Virtual fields fail for GO, haven't checked C assuming fails.
-//[type 'VirtualFieldTest'
+//[type VirtualFieldTest
// [simple uint 8 'simpleField']
// [virtual bit 'virtualBitField' 'simpleField == 0']
// [virtual int 8 'virtualIntField' 'simpleField']
@@ -225,7 +225,7 @@
//]
//TODO: Virtual fields fail for GO, haven't checked C assuming fails.
-//[discriminatedType 'DiscriminatedVirtualTypeTest'
+//[discriminatedType DiscriminatedVirtualTypeTest
// [simple uint 8 'simpleField']
// [virtual bit 'virtualBitField' 'simpleField == 0']
// [virtual int 8 'virtualIntField' 'simpleField']
@@ -240,7 +240,7 @@
// ]
//]
-[type 'IntTypeTest'
+[type IntTypeTest
[simple int 3 'ThreeField']
[simple int 8 'ByteField']
[simple int 16 'WordField']
@@ -249,7 +249,7 @@
[simple int 64 'QuadIntField']
]
-[type 'UIntTypeTest'
+[type UIntTypeTest
[simple uint 3 'ThreeField']
[simple uint 8 'ByteField']
[simple uint 16 'WordField']
@@ -259,7 +259,7 @@
]
//Specific test confirming a continuous loop isn't formed when working out the length.
-[type 'LentghLoopTest'
+[type LentghLoopTest
[simple uint 16 'commandType']
[implicit uint 16 'len' 'lengthInBytes - 8']
]
@@ -268,7 +268,7 @@
// Discriminated Type Tests
////////////////////////////////////////////////////////////////
-[discriminatedType 'EnumDiscriminatedType'
+[discriminatedType EnumDiscriminatedType
[discriminator EnumType 'discr']
[typeSwitch 'discr'
['BOOL' EnumDiscriminatedTypeA
@@ -284,7 +284,7 @@
]
// Multiple Enumerated discriminators
-[discriminatedType 'EnumDiscriminatedTypeMultiple'
+[discriminatedType EnumDiscriminatedTypeMultiple
[discriminator EnumType 'discr1']
[discriminator EnumTypeInt 'discr2']
[typeSwitch 'discr1','discr2'
@@ -301,7 +301,7 @@
]
// Enumerated Parameter
-[discriminatedType 'EnumDiscriminatedTypeParameter' (EnumType 'discr')
+[discriminatedType EnumDiscriminatedTypeParameter(EnumType 'discr')
[typeSwitch 'discr'
['BOOL' EnumDiscriminatedTypeAParameter
[simple uint 8 'simpA']
@@ -316,7 +316,7 @@
]
// Multiple Enumerated Parameters
-[discriminatedType 'EnumDiscriminatedTypeParameterMultiple' (EnumType 'discr1', EnumTypeInt 'discr2')
+[discriminatedType EnumDiscriminatedTypeParameterMultiple(EnumType 'discr1', EnumTypeInt 'discr2')
[typeSwitch 'discr1','discr2'
['BOOL','BOOLINT' EnumDiscriminatedTypeAParameterMultiple
[simple uint 8 'simpA']
@@ -330,7 +330,7 @@
]
]
-[discriminatedType 'SimpleDiscriminatedType'
+[discriminatedType SimpleDiscriminatedType
[discriminator uint 8 'discr']
[typeSwitch 'discr'
['0x00' SimpleDiscriminatedTypeA
@@ -347,7 +347,7 @@
//Test to check if we can include concrete types as fields. Doesn't work in any language at the moment.
-//[discriminatedType 'SimpleDiscriminatedType'
+//[discriminatedType SimpleDiscriminatedType
// [discriminator uint 8 'discr']
// [typeSwitch 'discr'
// ['0x00' SimpleDiscriminatedTypeA
@@ -356,7 +356,7 @@
// ]
//]
-//[discriminatedType 'AnotherSimpleDiscriminatedType'
+//[discriminatedType AnotherSimpleDiscriminatedType
// [discriminator uint 8 'discr']
// [typeSwitch 'discr'
// ['0x00' AnotherSimpleDiscriminatedTypeA
@@ -374,27 +374,27 @@
['false' FALSE]
]
-[enum int 8 'EnumTypeInt'
+[enum int 8 EnumTypeInt
['0x01' BOOLINT]
['0x02' UINTINT]
['0x03' INTINT]
]
-[enum uint 8 'EnumType'
+[enum uint 8 EnumType
['0x01' BOOL]
['0x02' UINT]
['0x03' INT]
]
//TODO: C doesn't support non integer switch fields
-//[enum float 32 'EnumTypeFloat'
+//[enum float 32 EnumTypeFloat
// ['100.0' LOW]
// ['101.0' MID]
// ['102.0' BIG]
//]
//TODO: C doesn't support non integer switch fields
-//[enum float 64 'EnumTypeDouble'
+//[enum float 64 EnumTypeDouble
// ['100.0' LOW]
// ['101.0' MID]
// ['102.0' BIG]
@@ -413,19 +413,19 @@
//]
//TODO: Float parameters aren't implemented for constants in enums in C
-//[enum int 8 'EnumTypeAllTest' (bit 'bitType', int 8 'intType', uint 8 'uintType', float 32 'floatType', float 64 'doubleType', string '-1' 'stringType', EnumType 'enumType')
+//[enum int 8 EnumTypeAllTest(bit 'bitType', int 8 'intType', uint 8 'uintType', float 32 'floatType', float 64 'doubleType', string '-1' 'stringType', EnumType 'enumType')
// ['0x01' BOOL ['false' , '1' , '1' , '100.0' , '100.0' , 'BOOL' , 'BOOL']]
// ['0x02' BYTE ['true' , '2' , '2' , '101.1' , '101.1' , 'BYTE' , 'UINT']]
//]
//TODO: Keyword named parameters aren't allowed
-//[enum int 8 'EnumTypeIntTest' (int 8 'int')
+//[enum int 8 EnumTypeIntTest (int 8 'int')
// ['0x01' BOOL ['1']]
// ['0x02' BYTE ['2']]
//]
//Showing allowed parameter types for enums
-[enum int 8 'EnumTypeParameters' (bit 'bitType', int 8 'intType', uint 8 'uintType', string 32 'stringType', EnumType 'enumType')
+[enum int 8 EnumTypeParameters(bit 'bitType', int 8 'intType', uint 8 'uintType', string 32 'stringType', EnumType 'enumType')
['0x01' BOOL ['false' , '1' , '1' , 'BOOL' , 'BOOL']]
['0x02' BYTE ['true' , '2' , '2' , 'BYTE' , 'UINT']]
]
@@ -434,7 +434,7 @@
// Data IO Tests
////////////////////////////////////////////////////////////////
-[dataIo 'DataIOType' (EnumType 'dataType')
+[dataIo DataIOType(EnumType 'dataType')
[typeSwitch 'dataType'
['BOOL' BOOL
[simple bit 'value']
diff --git a/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec b/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec
index 6d99af0..5726bba 100644
--- a/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec
+++ b/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec
@@ -25,12 +25,12 @@
// Bit Field Test Single
// Java +, C +, Go +
// tag::SimpleBitTypeTest[]
-[type 'SimpleBitTypeTest'
+[type SimpleBitTypeTest
[simple bit 'bitField']
]
// end::SimpleBitTypeTest[]
-[type 'FieldTypeTest'
+[type FieldTypeTest
[simple uint 8 'simpleField']
//Abstract fields can only be used within discriminated base types.
//[abstract unit 8 'abstractField']
@@ -50,7 +50,7 @@
]
// If a type has an unknown field, the entire serializer is reduced to firing an exception
-[type 'FieldTypeTestWithUnknownField'
+[type FieldTypeTestWithUnknownField
[simple uint 8 'simpleField']
//Abstract fields can only be used within discriminated base types.
//[abstract unit 8 'abstractField']
@@ -72,7 +72,7 @@
/*
* TODO: doesn't compile in java
-[type 'UFloatTypeTest'
+[type UFloatTypeTest
[simple ufloat 32 'ufloatField']
[simple ufloat 64 'udoubleField']
]
@@ -80,14 +80,14 @@
/*
* TODO: doesn't compile in java
-[type 'TimeTypeTest'
+[type TimeTypeTest
[simple time 8 'timeField']
[simple date 8 'dateField']
[simple dateTime 8 'dateTimeField']
]
*/
-[type 'SimpleTypeTest'
+[type SimpleTypeTest
[simple bit 'bitField']
[simple byte 'byteField']
[simple int 8 'intField']
@@ -97,7 +97,7 @@
[simple string 8 'stringField']
]
-[type 'AbstractTypeTest'
+[type AbstractTypeTest
//Abstract fields can only be used within discriminated base types.
[simple uint 8 'simpleField']
[abstract bit 'abstractBitField']
@@ -118,7 +118,7 @@
]
]
-[type 'AbstractTypeTest'
+[type AbstractTypeTest
//Abstract fields can only be used within discriminated base types.
[simple uint 8 'simpleField']
[abstract bit 'abstractBitField']
@@ -140,7 +140,7 @@
]
]
-[type 'ArrayTypeTest'
+[type ArrayTypeTest
[array bit 'bitField' count '5']
[array int 8 'intField' count '5']
[array uint 8 'uintField' count '5']
@@ -150,7 +150,7 @@
]
//TODO: Checksums fields are not supported in C
-//[type 'CheckSumTypeTest'
+//[type CheckSumTypeTest
//Bit field cannot be used for a checksum
//[checksum bit 'bitField' true]
//[checksum int 8 'intField' '100']
@@ -162,7 +162,7 @@
//[checksum vstring '11 * 8' 'stringField' '"HELLO TODDY"']
//]
-[type 'ConstTypeTest'
+[type ConstTypeTest
[const bit 'bitField' 'true']
[const int 8 'intField' '100']
[const uint 8 'uintField' '100']
@@ -171,21 +171,21 @@
[const string 8 'stringField' '"HELLO TODDY"']
]
-[type 'EnumTypeTest'
+[type EnumTypeTest
[enum EnumTypeParameters 'enumField' 'intType']
]
-[type 'PascalStringTypeTest'
+[type PascalStringTypeTest
[simple int 8 'stringLength']
[simple vstring 'stringLength' 'stringField']
]
-[type 'ImplicitPascalStringTypeTest'
+[type ImplicitPascalStringTypeTest
[implicit int 8 'stringLength' 'stringField.length']
[simple vstring 'stringLength' 'stringField']
]
-[type 'ImplicitTypeTest'
+[type ImplicitTypeTest
//Implicit types have the requirement that the expression is of a similar type to the field
//TODO: i.e Integers can't be cast to Booleans
[simple uint 8 'simpleField']
@@ -199,22 +199,22 @@
//[implicit string 8 'stringField' 'simpleField > 0 ? "HELLO TODDY" : "BYE TODDY"']
]
-[type 'OptionalTypeTest'
+[type OptionalTypeTest
[simple uint 8 'simpleField']
[optional uint 8 'optionalField' 'simpleField == 5']
]
-[type 'PaddingTypeTest'
+[type PaddingTypeTest
[simple uint 8 'simpleField']
[padding uint 8 'paddingField' '0x00' 'simpleField']
]
-[type 'ReservedTypeTest'
+[type ReservedTypeTest
[reserved uint 8 '0x00']
]
//TODO: Virtual fields fail for GO, haven't checked C assuming fails.
-//[type 'VirtualFieldTest'
+//[type VirtualFieldTest
// [simple uint 8 'simpleField']
// [virtual bit 'virtualBitField' 'simpleField == 0']
// [virtual int 8 'virtualIntField' 'simpleField']
@@ -225,7 +225,7 @@
//]
//TODO: Virtual fields fail for GO, haven't checked C assuming fails.
-//[discriminatedType 'DiscriminatedVirtualTypeTest'
+//[discriminatedType DiscriminatedVirtualTypeTest
// [simple uint 8 'simpleField']
// [virtual bit 'virtualBitField' 'simpleField == 0']
// [virtual int 8 'virtualIntField' 'simpleField']
@@ -240,7 +240,7 @@
// ]
//]
-[type 'IntTypeTest'
+[type IntTypeTest
[simple int 3 'ThreeField']
[simple int 8 'ByteField']
[simple int 16 'WordField']
@@ -249,7 +249,7 @@
[simple int 64 'QuadIntField']
]
-[type 'UIntTypeTest'
+[type UIntTypeTest
[simple uint 3 'ThreeField']
[simple uint 8 'ByteField']
[simple uint 16 'WordField']
@@ -259,7 +259,7 @@
]
//Specific test confirming a continous loop isn't formed when working out the length.
-[type 'LentghLoopTest'
+[type LentghLoopTest
[simple uint 16 'commandType']
[implicit uint 16 'len' 'lengthInBytes - 8']
]
@@ -268,7 +268,7 @@
// Discriminated Type Tests
////////////////////////////////////////////////////////////////
-[discriminatedType 'EnumDiscriminatedType'
+[discriminatedType EnumDiscriminatedType
[discriminator EnumType 'discr']
[typeSwitch 'discr'
['BOOL' EnumDiscriminatedTypeA
@@ -284,7 +284,7 @@
]
// Multiple Enumerated discriminators
-[discriminatedType 'EnumDiscriminatedTypeMultiple'
+[discriminatedType EnumDiscriminatedTypeMultiple
[discriminator EnumType 'discr1']
[discriminator EnumTypeInt 'discr2']
[typeSwitch 'discr1','discr2'
@@ -301,7 +301,7 @@
]
// Enumerated Parameter
-[discriminatedType 'EnumDiscriminatedTypeParameter' (EnumType 'discr')
+[discriminatedType EnumDiscriminatedTypeParameter(EnumType 'discr')
[typeSwitch 'discr'
['BOOL' EnumDiscriminatedTypeAParameter
[simple uint 8 'simpA']
@@ -316,7 +316,7 @@
]
// Multiple Enumerated Parameters
-[discriminatedType 'EnumDiscriminatedTypeParameterMultiple' (EnumType 'discr1', EnumTypeInt 'discr2')
+[discriminatedType EnumDiscriminatedTypeParameterMultiple(EnumType 'discr1', EnumTypeInt 'discr2')
[typeSwitch 'discr1','discr2'
['BOOL','BOOLINT' EnumDiscriminatedTypeAParameterMultiple
[simple uint 8 'simpA']
@@ -330,7 +330,7 @@
]
]
-[discriminatedType 'SimpleDiscriminatedType'
+[discriminatedType SimpleDiscriminatedType
[discriminator uint 8 'discr']
[typeSwitch 'discr'
['0x00' SimpleDiscriminatedTypeA
@@ -347,7 +347,7 @@
//Test to check if we can include concrete types as fields. Doesn't work in any language at the moment.
-//[discriminatedType 'SimpleDiscriminatedType'
+//[discriminatedType SimpleDiscriminatedType
// [discriminator uint 8 'discr']
// [typeSwitch 'discr'
// ['0x00' SimpleDiscriminatedTypeA
@@ -356,7 +356,7 @@
// ]
//]
-//[discriminatedType 'AnotherSimpleDiscriminatedType'
+//[discriminatedType AnotherSimpleDiscriminatedType
// [discriminator uint 8 'discr']
// [typeSwitch 'discr'
// ['0x00' AnotherSimpleDiscriminatedTypeA
@@ -374,34 +374,34 @@
['false' FALSE]
]
-[enum int 8 'EnumTypeInt'
+[enum int 8 EnumTypeInt
['0x01' BOOLINT]
['0x02' UINTINT]
['0x03' INTINT]
]
-[enum uint 8 'EnumType'
+[enum uint 8 EnumType
['0x01' BOOL]
['0x02' UINT]
['0x03' INT]
]
//TODO: C doesn't support non integer switch fields
-//[enum float 32 'EnumTypeFloat'
+//[enum float 32 EnumTypeFloat
// ['100.0' LOW]
// ['101.0' MID]
// ['102.0' BIG]
//]
//TODO: C doesn't support non integer switch fields
-//[enum float 64 'EnumTypeDouble'
+//[enum float 64 EnumTypeDouble
// ['100.0' LOW]
// ['101.0' MID]
// ['102.0' BIG]
//]
//TODO: C doesn't support non integer switch fields
-//[enum string 48 'EnumTypeString'
+//[enum string 48 EnumTypeString
// ['Toddy1' TODDY]
//]
@@ -413,19 +413,19 @@
//]
//TODO: Float parameters aren't implemented for constants in enums in C
-//[enum int 8 'EnumTypeAllTest' (bit 'bitType', int 8 'intType', uint 8 'uintType', float 32 'floatType', float 64 'doubleType', string 32 'stringType', EnumType 'enumType')
+//[enum int 8 EnumTypeAllTest (bit 'bitType', int 8 'intType', uint 8 'uintType', float 32 'floatType', float 64 'doubleType', string 32 'stringType', EnumType 'enumType')
// ['0x01' BOOL ['false' , '1' , '1' , '100.0' , '100.0' , 'BOOL' , 'BOOL']]
// ['0x02' BYTE ['true' , '2' , '2' , '101.1' , '101.1' , 'BYTE' , 'UINT']]
//]
//TODO: Keyword named parameters aren't allowed
-//[enum int 8 'EnumTypeIntTest' (int 8 'int')
+//[enum int 8 EnumTypeIntTest(int 8 'int')
// ['0x01' BOOL ['1']]
// ['0x02' BYTE ['2']]
//]
//Showing allowed parameter types for enums
-[enum int 8 'EnumTypeParameters' (bit 'bitType', int 8 'intType', uint 8 'uintType', string 32 'stringType', EnumType 'enumType')
+[enum int 8 EnumTypeParameters(bit 'bitType', int 8 'intType', uint 8 'uintType', string 32 'stringType', EnumType 'enumType')
['0x01' BOOL ['false' , '1' , '1' , 'BOOL' , 'BOOL']]
['0x02' BYTE ['true' , '2' , '2' , 'BYTE' , 'UINT']]
]
@@ -434,7 +434,7 @@
// Data IO Tests
////////////////////////////////////////////////////////////////
-[dataIo 'DataIOType' (EnumType 'dataType')
+[dataIo DataIOType(EnumType 'dataType')
[typeSwitch 'dataType'
['BOOL' BOOL
[simple bit 'value']
diff --git a/protocols/ab-eth/src/main/resources/protocols/abeth/ab-eth.mspec b/protocols/ab-eth/src/main/resources/protocols/abeth/ab-eth.mspec
index 525e54c..7b9fba0 100644
--- a/protocols/ab-eth/src/main/resources/protocols/abeth/ab-eth.mspec
+++ b/protocols/ab-eth/src/main/resources/protocols/abeth/ab-eth.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[discriminatedType 'CIPEncapsulationPacket' byteOrder='"BIG_ENDIAN"'
+[discriminatedType CIPEncapsulationPacket byteOrder='"BIG_ENDIAN"'
[discriminator uint 16 'commandType']
[implicit uint 16 'len' 'lengthInBytes - 28']
[simple uint 32 'sessionHandle']
@@ -39,7 +39,7 @@
]
]
-[discriminatedType 'DF1RequestMessage'
+[discriminatedType DF1RequestMessage
[simple uint 8 'destinationAddress']
[simple uint 8 'sourceAddress']
[reserved uint 16 '0x0000']
@@ -53,7 +53,7 @@
]
]
-[discriminatedType 'DF1ResponseMessage' (uint 16 'payloadLength')
+[discriminatedType DF1ResponseMessage(uint 16 'payloadLength')
[reserved uint 8 '0x00']
[simple uint 8 'destinationAddress']
[simple uint 8 'sourceAddress']
@@ -68,7 +68,7 @@
]
]
-[discriminatedType 'DF1RequestCommand'
+[discriminatedType DF1RequestCommand
[discriminator uint 8 'functionCode']
[typeSwitch 'functionCode'
['0xA2' DF1RequestProtectedTypedLogicalRead
diff --git a/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec b/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec
index 1542275..1d3a567 100644
--- a/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec
+++ b/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec
@@ -21,7 +21,7 @@
// AMS/TCP Packet
////////////////////////////////////////////////////////////////
-[discriminatedType 'AdsDiscovery' byteOrder='"BIG_ENDIAN"'
+[discriminatedType AdsDiscovery byteOrder='"BIG_ENDIAN"'
[const uint 32 'header' '0x03661471L']
[reserved uint 32 '0x00000000L']
[simple Operation 'operation']
@@ -69,29 +69,29 @@
]
]
-[enum uint 8 'Operation'
+[enum uint 8 Operation
['0x01' DISCOVERY]
['0x06' ROUTE ]
]
-[enum uint 8 'Direction'
+[enum uint 8 Direction
['0x00' REQUEST ]
['0x80' RESPONSE]
]
-[enum uint 24 'RouteStatus'
+[enum uint 24 RouteStatus
['0x040000' SUCCESS]
['0x000407' FAILURE]
]
-[type 'AmsMagicString'
+[type AmsMagicString
[implicit uint 16 'len' 'COUNT(text) + 1']
[reserved uint 8 '0x00']
[array int 8 'text' count 'len - 1']
[reserved uint 8 '0x00']
]
-[type 'AmsNetId'
+[type AmsNetId
[simple uint 8 'octet1' ]
[simple uint 8 'octet2' ]
[simple uint 8 'octet3' ]
diff --git a/protocols/ads/src/main/resources/protocols/ads/ads.mspec b/protocols/ads/src/main/resources/protocols/ads/ads.mspec
index 8ab13cc..26d8950 100644
--- a/protocols/ads/src/main/resources/protocols/ads/ads.mspec
+++ b/protocols/ads/src/main/resources/protocols/ads/ads.mspec
@@ -21,7 +21,7 @@
// AMS/TCP Packet
////////////////////////////////////////////////////////////////
-[type 'AmsTCPPacket' byteOrder='"LITTLE_ENDIAN"'
+[type AmsTCPPacket byteOrder='"LITTLE_ENDIAN"'
// AMS/TCP Header 6 bytes contains the tcpLength of the data packet.
// These bytes must be set to 0.
[reserved uint 16 '0x0000' ]
@@ -40,7 +40,7 @@
// then the receiver has to send an acknowledge frame, to inform the transmitter that the frame has arrived.
//
// @see <a href="https://infosys.beckhoff.com/content/1033/tcadsamsserialspec/html/tcamssericalspec_amsframe.htm?id=8115637053270715044">TwinCAT AMS via RS232 Specification</a>
-[type 'AmsSerialAcknowledgeFrame'
+[type AmsSerialAcknowledgeFrame
// Id for detecting an AMS serial frame.
[simple uint 16 'magicCookie' ]
// Address of the sending participant. This value can always be set to 0 for an RS232 communication,
@@ -66,7 +66,7 @@
// The frame number is simply accepted and not checked when receiving the first AMS frame or in case a timeout is
// exceeded. The CRC16 algorithm is used for calculating the checksum.
// @see <a href="https://infosys.beckhoff.com/content/1033/tcadsamsserialspec/html/tcamssericalspec_amsframe.htm?id=8115637053270715044">TwinCAT AMS via RS232 Specification</a>
-[type 'AmsSerialFrame'
+[type AmsSerialFrame
// Id for detecting an AMS serial frame.
[simple uint 16 'magicCookie' ]
// Address of the sending participant. This value can always be set to 0 for an RS232 communication,
@@ -89,7 +89,7 @@
// In case the transmitter does not receive a valid acknowledgement after multiple transmission, then a reset frame is
// sent. In this way the receiver is informed that a new communication is running and the receiver then accepts the
// fragment number during the next AMS-Frame, without carrying out a check.
-[type 'AmsSerialResetFrame'
+[type AmsSerialResetFrame
// Id for detecting an AMS serial frame.
[simple uint 16 'magicCookie' ]
// Address of the sending participant. This value can always be set to 0 for an RS232 communication,
@@ -111,7 +111,7 @@
// AMS Common
////////////////////////////////////////////////////////////////
-[type 'AmsPacket'
+[type AmsPacket
// AMS Header 32 bytes The AMS/TCP-Header contains the addresses of the transmitter and receiver. In addition the AMS error code , the ADS command Id and some other information.
// This is the AmsNetId of the station, for which the packet is intended. Remarks see below.
[simple AmsNetId 'targetAmsNetId' ]
@@ -136,7 +136,7 @@
[simple AdsData('commandId', 'state.response') 'data' ]
]
-[enum uint 16 'CommandId'
+[enum uint 16 CommandId
['0x0000' INVALID]
['0x0001' ADS_READ_DEVICE_INFO]
['0x0002' ADS_READ]
@@ -149,7 +149,7 @@
['0x0009' ADS_READ_WRITE]
]
-[type 'State'
+[type State
[simple bit 'initCommand' ]
[simple bit 'updCommand' ]
[simple bit 'timestampAdded' ]
@@ -181,7 +181,7 @@
// target system. At the PC for this the TwinCAT System Control is used. If you use other hardware, see the considering
// documentation for notes about settings of the AMS NetId.
// @see <a href="https://infosys.beckhoff.com/content/1033/tcadscommon/html/tcadscommon_identadsdevice.htm?id=3991659524769593444">ADS device identification</a>
-[type 'AmsNetId'
+[type AmsNetId
[simple uint 8 'octet1' ]
[simple uint 8 'octet2' ]
[simple uint 8 'octet3' ]
@@ -190,7 +190,7 @@
[simple uint 8 'octet6' ]
]
-[discriminatedType 'AdsData' (CommandId 'commandId', bit 'response')
+[discriminatedType AdsData(CommandId 'commandId', bit 'response')
[typeSwitch 'commandId', 'response'
['INVALID', 'false' AdsInvalidRequest]
['INVALID', 'true' AdsInvalidResponse]
@@ -334,7 +334,7 @@
]
]
-[discriminatedType 'AdsMultiRequestItem' (uint 32 'indexGroup')
+[discriminatedType AdsMultiRequestItem(uint 32 'indexGroup')
[typeSwitch 'indexGroup'
// ReservedIndexGroups.ADSIGRP_MULTIPLE_READ
['61568' AdsMultiRequestItemRead
@@ -368,7 +368,7 @@
]
]
-[type 'AdsStampHeader'
+[type AdsStampHeader
// 8 bytes The timestamp is coded after the Windows FILETIME format. I.e. the value contains the number of the nano seconds, which passed since 1.1.1601. In addition, the local time change is not considered. Thus the time stamp is present as universal Coordinated time (UTC).
[simple uint 64 'timestamp']
// 4 bytes Number of elements of type AdsNotificationSample.
@@ -377,7 +377,7 @@
[array AdsNotificationSample 'adsNotificationSamples' count 'samples']
]
-[type 'AdsNotificationSample'
+[type AdsNotificationSample
// 4 bytes Handle of notification
[simple uint 32 'notificationHandle']
// 4 Bytes Size of data range in bytes.
@@ -386,7 +386,7 @@
[array byte 'data' count 'sampleSize']
]
-[dataIo 'DataItem' (vstring 'dataFormatName', int 32 'stringLength')
+[dataIo DataItem(vstring 'dataFormatName', int 32 'stringLength')
[typeSwitch 'dataFormatName'
// -----------------------------------------
// Bit
@@ -498,7 +498,7 @@
]
]
-[enum int 8 'AdsDataType' (uint 16 'numBytes', vstring 'dataFormatName')
+[enum int 8 AdsDataType(uint 16 'numBytes', vstring 'dataFormatName')
['0x01' BOOL ['1', '"IEC61131_BOOL"']]
['0x02' BIT ['1', '"IEC61131_BOOL"']]
['0x03' BIT8 ['1', '"IEC61131_BOOL"']]
@@ -564,7 +564,7 @@
['0x28' DT ['4', '"IEC61131_DATE_AND_TIME"']]
]
-[enum uint 32 'ReservedIndexGroups'
+[enum uint 32 ReservedIndexGroups
['0x0000F000' ADSIGRP_SYMTAB]
['0x0000F001' ADSIGRP_SYMNAME]
['0x0000F002' ADSIGRP_SYMVAL]
@@ -597,7 +597,7 @@
['0x00000002' ADSIOFFS_DEVDATA_DEVSTATE]
]
-[enum uint 32 'ReturnCode'
+[enum uint 32 ReturnCode
// Global Return Codes
['0x00' OK]
['0x01' INTERNAL_ERROR]
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index 14ca9d5..fca208a 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[discriminatedType 'BVLC' byteOrder='"BIG_ENDIAN"'
+[discriminatedType BVLC byteOrder='"BIG_ENDIAN"'
[const uint 8 'bacnetType' '0x81' ]
[discriminator uint 8 'bvlcFunction' ]
[implicit uint 16 'bvlcLength' 'lengthInBytes']
@@ -56,7 +56,7 @@
]
]
-[type 'NPDU'(uint 16 'npduLength')
+[type NPDU(uint 16 'npduLength')
[simple uint 8 'protocolVersionNumber']
[simple bit 'messageTypeFieldPresent']
[reserved uint 1 '0']
@@ -76,7 +76,7 @@
[optional APDU('npduLength - (2 + (sourceSpecified ? 3 + sourceLength : 0) + (destinationSpecified ? 3 + destinationLength: 0) + ((destinationSpecified || sourceSpecified) ? 1 : 0))') 'apdu' '!messageTypeFieldPresent' ]
]
-[discriminatedType 'NLM'(uint 16 'apduLength')
+[discriminatedType NLM(uint 16 'apduLength')
[discriminator uint 8 'messageType']
[optional uint 16 'vendorId' '(messageType >= 128) && (messageType <= 255)']
[typeSwitch 'messageType'
@@ -89,7 +89,7 @@
]
]
-[discriminatedType 'APDU'(uint 16 'apduLength')
+[discriminatedType APDU(uint 16 'apduLength')
[discriminator uint 4 'apduType']
[typeSwitch 'apduType'
['0x0' APDUConfirmedRequest
@@ -149,7 +149,7 @@
]
]
-[discriminatedType 'BACnetConfirmedServiceRequest'(uint 16 'len')
+[discriminatedType BACnetConfirmedServiceRequest(uint 16 'len')
[discriminator uint 8 'serviceChoice']
[typeSwitch 'serviceChoice'
['0x00' BACnetConfirmedServiceRequestAcknowledgeAlarm
@@ -267,7 +267,7 @@
]
]
-[discriminatedType 'BACnetUnconfirmedServiceRequest'(uint 16 'len')
+[discriminatedType BACnetUnconfirmedServiceRequest(uint 16 'len')
[discriminator uint 8 'serviceChoice']
[typeSwitch 'serviceChoice'
['0x00' BACnetUnconfirmedServiceRequestIAm
@@ -325,7 +325,7 @@
]
]
-[discriminatedType 'BACnetComplexTag'(uint 4 'tagNumberArgument', BACnetDataType 'dataType')
+[discriminatedType BACnetComplexTag(uint 4 'tagNumberArgument', BACnetDataType 'dataType')
[assert uint 4 'tagNumber' 'tagNumberArgument' ]
[const TagClass 'tagClass' 'TagClass.CONTEXT_SPECIFIC_TAGS' ]
[simple uint 3 'lengthValueType' ]
@@ -376,7 +376,7 @@
]
]
-[discriminatedType 'BACnetServiceAck'
+[discriminatedType BACnetServiceAck
[discriminator uint 8 'serviceChoice']
[typeSwitch 'serviceChoice'
['0x03' BACnetServiceAckGetAlarmSummary
@@ -437,7 +437,7 @@
]
]
-[discriminatedType 'BACnetConfirmedServiceACK'
+[discriminatedType BACnetConfirmedServiceACK
[discriminator uint 8 'serviceChoice']
[typeSwitch 'serviceChoice'
['0x03' BACnetConfirmedServiceACKGetAlarmSummary
@@ -476,7 +476,7 @@
]
]
-[discriminatedType 'BACnetError'
+[discriminatedType BACnetError
[discriminator uint 8 'serviceChoice']
[typeSwitch 'serviceChoice'
['0x03' BACnetErrorGetAlarmSummary
@@ -521,12 +521,12 @@
]
]
-[type 'BACnetAddress'
+[type BACnetAddress
[array uint 8 'address' count '4']
[simple uint 16 'port']
]
-[type 'BACnetTagWithContent'
+[type BACnetTagWithContent
[simple uint 4 'tagNumber' ]
[simple TagClass 'tagClass' ]
[simple uint 3 'lengthValueType' ]
@@ -538,7 +538,7 @@
[const uint 8 'closingTag' '0x2f']
]
-[discriminatedType 'BACnetTag'
+[discriminatedType BACnetTag
[simple uint 4 'tagNumber' ]
[discriminator TagClass 'tagClass' ]
[simple uint 3 'lengthValueType' ]
@@ -589,12 +589,12 @@
]
]
-[enum uint 1 'TagClass'
+[enum uint 1 TagClass
['0x0' APPLICATION_TAGS]
['0x1' CONTEXT_SPECIFIC_TAGS]
]
-[enum int 4 'BACnetDataType'
+[enum int 4 BACnetDataType
['0x0' NULL]
['0x1' BOOLEAN]
['0x2' UNSIGNED_INTEGER]
@@ -610,7 +610,7 @@
['0xC' BACNET_OBJECT_IDENTIFIER]
]
-[enum uint 4 'BACnetNetworkType'
+[enum uint 4 BACnetNetworkType
['0x0' ETHERNET]
['0x1' ARCNET]
['0x2' MSTP]
@@ -624,7 +624,7 @@
['0xA' SERIAL]
]
-[enum uint 8 'BACnetNodeType'
+[enum uint 8 BACnetNodeType
['0x00' UNKNOWN]
['0x01' SYSTEM]
['0x02' NETWORK]
@@ -649,13 +649,13 @@
['0x15' ZONE]
]
-[enum uint 4 'BACnetNotifyType'
+[enum uint 4 BACnetNotifyType
['0x0' ALARM]
['0x1' EVENT]
['0x2' ACK_NOTIFICATION]
]
-[enum uint 10 'BACnetObjectType'
+[enum uint 10 BACnetObjectType
['0x000' ANALOG_INPUT]
['0x001' ANALOG_OUTPUT]
['0x002' ANALOG_VALUE]
diff --git a/protocols/canopen/src/main/resources/protocols/can/canopen.mspec b/protocols/canopen/src/main/resources/protocols/can/canopen.mspec
index ded00ac..4097e68 100644
--- a/protocols/canopen/src/main/resources/protocols/can/canopen.mspec
+++ b/protocols/canopen/src/main/resources/protocols/can/canopen.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[enum uint 4 'CANOpenService' (uint 8 'min', uint 8 'max', bit 'pdo')
+[enum uint 4 CANOpenService(uint 8 'min', uint 8 'max', bit 'pdo')
['0b0000' NMT ['0', '0' , 'false']]
['0b0001' SYNC ['0x80', '0x80' , 'false']]
['0b0001' EMCY ['0x81', '0xFF' , 'false']]
@@ -35,7 +35,7 @@
['0b1110' HEARTBEAT ['0x700', '0x77F', 'false']]
]
-[enum uint 8 'NMTStateRequest'
+[enum uint 8 NMTStateRequest
['0x01' START]
['0x02' STOP]
['0x80' PRE_OPERATIONAL]
@@ -43,14 +43,14 @@
['0x82' RESET_COMMUNICATION]
]
-[enum uint 8 'NMTState'
+[enum uint 8 NMTState
['0x00' BOOTED_UP]
['0x04' STOPPED]
['0x05' OPERATIONAL]
['0x7f' PRE_OPERATIONAL]
]
-[discriminatedType 'CANOpenPayload' (CANOpenService 'service')
+[discriminatedType CANOpenPayload(CANOpenService 'service')
[typeSwitch 'service'
['NMT' CANOpenNetworkPayload
[simple NMTStateRequest 'request']
@@ -98,7 +98,7 @@
]
]
-[type 'SDORequest' (SDORequestCommand 'command')
+[type SDORequest(SDORequestCommand 'command')
[typeSwitch 'command'
['SEGMENT_DOWNLOAD' SDOSegmentDownloadRequest
[simple bit 'toggle']
@@ -134,12 +134,12 @@
]
]
-[type 'SDOBlockData'
+[type SDOBlockData
[simple uint 5 'flags']
[array byte 'data' count '7']
]
-[type 'SDOResponse' (SDOResponseCommand 'command')
+[type SDOResponse(SDOResponseCommand 'command')
[typeSwitch 'command'
['SEGMENT_UPLOAD' SDOSegmentUploadResponse
[simple bit 'toggle']
@@ -175,7 +175,7 @@
]
]
-[type 'SDOInitiateUploadResponsePayload' (bit 'expedited', bit 'indicated', uint 2 'size')
+[type SDOInitiateUploadResponsePayload(bit 'expedited', bit 'indicated', uint 2 'size')
[typeSwitch 'expedited', 'indicated'
['true', 'true' SDOInitiateExpeditedUploadResponse
[array byte 'data' count '4 - size']
@@ -190,13 +190,13 @@
]
]
-[type 'SDOAbort'
+[type SDOAbort
[reserved uint 5 '0x00']
[simple IndexAddress 'address']
[simple uint 32 'code']
]
-[type 'SDOSegment'
+[type SDOSegment
[reserved uint 1 '0x00']
[implicit uint 2 'size' 'expedited && indicated ? 4 - COUNT(data) : 0']
[simple bit 'expedited']
@@ -206,12 +206,12 @@
[padding uint 8 'alignment' '0x00' '4 - (COUNT(data))']
]
-[type 'IndexAddress'
+[type IndexAddress
[simple uint 16 'index']
[simple uint 8 'subindex']
]
-[enum uint 3 'SDORequestCommand'
+[enum uint 3 SDORequestCommand
['0x00' SEGMENT_DOWNLOAD ]
['0x01' INITIATE_DOWNLOAD ]
['0x02' INITIATE_UPLOAD ]
@@ -220,7 +220,7 @@
['0x05' BLOCK ]
]
-[enum uint 3 'SDOResponseCommand'
+[enum uint 3 SDOResponseCommand
['0x00' SEGMENT_UPLOAD ]
['0x01' SEGMENT_DOWNLOAD ]
['0x02' INITIATE_UPLOAD ]
@@ -229,11 +229,11 @@
['0x06' BLOCK ]
]
-[type 'CANOpenPDO' /*(uint 2 'index', bit 'receive')*/
+[type CANOpenPDO /*(uint 2 'index', bit 'receive')*/
[array byte 'data' count '8']
]
-[type 'CANOpenTime'
+[type CANOpenTime
// CiA 301 - section 7.1.6.5 and 7.1.6.6
[simple uint 28 'millis']
[reserved int 4 '0x00']
@@ -270,7 +270,7 @@
[TIME_DIFFERENCE ['48'] ]
]
-[dataIo 'DataItem' (CANOpenDataType 'dataType', int 32 'size')
+[dataIo DataItem(CANOpenDataType 'dataType', int 32 'size')
[typeSwitch 'dataType'
['BOOLEAN' BOOL
[simple bit 'value']
@@ -347,14 +347,14 @@
]
// utility type quickly write data for mapped/manufacturer PDOs
-[type 'CANOpenMPDO'
+[type CANOpenMPDO
[simple uint 8 'node']
[simple IndexAddress 'address']
[array byte 'data' count '4']
]
// A compact, byte aligned structure for test and embedding purposes
-[type 'CANOpenFrame' byteOrder='"LITTLE_ENDIAN"'
+[type CANOpenFrame byteOrder='"LITTLE_ENDIAN"'
[simple uint 8 'nodeId']
[simple CANOpenService 'service']
[const uint 4 'alignment' '0x00']
diff --git a/protocols/df1/src/main/resources/protocols/df1/df1.mspec b/protocols/df1/src/main/resources/protocols/df1/df1.mspec
index 5db2b33..c6ec76b 100644
--- a/protocols/df1/src/main/resources/protocols/df1/df1.mspec
+++ b/protocols/df1/src/main/resources/protocols/df1/df1.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[discriminatedType 'DF1Symbol' byteOrder='"BIG_ENDIAN"'
+[discriminatedType DF1Symbol byteOrder='"BIG_ENDIAN"'
[const uint 8 'messageStart' '0x10']
[discriminator uint 8 'symbolType']
[typeSwitch 'symbolType'
@@ -36,7 +36,7 @@
]
]
-[discriminatedType 'DF1Command'
+[discriminatedType DF1Command
[discriminator uint 8 'commandCode']
[simple uint 8 'status']
[simple uint 16 'transactionCounter']
diff --git a/protocols/eip/src/main/resources/protocols/eip/eip.mspec b/protocols/eip/src/main/resources/protocols/eip/eip.mspec
index 14b081b..66ec72a 100644
--- a/protocols/eip/src/main/resources/protocols/eip/eip.mspec
+++ b/protocols/eip/src/main/resources/protocols/eip/eip.mspec
@@ -21,7 +21,7 @@
///EthernetIP Header of size 24
/////////////////////////////////////////////////////////////////
-[discriminatedType 'EipPacket' byteOrder='"BIG_ENDIAN"'
+[discriminatedType EipPacket byteOrder='"BIG_ENDIAN"'
[discriminator uint 16 'command']
[implicit uint 16 'len' 'lengthInBytes - 24']
[simple uint 32 'sessionHandle']
diff --git a/protocols/firmata/src/main/resources/protocols/firmata/firmata.mspec b/protocols/firmata/src/main/resources/protocols/firmata/firmata.mspec
index 250483d..1374686 100644
--- a/protocols/firmata/src/main/resources/protocols/firmata/firmata.mspec
+++ b/protocols/firmata/src/main/resources/protocols/firmata/firmata.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[discriminatedType 'FirmataMessage' byteOrder='"BIG_ENDIAN"'(bit 'response')
+[discriminatedType FirmataMessage byteOrder='"BIG_ENDIAN"'(bit 'response')
[discriminator uint 4 'messageType']
[typeSwitch 'messageType'
// Reading operations
@@ -56,7 +56,7 @@
]
]
-[discriminatedType 'FirmataCommand'(bit 'response')
+[discriminatedType FirmataCommand(bit 'response')
[discriminator uint 4 'commandCode']
[typeSwitch 'commandCode'
['0x0' FirmataCommandSysex
@@ -81,7 +81,7 @@
]
]
-[discriminatedType 'SysexCommand'(bit 'response')
+[discriminatedType SysexCommand(bit 'response')
[discriminator uint 8 'commandType']
[typeSwitch 'commandType','response'
['0x00' SysexCommandExtendedId
@@ -126,7 +126,7 @@
]
]
-[enum uint 8 'PinMode'
+[enum uint 8 PinMode
['0x0' PinModeInput]
['0x1' PinModeOutput]
['0x2' PinModeAnalog]
diff --git a/protocols/genericcan/src/main/resources/protocols/can/genericcan.mspec b/protocols/genericcan/src/main/resources/protocols/can/genericcan.mspec
index 949d489..6614221 100644
--- a/protocols/genericcan/src/main/resources/protocols/can/genericcan.mspec
+++ b/protocols/genericcan/src/main/resources/protocols/can/genericcan.mspec
@@ -40,7 +40,7 @@
[REAL64 ['64'] ]
]
-[dataIo 'DataItem' byteOrder='"LITTLE_ENDIAN"' (GenericCANDataType 'dataType')
+[dataIo DataItem byteOrder='"LITTLE_ENDIAN"' (GenericCANDataType 'dataType')
[typeSwitch 'dataType'
['BYTE' BYTE
[simple byte 'value']
diff --git a/protocols/knxnetip/src/main/resources/protocols/knxnetip/device-info.mspec b/protocols/knxnetip/src/main/resources/protocols/knxnetip/device-info.mspec
index 8e4556b..2bb1c9f 100644
--- a/protocols/knxnetip/src/main/resources/protocols/knxnetip/device-info.mspec
+++ b/protocols/knxnetip/src/main/resources/protocols/knxnetip/device-info.mspec
@@ -35,7 +35,7 @@
// On this local copy.
//
/////////////////////////////////////////////////////////////////////////////////////////////////
-[enum uint 16 'ComObjectTableAddresses' (uint 16 'comObjectTableAddress')
+[enum uint 16 ComObjectTableAddresses(uint 16 'comObjectTableAddress')
[' 1' DEV0001914201 ['0x43FE' ]]
[' 2' DEV0001140C13 ['0x4400' ]]
[' 3' DEV0001140B11 ['0x4400' ]]
diff --git a/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec b/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec
index 9ecd4a3..605fdb4 100644
--- a/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec
+++ b/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[discriminatedType 'KnxNetIpMessage' byteOrder='"BIG_ENDIAN"'
+[discriminatedType KnxNetIpMessage byteOrder='"BIG_ENDIAN"'
[implicit uint 8 'headerLength' '6']
[const uint 8 'protocolVersion' '0x10']
[discriminator uint 16 'msgType']
@@ -89,21 +89,21 @@
]
]
-[type 'HPAIDiscoveryEndpoint'
+[type HPAIDiscoveryEndpoint
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple HostProtocolCode 'hostProtocolCode']
[simple IPAddress 'ipAddress']
[simple uint 16 'ipPort']
]
-[type 'HPAIControlEndpoint'
+[type HPAIControlEndpoint
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple HostProtocolCode 'hostProtocolCode']
[simple IPAddress 'ipAddress']
[simple uint 16 'ipPort']
]
-[type 'DIBDeviceInfo'
+[type DIBDeviceInfo
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple uint 8 'descriptionType']
[simple KnxMedium 'knxMedium']
@@ -116,20 +116,20 @@
[array byte 'deviceFriendlyName' count '30']
]
-[type 'DIBSuppSvcFamilies'
+[type DIBSuppSvcFamilies
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple uint 8 'descriptionType']
[array ServiceId 'serviceIds' length 'structureLength - 2']
]
-[type 'HPAIDataEndpoint'
+[type HPAIDataEndpoint
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple HostProtocolCode 'hostProtocolCode']
[simple IPAddress 'ipAddress']
[simple uint 16 'ipPort']
]
-[discriminatedType 'ConnectionRequestInformation'
+[discriminatedType ConnectionRequestInformation
[implicit uint 8 'structureLength' 'lengthInBytes']
[discriminator uint 8 'connectionType']
[typeSwitch 'connectionType'
@@ -142,7 +142,7 @@
]
]
-[discriminatedType 'ConnectionResponseDataBlock'
+[discriminatedType ConnectionResponseDataBlock
[implicit uint 8 'structureLength' 'lengthInBytes']
[discriminator uint 8 'connectionType']
[typeSwitch 'connectionType'
@@ -154,59 +154,59 @@
]
]
-[type 'DeviceConfigurationRequestDataBlock'
+[type DeviceConfigurationRequestDataBlock
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple uint 8 'communicationChannelId']
[simple uint 8 'sequenceCounter']
[reserved uint 8 '0x00']
]
-[type 'DeviceConfigurationAckDataBlock'
+[type DeviceConfigurationAckDataBlock
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple uint 8 'communicationChannelId']
[simple uint 8 'sequenceCounter']
[simple Status 'status']
]
-[type 'TunnelingRequestDataBlock'
+[type TunnelingRequestDataBlock
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple uint 8 'communicationChannelId']
[simple uint 8 'sequenceCounter']
[reserved uint 8 '0x00']
]
-[type 'TunnelingResponseDataBlock'
+[type TunnelingResponseDataBlock
[implicit uint 8 'structureLength' 'lengthInBytes']
[simple uint 8 'communicationChannelId']
[simple uint 8 'sequenceCounter']
[simple Status 'status']
]
-[type 'IPAddress'
+[type IPAddress
[array byte 'addr' count '4']
]
-[type 'MACAddress'
+[type MACAddress
[array byte 'addr' count '6']
]
-[type 'KnxAddress'
+[type KnxAddress
[simple uint 4 'mainGroup']
[simple uint 4 'middleGroup']
[simple uint 8 'subGroup']
]
-[type 'DeviceStatus'
+[type DeviceStatus
[reserved uint 7 '0x00']
[simple bit 'programMode']
]
-[type 'ProjectInstallationIdentifier'
+[type ProjectInstallationIdentifier
[simple uint 8 'projectNumber']
[simple uint 8 'installationNumber']
]
-[discriminatedType 'ServiceId'
+[discriminatedType ServiceId
[discriminator uint 8 'serviceType']
[typeSwitch 'serviceType'
['0x02' KnxNetIpCore
@@ -241,7 +241,7 @@
// NOTE: When inspecting traffic in WireShark it seems they got the
// standard/extended frame thing wrong. When comparing to the spec most
// normal traffic is actually extended frames.
-[discriminatedType 'CEMI' (uint 16 'size')
+[discriminatedType CEMI(uint 16 'size')
[discriminator uint 8 'messageCode']
[typeSwitch 'messageCode'
['0x2B' LBusmonInd
@@ -329,7 +329,7 @@
]
]
-[discriminatedType 'CEMIAdditionalInformation'
+[discriminatedType CEMIAdditionalInformation
[discriminator uint 8 'additionalInformationType']
[typeSwitch 'additionalInformationType'
['0x03' CEMIAdditionalInformationBusmonitorInfo
@@ -350,7 +350,7 @@
// The CEMI part is described in the document "03_06_03 EMI_IMI v01.03.03 AS" Page 73
// "03_02_02 Communication Medium TP1 v01.02.02 AS" Page 27
-[discriminatedType 'LDataFrame'
+[discriminatedType LDataFrame
[simple bit 'frameType']
[discriminator bit 'polling']
[simple bit 'notRepeated']
@@ -395,7 +395,7 @@
]
]
-[discriminatedType 'Apdu' (uint 8 'dataLength')
+[discriminatedType Apdu(uint 8 'dataLength')
// 10_01 Logical Tag Extended v01.02.01 AS.pdf Page 74ff
[discriminator uint 1 'control']
[simple bit 'numbered']
@@ -410,7 +410,7 @@
]
]
-[discriminatedType 'ApduControl'
+[discriminatedType ApduControl
[discriminator uint 2 'controlType']
[typeSwitch 'controlType'
['0x0' ApduControlConnect
@@ -424,7 +424,7 @@
]
]
-[discriminatedType 'ApduData' (uint 8 'dataLength')
+[discriminatedType ApduData(uint 8 'dataLength')
[discriminator uint 4 'apciType']
// 03_03_07 Application Layer v01.06.02 AS Page 9ff
[typeSwitch 'apciType'
@@ -480,7 +480,7 @@
]
// 03_03_07 Application Layer v01.06.02 AS Page 9ff
-[discriminatedType 'ApduDataExt' (uint 8 'length')
+[discriminatedType ApduDataExt(uint 8 'length')
[discriminator uint 6 'extApciType']
[typeSwitch 'extApciType'
['0x00' ApduDataExtOpenRoutingTableRequest
@@ -610,11 +610,11 @@
]
]
-[type 'RelativeTimestamp'
+[type RelativeTimestamp
[simple uint 16 'timestamp']
]
-[discriminatedType 'KnxGroupAddress' (uint 2 'numLevels')
+[discriminatedType KnxGroupAddress(uint 2 'numLevels')
[typeSwitch 'numLevels'
['1' KnxGroupAddressFreeLevel
[simple uint 16 'subGroup']
@@ -631,14 +631,14 @@
]
]
-[enum uint 2 'CEMIPriority'
+[enum uint 2 CEMIPriority
['0x0' SYSTEM]
['0x1' NORMAL]
['0x2' URGENT]
['0x3' LOW]
]
-[enum uint 8 'Status'
+[enum uint 8 Status
['0x00' NO_ERROR]
['0x01' PROTOCOL_TYPE_NOT_SUPPORTED]
['0x02' UNSUPPORTED_PROTOCOL_VERSION]
@@ -653,7 +653,7 @@
['0x29' TUNNELLING_LAYER_NOT_SUPPORTED]
]
-[enum uint 8 'HostProtocolCode'
+[enum uint 8 HostProtocolCode
['0x01' IPV4_UDP]
['0x02' IPV4_TCP]
]
@@ -668,13 +668,13 @@
// TUNNEL_BUSMONITOR The client becomes a passive participant and all frames
// on the KNX bus get forwarded to the client. Only one
// Busmonitor connection is allowed at any given time.
-[enum uint 8 'KnxLayer'
+[enum uint 8 KnxLayer
['0x02' TUNNEL_LINK_LAYER]
['0x04' TUNNEL_RAW]
['0x80' TUNNEL_BUSMONITOR]
]
-[enum uint 8 'KnxMedium'
+[enum uint 8 KnxMedium
['0x01' MEDIUM_RESERVED_1]
['0x02' MEDIUM_TP1]
['0x04' MEDIUM_PL110]
@@ -683,7 +683,7 @@
['0x20' MEDIUM_KNX_IP]
]
-[enum uint 8 'SupportedPhysicalMedia' (vstring 'description', bit 'knxSupport')
+[enum uint 8 SupportedPhysicalMedia(vstring 'description', bit 'knxSupport')
['0x00' OTHER ['used_for_undefined_physical_medium', 'true']]
['0x01' OIL_METER ['measures_volume_of_oil', 'true']]
['0x02' ELECTRICITY_METER ['measures_electric_energy', 'true']]
@@ -709,7 +709,7 @@
// The definition of the constants for medium type in the device descriptor differs from that of the other parts
// 03_05_01 Resources v01.09.03 AS.pdf Page 22
-[enum uint 4 'DeviceDescriptorMediumType'
+[enum uint 4 DeviceDescriptorMediumType
['0x0' TP1 ]
['0x1' PL110 ]
['0x2' RF ]
@@ -720,7 +720,7 @@
// 03_05_01 Resources v01.09.03 AS.pdf Page 22
// REMARK: The last digit is intentionally set to 0 so this enum code can only be used as a mask.
-[enum uint 16 'FirmwareType'
+[enum uint 16 FirmwareType
['0x0010' SYSTEM_1 ]
['0x0020' SYSTEM_2 ]
['0x0300' SYSTEM_300 ]
@@ -743,7 +743,7 @@
// Helper enum that binds the combinations of medium type and firmware
// type to the pre-defined constants the spec defines
// 03_05_01 Resources v01.09.03 AS.pdf Page 22
-[enum uint 16 'DeviceDescriptor' (DeviceDescriptorMediumType 'mediumType', FirmwareType 'firmwareType')
+[enum uint 16 DeviceDescriptor(DeviceDescriptorMediumType 'mediumType', FirmwareType 'firmwareType')
['0x0010' TP1_BCU_1_SYSTEM_1_0 ['TP1', 'SYSTEM_1' ]]
['0x0011' TP1_BCU_1_SYSTEM_1_1 ['TP1', 'SYSTEM_1' ]]
['0x0012' TP1_BCU_1_SYSTEM_1_2 ['TP1', 'SYSTEM_1' ]]
@@ -775,7 +775,7 @@
['0x5705' KNX_IP_SYSTEM7 ['KNX_IP', 'SYSTEM_7' ]]
]
-[enum uint 4 'AccessLevel' (vstring 'purpose', bit 'needsAuthentication')
+[enum uint 4 AccessLevel(vstring 'purpose', bit 'needsAuthentication')
['0x0' Level0 ['"system manufacturer"', 'true' ]]
['0x1' Level1 ['"product manufacturer"', 'true' ]]
['0x2' Level2 ['"configuration"', 'true' ]]
@@ -784,7 +784,7 @@
]
// 03_05_01 Resources v01.09.03 AS.pdf Page 23ff
-[type 'DeviceDescriptorType2'
+[type DeviceDescriptorType2
// Same manufacturer id as used elsewhere (Assigned by KNX Association)
[simple uint 16 'manufacturerId' ]
// Manufacturer specific device type id
@@ -803,7 +803,7 @@
]
// 03_05_01 Resources v01.09.03 AS.pdf Page 24
-[type 'ChannelInformation'
+[type ChannelInformation
[simple uint 3 'numChannels']
[simple uint 13 'channelCode']
]
@@ -813,7 +813,7 @@
// - 03_05_01 Resources v01.09.03 AS.pdf
// - 03_07_03 Standardized Identifier Tables v01.03.01 AS.pdf
// - 03_07_02 Datapoint Types v01.08.02 AS.pdf
-[dataIo 'KnxProperty' (KnxPropertyDataType 'propertyType', uint 8 'dataLengthInBytes')
+[dataIo KnxProperty(KnxPropertyDataType 'propertyType', uint 8 'dataLengthInBytes')
[typeSwitch 'propertyType','dataLengthInBytes'
['PDT_CONTROL' BOOL
[reserved uint 7 '0x00']
@@ -1019,7 +1019,7 @@
]
// 03_05_01 Resources v01.09.03 AS page 171
-[enum uint 8 'ComObjectValueType' (uint 8 'sizeInBytes')
+[enum uint 8 ComObjectValueType(uint 8 'sizeInBytes')
['0x00' BIT1 ['1']]
['0x01' BIT2 ['1']]
['0x02' BIT3 ['1']]
@@ -1037,7 +1037,7 @@
['0x0E' BYTE14 ['14']]
]
-[discriminatedType 'ComObjectTable' (FirmwareType 'firmwareType')
+[discriminatedType ComObjectTable(FirmwareType 'firmwareType')
[typeSwitch 'firmwareType'
// The location of the Group Object Table - Realization Type 1 is calculated by
// adding 0x100 to the value of the resource 'Group Object Table Pointer', which
@@ -1068,7 +1068,7 @@
]
// 03_05_01 Resources v01.09.03 AS page 168ff
-[type 'GroupObjectDescriptorRealisationType1'
+[type GroupObjectDescriptorRealisationType1
// Offset to the data (Also pay attention to the value of 'segmentSelectorEnable',
// if set to 'true' 0x100 has to be added to this value
[simple uint 8 'dataPointer']
@@ -1091,7 +1091,7 @@
// 03_05_01 Resources v01.09.03 AS page 172ff
// It's generally identical to the type 1, but uses the reserved bit from type 1 as "updateEnable"
-[type 'GroupObjectDescriptorRealisationType2'
+[type GroupObjectDescriptorRealisationType2
// Offset to the data (Also pay attention to the value of 'segmentSelectorEnable',
// if set to 'true' 0x100 has to be added to this value
[simple uint 8 'dataPointer']
@@ -1113,7 +1113,7 @@
]
// 03_05_01 Resources v01.09.03 AS page 173ff
-[type 'GroupObjectDescriptorRealisationType6'
+[type GroupObjectDescriptorRealisationType6
// TODO: Implement
]
@@ -1124,7 +1124,7 @@
// the total number of entries. This seems to be followed by a 2-byte
// Address and then by the entries themselves. Each entry seems to
// be 4 bytes long.
-[type 'GroupObjectDescriptorRealisationType7'
+[type GroupObjectDescriptorRealisationType7
// Offset of the value memory start address
[simple uint 16 'dataAddress']
[simple bit 'updateEnable']
@@ -1150,7 +1150,7 @@
// however when having a look at the payload in WireShark
// if looks as if it's simply the realization type 1 or 2
// without the leading 'dataPointer' field.
-[type 'GroupObjectDescriptorRealisationTypeB'
+[type GroupObjectDescriptorRealisationTypeB
[simple bit 'updateEnable']
// The com object emits GroupValueWrites if the internal value changes
[simple bit 'transmitEnable']
diff --git a/protocols/knxnetip/src/main/xslt/knx-types.xsl b/protocols/knxnetip/src/main/xslt/knx-types.xsl
index eba2eb4..9a15846 100644
--- a/protocols/knxnetip/src/main/xslt/knx-types.xsl
+++ b/protocols/knxnetip/src/main/xslt/knx-types.xsl
@@ -47,7 +47,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-[enum uint 16 'KnxDatapointMainType' (uint 16 'number', uint 8 'sizeInBits', string 8 'name')
+[enum uint 16 KnxDatapointMainType(uint 16 'number', uint 8 'sizeInBits', string 8 'name')
['0' DPT_UNKNOWN ['0', '0', '"Unknown Datapoint Type"']]
// Begin: Some typed needed to support all IEC types on KNX (Which the standard generally doesn't support)
['1' DPT_64_BIT_SET ['0', '64', '"Unknown Datapoint Type"']]
@@ -59,7 +59,7 @@
<xsl:apply-templates select="knx:KNX/knx:MasterData/knx:DatapointTypes/knx:DatapointType"/>
]
-[enum uint 32 'KnxDatapointType' (uint 16 'number', KnxDatapointMainType 'datapointMainType', string 8 'name')
+[enum uint 32 KnxDatapointType(uint 16 'number', KnxDatapointMainType 'datapointMainType', string 8 'name')
['0' DPT_UNKNOWN ['0', 'DPT_UNKNOWN', '"Unknown Datapoint Subtype"']]
// Begin: Some typed needed to support all IEC types on KNX (Which the standard generally doesn't support)
['1' BOOL ['0', 'DPT_1_BIT', '"BOOL"']]
@@ -92,28 +92,28 @@
<xsl:apply-templates select="knx:KNX/knx:MasterData/knx:DatapointTypes/knx:DatapointType/knx:DatapointSubtypes/knx:DatapointSubtype"/>
]
-[enum uint 16 'KnxInterfaceObjectType' (string 8 'code', string 8 'name')
+[enum uint 16 KnxInterfaceObjectType(string 8 'code', string 8 'name')
['0' OT_UNKNOWN ['U', '"Unknown Interface Object Type"']]
['1' OT_GENERAL ['G', '"General Interface Object Type"']]
<xsl:apply-templates select="knx:KNX/knx:MasterData/knx:InterfaceObjectTypes/knx:InterfaceObjectType"/>
]
-[enum uint 32 'KnxInterfaceObjectProperty' (uint 8 'propertyId', KnxInterfaceObjectType 'objectType', KnxPropertyDataType 'propertyDataType', string 8 'name')
+[enum uint 32 KnxInterfaceObjectProperty(uint 8 'propertyId', KnxInterfaceObjectType 'objectType', KnxPropertyDataType 'propertyDataType', string 8 'name')
['0' PID_UNKNOWN ['0', 'OT_UNKNOWN', 'PDT_UNKNOWN', '"Unknown Interface Object Property"']]
<xsl:apply-templates select="knx:KNX/knx:MasterData/knx:InterfaceObjectProperties/knx:InterfaceObjectProperty"/>
]
-[enum uint 8 'KnxPropertyDataType' (uint 8 'number', uint 8 'sizeInBytes', string 8 'name')
+[enum uint 8 KnxPropertyDataType(uint 8 'number', uint 8 'sizeInBytes', string 8 'name')
['0' PDT_UNKNOWN ['0', '0', '"Unknown Property Data Type"']]
<xsl:apply-templates select="knx:KNX/knx:MasterData/knx:PropertyDataTypes/knx:PropertyDataType"/>
]
-[enum uint 16 'KnxManufacturer' (uint 16 'number', string 8 'name')
+[enum uint 16 KnxManufacturer(uint 16 'number', string 8 'name')
['0' M_UNKNOWN ['0', '"Unknown Manufacturer"']]
<xsl:apply-templates select="knx:KNX/knx:MasterData/knx:Manufacturers/knx:Manufacturer"/>
]
-[dataIo 'KnxDatapoint' (KnxDatapointType 'datapointType')
+[dataIo KnxDatapoint(KnxDatapointType 'datapointType')
[typeSwitch 'datapointType'
['BOOL' BOOL
[reserved uint 7 '0x00']
diff --git a/protocols/knxnetip/src/test/java/org/apache/plc4x/protocol/knxnetip/KnxDefinitionsGenerator.java b/protocols/knxnetip/src/test/java/org/apache/plc4x/protocol/knxnetip/KnxDefinitionsGenerator.java
index 6c0dec1..d8b8112 100644
--- a/protocols/knxnetip/src/test/java/org/apache/plc4x/protocol/knxnetip/KnxDefinitionsGenerator.java
+++ b/protocols/knxnetip/src/test/java/org/apache/plc4x/protocol/knxnetip/KnxDefinitionsGenerator.java
@@ -53,7 +53,7 @@ public class KnxDefinitionsGenerator {
" * under the License.\n" +
" */\n\n" +
"\n" +
- "[enum uint 16 'DeviceInformation' (uint 16 'deviceDescriptor', string 'name', uint 16 'comObjectTableAddress')\n";
+ "[enum uint 16 DeviceInformation(uint 16 'deviceDescriptor', string 'name', uint 16 'comObjectTableAddress')\n";
public static final String FOOTER = "]\n";
diff --git a/protocols/modbus/src/main/resources/protocols/modbus/modbus.mspec b/protocols/modbus/src/main/resources/protocols/modbus/modbus.mspec
index 1febc11..3a0c06f 100644
--- a/protocols/modbus/src/main/resources/protocols/modbus/modbus.mspec
+++ b/protocols/modbus/src/main/resources/protocols/modbus/modbus.mspec
@@ -19,11 +19,11 @@
// Remark: The different fields are encoded in Big-endian.
-[type 'ModbusConstants'
+[type ModbusConstants
[const uint 16 'modbusTcpDefaultPort' '502']
]
-[type 'ModbusTcpADU' byteOrder='"BIG_ENDIAN"' (bit 'response')
+[type ModbusTcpADU byteOrder='"BIG_ENDIAN"' (bit 'response')
// It is used for transaction pairing, the MODBUS server copies in the response the transaction
// identifier of the request.
[simple uint 16 'transactionIdentifier']
@@ -45,7 +45,7 @@
[simple ModbusPDU('response') 'pdu']
]
-[type 'ModbusSerialADU' byteOrder='"LITTLE_ENDIAN"' (bit 'response')
+[type ModbusSerialADU byteOrder='"LITTLE_ENDIAN"' (bit 'response')
[simple uint 16 'transactionId']
[reserved uint 16 '0x0000']
[simple uint 16 'length']
@@ -55,7 +55,7 @@
[simple ModbusPDU('response') 'pdu']
]
-[discriminatedType 'ModbusPDU' (bit 'response')
+[discriminatedType ModbusPDU(bit 'response')
[discriminator bit 'errorFlag']
[discriminator uint 7 'functionFlag']
[typeSwitch 'errorFlag','functionFlag','response'
@@ -241,20 +241,20 @@
]
]
-[type 'ModbusPDUReadFileRecordRequestItem'
+[type ModbusPDUReadFileRecordRequestItem
[simple uint 8 'referenceType']
[simple uint 16 'fileNumber']
[simple uint 16 'recordNumber']
[simple uint 16 'recordLength']
]
-[type 'ModbusPDUReadFileRecordResponseItem'
+[type ModbusPDUReadFileRecordResponseItem
[implicit uint 8 'dataLength' 'COUNT(data) + 1']
[simple uint 8 'referenceType']
[array byte 'data' length 'dataLength - 1']
]
-[type 'ModbusPDUWriteFileRecordRequestItem'
+[type ModbusPDUWriteFileRecordRequestItem
[simple uint 8 'referenceType']
[simple uint 16 'fileNumber']
[simple uint 16 'recordNumber']
@@ -262,7 +262,7 @@
[array byte 'recordData' length 'recordLength * 2']
]
-[type 'ModbusPDUWriteFileRecordResponseItem'
+[type ModbusPDUWriteFileRecordResponseItem
[simple uint 8 'referenceType']
[simple uint 16 'fileNumber']
[simple uint 16 'recordNumber']
@@ -270,7 +270,7 @@
[array byte 'recordData' length 'recordLength']
]
-[dataIo 'DataItem' (ModbusDataType 'dataType', uint 16 'numberOfValues')
+[dataIo DataItem(ModbusDataType 'dataType', uint 16 'numberOfValues')
[typeSwitch 'dataType','numberOfValues'
['BOOL','1' BOOL
[reserved uint 7 '0x00']
@@ -378,7 +378,7 @@
]
]
-[enum uint 8 'ModbusDataType' (uint 8 'dataTypeSize')
+[enum uint 8 ModbusDataType(uint 8 'dataTypeSize')
['1' BOOL ['1']]
['2' BYTE ['1']]
['3' WORD ['2']]
@@ -408,7 +408,7 @@
['27' WSTRING ['2']]
]
-[enum uint 8 'ModbusErrorCode'
+[enum uint 8 ModbusErrorCode
['1' ILLEGAL_FUNCTION]
['2' ILLEGAL_DATA_ADDRESS]
['3' ILLEGAL_DATA_VALUE]
diff --git a/protocols/opcua/src/main/xslt/opc-common.xsl b/protocols/opcua/src/main/xslt/opc-common.xsl
index aea0d93..68b6de0b 100644
--- a/protocols/opcua/src/main/xslt/opc-common.xsl
+++ b/protocols/opcua/src/main/xslt/opc-common.xsl
@@ -88,7 +88,7 @@
<xsl:when test="$originaldoc/opc:TypeDictionary/opc:StructuredType[@Name=$browseName]">
<xsl:choose>
<xsl:when test="not(@BrowseName='Vector') and not(substring(@BrowseName,1,1) = '<') and not(number(substring(@BrowseName,1,1)))">
- [type '<xsl:value-of select='@BrowseName'/>'
+ [type <xsl:value-of select='@BrowseName'/>
<xsl:apply-templates select="$originaldoc/opc:TypeDictionary/opc:StructuredType[@Name=$browseName]"/>]
</xsl:when>
</xsl:choose>
@@ -132,7 +132,7 @@
<xsl:with-param name="switchField" select="@SwitchField"/>
<xsl:with-param name="switchValue" select="@SwitchValue"/>
</xsl:call-template>
- </xsl:variable>[type '<xsl:value-of select="@Name"/>'<xsl:text>
+ </xsl:variable>[type <xsl:value-of select="@Name"/><xsl:text>
</xsl:text>
<xsl:apply-templates select="opc:Documentation"/>
<xsl:choose>
@@ -148,7 +148,7 @@
<xsl:call-template name="clean-datatype-string">
<xsl:with-param name="text" select="@Name"/>
</xsl:call-template>
- </xsl:variable>[type '<xsl:value-of select="$objectTypeId"/>'<xsl:text>
+ </xsl:variable>[type <xsl:value-of select="$objectTypeId"/><xsl:text>
</xsl:text>
<xsl:apply-templates select="opc:Documentation"/><xsl:text>
</xsl:text>
@@ -168,7 +168,7 @@
<xsl:call-template name="clean-datatype-string">
<xsl:with-param name="text" select="@Name"/>
</xsl:call-template>
- </xsl:variable>[type '<xsl:value-of select="$objectTypeId"/>'<xsl:text>
+ </xsl:variable>[type <xsl:value-of select="$objectTypeId"/><xsl:text>
</xsl:text>
<xsl:apply-templates select="opc:Documentation"/><xsl:text>
</xsl:text>
diff --git a/protocols/opcua/src/main/xslt/opc-manual.xsl b/protocols/opcua/src/main/xslt/opc-manual.xsl
index 6ccdf8e..10d5388 100644
--- a/protocols/opcua/src/main/xslt/opc-manual.xsl
+++ b/protocols/opcua/src/main/xslt/opc-manual.xsl
@@ -55,11 +55,11 @@
<xsl:template match="/">
// Remark: The different fields are encoded in Little-endian.
-[type 'OpcuaAPU' byteOrder='"LITTLE_ENDIAN"' (bit 'response')
+[type OpcuaAPU byteOrder='"LITTLE_ENDIAN"' (bit 'response')
[simple MessagePDU('response') 'message']
]
-[discriminatedType 'MessagePDU' (bit 'response')
+[discriminatedType MessagePDU (bit 'response')
[discriminator string 24 'messageType']
[typeSwitch 'messageType','response'
['"HEL"','false' OpcuaHelloRequest
@@ -133,12 +133,12 @@
]
]
-[type 'ByteStringArray'
+[type ByteStringArray
[simple int 32 'arrayLength']
[array uint 8 'value' count 'arrayLength']
]
-[type 'GuidValue'
+[type GuidValue
[simple uint 32 'data1']
[simple uint 16 'data2']
[simple uint 16 'data3']
@@ -146,7 +146,7 @@
[array byte 'data5' count '6']
]
-[type 'ExpandedNodeId'
+[type ExpandedNodeId
[simple bit 'namespaceURISpecified']
[simple bit 'serverIndexSpecified']
[simple NodeIdTypeDefinition 'nodeId']
@@ -155,20 +155,20 @@
[optional uint 32 'serverIndex' 'serverIndexSpecified']
]
-[type 'ExtensionHeader'
+[type ExtensionHeader
[reserved int 5 '0x00']
[simple bit 'xmlbody']
[simple bit 'binaryBody']
]
-[type 'ExtensionObjectEncodingMask'
+[type ExtensionObjectEncodingMask
[reserved int 5 '0x00']
[simple bit 'typeIdSpecified']
[simple bit 'xmlbody']
[simple bit 'binaryBody']
]
-[type 'ExtensionObject' (bit 'includeEncodingMask')
+[type ExtensionObject(bit 'includeEncodingMask')
//A serialized object prefixed with its data type identifier.
[simple ExpandedNodeId 'typeId']
[optional ExtensionObjectEncodingMask 'encodingMask' 'includeEncodingMask']
@@ -176,7 +176,7 @@
[simple ExtensionObjectDefinition('identifier') 'body']
]
-[discriminatedType 'ExtensionObjectDefinition' (vstring '-1' 'identifier')
+[discriminatedType ExtensionObjectDefinition(vstring '-1' 'identifier')
[typeSwitch 'identifier'
['"0"' NullExtension
]
@@ -213,7 +213,7 @@
]
]
-[discriminatedType 'UserIdentityTokenDefinition' (vstring '-1' 'identifier')
+[discriminatedType UserIdentityTokenDefinition(vstring '-1' 'identifier')
[typeSwitch 'identifier'
['"anonymous"' AnonymousIdentityToken
]
@@ -233,7 +233,7 @@
]
-[discriminatedType 'Variant'
+[discriminatedType Variant
[simple bit 'arrayLengthSpecified']
[simple bit 'arrayDimensionsSpecified']
[discriminator uint 6 'VariantType']
@@ -343,7 +343,7 @@
[array bit 'arrayDimensions' count 'noOfArrayDimensions == null ? 0 : noOfArrayDimensions']
]
-[discriminatedType 'NodeIdTypeDefinition'
+[discriminatedType NodeIdTypeDefinition
[abstract vstring '-1' 'identifier']
[discriminator NodeIdType 'nodeType']
[typeSwitch 'nodeType'
@@ -379,28 +379,28 @@
]
]
-[type 'NodeId'
+[type NodeId
[reserved int 2 '0x00']
[simple NodeIdTypeDefinition 'nodeId']
[virtual vstring '-1' 'id' 'nodeId.identifier']
]
-[type 'PascalString'
+[type PascalString
[implicit int 32 'sLength' 'stringValue.length == 0 ? -1 : stringValue.length']
[simple vstring 'sLength == -1 ? 0 : sLength * 8' 'stringValue']
[virtual int 32 'stringLength' 'stringValue.length == -1 ? 0 : stringValue.length']
]
-[type 'PascalByteString'
+[type PascalByteString
[simple int 32 'stringLength']
[array byte 'stringValue' count 'stringLength == -1 ? 0 : stringLength' ]
]
-[type 'Structure'
+[type Structure
]
-//[type 'DataTypeDefinition'
+//[type DataTypeDefinition
//
//]
@@ -413,7 +413,7 @@
// OpaqueType
<xsl:apply-templates select="/opc:TypeDictionary/opc:OpaqueType"/>
-[enum string 112 'OpcuaDataType' (uint 8 'variantType')
+[enum string 112 OpcuaDataType(uint 8 'variantType')
['"NULL"' NULL ['0']]
['"BOOL"' BOOL ['1']]
['"BYTE"' BYTE ['3']]
@@ -440,7 +440,7 @@
['"STRING"' STRING ['12']]
]
-[enum string 8 'OpcuaIdentifierType'
+[enum string 8 OpcuaIdentifierType
['"s"' STRING_IDENTIFIER]
['"i"' NUMBER_IDENTIFIER]
['"g"' GUID_IDENTIFIER]
diff --git a/protocols/opcua/src/main/xslt/opc-services.xsl b/protocols/opcua/src/main/xslt/opc-services.xsl
index 472941c..17c145d 100644
--- a/protocols/opcua/src/main/xslt/opc-services.xsl
+++ b/protocols/opcua/src/main/xslt/opc-services.xsl
@@ -57,7 +57,7 @@
<xsl:template name="servicesEnumParsing" >
<xsl:variable name="tokenizedLine" select="tokenize($servicesEnumFile, '\r\n|\r|\n')" />
-[enum int 32 'OpcuaNodeIdServices'<xsl:text>
+[enum int 32 OpcuaNodeIdServices<xsl:text>
</xsl:text>
<xsl:for-each select="$tokenizedLine">
<xsl:variable select="tokenize(., ',')" name="values" />
diff --git a/protocols/opcua/src/main/xslt/opc-status.xsl b/protocols/opcua/src/main/xslt/opc-status.xsl
index ffd2aec..d969598 100644
--- a/protocols/opcua/src/main/xslt/opc-status.xsl
+++ b/protocols/opcua/src/main/xslt/opc-status.xsl
@@ -57,7 +57,7 @@
<xsl:template name="statusCodeParsing" >
<xsl:variable name="tokenizedLine" select="tokenize($statusCodeFile, '\r\n|\r|\n')" />
-[enum uint 32 'OpcuaStatusCode'<xsl:text>
+[enum uint 32 OpcuaStatusCode<xsl:text>
</xsl:text>
<xsl:for-each select="$tokenizedLine">
<xsl:variable select="tokenize(., ',')" name="values" /> ['<xsl:value-of select="$values[2]"/>L' <xsl:value-of select="$values[1]"/>]<xsl:text>
diff --git a/protocols/plc4x/src/main/resources/protocols/plc4x/plc4x.mspec b/protocols/plc4x/src/main/resources/protocols/plc4x/plc4x.mspec
index c9b7111..3f816bc 100644
--- a/protocols/plc4x/src/main/resources/protocols/plc4x/plc4x.mspec
+++ b/protocols/plc4x/src/main/resources/protocols/plc4x/plc4x.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[discriminatedType 'Request' byteOrder='"BIG_ENDIAN"'
+[discriminatedType Request byteOrder='"BIG_ENDIAN"'
// TODO: Replace this with an discriminator field asap
[simple RequestType 'type']
[typeSwitch 'type'
@@ -36,7 +36,7 @@
]
]
-[enum uint 8 'RequestType'
+[enum uint 8 RequestType
['0x01' ReadRequest]
['0x02' ReadResponse]
['0x03' WriteRequest]
diff --git a/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec b/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
index 79f486e..bfb2c3a 100644
--- a/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
+++ b/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
@@ -37,14 +37,14 @@
PnPtcp PROFINET Precision Transparent Clock Protocol
*/
-[type 'Ethernet_Frame' byteOrder='"BIG_ENDIAN"'
+[type Ethernet_Frame byteOrder='"BIG_ENDIAN"'
// When sending to the mac address prefix of 01:0e:cf are multicast packets
[simple MacAddress 'destination']
[simple MacAddress 'source' ]
[simple Ethernet_FramePayload 'payload' ]
]
-[discriminatedType 'Ethernet_FramePayload'
+[discriminatedType Ethernet_FramePayload
[discriminator uint 16 'packetType']
[typeSwitch 'packetType'
['0x0800' Ethernet_FramePayload_IPv4
@@ -78,7 +78,7 @@
]
]
-[type 'Udp_Packet'
+[type Udp_Packet
[simple uint 16 'sourcePort' ]
[simple uint 16 'destinationPort' ]
[implicit uint 16 'packetLength' 'lengthInBytes' ]
@@ -92,7 +92,7 @@
// usually be dynamic. However are we trying to limit the number of
// arguments needed to construct the messages and Profinet only seems
// be using a very limited subset of all possible DCE/RPC packets.
-[type 'DceRpc_Packet' byteOrder='"BIG_ENDIAN"'
+[type DceRpc_Packet byteOrder='"BIG_ENDIAN"'
// RPC Header {
// RPCVersion 4.10.3.2.1
[const uint 8 'version' '0x04' ]
@@ -153,7 +153,7 @@
]
// RPCObjectUUID 4.10.3.2.8
-[type 'DceRpc_ObjectUuid'
+[type DceRpc_ObjectUuid
[const uint 32 'data1' '0xDEA00000' ]
[const uint 16 'data2' '0x6C97' ]
[const uint 16 'data3' '0x11D1' ]
@@ -169,7 +169,7 @@
// implemented this via an enum. However as the first 8 bytes are
// dynamically endianed and the last 8 bytes are set to Big Endian, we
// had to do this trick.
-[discriminatedType 'DceRpc_InterfaceUuid'
+[discriminatedType DceRpc_InterfaceUuid
[discriminator uint 32 'interfaceType' ]
[const uint 16 'data1' '0x6C97' ]
[const uint 16 'data2' '0x11D1' ]
@@ -195,7 +195,7 @@
// and used throughout the entire communication. Unfortunately,
// the first parts are effected by endianess, and the last 8
// bytes are fixed big-endian. Therefore the complicated notation.
-[type 'DceRpc_ActivityUuid'
+[type DceRpc_ActivityUuid
[simple uint 32 'data1' ]
[simple uint 16 'data2' ]
[simple uint 16 'data3' ]
@@ -211,16 +211,16 @@
// 01-0E-CF-00-01-01: As multicast destination for RT_CLASS_3
// 01-0E-CF-00-01-02: As invalid frame multicast destination for RT_CLASS_3
// 01-0E-CF-00-01-03 - FF: Reserved for further multicast addresses within the Type 10 context
-[type 'MacAddress'
+[type MacAddress
[array byte 'address' count '6']
]
-[type 'IpAddress'
+[type IpAddress
[array byte 'data' count '4']
]
// 4.10.3.2.2
-[enum uint 8 'DceRpc_PacketType'
+[enum uint 8 DceRpc_PacketType
['0x00' REQUEST ]
['0x01' PING ]
['0x02' RESPONSE ]
@@ -236,7 +236,7 @@
]
// 4.10.3.2.14
-[enum uint 16 'DceRpc_Operation'
+[enum uint 16 DceRpc_Operation
['0x0000' CONNECT ]
['0x0001' RELEASE ]
['0x0002' READ ]
@@ -246,7 +246,7 @@
]
// https://de.wikipedia.org/wiki/IEEE_802.1p
-[enum uint 3 'VirtualLanPriority' (string 16 'acronym')
+[enum uint 3 VirtualLanPriority (string 16 'acronym')
['0x0' BEST_EFFORT ['BE' ]]
['0x1' BACKGROUND ['BK' ]]
['0x2' EXCELLENT_EFFORT ['EE' ]]
@@ -266,7 +266,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Page 90
-[discriminatedType 'PnDcp_Pdu'
+[discriminatedType PnDcp_Pdu
[discriminator PnDcp_FrameId 'frameId' ]
[discriminator PnDcp_ServiceId 'serviceId' ]
[simple PnDcp_ServiceType 'serviceType' ]
@@ -331,7 +331,7 @@
]
]
-[discriminatedType 'PnDcp_Block'
+[discriminatedType PnDcp_Block
[discriminator PnDcp_BlockOptions 'option' ]
[discriminator uint 8 'suboption' ]
[implicit uint 16 'blockLength' 'lengthInBytes - 4']
@@ -491,13 +491,13 @@
]
]
-[type 'PnDcp_SupportedDeviceOption'
+[type PnDcp_SupportedDeviceOption
[simple PnDcp_BlockOptions 'option']
[simple uint 8 'suboption' ]
]
// 4.3.1.3.2 (Page 94ff)
-[type 'PnDcp_ServiceType'
+[type PnDcp_ServiceType
[reserved uint 5 '0x00' ]
[simple bit 'notSupported']
[reserved uint 1 '0x00' ]
@@ -505,7 +505,7 @@
]
// Page 86ff: Coding of the field FrameID
-[enum uint 16 'PnDcp_FrameId'
+[enum uint 16 PnDcp_FrameId
// Range 1
['0x0020' PTCP_RTSyncPDUWithFollowUp ]
// Range 2
@@ -536,7 +536,7 @@
// Page 94
// All other values are "Reserved"
-[enum uint 8 'PnDcp_ServiceId'
+[enum uint 8 PnDcp_ServiceId
['0x03' GET ]
['0x04' SET ]
['0x05' IDENTIFY]
@@ -546,7 +546,7 @@
// 4.3.1.4.1 (Page 97)
// All other values are "Reserved"
-[enum uint 8 'PnDcp_BlockOptions'
+[enum uint 8 PnDcp_BlockOptions
['0x01' IP_OPTION ]
['0x02' DEVICE_PROPERTIES_OPTION]
['0x03' DCP_OPTION ]
@@ -566,7 +566,7 @@
// TODO: Check if it's really Little Endian
// 5.1.2
// 5.5.2.2
-[discriminatedType 'PnIoCm_Packet'(DceRpc_PacketType 'packetType')
+[discriminatedType PnIoCm_Packet(DceRpc_PacketType 'packetType')
[typeSwitch 'packetType'
['REQUEST' PnIoCm_Packet_Req
[simple uint 32 'argsMaximum' ]
@@ -586,7 +586,7 @@
]
// Big Endian
-[discriminatedType 'PnIoCm_Block'
+[discriminatedType PnIoCm_Block
[discriminator PnIoCm_BlockType 'blockType' ]
[implicit uint 16 'blockLength' 'lengthInBytes - 4']
[simple uint 8 'blockVersionHigh' ]
@@ -691,7 +691,7 @@
]
]
-[type 'PnIoCm_IoCrBlockReqApi'
+[type PnIoCm_IoCrBlockReqApi
[const uint 32 'api' '0x00000000' ]
[implicit uint 16 'numIoDataObjects' 'COUNT(ioDataObjects)' ]
[array PnIoCm_IoDataObject 'ioDataObjects' count 'numIoDataObjects']
@@ -699,19 +699,19 @@
[array PnIoCm_IoCs 'ioCss' count 'numIoCss' ]
]
-[type 'PnIoCm_IoDataObject'
+[type PnIoCm_IoDataObject
[simple uint 16 'slotNumber' ]
[simple uint 16 'subSlotNumber' ]
[simple uint 16 'ioDataObjectFrameOffset']
]
-[type 'PnIoCm_IoCs'
+[type PnIoCm_IoCs
[simple uint 16 'slotNumber' ]
[simple uint 16 'subSlotNumber']
[simple uint 16 'ioFrameOffset']
]
-[type 'PnIoCm_ExpectedSubmoduleBlockReqApi'
+[type PnIoCm_ExpectedSubmoduleBlockReqApi
[const uint 32 'api' '0x00000000' ]
[simple uint 16 'slotNumber' ]
[simple uint 32 'moduleIdentNumber' ]
@@ -720,13 +720,13 @@
[array PnIoCm_Submodule 'submodules' count 'numSubmodules']
]
-[type 'PnIoCm_ModuleDiffBlockApi'
+[type PnIoCm_ModuleDiffBlockApi
[const uint 32 'api' '0x00000000' ]
[implicit uint 16 'numModules' 'COUNT(modules)' ]
[array PnIoCm_ModuleDiffBlockApi_Module 'modules' count 'numModules']
]
-[type 'PnIoCm_ModuleDiffBlockApi_Module'
+[type PnIoCm_ModuleDiffBlockApi_Module
[simple uint 16 'slotNumber' ]
[simple uint 32 'moduleIdentNumber' ]
[simple PnIoCm_ModuleState 'moduleState' ]
@@ -734,7 +734,7 @@
[array PnIoCm_ModuleDiffBlockApi_Submodule 'submodules' count 'numSubmodules']
]
-[type 'PnIoCm_ModuleDiffBlockApi_Submodule'
+[type PnIoCm_ModuleDiffBlockApi_Submodule
[simple uint 16 'subslotNumber' ]
[simple uint 32 'submoduleIdentNumber']
[simple bit 'codingUsesIdentInfo' ]
@@ -747,7 +747,7 @@
[simple PnIoCm_AddInfo 'addInfo' ]
]
-[discriminatedType 'PnIoCm_Submodule'
+[discriminatedType PnIoCm_Submodule
[simple uint 16 'slotNumber' ]
[simple uint 32 'submoduleIdentNumber' ]
// Begin SubmoduleProperties
@@ -778,11 +778,11 @@
]
]
-[type 'Uuid'
+[type Uuid
[array byte 'data' count '16']
]
-[enum uint 16 'PnIoCm_BlockType'
+[enum uint 16 PnIoCm_BlockType
['0x0101' AR_BLOCK_REQ ]
['0x8101' AR_BLOCK_RES ]
['0x0102' IO_CR_BLOCK_REQ ]
@@ -794,67 +794,67 @@
['0x8106' AR_SERVER_BLOCK ]
]
-[enum uint 16 'PnIoCm_ArType'
+[enum uint 16 PnIoCm_ArType
['0x0001' IO_CONTROLLER]
]
-[enum uint 2 'PnIoCm_CompanionArType'
+[enum uint 2 PnIoCm_CompanionArType
['0x0' SINGLE_AR]
]
-[enum uint 3 'PnIoCm_State'
+[enum uint 3 PnIoCm_State
['0x1' ACTIVE]
]
-[enum uint 16 'PnIoCm_IoCrType'
+[enum uint 16 PnIoCm_IoCrType
['0x0001' INPUT_CR]
['0x0002' OUTPUT_CR]
]
-[enum uint 4 'PnIoCm_RtClass'
+[enum uint 4 PnIoCm_RtClass
['0x2' RT_CLASS_2]
]
-[enum uint 16 'PnIoCm_AlarmCrType'
+[enum uint 16 PnIoCm_AlarmCrType
['0x0001' ALARM_CR]
]
-[enum uint 16 'PnIoCm_ModuleState'
+[enum uint 16 PnIoCm_ModuleState
['0x0002' PROPER_MODULE]
]
-[enum uint 2 'PnIoCm_SubmoduleType'
+[enum uint 2 PnIoCm_SubmoduleType
['0x0' NO_INPUT_NO_OUTPUT_DATA]
['0x3' INPUT_AND_OUTPUT_DATA]
]
-[enum uint 16 'PnIoCm_DescriptionType'
+[enum uint 16 PnIoCm_DescriptionType
['0x0001' INPUT]
]
-[enum uint 4 'PnIoCm_IdentInfo'
+[enum uint 4 PnIoCm_IdentInfo
['0x0' OK]
]
-[enum uint 4 'PnIoCm_ArInfo'
+[enum uint 4 PnIoCm_ArInfo
['0x0' OWN]
]
-[enum uint 3 'PnIoCm_AddInfo'
+[enum uint 3 PnIoCm_AddInfo
['0x0' NONE]
]
-[enum uint 4 'IntegerEncoding'
+[enum uint 4 IntegerEncoding
['0x0' BIG_ENDIAN]
['0x1' LITTLE_ENDIAN]
]
-[enum uint 4 'CharacterEncoding'
+[enum uint 4 CharacterEncoding
['0x0' ASCII]
['0x0' EBCDIC]
]
-[enum uint 8 'FloatingPointEncoding'
+[enum uint 8 FloatingPointEncoding
['0x00' IEEE]
['0x01' VAX ]
['0x02' CRAY]
diff --git a/protocols/s7/src/main/resources/protocols/s7/s7.mspec b/protocols/s7/src/main/resources/protocols/s7/s7.mspec
index 008097a..203acdc 100644
--- a/protocols/s7/src/main/resources/protocols/s7/s7.mspec
+++ b/protocols/s7/src/main/resources/protocols/s7/s7.mspec
@@ -21,7 +21,7 @@
// IsoOnTcp/TPKT
////////////////////////////////////////////////////////////////
-[type 'TPKTPacket' byteOrder='"BIG_ENDIAN"'
+[type TPKTPacket byteOrder='"BIG_ENDIAN"'
[const uint 8 'protocolId' '0x03']
[reserved uint 8 '0x00']
[implicit uint 16 'len' 'payload.lengthInBytes + 4']
@@ -32,7 +32,7 @@
// COTP
////////////////////////////////////////////////////////////////
-[discriminatedType 'COTPPacket' (uint 16 'cotpLen')
+[discriminatedType COTPPacket (uint 16 'cotpLen')
[implicit uint 8 'headerLength' 'lengthInBytes - (((payload != null) ? payload.lengthInBytes : 0) + 1)']
[discriminator uint 8 'tpduCode']
[typeSwitch 'tpduCode'
@@ -68,7 +68,7 @@
[optional S7Message 'payload' 'curPos < cotpLen']
]
-[discriminatedType 'COTPParameter' (uint 8 'rest')
+[discriminatedType COTPParameter (uint 8 'rest')
[discriminator uint 8 'parameterType']
[implicit uint 8 'parameterLength' 'lengthInBytes - 2']
[typeSwitch 'parameterType'
@@ -94,7 +94,7 @@
// S7
////////////////////////////////////////////////////////////////
-[discriminatedType 'S7Message'
+[discriminatedType S7Message
[const uint 8 'protocolId' '0x32']
[discriminator uint 8 'messageType']
[reserved uint 16 '0x0000']
@@ -122,7 +122,7 @@
////////////////////////////////////////////////////////////////
// Parameters
-[discriminatedType 'S7Parameter' (uint 8 'messageType')
+[discriminatedType S7Parameter (uint 8 'messageType')
[discriminator uint 8 'parameterType']
[typeSwitch 'parameterType','messageType'
['0xF0' S7ParameterSetupCommunication
@@ -161,7 +161,7 @@
]
]
-[discriminatedType 'S7VarRequestParameterItem'
+[discriminatedType S7VarRequestParameterItem
[discriminator uint 8 'itemType']
[typeSwitch 'itemType'
['0x12' S7VarRequestParameterItemAddress
@@ -171,7 +171,7 @@
]
]
-[discriminatedType 'S7Address'
+[discriminatedType S7Address
[discriminator uint 8 'addressType']
[typeSwitch 'addressType'
['0x10' S7AddressAny
@@ -186,7 +186,7 @@
]
]
-[discriminatedType 'S7ParameterUserDataItem'
+[discriminatedType S7ParameterUserDataItem
[discriminator uint 8 'itemType']
[typeSwitch 'itemType'
['0x12' S7ParameterUserDataItemCPUFunctions
@@ -203,13 +203,13 @@
]
]
-[type 'SzlId'
+[type SzlId
[simple SzlModuleTypeClass 'typeClass']
[simple uint 4 'sublistExtract']
[simple SzlSublist 'sublistList']
]
-[type 'SzlDataTreeItem'
+[type SzlDataTreeItem
[simple uint 16 'itemIndex']
[array byte 'mlfb' count '20']
[simple uint 16 'moduleTypeId']
@@ -220,7 +220,7 @@
////////////////////////////////////////////////////////////////
// Payloads
-[discriminatedType 'S7Payload' (uint 8 'messageType', S7Parameter 'parameter')
+[discriminatedType S7Payload (uint 8 'messageType', S7Parameter 'parameter')
[typeSwitch 'parameter.parameterType', 'messageType'
['0x04','0x03' S7PayloadReadVarResponse
[array S7VarPayloadDataItem 'items' count 'CAST(parameter, S7ParameterReadVarResponse).numItems']
@@ -238,7 +238,7 @@
]
// This is actually not quite correct as depending pon the transportSize the length is either defined in bits or bytes.
-[type 'S7VarPayloadDataItem'
+[type S7VarPayloadDataItem
[simple DataTransportErrorCode 'returnCode']
[simple DataTransportSize 'transportSize']
[implicit uint 16 'dataLength' 'COUNT(data) * ((transportSize == DataTransportSize.BIT) ? 1 : (transportSize.sizeInBits ? 8 : 1))']
@@ -246,7 +246,7 @@
[padding uint 8 'pad' '0x00' 'COUNT(data) % 2']
]
-[type 'S7VarPayloadStatusItem'
+[type S7VarPayloadStatusItem
[simple DataTransportErrorCode 'returnCode']
]
@@ -277,7 +277,7 @@
]
]
-[type 'AssociatedValueType'
+[type AssociatedValueType
[simple DataTransportErrorCode 'returnCode']
[simple DataTransportSize 'transportSize']
[manual uint 16 'valueLength' 'STATIC_CALL("RightShift3", readBuffer)' 'STATIC_CALL("LeftShift3", writeBuffer, _value.valueLength)' '2']
@@ -285,7 +285,7 @@
]
//TODO: Convert BCD to uint
-[type 'DateAndTime'
+[type DateAndTime
[manual uint 8 'year' 'STATIC_CALL("BcdToInt", readBuffer)' 'STATIC_CALL("ByteToBcd", writeBuffer, _value.year)' '1']
[manual uint 8 'month' 'STATIC_CALL("BcdToInt", readBuffer)' 'STATIC_CALL("ByteToBcd", writeBuffer, _value.month)' '1']
[manual uint 8 'day' 'STATIC_CALL("BcdToInt", readBuffer)' 'STATIC_CALL("ByteToBcd", writeBuffer, _value.day)' '1']
@@ -296,7 +296,7 @@
[simple uint 4 'dow']
]
-[type 'State'
+[type State
[simple bit 'SIG_8']
[simple bit 'SIG_7']
[simple bit 'SIG_6']
@@ -307,7 +307,7 @@
[simple bit 'SIG_1']
]
-[type 'AlarmMessageObjectPushType'
+[type AlarmMessageObjectPushType
[const uint 8 'variableSpec' '0x12']
[simple uint 8 'lengthSpec']
[simple SyntaxIdType 'syntaxId']
@@ -320,7 +320,7 @@
[array AssociatedValueType 'AssociatedValues' count 'numberOfValues' ]
]
-[type 'AlarmMessageAckObjectPushType'
+[type AlarmMessageAckObjectPushType
[const uint 8 'variableSpec' '0x12']
[simple uint 8 'lengthSpec']
[simple SyntaxIdType 'syntaxId']
@@ -330,21 +330,21 @@
[simple State 'ackStateComing']
]
-[type 'AlarmMessagePushType'
+[type AlarmMessagePushType
[simple DateAndTime 'TimeStamp']
[simple uint 8 'functionId']
[simple uint 8 'numberOfObjects']
[array AlarmMessageObjectPushType 'messageObjects' count 'numberOfObjects' ]
]
-[type 'AlarmMessageAckPushType'
+[type AlarmMessageAckPushType
[simple DateAndTime 'TimeStamp']
[simple uint 8 'functionId']
[simple uint 8 'numberOfObjects']
[array AlarmMessageAckObjectPushType 'messageObjects' count 'numberOfObjects' ]
]
-[type 'AlarmMessageObjectQueryType'
+[type AlarmMessageObjectQueryType
[simple uint 8 'lengthDataset']
[reserved uint 16 '0x0000']
[const uint 8 'variableSpec' '0x12']
@@ -357,7 +357,7 @@
[simple AssociatedValueType 'valueGoing']
]
-[type 'AlarmMessageQueryType'
+[type AlarmMessageQueryType
[simple uint 8 'functionId']
[simple uint 8 'numberOfObjects']
[simple DataTransportErrorCode 'returnCode']
@@ -366,7 +366,7 @@
[array AlarmMessageObjectQueryType 'messageObjects' count 'numberOfObjects' ]
]
-[type 'AlarmMessageObjectAckType'
+[type AlarmMessageObjectAckType
[const uint 8 'variableSpec' '0x12']
[const uint 8 'length' '0x08']
[simple SyntaxIdType 'syntaxId']
@@ -376,13 +376,13 @@
[simple State 'ackStateComing']
]
-[type 'AlarmMessageAckType'
+[type AlarmMessageAckType
[simple uint 8 'functionId']
[simple uint 8 'numberOfObjects']
[array AlarmMessageObjectAckType 'messageObjects' count 'numberOfObjects' ]
]
-[type 'AlarmMessageAckResponseType'
+[type AlarmMessageAckResponseType
[simple uint 8 'functionId']
[simple uint 8 'numberOfObjects']
[array uint 8 'messageObjects' count 'numberOfObjects' ]
@@ -412,7 +412,7 @@
// 0x16 NOTIFY8_IND
////////////////////////////////////////////////////////////////
-[discriminatedType 'S7PayloadUserDataItem'(uint 4 'cpuFunctionType', uint 8 'cpuSubfunction')
+[discriminatedType S7PayloadUserDataItem(uint 4 'cpuFunctionType', uint 8 'cpuSubfunction')
[simple DataTransportErrorCode 'returnCode']
[simple DataTransportSize 'transportSize']
[implicit uint 16 'dataLength' 'lengthInBytes - 4']
@@ -521,7 +521,7 @@
]
]
-[dataIo 'DataItem'(vstring 'dataProtocolId', int 32 'stringLength')
+[dataIo DataItem(vstring 'dataProtocolId', int 32 'stringLength')
[typeSwitch 'dataProtocolId'
// -----------------------------------------
// Bit
@@ -647,7 +647,7 @@
]
]
-[enum int 8 'COTPTpduSize'(uint 16 'sizeInBytes')
+[enum int 8 COTPTpduSize(uint 16 'sizeInBytes')
['0x07' SIZE_128 ['128']]
['0x08' SIZE_256 ['256']]
['0x09' SIZE_512 ['512']]
@@ -657,7 +657,7 @@
['0x0d' SIZE_8192 ['8192']]
]
-[enum int 8 'COTPProtocolClass'
+[enum int 8 COTPProtocolClass
['0x00' CLASS_0]
['0x10' CLASS_1]
['0x20' CLASS_2]
@@ -665,7 +665,7 @@
['0x40' CLASS_4]
]
-[enum int 8 'DataTransportSize'(bit 'sizeInBits')
+[enum int 8 DataTransportSize(bit 'sizeInBits')
['0x00' NULL ['false']]
['0x03' BIT ['true']]
['0x04' BYTE_WORD_DWORD ['true']]
@@ -675,13 +675,13 @@
['0x09' OCTET_STRING ['false']]
]
-[enum int 8 'DeviceGroup'
+[enum int 8 DeviceGroup
['0x01' PG_OR_PC]
['0x02' OS ]
['0x03' OTHERS ]
]
-[enum int 8 'TransportSize'(uint 8 'code', uint 8 'shortName', uint 8 'sizeInBytes', TransportSize 'baseType', DataTransportSize 'dataTransportSize', vstring 'dataProtocolId', bit 'supported_S7_300', bit 'supported_S7_400', bit 'supported_S7_1200', bit 'supported_S7_1500', bit 'supported_LOGO')
+[enum int 8 TransportSize(uint 8 'code', uint 8 'shortName', uint 8 'sizeInBytes', TransportSize 'baseType', DataTransportSize 'dataTransportSize', vstring 'dataProtocolId', bit 'supported_S7_300', bit 'supported_S7_400', bit 'supported_S7_1200', bit 'supported_S7_1500', bit 'supported_LOGO')
// Bit Strings
['0x01' BOOL ['0x01' , 'X' , '1' , 'null' , 'BIT' , 'IEC61131_BOOL' , 'true' , 'true' , 'true' , 'true' , 'true' ]]
['0x02' BYTE ['0x02' , 'B' , '1' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_BYTE' , 'true' , 'true' , 'true' , 'true' , 'true' ]]
@@ -722,7 +722,7 @@
['0x1B' DT ['0x0F' , 'X' , '12' , 'null' , 'null' , 'IEC61131_DATE_AND_TIME', 'true' , 'true' , 'false' , 'true' , 'false' ]]
]
-[enum uint 8 'MemoryArea'(string 24 'shortName')
+[enum uint 8 MemoryArea(string 24 'shortName')
['0x1C' COUNTERS ['C']]
['0x1D' TIMERS ['T']]
['0x80' DIRECT_PERIPHERAL_ACCESS ['D']]
@@ -734,7 +734,7 @@
['0x86' LOCAL_DATA ['LD']]
]
-[enum uint 8 'DataTransportSize'(bit 'sizeInBits')
+[enum uint 8 DataTransportSize(bit 'sizeInBits')
['0x00' NULL ['false']]
['0x03' BIT ['true']]
['0x04' BYTE_WORD_DWORD ['true']]
@@ -744,7 +744,7 @@
['0x09' OCTET_STRING ['false']]
]
-[enum uint 8 'DataTransportErrorCode'
+[enum uint 8 DataTransportErrorCode
['0x00' RESERVED ]
['0xFF' OK ]
['0x03' ACCESS_DENIED ]
@@ -753,14 +753,14 @@
['0x0A' NOT_FOUND ]
]
-[enum uint 4 'SzlModuleTypeClass'
+[enum uint 4 SzlModuleTypeClass
['0x0' CPU]
['0x4' IM]
['0x8' FM]
['0xC' CP]
]
-[enum uint 8 'SzlSublist'
+[enum uint 8 SzlSublist
['0x11' MODULE_IDENTIFICATION]
['0x12' CPU_FEATURES]
['0x13' USER_MEMORY_AREA]
@@ -782,21 +782,21 @@
['0xB1' MODULE_DIAGNOSTIC_DATA]
]
-[enum uint 8 'CpuSubscribeEvents'
+[enum uint 8 CpuSubscribeEvents
['0x01' CPU]
['0x02' IM]
['0x04' FM]
['0x80' CP]
]
-[enum uint 8 'EventType'
+[enum uint 8 EventType
['0x01' MODE]
['0x02' SYS]
['0x04' USR]
['0x80' ALM]
]
-[enum uint 8 'SyntaxIdType'
+[enum uint 8 SyntaxIdType
['0x01' S7ANY]
['0x13' PBC_ID]
['0x15' ALARM_LOCKFREESET]
@@ -812,13 +812,13 @@
['0xB0' DBREAD]
]
-[enum uint 8 'AlarmType'
+[enum uint 8 AlarmType
['0x01' SCAN]
['0x02' ALARM_8]
['0x04' ALARM_S]
]
-[enum uint 8 'AlarmStateType'
+[enum uint 8 AlarmStateType
['0x00' SCAN_ABORT]
['0x01' SCAN_INITIATE]
['0x04' ALARM_ABORT]
@@ -827,13 +827,13 @@
['0x09' ALARM_S_INITIATE]
]
-[enum uint 8 'QueryType'
+[enum uint 8 QueryType
['0x01' BYALARMTYPE]
['0x02' ALARM_8]
['0x04' ALARM_S]
]
-[enum uint 8 'ModeTransitionType'
+[enum uint 8 ModeTransitionType
['0x00' STOP]
['0x01' WARM_RESTART]
['0x02' RUN]
diff --git a/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec b/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec
index 40251e5..975f392 100644
--- a/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec
+++ b/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec
@@ -23,7 +23,7 @@
[simple uint 16 'dummy']
]
-[dataIo 'DataItem'(vstring 'dataType', uint 16 'numberOfValues')
+[dataIo DataItem(vstring 'dataType', uint 16 'numberOfValues')
[typeSwitch 'dataType','numberOfValues'
['"BOOL"','1' BOOL
[simple bit 'value']
@@ -136,7 +136,7 @@
]
]
-[enum uint 8 'SimulatedDataTypeSizes'(uint 8 'dataTypeSize')
+[enum uint 8 SimulatedDataTypeSizes(uint 8 'dataTypeSize')
['1' BOOL ['1']]
['2' BYTE ['1']]
['3' WORD ['2']]
diff --git a/protocols/socketcan/src/main/resources/protocols/can/socketcan.mspec b/protocols/socketcan/src/main/resources/protocols/can/socketcan.mspec
index ba3f552..439053f 100644
--- a/protocols/socketcan/src/main/resources/protocols/can/socketcan.mspec
+++ b/protocols/socketcan/src/main/resources/protocols/can/socketcan.mspec
@@ -17,7 +17,7 @@
* under the License.
*/
-[type 'SocketCANFrame' byteOrder='"LITTLE_ENDIAN"'
+[type SocketCANFrame byteOrder='"LITTLE_ENDIAN"'
[simple int 32 'rawId']
[virtual int 32 'identifier'
'STATIC_CALL("readIdentifier", rawId)'
diff --git a/src/site/asciidoc/developers/code-gen/protocol/df1.adoc b/src/site/asciidoc/developers/code-gen/protocol/df1.adoc
index 3d0f89c..027b9de 100644
--- a/src/site/asciidoc/developers/code-gen/protocol/df1.adoc
+++ b/src/site/asciidoc/developers/code-gen/protocol/df1.adoc
@@ -54,7 +54,7 @@ DLE + ETX mark the end of the message, the last two bytes are the CRC that is ca
Here is the MSpec to model the behaviour:
....
-[discriminatedType 'DF1Symbol'
+[discriminatedType DF1Symbol
[const uint 8 'messageStart' '0x10']
[discriminator uint 8 'symbolType']
[typeSwitch 'symbolType'
@@ -73,7 +73,7 @@ Here is the MSpec to model the behaviour:
]
]
-[discriminatedType 'DF1Command'
+[discriminatedType DF1Command
[discriminator uint 8 'commandCode']
[simple uint 8 'status']
[simple uint 16 'transactionCounter']
diff --git a/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc b/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc
index 90b774b..a1d1579 100644
--- a/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc
+++ b/src/site/asciidoc/developers/code-gen/protocol/mspec.adoc
@@ -31,7 +31,7 @@ At the root level of these specs are a set of `type` or `discriminatedType` bloc
An example would be the `TPKTPacket` of the S7 format:
....
-[type 'TPKTPacket'
+[type TPKTPacket
[const uint 8 'protocolId' '0x03']
[reserved uint 8 '0x00']
[implicit uint 16 'len' 'payload.lengthInBytes + 4']
@@ -46,7 +46,7 @@ Every discriminated type can contain at most one `discriminator` field and exact
For example part of the spec for the S7 format looks like this:
....
-[discriminatedType 'S7Message'
+[discriminatedType S7Message
[const uint 8 'protocolId' '0x32']
[discriminator uint 8 'messageType']
[reserved uint 16 '0x0000']
@@ -329,7 +329,7 @@ Some times it is necessary to pass along additional parameters.
If a complex type requires parameters, these are declared in the header of that type.
....
-[discriminatedType 'S7Payload' [uint 8 'messageType', S7Parameter 'parameter']
+[discriminatedType S7Payload(uint 8 'messageType', S7Parameter 'parameter')
[typeSwitch 'parameter.discriminatorValues[0]', 'messageType'
['0xF0' S7PayloadSetupCommunication]
['0x04','0x01' S7PayloadReadVarRequest]