You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2021/08/08 10:30:56 UTC
[plc4x] branch develop updated: - Cleaned up in the names of the
mspec types for PROFINET to follow a consistent pattern
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 2a8631c - Cleaned up in the names of the mspec types for PROFINET to follow a consistent pattern
2a8631c is described below
commit 2a8631c1b9a94f81cff6349b61ed3f965d8622c3
Author: cdutz <ch...@c-ware.de>
AuthorDate: Sun Aug 8 12:30:47 2021 +0200
- Cleaned up in the names of the mspec types for PROFINET to follow a consistent pattern
---
.../apache/plc4x/java/profinet/ProfinetDriver.java | 10 +-
.../profinet/discovery/ProfinetPlcDiscoverer.java | 42 +-
.../profinet/protocol/ProfinetDiscoveryLogic.java | 6 +-
.../profinet/protocol/ProfinetProtocolLogic.java | 6 +-
.../resources/protocols/profinet/profinet.mspec | 510 +++++++++++----------
5 files changed, 289 insertions(+), 285 deletions(-)
diff --git a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/ProfinetDriver.java b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/ProfinetDriver.java
index 4e3f641..d46d1f3 100644
--- a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/ProfinetDriver.java
+++ b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/ProfinetDriver.java
@@ -26,8 +26,8 @@ import org.apache.plc4x.java.profinet.discovery.ProfinetPlcDiscoverer;
import org.apache.plc4x.java.profinet.field.ProfinetField;
import org.apache.plc4x.java.profinet.field.ProfinetFieldHandler;
import org.apache.plc4x.java.profinet.protocol.ProfinetProtocolLogic;
-import org.apache.plc4x.java.profinet.readwrite.EthernetFrame;
-import org.apache.plc4x.java.profinet.readwrite.io.EthernetFrameIO;
+import org.apache.plc4x.java.profinet.readwrite.Ethernet_Frame;
+import org.apache.plc4x.java.profinet.readwrite.io.Ethernet_FrameIO;
import org.apache.plc4x.java.spi.connection.GeneratedDriverBase;
import org.apache.plc4x.java.spi.connection.ProtocolStackConfigurer;
import org.apache.plc4x.java.spi.messages.DefaultPlcDiscoveryRequest;
@@ -40,7 +40,7 @@ import org.apache.plc4x.java.spi.optimizer.SingleFieldOptimizer;
import java.util.function.ToIntFunction;
-public class ProfinetDriver extends GeneratedDriverBase<EthernetFrame> {
+public class ProfinetDriver extends GeneratedDriverBase<Ethernet_Frame> {
public static final String DRIVER_CODE = "profinet";
@@ -123,8 +123,8 @@ public class ProfinetDriver extends GeneratedDriverBase<EthernetFrame> {
}
@Override
- protected ProtocolStackConfigurer<EthernetFrame> getStackConfigurer() {
- return SingleProtocolStackConfigurer.builder(EthernetFrame.class, EthernetFrameIO.class)
+ protected ProtocolStackConfigurer<Ethernet_Frame> getStackConfigurer() {
+ return SingleProtocolStackConfigurer.builder(Ethernet_Frame.class, Ethernet_FrameIO.class)
.withProtocol(ProfinetProtocolLogic.class)
.withPacketSizeEstimator(ByteLengthEstimator.class)
// Every incoming message is to be treated as a response.
diff --git a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java
index 72ec15c..27cff8c 100644
--- a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java
+++ b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java
@@ -26,7 +26,7 @@ import org.apache.plc4x.java.api.messages.PlcDiscoveryResponse;
import org.apache.plc4x.java.api.types.PlcResponseCode;
import org.apache.plc4x.java.profinet.ProfinetDriver;
import org.apache.plc4x.java.profinet.readwrite.*;
-import org.apache.plc4x.java.profinet.readwrite.io.EthernetFrameIO;
+import org.apache.plc4x.java.profinet.readwrite.io.Ethernet_FrameIO;
import org.apache.plc4x.java.profinet.readwrite.types.VirtualLanPriority;
import org.apache.plc4x.java.spi.generation.ParseException;
import org.apache.plc4x.java.spi.generation.ReadBuffer;
@@ -112,23 +112,23 @@ public class ProfinetPlcDiscoverer implements PlcDiscoverer {
if (isPnPacket) {
ReadBuffer reader = new ReadBufferByteBased(ethernetPacket.getRawData());
try {
- EthernetFrame ethernetFrame = EthernetFrameIO.staticParse(reader);
- DCP_PDU pdu;
+ Ethernet_Frame ethernetFrame = Ethernet_FrameIO.staticParse(reader);
+ PnDcp_Pdu pdu;
// Access the pdu data (either directly or by
// unpacking the content of the VLAN packet.
- if (ethernetFrame.getPayload() instanceof VirtualLanEthernetFramePayload) {
- VirtualLanEthernetFramePayload vlefpl = (VirtualLanEthernetFramePayload) ethernetFrame.getPayload();
- pdu = ((ProfinetEthernetFramePayload) vlefpl.getPayload()).getPdu();
+ if (ethernetFrame.getPayload() instanceof Ethernet_FramePayload_VirtualLan) {
+ Ethernet_FramePayload_VirtualLan vlefpl = (Ethernet_FramePayload_VirtualLan) ethernetFrame.getPayload();
+ pdu = ((Ethernet_FramePayload_PnDcp) vlefpl.getPayload()).getPdu();
} else {
- pdu = ((ProfinetEthernetFramePayload) ethernetFrame.getPayload()).getPdu();
+ pdu = ((Ethernet_FramePayload_PnDcp) ethernetFrame.getPayload()).getPdu();
}
// Inspect the PDU itself
// (in this case we only process identify response packets)
- if (pdu instanceof DCP_Identify_ResPDU) {
- DCP_Identify_ResPDU identifyResPDU = (DCP_Identify_ResPDU) pdu;
+ if (pdu instanceof PnDcp_Pdu_IdentifyRes) {
+ PnDcp_Pdu_IdentifyRes identifyResPDU = (PnDcp_Pdu_IdentifyRes) pdu;
- Map<String, DCP_Block> blocks = new HashMap<>();
- for (DCP_Block block : identifyResPDU.getBlocks()) {
+ Map<String, PnDcp_Block> blocks = new HashMap<>();
+ for (PnDcp_Block block : identifyResPDU.getBlocks()) {
String blockName = block.getOption().name() + "-" + block.getSuboption().toString();
blocks.put(blockName, block);
}
@@ -140,12 +140,12 @@ public class ProfinetPlcDiscoverer implements PlcDiscoverer {
String deviceTypeName = "unknown";
if (blocks.containsKey(DEVICE_TYPE_NAME)) {
- DCP_BlockDevicePropertiesDeviceVendor block = (DCP_BlockDevicePropertiesDeviceVendor) blocks.get(DEVICE_TYPE_NAME);
+ PnDcp_Block_DevicePropertiesDeviceVendor block = (PnDcp_Block_DevicePropertiesDeviceVendor) blocks.get(DEVICE_TYPE_NAME);
deviceTypeName = new String(block.getDeviceVendorValue());
}
String deviceName = "unknown";
if (blocks.containsKey(DEVICE_NAME_OF_STATION)) {
- DCP_BlockDevicePropertiesNameOfStation block = (DCP_BlockDevicePropertiesNameOfStation) blocks.get(DEVICE_NAME_OF_STATION);
+ PnDcp_Block_DevicePropertiesNameOfStation block = (PnDcp_Block_DevicePropertiesNameOfStation) blocks.get(DEVICE_NAME_OF_STATION);
deviceName = new String(block.getNameOfStation());
}
@@ -176,21 +176,21 @@ public class ProfinetPlcDiscoverer implements PlcDiscoverer {
pool.execute(t);
// Construct and send the search request.
- EthernetFrame identificationRequest = new EthernetFrame(
+ Ethernet_Frame identificationRequest = new Ethernet_Frame(
// Pre-Defined PROFINET discovery MAC address
new MacAddress(new short[]{0x01, 0x0E, 0xCF, 0x00, 0x00, 0x00}),
toPlc4xMacAddress(macAddress),
- new VirtualLanEthernetFramePayload(VirtualLanPriority.BEST_EFFORT, false, 0,
- new ProfinetEthernetFramePayload(
- new DCP_Identify_ReqPDU(
- new ServiceType(false, false),
+ new Ethernet_FramePayload_VirtualLan(VirtualLanPriority.BEST_EFFORT, false, 0,
+ new Ethernet_FramePayload_PnDcp(
+ new PnDcp_Pdu_IdentifyReq(
+ new PnDcp_ServiceType(false, false),
1,
256,
- new DCP_Block[]{
- new DCP_BlockALLSelector()
+ new PnDcp_Block[]{
+ new PnDcp_Block_ALLSelector()
}))));
WriteBufferByteBased buffer = new WriteBufferByteBased(34);
- EthernetFrameIO.staticSerialize(buffer, identificationRequest);
+ Ethernet_FrameIO.staticSerialize(buffer, identificationRequest);
Packet packet = EthernetPacket.newPacket(buffer.getData(), 0, 34);
handle.sendPacket(packet);
}
diff --git a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetDiscoveryLogic.java b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetDiscoveryLogic.java
index 5c4f2d1..7c97d02 100644
--- a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetDiscoveryLogic.java
+++ b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetDiscoveryLogic.java
@@ -18,14 +18,14 @@
*/
package org.apache.plc4x.java.profinet.protocol;
-import org.apache.plc4x.java.profinet.readwrite.EthernetFrame;
+import org.apache.plc4x.java.profinet.readwrite.Ethernet_Frame;
import org.apache.plc4x.java.spi.ConversationContext;
import org.apache.plc4x.java.spi.Plc4xProtocolBase;
-public class ProfinetDiscoveryLogic extends Plc4xProtocolBase<EthernetFrame> {
+public class ProfinetDiscoveryLogic extends Plc4xProtocolBase<Ethernet_Frame> {
@Override
- public void close(ConversationContext<EthernetFrame> context) {
+ public void close(ConversationContext<Ethernet_Frame> context) {
}
diff --git a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
index 48e7182..52b1f56 100644
--- a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
+++ b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
@@ -21,7 +21,7 @@ package org.apache.plc4x.java.profinet.protocol;
import org.apache.commons.lang3.NotImplementedException;
import org.apache.plc4x.java.api.messages.*;
import org.apache.plc4x.java.profinet.config.ProfinetConfiguration;
-import org.apache.plc4x.java.profinet.readwrite.EthernetFrame;
+import org.apache.plc4x.java.profinet.readwrite.Ethernet_Frame;
import org.apache.plc4x.java.spi.ConversationContext;
import org.apache.plc4x.java.spi.Plc4xProtocolBase;
import org.apache.plc4x.java.spi.configuration.HasConfiguration;
@@ -30,7 +30,7 @@ import org.apache.plc4x.java.spi.transaction.RequestTransactionManager;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicInteger;
-public class ProfinetProtocolLogic extends Plc4xProtocolBase<EthernetFrame> implements HasConfiguration<ProfinetConfiguration> {
+public class ProfinetProtocolLogic extends Plc4xProtocolBase<Ethernet_Frame> implements HasConfiguration<ProfinetConfiguration> {
private RequestTransactionManager tm;
private final AtomicInteger transactionIdentifierGenerator = new AtomicInteger(1);
@@ -41,7 +41,7 @@ public class ProfinetProtocolLogic extends Plc4xProtocolBase<EthernetFrame> impl
}
@Override
- public void close(ConversationContext<EthernetFrame> context) {
+ public void close(ConversationContext<Ethernet_Frame> context) {
// Nothing to do here ...
}
diff --git a/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec b/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
index 98dd88b..634a1f6 100644
--- a/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
+++ b/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
@@ -27,57 +27,58 @@
ARP Address Resolution Protocol (Based on Ethernet)
LLDP Link Layer Discovery Protocol (Based on Ethernet)
- PN-DCP PROFINET Discovery and Configuration Protocol (Based on Ethernet)
- PNIO-CM PROFINET IO Context Manager (Based on DCP/RPC, UDP and Ethernet)
- PNIO PROFINET IO (Based on Ethernet)
- PNIO_PS PROFIsafe protocol (Based on Ethernet)
- PNIO-AL PROFINET Alarm Events (Based on Ethernet)
-
- PN-PTCP PROFINET Precision Transparent Clock Protocol
+ PnDcp PROFINET Discovery and Configuration Protocol (Based on Ethernet)
+ PnIoCm PROFINET IO Context Manager (Based on DCP/RPC, UDP and Ethernet)
+ PnIo PROFINET IO (Based on Ethernet)
+ PnIoPs PROFIsafe protocol (Based on Ethernet)
+ PnIoAl PROFINET Alarm Events (Based on Ethernet)
+
+ // Not really handled in this driver (Just listed for the sake of completeness)
+ PnPtcp PROFINET Precision Transparent Clock Protocol
*/
-[type 'EthernetFrame'
+[type 'Ethernet_Frame'
// When sending to the mac address prefix of 01:0e:cf are multicast packets
- [simple MacAddress 'destination']
- [simple MacAddress 'source']
- [simple EthernetFamePayload 'payload']
+ [simple MacAddress 'destination']
+ [simple MacAddress 'source' ]
+ [simple Ethernet_FramePayload 'payload' ]
]
-[discriminatedType 'EthernetFamePayload'
+[discriminatedType 'Ethernet_FramePayload'
[discriminator uint 16 'packetType']
[typeSwitch 'packetType'
- ['0x0800' IPv4
- [const uint 4 'version' '0x4' ]
- [const uint 4 'headerLength' '0x5' ]
- [const uint 6 'differentiatedServicesCodepoint' '0x00' ]
- [const uint 2 'explicitCongestionNotification' '0x0' ]
- [implicit uint 16 'totalLength' '20 + packet.lengthInBytes']
- [simple uint 15 'identification' ]
- [const uint 3 'flags' '0x00' ]
- [const uint 13 'fragmentOffset' '0x00' ]
+ ['0x0800' Ethernet_FramePayload_IPv4
+ [const uint 4 'version' '0x4' ]
+ [const uint 4 'headerLength' '0x5' ]
+ [const uint 6 'differentiatedServicesCodepoint' '0x00' ]
+ [const uint 2 'explicitCongestionNotification' '0x0' ]
+ [implicit uint 16 'totalLength' '20 + packet.lengthInBytes']
+ [simple uint 15 'identification' ]
+ [const uint 3 'flags' '0x00' ]
+ [const uint 13 'fragmentOffset' '0x00' ]
// Time to live: 64
- [const uint 8 'timeToLive' '0x40' ]
+ [const uint 8 'timeToLive' '0x40' ]
// Protocol: UDP
- [const uint 8 'protocol' '0x11' ]
+ [const uint 8 'protocol' '0x11' ]
// TODO: Implement
- //[checksum uint 16 'headerChecksum' ]
- [simple IpAddress 'sourceAddress' ]
- [simple IpAddress 'destinationAddress' ]
- [simple UdpPacket 'packet' ]
+ //[checksum uint 16 'headerChecksum' ]
+ [simple IpAddress 'sourceAddress' ]
+ [simple IpAddress 'destinationAddress' ]
+ [simple Udp_Packet 'packet' ]
]
- ['0x8100' VirtualLanEthernetFramePayload
- [simple VirtualLanPriority 'priority']
- [simple bit 'ineligible']
- [simple uint 12 'id']
- [simple EthernetFamePayload 'payload']
+ ['0x8100' Ethernet_FramePayload_VirtualLan
+ [simple VirtualLanPriority 'priority' ]
+ [simple bit 'ineligible' ]
+ [simple uint 12 'id' ]
+ [simple Ethernet_FramePayload 'payload' ]
]
- ['0x8892' ProfinetEthernetFramePayload
- [simple DCP_PDU 'pdu']
+ ['0x8892' Ethernet_FramePayload_PnDcp
+ [simple PnDcp_Pdu 'pdu' ]
]
]
]
-[type 'UdpPacket'
+[type 'Udp_Packet'
[simple uint 16 'sourcePort' ]
[simple uint 16 'destinationPort' ]
[implicit uint 16 'packetLength' 'lengthInBytes' ]
@@ -86,16 +87,19 @@
[array byte 'payload' count 'packetLength - 8']
]
-[discriminatedType 'DceRpcPacket'
+// Little-Endian
+// This type is explicitly not directly linked to the Udp_Packet.payload as it has a different endianess
+// TODO: As only this type and the first layer of PnIo seem to be little-endian, perhaps a workaround to avoid endianes switching would be good.
+[discriminatedType 'DceRpc_Packet'
[const uint 8 'version' '0x04' ]
- [discriminator DceRpcPacketType 'packetType' ]
+ [discriminator DceRpc_PacketType 'packetType' ]
[typeSwitch 'packetType'
- ['REQUEST' DceRpcPacketRequest
+ ['REQUEST' DceRpc_Packet_Req
// Flags: Idempotent
[const uint 8 'flags1' '0x20' ]
]
- ['RESPONSE' DceRpcPacketResponse
+ ['RESPONSE' DceRpc_Packet_Res
[const uint 8 'flags1' '0x0A' ]
]
]
@@ -128,34 +132,59 @@
[simple uint 32 'serverBootTime' ]
[const uint 32 'interfaceVar' '0x00000001' ]
[simple uint 32 'sequenceNumber' ]
- [simple Operation 'operation' ]
+ [simple DceRpc_Operation 'operation' ]
[const uint 16 'interfaceHint' '0xFFFF' ]
[const uint 16 'activityHint' '0xFFFF' ]
[implicit uint 16 'fragmentLength' 'payload.lengthInBytes']
[const uint 16 'fragmentNum' '0x0000' ]
[const uint 8 'authProto' '0x00' ]
[const uint 8 'serialLow' '0x00' ]
- [simple PnIoCmPacket 'payload' ]
+ [simple PnIoCm_Packet 'payload' ]
]
[type 'Uuid'
[array byte 'data' count '16']
]
+// There are some special MAC addresses reserved:
+// 01-0E-CF-00-00-00: As destination for DCP-Identify-ReqPDU (The FrameID is then required to be set to 0xFEFE)
+// 01-0E-CF-00-00-01: As destination for DCP-Helo-ReqPDU (The FrameID is then required to be set to 0xFEFC)
+// 01-0E-CF-00-00-02: Reserved
+// 01-0E-CF-00-01-00: Reserved for further multicast addresses within the Type 10 context
+// 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'
+ [array uint 8 'address' count '6']
+]
+
[type 'IpAddress'
[array uint 8 'data' count '4']
]
-[enum uint 8 'DceRpcPacketType'
+[enum uint 8 'DceRpc_PacketType'
['0x00' REQUEST ]
['0x02' RESPONSE]
]
-[enum uint 16 'Operation'
+[enum uint 16 'DceRpc_Operation'
['0x0000' CONNECT]
['0x0003' WRITE ]
]
+// https://de.wikipedia.org/wiki/IEEE_802.1p
+[enum uint 3 'VirtualLanPriority' [string '2' 'acronym']
+ ['0x0' BEST_EFFORT ['BE' ]]
+ ['0x1' BACKGROUND ['BK' ]]
+ ['0x2' EXCELLENT_EFFORT ['EE' ]]
+ ['0x3' CRITICAL_APPLICATIONS ['CA' ]]
+ ['0x4' VIDEO ['VI' ]]
+ ['0x5' VOICE ['VO' ]]
+ ['0x6' INTERNETWORK_CONTROL ['IC' ]]
+ ['0x7' NETWORK_CONTROL ['NC' ]]
+]
+
/////////////////////////////////////////////////////////////////////////////////////////
//
// PROFINET DCP
@@ -165,16 +194,16 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Page 90
-[discriminatedType 'DCP_PDU'
- [discriminator ProfinetFrameId 'frameId']
- [discriminator ServiceId 'serviceId']
- [simple ServiceType 'serviceType']
+[discriminatedType 'PnDcp_Pdu'
+ [discriminator PnDcp_FrameId 'frameId' ]
+ [discriminator PnDcp_ServiceId 'serviceId' ]
+ [simple PnDcp_ServiceType 'serviceType' ]
// 4.3.1.3.4 (Page 95)
- [simple uint 32 'xid']
+ [simple uint 32 'xid' ]
// 4.3.1.3.5 (Page 95ff)
- [simple uint 16 'responseDelayFactorOrPadding']
+ [simple uint 16 'responseDelayFactorOrPadding' ]
// 4.3.1.3.4 (Page 95)
- [implicit uint 16 'dcpDataLength' 'lengthInBytes - 12']
+ [implicit uint 16 'dcpDataLength' 'lengthInBytes - 12']
[typeSwitch 'frameId','serviceId','serviceType.response'
////////////////////////////////////////////////////////////////////////////
// Multicast (Well theoretically)
@@ -183,23 +212,23 @@
// 1) One containing only an AllSelectorBlock
// 2) One containing optionally either NameOfStationBlock or AliasNameBlock and another optional IdentifyReqBlock
// (I assume, that if in case 2 both optionally aren't used, this might not be valid and option 1 should be sent instead)
- ['DCP_Identify_ReqPDU','IDENTIFY','false' DCP_Identify_ReqPDU [uint 16 'dcpDataLength']
- [array DCP_Block 'blocks' length 'dcpDataLength']
+ ['DCP_Identify_ReqPDU','IDENTIFY','false' PnDcp_Pdu_IdentifyReq [uint 16 'dcpDataLength']
+ [array PnDcp_Block 'blocks' length 'dcpDataLength' ]
]
// Response to a Identify request
- ['DCP_Identify_ResPDU','IDENTIFY','true' DCP_Identify_ResPDU [uint 16 'dcpDataLength']
- [array DCP_Block 'blocks' length 'dcpDataLength']
+ ['DCP_Identify_ResPDU','IDENTIFY','true' PnDcp_Pdu_IdentifyRes [uint 16 'dcpDataLength']
+ [array PnDcp_Block 'blocks' length 'dcpDataLength' ]
]
// Packet a Profinet station might emit once it is turned on
- ['DCP_Hello_ReqPDU','HELLO','false' DCP_Hello_ReqPDU
-// [simple NameOfStationBlockRes 'nameOfStationBlockRes']
-// [simple IPParameterBlockRes 'iPParameterBlockRes']
-// [simple DeviceIdBlockRes 'deviceIdBlockRes']
-// [simple DeviceVendorBlockRes 'deviceVendorBlockRes']
-// [simple DeviceOptionsBlockRes 'deviceOptionsBlockRes']
-// [simple DeviceRoleBlockRes 'deviceRoleBlockRes']
+ ['DCP_Hello_ReqPDU','HELLO','false' PnDcp_Pdu_HelloReq
+// [simple NameOfStationBlockRes 'nameOfStationBlockRes' ]
+// [simple IPParameterBlockRes 'iPParameterBlockRes' ]
+// [simple DeviceIdBlockRes 'deviceIdBlockRes' ]
+// [simple DeviceVendorBlockRes 'deviceVendorBlockRes' ]
+// [simple DeviceOptionsBlockRes 'deviceOptionsBlockRes' ]
+// [simple DeviceRoleBlockRes 'deviceRoleBlockRes' ]
// [simple DeviceInitiativeBlockRes 'deviceInitiativeBlockRes']
]
@@ -207,33 +236,33 @@
// Unicast
////////////////////////////////////////////////////////////////////////////
- ['DCP_GetSet_PDU','GET','false' DCP_Get_ReqPDU
-// [simple GetReqBlock 'getReqBlock']
+ ['DCP_GetSet_PDU','GET','false' PnDcp_Pdu_GetReq
+// [simple GetReqBlock 'getReqBlock' ]
]
- ['DCP_GetSet_PDU','GET','true' DCP_Get_ResPDU
-// [simple GetResBlock 'getResBlock']
-// [simple GetNegResBlock 'getNegResBlock']
+ ['DCP_GetSet_PDU','GET','true' PnDcp_Pdu_GetRes
+// [simple GetResBlock 'getResBlock' ]
+// [simple GetNegResBlock 'getNegResBlock' ]
]
- ['DCP_GetSet_PDU','SET','false' DCP_Set_ReqPDU
-// [simple StartTransactionBlock 'startTransactionBlock']
-// [simple BlockQualifier 'blockQualifier']
-// [simple SetResetReqBlock 'setResetReqBlock']
-// [simple SetReqBlock 'setReqBlock']
-// [simple StopTransactionBlock 'stopTransactionBlock']
-// [simple BlockQualifier 'blockQualifier']
+ ['DCP_GetSet_PDU','SET','false' PnDcp_Pdu_SetReq
+// [simple StartTransactionBlock 'startTransactionBlock' ]
+// [simple BlockQualifier 'blockQualifier' ]
+// [simple SetResetReqBlock 'setResetReqBlock' ]
+// [simple SetReqBlock 'setReqBlock' ]
+// [simple StopTransactionBlock 'stopTransactionBlock' ]
+// [simple BlockQualifier 'blockQualifier' ]
]
- ['DCP_GetSet_PDU','SET','true' DCP_Set_ResPDU
-// [simple SetResBlock 'setResBlock']
-// [simple SetNegResBlock 'setNegResBlock']
+ ['DCP_GetSet_PDU','SET','true' PnDcp_Pdu_SetRes
+// [simple SetResBlock 'setResBlock' ]
+// [simple SetNegResBlock 'setNegResBlock' ]
]
]
]
-[discriminatedType 'DCP_Block'
- [discriminator BlockOptions 'option' ]
- [discriminator uint 8 'suboption' ]
- [implicit uint 16 'blockLength' 'lengthInBytes - 4' ]
+[discriminatedType 'PnDcp_Block'
+ [discriminator PnDcp_BlockOptions 'option' ]
+ [discriminator uint 8 'suboption' ]
+ [implicit uint 16 'blockLength' 'lengthInBytes - 4']
[typeSwitch 'option','suboption'
////////////////////////////////////////////////////////////////////////////
@@ -241,11 +270,11 @@
////////////////////////////////////////////////////////////////////////////
// 4.3.1.4.1 (Page 97)
- ['IP_OPTION','1' DCP_BlockIpMacAddress
+ ['IP_OPTION','1' PnDcp_Block_IpMacAddress
[reserved uint 16 '0x0000' ]
[simple MacAddress 'macAddress' ]
]
- ['IP_OPTION','2' DCP_BlockIpIpParameter
+ ['IP_OPTION','2' PnDcp_Block_IpParameter
// 4.3.1.4.12 (Page 105ff)
[reserved uint 8 '0x00' ]
[simple bit 'ipConflictDetected' ]
@@ -256,7 +285,7 @@
[array uint 8 'subnetMask' count '4' ]
[array uint 8 'standardGateway' count '4' ]
]
- ['IP_OPTION','3' DCP_BlockIpFullIpSuite
+ ['IP_OPTION','3' PnDcp_Block_FullIpSuite
// TODO: Implement this ...
]
@@ -264,24 +293,24 @@
// DEVICE_PROPERTIES_OPTION
////////////////////////////////////////////////////////////////////////////
- ['DEVICE_PROPERTIES_OPTION','1' DCP_BlockDevicePropertiesDeviceVendor [uint 16 'blockLength']
+ ['DEVICE_PROPERTIES_OPTION','1' PnDcp_Block_DevicePropertiesDeviceVendor [uint 16 'blockLength']
[reserved uint 16 '0x0000' ]
// TODO: Figure out how to do this correctly.
[array byte 'deviceVendorValue' count 'blockLength-2' ]
[padding uint 8 'pad' '0x00' 'STATIC_CALL("org.apache.plc4x.java.profinet.utils.StaticHelper.arrayLength", deviceVendorValue) % 2']
]
- ['DEVICE_PROPERTIES_OPTION','2' DCP_BlockDevicePropertiesNameOfStation [uint 16 'blockLength']
+ ['DEVICE_PROPERTIES_OPTION','2' PnDcp_Block_DevicePropertiesNameOfStation [uint 16 'blockLength']
[reserved uint 16 '0x0000' ]
// TODO: Figure out how to do this correctly.
[array byte 'nameOfStation' count 'blockLength-2' ]
[padding uint 8 'pad' '0x00' 'STATIC_CALL("org.apache.plc4x.java.profinet.utils.StaticHelper.arrayLength", nameOfStation) % 2']
]
- ['DEVICE_PROPERTIES_OPTION','3' DCP_BlockDevicePropertiesDeviceId
+ ['DEVICE_PROPERTIES_OPTION','3' PnDcp_Block_DevicePropertiesDeviceId
[reserved uint 16 '0x0000' ]
[simple uint 16 'vendorId' ]
[simple uint 16 'deviceId' ]
]
- ['DEVICE_PROPERTIES_OPTION','4' DCP_BlockDevicePropertiesDeviceRole
+ ['DEVICE_PROPERTIES_OPTION','4' PnDcp_Block_DevicePropertiesDeviceRole
[reserved uint 20 '0x000000' ]
[simple bit 'pnioSupervisor' ]
[simple bit 'pnioMultidevive' ]
@@ -290,55 +319,55 @@
[reserved uint 8 '0x00' ]
]
// Contains a list of option combinations the device supports.
- ['DEVICE_PROPERTIES_OPTION','5' DCP_BlockDevicePropertiesDeviceOptions [uint 16 'blockLength']
+ ['DEVICE_PROPERTIES_OPTION','5' PnDcp_Block_DevicePropertiesDeviceOptions [uint 16 'blockLength']
[reserved uint 16 '0x0000' ]
- [array SupportedDeviceOption 'supportedOptions' length 'blockLength - 2' ]
+ [array PnDcp_SupportedDeviceOption 'supportedOptions' length 'blockLength - 2' ]
]
- ['DEVICE_PROPERTIES_OPTION','6' DCP_BlockDevicePropertiesAliasName [uint 16 'blockLength']
+ ['DEVICE_PROPERTIES_OPTION','6' PnDcp_Block_DevicePropertiesAliasName [uint 16 'blockLength']
[reserved uint 16 '0x0000' ]
[array byte 'aliasNameValue' count 'blockLength-2' ]
[padding uint 8 'pad' '0x00' 'STATIC_CALL("org.apache.plc4x.java.profinet.utils.StaticHelper.arrayLength", aliasNameValue) % 2']
]
- ['DEVICE_PROPERTIES_OPTION','7' DCP_BlockDevicePropertiesDeviceInstance
+ ['DEVICE_PROPERTIES_OPTION','7' PnDcp_Block_DevicePropertiesDeviceInstance
[reserved uint 16 '0x0000' ]
[simple uint 8 'deviceInstanceHigh' ]
[simple uint 8 'deviceInstanceLow' ]
]
- ['DEVICE_PROPERTIES_OPTION','8' DCP_BlockDevicePropertiesOemDeviceId
+ ['DEVICE_PROPERTIES_OPTION','8' PnDcp_Block_DevicePropertiesOemDeviceId
// TODO: Implement this ...
]
- ['DEVICE_PROPERTIES_OPTION','9' DCP_BlockDevicePropertiesStandardGateway
+ ['DEVICE_PROPERTIES_OPTION','9' PnDcp_Block_DevicePropertiesStandardGateway
// TODO: Implement this ...
]
////////////////////////////////////////////////////////////////////////////
- // DCP_OPTION
+ // DHCP_OPTION
////////////////////////////////////////////////////////////////////////////
// 4.3.1.4.1 (Page 98 & 100)
// TODO: Check if these are really all DCP_OPTION
- ['DCP_OPTION','12' DCP_BlockDhcpOptionHostName
+ ['DCP_OPTION','12' PnDcp_Block_DhcpOptionHostName
// TODO: Implement this ...
]
- ['DCP_OPTION','43' DCP_BlockDhcpOptionVendorSpecificInformation
+ ['DCP_OPTION','43' PnDcp_Block_DhcpOptionVendorSpecificInformation
// TODO: Implement this ...
]
- ['DCP_OPTION','54' DCP_BlockDhcpOptionServerIdentifier
+ ['DCP_OPTION','54' PnDcp_Block_DhcpOptionServerIdentifier
// TODO: Implement this ...
]
- ['DCP_OPTION','55' DCP_BlockDhcpOptionParameterRequestList
+ ['DCP_OPTION','55' PnDcp_Block_DhcpOptionParameterRequestList
// TODO: Implement this ...
]
- ['DCP_OPTION','60' DCP_BlockDhcpOptionClassIdentifier
+ ['DCP_OPTION','60' PnDcp_Block_DhcpOptionClassIdentifier
// TODO: Implement this ...
]
- ['DCP_OPTION','61' DCP_BlockDhcpOptionDhcpClientIdentifier
+ ['DCP_OPTION','61' PnDcp_Block_DhcpOptionDhcpClientIdentifier
// TODO: Implement this ...
]
- ['DCP_OPTION','81' DCP_BlockDhcpOptionFullyQualifiedDomainName
+ ['DCP_OPTION','81' PnDcp_Block_DhcpOptionFullyQualifiedDomainName
// TODO: Implement this ...
]
- ['DCP_OPTION','97' DCP_BlockDhcpOptionUuidBasedClient
+ ['DCP_OPTION','97' PnDcp_Block_DhcpOptionUuidBasedClient
// TODO: Implement this ...
]
@@ -347,22 +376,22 @@
////////////////////////////////////////////////////////////////////////////
// 4.3.1.4.1 (Page 98)
- ['CONTROL_OPTION','1' DCP_BlockControlOptionStart
+ ['CONTROL_OPTION','1' PnDcp_Block_ControlOptionStart
// TODO: Implement this ...
]
- ['CONTROL_OPTION','2' DCP_BlockControlOptionStop
+ ['CONTROL_OPTION','2' PnDcp_Block_ControlOptionStop
// TODO: Implement this ...
]
- ['CONTROL_OPTION','3' DCP_BlockControlOptionSignal
+ ['CONTROL_OPTION','3' PnDcp_Block_ControlOptionSignal
// TODO: Implement this ...
]
- ['CONTROL_OPTION','4' DCP_BlockControlOptionResponse
+ ['CONTROL_OPTION','4' PnDcp_Block_ControlOptionResponse
// TODO: Implement this ...
]
- ['CONTROL_OPTION','5' DCP_BlockControlOptionFactoryReset
+ ['CONTROL_OPTION','5' PnDcp_Block_ControlOptionFactoryReset
// TODO: Implement this ...
]
- ['CONTROL_OPTION','6' DCP_BlockControlOptionResetToFactory
+ ['CONTROL_OPTION','6' PnDcp_Block_ControlOptionResetToFactory
// TODO: Implement this ...
]
@@ -371,7 +400,7 @@
////////////////////////////////////////////////////////////////////////////
// 4.3.1.4.1 (Page 98)
- ['DEVICE_INITIATIVE_OPTION','1' DCP_BlockDeviceInitiativeOption
+ ['DEVICE_INITIATIVE_OPTION','1' PnDcp_Block_DeviceInitiativeOption
// TODO: Implement this ...
]
@@ -380,7 +409,7 @@
////////////////////////////////////////////////////////////////////////////
// 4.3.1.4.1 (Page 99)
- ['ALL_SELECTOR_OPTION','0xFF' DCP_BlockALLSelector
+ ['ALL_SELECTOR_OPTION','0xFF' PnDcp_Block_ALLSelector
// This type of block is empty
]
@@ -390,25 +419,25 @@
]
]
-[type 'SupportedDeviceOption'
- [simple BlockOptions 'option' ]
- [simple uint 8 'suboption' ]
+[type 'PnDcp_SupportedDeviceOption'
+ [simple PnDcp_BlockOptions 'option']
+ [simple uint 8 'suboption' ]
]
// 4.3.1.3.2 (Page 94ff)
-[type 'ServiceType'
- [reserved uint 5 '0x00']
+[type 'PnDcp_ServiceType'
+ [reserved uint 5 '0x00' ]
[simple bit 'notSupported']
- [reserved uint 1 '0x00']
- [simple bit 'response']
+ [reserved uint 1 '0x00' ]
+ [simple bit 'response' ]
]
// Page 86ff: Coding of the field FrameID
-[enum uint 16 'ProfinetFrameId'
+[enum uint 16 'PnDcp_FrameId'
// Range 1
- ['0x0020' PTCP_RTSyncPDUWithFollowUp]
+ ['0x0020' PTCP_RTSyncPDUWithFollowUp ]
// Range 2
- ['0x0080' PTCP_RTSyncPDU]
+ ['0x0080' PTCP_RTSyncPDU ]
// Range 3
// 0x100-0x0FFF RT_CLASS_3
// Range 6
@@ -416,18 +445,18 @@
// Range 7
// 0XC000-FBFF RT_CLASS_UDP
// Range 8
- ['0xFC01' Alarm_High]
- ['0xFE01' Alarm_Low]
- ['0xFEFC' DCP_Hello_ReqPDU]
- ['0xFEFD' DCP_GetSet_PDU]
- ['0xFEFE' DCP_Identify_ReqPDU]
- ['0xFEFF' DCP_Identify_ResPDU]
+ ['0xFC01' Alarm_High ]
+ ['0xFE01' Alarm_Low ]
+ ['0xFEFC' DCP_Hello_ReqPDU ]
+ ['0xFEFD' DCP_GetSet_PDU ]
+ ['0xFEFE' DCP_Identify_ReqPDU ]
+ ['0xFEFF' DCP_Identify_ResPDU ]
// Range 9
- ['0xFF00' PTCP_AnnouncePDU]
- ['0xFF20' PTCP_FollowUpPDU]
- ['0xFF40' PTCP_DelayReqPDU]
- ['0xFF41' PTCP_DelayResPDUWithFollowUp]
- ['0xFF42' PTCP_DelayFuResPDUWithFollowUp]
+ ['0xFF00' PTCP_AnnouncePDU ]
+ ['0xFF20' PTCP_FollowUpPDU ]
+ ['0xFF40' PTCP_DelayReqPDU ]
+ ['0xFF41' PTCP_DelayResPDUWithFollowUp ]
+ ['0xFF42' PTCP_DelayFuResPDUWithFollowUp ]
['0xFF43' PTCP_DelayResPDUWithoutFollowUp]
// Range 12
// 0xFF80 - 0xFF8F FragmentationFrameId
@@ -435,48 +464,23 @@
// Page 94
// All other values are "Reserved"
-[enum uint 8 'ServiceId'
- ['0x03' GET]
- ['0x04' SET]
+[enum uint 8 'PnDcp_ServiceId'
+ ['0x03' GET ]
+ ['0x04' SET ]
['0x05' IDENTIFY]
- ['0x06' HELLO]
+ ['0x06' HELLO ]
//[RESERVED]
]
// 4.3.1.4.1 (Page 97)
// All other values are "Reserved"
-[enum uint 8 'BlockOptions'
- ['0x01' IP_OPTION]
+[enum uint 8 'PnDcp_BlockOptions'
+ ['0x01' IP_OPTION ]
['0x02' DEVICE_PROPERTIES_OPTION]
- ['0x03' DCP_OPTION]
- ['0x05' CONTROL_OPTION]
+ ['0x03' DCP_OPTION ]
+ ['0x05' CONTROL_OPTION ]
['0x06' DEVICE_INITIATIVE_OPTION]
- ['0xFF' ALL_SELECTOR_OPTION]
-]
-
-// https://de.wikipedia.org/wiki/IEEE_802.1p
-[enum uint 3 'VirtualLanPriority' [string '2' 'acronym']
- ['0x0' BEST_EFFORT ['BE' ]]
- ['0x1' BACKGROUND ['BK' ]]
- ['0x2' EXCELLENT_EFFORT ['EE' ]]
- ['0x3' CRITICAL_APPLICATIONS ['CA' ]]
- ['0x4' VIDEO ['VI' ]]
- ['0x5' VOICE ['VO' ]]
- ['0x6' INTERNETWORK_CONTROL ['IC' ]]
- ['0x7' NETWORK_CONTROL ['NC' ]]
-]
-
-// There are some special MAC addresses reserved:
-// 01-0E-CF-00-00-00: As destination for DCP-Identify-ReqPDU (The FrameID is then required to be set to 0xFEFE)
-// 01-0E-CF-00-00-01: As destination for DCP-Helo-ReqPDU (The FrameID is then required to be set to 0xFEFC)
-// 01-0E-CF-00-00-02: Reserved
-// 01-0E-CF-00-01-00: Reserved for further multicast addresses within the Type 10 context
-// 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'
- [array uint 8 'address' count '6']
+ ['0xFF' ALL_SELECTOR_OPTION ]
]
/////////////////////////////////////////////////////////////////////////////////////////
@@ -488,75 +492,75 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Little Endian !!!!!
-[type 'PnIoCmPacket'
- [simple uint 32 'argsMaximum']
- [simple uint 32 'argsLength']
- [simple uint 32 'arrayMaximumCount']
- [simple uint 32 'arrayOffset']
- [simple uint 32 'arrayActualCount']
- [array PnIoCmBlock 'blocks' length 'argsLength']
+[type 'PnIoCm_Packet'
+ [simple uint 32 'argsMaximum' ]
+ [simple uint 32 'argsLength' ]
+ [simple uint 32 'arrayMaximumCount' ]
+ [simple uint 32 'arrayOffset' ]
+ [simple uint 32 'arrayActualCount' ]
+ [array PnIoCm_Block 'blocks' length 'argsLength']
]
// Big Endian
-[type 'PnIoCmBlock'
- [discriminator PnIoCmBlockType 'blockType' ]
+[type 'PnIoCm_Block'
+ [discriminator PnIoCm_BlockType 'blockType' ]
[implicit uint 16 'blockLength' 'lengthInBytes - 4']
[simple uint 8 'blockVersionHigh' ]
[simple uint 8 'blockVersionLow' ]
[typeSwitch 'blockType'
- ['AR_BLOCK_REQ' PnIoCmBlockArBlockReq
- [simple PnIoCmArType 'arType' ]
- [simple Uuid 'arUuid' ]
- [simple uint 16 'sessionKey' ]
- [simple MacAddress 'cmInitiatorMacAddr' ]
- [simple Uuid 'cmInitiatorObjectUuid' ]
+ ['AR_BLOCK_REQ' PnIoCm_Block_ArBlockReq
+ [simple PnIoCm_ArType 'arType' ]
+ [simple Uuid 'arUuid' ]
+ [simple uint 16 'sessionKey' ]
+ [simple MacAddress 'cmInitiatorMacAddr' ]
+ [simple Uuid 'cmInitiatorObjectUuid' ]
// Begin ARProperties
- [simple bit 'pullModuleAlarmAllowed' ]
- [simple bit 'nonLegacyStartupMode' ]
- [simple bit 'combinedObjectContainerUsed' ]
- [reserved uint 17 '0x00000' ]
- [simple bit 'acknowledgeCompanionAr' ]
- [simple PnIoCmCompanionArType 'companionArType' ]
- [simple bit 'deviceAccess' ]
- [reserved uint 3 '0x0' ]
- [simple bit 'cmInitiator' ]
- [simple bit 'supervisorTakeoverAllowed' ]
- [simple PnIoCmState 'state' ]
+ [simple bit 'pullModuleAlarmAllowed' ]
+ [simple bit 'nonLegacyStartupMode' ]
+ [simple bit 'combinedObjectContainerUsed' ]
+ [reserved uint 17 '0x00000' ]
+ [simple bit 'acknowledgeCompanionAr' ]
+ [simple PnIoCm_CompanionArType 'companionArType' ]
+ [simple bit 'deviceAccess' ]
+ [reserved uint 3 '0x0' ]
+ [simple bit 'cmInitiator' ]
+ [simple bit 'supervisorTakeoverAllowed' ]
+ [simple PnIoCm_State 'state' ]
// End ARProperties
- [simple uint 16 'cmInitiatorActivityTimeoutFactor' ]
- [simple uint 16 'cmInitiatorUdpRtPort' ]
- [implicit uint 16 'stationNameLength' 'STR_LEN(cmInitiatorStationName)']
- [simple string 'stationNameLength * 8' 'cmInitiatorStationName' ]
- ]
- ['IO_CR_BLOCK_REQ' PnIoCmBlockIoCrBlockReq
- [simple PnIoCmIoCrType 'ioCrType' ]
- [simple uint 16 'ioCrReference' ]
- [simple uint 16 'lt' ]
+ [simple uint 16 'cmInitiatorActivityTimeoutFactor' ]
+ [simple uint 16 'cmInitiatorUdpRtPort' ]
+ [implicit uint 16 'stationNameLength' 'STR_LEN(cmInitiatorStationName)']
+ [simple string 'stationNameLength * 8' 'cmInitiatorStationName' ]
+ ]
+ ['IO_CR_BLOCK_REQ' PnIoCm_Block_IoCrBlockReq
+ [simple PnIoCm_IoCrType 'ioCrType' ]
+ [simple uint 16 'ioCrReference' ]
+ [simple uint 16 'lt' ]
// Begin IOCRProperties
- [simple bit 'fullSubFrameStructure' ]
- [simple bit 'distributedSubFrameWatchDog' ]
- [simple bit 'fastForwardingMacAdr' ]
- [reserved uint 16 '0x0000' ]
- [simple bit 'mediaRedundancy' ]
- [reserved uint 7 '0x00' ]
- [simple PnIoCmRtClass 'rtClass' ]
+ [simple bit 'fullSubFrameStructure' ]
+ [simple bit 'distributedSubFrameWatchDog' ]
+ [simple bit 'fastForwardingMacAdr' ]
+ [reserved uint 16 '0x0000' ]
+ [simple bit 'mediaRedundancy' ]
+ [reserved uint 7 '0x00' ]
+ [simple PnIoCm_RtClass 'rtClass' ]
// End IOCRProperties
- [simple uint 16 'dataLength' ]
- [simple uint 16 'frameId' ]
- [simple uint 16 'sendClockFactor' ]
- [simple uint 16 'reductionRatio' ]
- [simple uint 16 'phase' ]
- [simple uint 16 'sequence' ]
- [simple uint 32 'frameSendOffset' ]
- [simple uint 16 'watchDogFactor' ]
- [simple uint 16 'dataHoldFactor' ]
- [simple uint 16 'ioCrTagHeader' ]
- [simple MacAddress 'ioCrMulticastMacAdr' ]
- [implicit uint 16 'numberOfApis' 'COUNT(apis)' ]
- [array PnIoCmIoCrBlockReqApi 'apis' count 'numberOfApis' ]
- ]
- ['ALARM_CR_BLOCK_REQ' PnIoCmBlockAlarmCrBlockReq
- [simple PnIoCmAlarmCrType 'alarmType' ]
+ [simple uint 16 'dataLength' ]
+ [simple uint 16 'frameId' ]
+ [simple uint 16 'sendClockFactor' ]
+ [simple uint 16 'reductionRatio' ]
+ [simple uint 16 'phase' ]
+ [simple uint 16 'sequence' ]
+ [simple uint 32 'frameSendOffset' ]
+ [simple uint 16 'watchDogFactor' ]
+ [simple uint 16 'dataHoldFactor' ]
+ [simple uint 16 'ioCrTagHeader' ]
+ [simple MacAddress 'ioCrMulticastMacAdr' ]
+ [implicit uint 16 'numberOfApis' 'COUNT(apis)' ]
+ [array PnIoCm_IoCrBlockReqApi 'apis' count 'numberOfApis' ]
+ ]
+ ['ALARM_CR_BLOCK_REQ' PnIoCm_Block_AlarmCrBlockReq
+ [simple PnIoCm_AlarmCrType 'alarmType' ]
[simple uint 16 'lt' ]
// Begin AlarmCrProperties
[reserved uint 30 '0x00000000' ]
@@ -570,43 +574,43 @@
[simple uint 16 'alarmCtrTagHeaderHigh' ]
[simple uint 16 'alarmCtrTagHeaderLow' ]
]
- ['EXPECTED_SUBMODULE_BLOCK_REQ' PnIoCmBlockExpectedSubmoduleBlockReq
- [implicit uint 16 'numberOfApis' 'COUNT(apis)' ]
- [array PnIoCmExpectedSubmoduleBlockReqApi 'apis' count 'numberOfApis']
+ ['EXPECTED_SUBMODULE_BLOCK_REQ' PnIoCm_Block_ExpectedSubmoduleBlockReq
+ [implicit uint 16 'numberOfApis' 'COUNT(apis)' ]
+ [array PnIoCm_ExpectedSubmoduleBlockReqApi 'apis' count 'numberOfApis' ]
]
]
]
-[type 'PnIoCmIoCrBlockReqApi'
- [const uint 32 'api' '0x00000000' ]
- [implicit uint 16 'numIoDataObjects' 'COUNT(ioDataObjects)' ]
- [array PnIoCmIoDataObject 'ioDataObjects' count 'numIoDataObjects']
- [implicit uint 16 'numIoCss' 'COUNT(ioCss)' ]
- [array PnIoCmIoCs 'ioCss' count 'numIoCss' ]
+[type 'PnIoCm_IoCrBlockReqApi'
+ [const uint 32 'api' '0x00000000' ]
+ [implicit uint 16 'numIoDataObjects' 'COUNT(ioDataObjects)' ]
+ [array PnIoCm_IoDataObject 'ioDataObjects' count 'numIoDataObjects']
+ [implicit uint 16 'numIoCss' 'COUNT(ioCss)' ]
+ [array PnIoCm_IoCs 'ioCss' count 'numIoCss' ]
]
-[type 'PnIoCmIoDataObject'
+[type 'PnIoCm_IoDataObject'
[simple uint 16 'slotNumber' ]
[simple uint 16 'subSlotNumber' ]
[simple uint 16 'ioDataObjectFrameOffset']
]
-[type 'PnIoCmIoCs'
+[type 'PnIoCm_IoCs'
[simple uint 16 'slotNumber' ]
[simple uint 16 'subSlotNumber']
[simple uint 16 'ioFrameOffset']
]
-[type 'PnIoCmExpectedSubmoduleBlockReqApi'
- [const uint 32 'api' '0x00000000' ]
- [simple uint 16 'slotNumber' ]
- [simple uint 32 'moduleIdentNumber' ]
- [simple uint 16 'moduleProperties' ]
- [implicit uint 16 'numSubmodules' 'COUNT(submodules)' ]
- [array PnIoCmSubmodule 'submodules' count 'numSubmodules']
+[type 'PnIoCm_ExpectedSubmoduleBlockReqApi'
+ [const uint 32 'api' '0x00000000' ]
+ [simple uint 16 'slotNumber' ]
+ [simple uint 32 'moduleIdentNumber' ]
+ [simple uint 16 'moduleProperties' ]
+ [implicit uint 16 'numSubmodules' 'COUNT(submodules)' ]
+ [array PnIoCm_Submodule 'submodules' count 'numSubmodules']
]
-[type 'PnIoCmSubmodule'
+[type 'PnIoCm_Submodule'
[simple uint 16 'slotNumber' ]
[simple uint 32 'submoduleIdentNumber' ]
// Begin SubmoduleProperties
@@ -615,49 +619,49 @@
[simple bit 'reduceOutputModuleDataLength']
[simple bit 'reduceInputModuleDataLength' ]
[simple bit 'sharedInput' ]
- [simple PnIoCmSubmoduleType 'submoduleType' ]
+ [simple PnIoCm_SubmoduleType 'submoduleType' ]
// End SubmoduleProperties
- [simple PnIoCmDescriptionType 'descriptionType' ]
+ [simple PnIoCm_DescriptionType 'descriptionType' ]
[simple uint 16 'submoduleDataLength' ]
[simple uint 8 'lengthIoCs' ]
[simple uint 8 'lengthIoPs' ]
]
-[enum uint 16 'PnIoCmBlockType'
+[enum uint 16 'PnIoCm_BlockType'
['0x0101' AR_BLOCK_REQ ]
['0x0102' IO_CR_BLOCK_REQ ]
['0x0103' ALARM_CR_BLOCK_REQ ]
['0x0104' EXPECTED_SUBMODULE_BLOCK_REQ]
]
-[enum uint 16 'PnIoCmArType'
+[enum uint 16 'PnIoCm_ArType'
['0x0001' IO_CONTROLLER]
]
-[enum uint 2 'PnIoCmCompanionArType'
+[enum uint 2 'PnIoCm_CompanionArType'
['0x0' SINGLE_AR]
]
-[enum uint 3 'PnIoCmState'
+[enum uint 3 'PnIoCm_State'
['0x1' ACTIVE]
]
-[enum uint 16 'PnIoCmIoCrType'
+[enum uint 16 'PnIoCm_IoCrType'
['0x0001' INPUT_CR]
]
-[enum uint 4 'PnIoCmRtClass'
+[enum uint 4 'PnIoCm_RtClass'
['0x0010' RT_CLASS_2]
]
-[enum uint 16 'PnIoCmAlarmCrType'
+[enum uint 16 'PnIoCm_AlarmCrType'
['0x0001' ALARM_CR]
]
-[enum uint 2 'PnIoCmSubmoduleType'
+[enum uint 2 'PnIoCm_SubmoduleType'
['0x0' NO_INPUT_NO_OUTPUT_DATA]
]
-[enum uint 16 'PnIoCmDescriptionType'
+[enum uint 16 'PnIoCm_DescriptionType'
['0x0001' INPUT]
]
\ No newline at end of file