Skip to content

Commit

Permalink
feat(plc4x/codegen): remove obsolete ticks
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl authored and chrisdutz committed Nov 17, 2021
1 parent f9d737e commit 24d3472
Show file tree
Hide file tree
Showing 28 changed files with 354 additions and 354 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
// AMS/TCP Packet
////////////////////////////////////////////////////////////////

[type 'AmsTCPPacket'
[type AmsTCPPacket
// The ams - tcp to be sent.
[simple AmsTcpHeader 'amsTcpHeader']
// The AMS packet to be sent.
[simple AmsPacket 'userdata' ]
]

// 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.
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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.
Expand All @@ -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]
Expand All @@ -163,7 +163,7 @@
['0x09' ADS_READ_WRITE]
]

[type 'State'
[type State
[simple bit 'broadcast' ]
[reserved int 7 '0x0' ]
[simple bit 'initCommand' ]
Expand Down Expand Up @@ -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' ]
Expand All @@ -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]
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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']
Expand Down
Loading

0 comments on commit 24d3472

Please sign in to comment.