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 2026/08/19 19:41:41 UTC
(plc4x) 01/05: refactor: Refactored the eip.mspec
This is an automated email from the ASF dual-hosted git repository.
chrisdutz pushed a commit to branch feat/plc4j-eip-GetAttributeSingle
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 55a87f37b9fee9c45afdab24b469753ab59c5cfe
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Aug 19 19:13:51 2026 +0200
refactor: Refactored the eip.mspec
---
.../testing/protocols/eip/DriverTestsuite.xml | 908 +++++++++-------
.../protocols/eip/DriverTestsuiteConnected.xml | 465 ++++----
.../eip/DriverTestsuiteForcedUnconnected.xml | 137 +--
.../protocols/eip/DriverTestsuiteMessageRouter.xml | 425 ++++----
.../eip/ParserSerializerTestsuiteBigEndian.xml | 324 +++---
.../eip/ParserSerializerTestsuiteLittleEndian.xml | 1054 +++++++++---------
.../protocols/logix/CompactLogixSimpleRead.xml | 705 +++++++------
plc4go/internal/modbus/mocks_test.go | 314 ++++++
.../protocols/eip/readwrite/model/AttributeID.go | 341 ++++++
.../eip/readwrite/model/CipConnectedRequest.go | 48 +-
.../eip/readwrite/model/CipConnectedResponse.go | 136 +--
.../model/CipConnectionManagerCloseRequest.go | 70 +-
.../model/CipConnectionManagerCloseResponse.go | 145 +--
.../readwrite/model/CipConnectionManagerRequest.go | 84 +-
.../model/CipConnectionManagerResponse.go | 128 +--
.../eip/readwrite/model/CipReadRequest.go | 50 +-
.../eip/readwrite/model/CipReadResponse.go | 136 +--
plc4go/protocols/eip/readwrite/model/CipService.go | 425 +-------
.../eip/readwrite/model/CipServiceRequest.go | 541 ++++++++++
.../eip/readwrite/model/CipServiceResponse.go | 623 +++++++++++
.../eip/readwrite/model/CipUnconnectedRequest.go | 58 +-
.../eip/readwrite/model/CipWriteRequest.go | 54 +-
.../eip/readwrite/model/CipWriteResponse.go | 142 +--
.../eip/readwrite/model/GetAttributeAllRequest.go | 50 +-
.../eip/readwrite/model/GetAttributeAllResponse.go | 134 +--
.../eip/readwrite/model/GetAttributeListRequest.go | 46 +-
.../readwrite/model/GetAttributeListResponse.go | 52 +-
.../readwrite/model/GetAttributeSingleRequest.go | 218 +++-
.../readwrite/model/GetAttributeSingleResponse.go | 95 +-
.../eip/readwrite/model/LogicalSegmentType.go | 16 +
.../eip/readwrite/model/MultipleServiceRequest.go | 48 +-
.../eip/readwrite/model/MultipleServiceResponse.go | 140 +--
.../eip/readwrite/model/SetAttributeAllRequest.go | 46 +-
.../eip/readwrite/model/SetAttributeAllResponse.go | 52 +-
.../eip/readwrite/model/SetAttributeListRequest.go | 46 +-
.../readwrite/model/SetAttributeListResponse.go | 52 +-
.../readwrite/model/SetAttributeSingleRequest.go | 46 +-
.../readwrite/model/SetAttributeSingleResponse.go | 52 +-
.../java/eip/readwrite/CipConnectedRequest.java | 22 +-
.../java/eip/readwrite/CipConnectedResponse.java | 94 +-
.../CipConnectionManagerCloseRequest.java | 22 +-
.../CipConnectionManagerCloseResponse.java | 96 +-
.../eip/readwrite/CipConnectionManagerRequest.java | 22 +-
.../readwrite/CipConnectionManagerResponse.java | 78 +-
.../plc4x/java/eip/readwrite/CipReadRequest.java | 22 +-
.../plc4x/java/eip/readwrite/CipReadResponse.java | 92 +-
.../plc4x/java/eip/readwrite/CipService.java | 76 +-
.../java/eip/readwrite/CipServiceRequest.java | 152 +++
.../java/eip/readwrite/CipServiceResponse.java | 211 ++++
.../java/eip/readwrite/CipUnconnectedRequest.java | 22 +-
.../plc4x/java/eip/readwrite/CipWriteRequest.java | 23 +-
.../plc4x/java/eip/readwrite/CipWriteResponse.java | 93 +-
.../java/eip/readwrite/GetAttributeAllRequest.java | 22 +-
.../eip/readwrite/GetAttributeAllResponse.java | 92 +-
.../eip/readwrite/GetAttributeListRequest.java | 22 +-
.../eip/readwrite/GetAttributeListResponse.java | 38 +-
.../eip/readwrite/GetAttributeSingleRequest.java | 22 +-
.../eip/readwrite/GetAttributeSingleResponse.java | 119 +--
.../java/eip/readwrite/MultipleServiceRequest.java | 22 +-
.../eip/readwrite/MultipleServiceResponse.java | 93 +-
.../java/eip/readwrite/SetAttributeAllRequest.java | 22 +-
.../eip/readwrite/SetAttributeAllResponse.java | 38 +-
.../eip/readwrite/SetAttributeListRequest.java | 22 +-
.../eip/readwrite/SetAttributeListResponse.java | 38 +-
.../eip/readwrite/SetAttributeSingleRequest.java | 22 +-
.../eip/readwrite/SetAttributeSingleResponse.java | 38 +-
.../eip/src/main/resources/protocols/eip/eip.mspec | 349 +++---
.../resources/protocols/eip/DriverTestsuite.xml | 1114 +++++++++++++++++---
.../protocols/eip/DriverTestsuiteConnected.xml | 465 ++++----
.../eip/DriverTestsuiteForcedUnconnected.xml | 137 +--
.../protocols/eip/DriverTestsuiteMessageRouter.xml | 425 ++++----
.../eip/ParserSerializerTestsuiteBigEndian.xml | 324 +++---
.../eip/ParserSerializerTestsuiteLittleEndian.xml | 1054 +++++++++---------
.../protocols/logix/CompactLogixSimpleRead.xml | 705 +++++++------
74 files changed, 8351 insertions(+), 6263 deletions(-)
diff --git a/plc4go/assets/testing/protocols/eip/DriverTestsuite.xml b/plc4go/assets/testing/protocols/eip/DriverTestsuite.xml
index 1b5d94cdba..0efd65d75c 100644
--- a/plc4go/assets/testing/protocols/eip/DriverTestsuite.xml
+++ b/plc4go/assets/testing/protocols/eip/DriverTestsuite.xml
@@ -148,42 +148,44 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- </GetAttributeAllRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">1</service>
+ <GetAttributeAllRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ </GetAttributeAllRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -221,12 +223,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">1</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- </GetAttributeAllResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeAllResponse>
+ </GetAttributeAllResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -279,58 +284,62 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">10</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">10</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -368,21 +377,24 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -473,58 +485,62 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">10</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">10</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -562,21 +578,24 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -614,58 +633,62 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">12</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">4</requestPathSize>
- <tag dataType="byte" bitLength="64">0x9105636f756e7400</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">12</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">4</requestPathSize>
+ <tag dataType="byte" bitLength="64">0x9105636f756e7400</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -703,21 +726,24 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x2a000000</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x2a000000</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -823,58 +849,62 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">10</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <elementNb dataType="uint" bitLength="16">4</elementNb>
- </CipReadRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">10</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <elementNb dataType="uint" bitLength="16">4</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -912,21 +942,24 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="128">0x01000000020000000300000004000000</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="128">0x01000000020000000300000004000000</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -1019,63 +1052,67 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">14</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CipWriteRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">14</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">77</service>
+ <CipWriteRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CipWriteRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -1113,12 +1150,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">77</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- </CipWriteResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipWriteResponse>
+ </CipWriteResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -1163,4 +1203,148 @@
</steps>
</testcase>
-</test:driver-testsuite>
\ No newline at end of file
+ <testcase>
+ <name>Get Attribute Single Request</name>
+ <steps>
+ <outgoing-plc-message name="Send GetAttributeSingleRequest">
+ <parser-arguments>
+ <response>false</response>
+ </parser-arguments>
+ <EipPacket>
+ <command dataType="uint" bitLength="16">111</command>
+ <packetLength dataType="uint" bitLength="16">22</packetLength>
+ <sessionHandle dataType="uint" bitLength="32">1074224669</sessionHandle>
+ <status dataType="uint" bitLength="32">0</status>
+ <senderContext dataType="byte" bitLength="64">0x504c433458202020</senderContext>
+ <options dataType="uint" bitLength="32">0</options>
+ <CipRRData>
+ <interfaceHandle dataType="uint" bitLength="32">0</interfaceHandle>
+ <timeout dataType="uint" bitLength="16">0</timeout>
+ <typeIdCount dataType="uint" bitLength="16">2</typeIdCount>
+ <typeIds isList="true">
+ <TypeId>
+ <id dataType="uint" bitLength="16">0</id>
+ <NullAddressItem>
+ <reserved dataType="uint" bitLength="16">0</reserved>
+ </NullAddressItem>
+ </TypeId>
+ <TypeId>
+ <id dataType="uint" bitLength="16">178</id>
+ <UnConnectedDataItem>
+ <packetSize dataType="uint" bitLength="16">8</packetSize>
+ <service>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">14</service>
+ <GetAttributeSingleRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">1</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <attributeSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">4</logicalSegmentType>
+ <AttributeID>
+ <format dataType="uint" bitLength="2">0</format>
+ <attribute dataType="uint" bitLength="8">1</attribute>
+ </AttributeID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </attributeSegment>
+ </GetAttributeSingleRequest>
+ </CipServiceRequest>
+ </CipService>
+ </service>
+ </UnConnectedDataItem>
+ </TypeId>
+ </typeIds>
+ </CipRRData>
+ </EipPacket>
+ </outgoing-plc-message>
+ <incoming-plc-message name="Receive GetAttributeSingleResponse">
+ <parser-arguments>
+ <response>true</response>
+ </parser-arguments>
+ <EipPacket>
+ <command dataType="uint" bitLength="16">111</command>
+ <packetLength dataType="uint" bitLength="16">22</packetLength>
+ <sessionHandle dataType="uint" bitLength="32">1074224669</sessionHandle>
+ <status dataType="uint" bitLength="32">0</status>
+ <senderContext dataType="byte" bitLength="64">0x504c433458202020</senderContext>
+ <options dataType="uint" bitLength="32">0</options>
+ <CipRRData>
+ <interfaceHandle dataType="uint" bitLength="32">0</interfaceHandle>
+ <timeout dataType="uint" bitLength="16">0</timeout>
+ <typeIdCount dataType="uint" bitLength="16">2</typeIdCount>
+ <typeIds isList="true">
+ <TypeId>
+ <id dataType="uint" bitLength="16">0</id>
+ <NullAddressItem>
+ <reserved dataType="uint" bitLength="16">0</reserved>
+ </NullAddressItem>
+ </TypeId>
+ <TypeId>
+ <id dataType="uint" bitLength="16">178</id>
+ <UnConnectedDataItem>
+ <packetSize dataType="uint" bitLength="16">6</packetSize>
+ <service>
+ <CipService>
+ <response dataType="bit" bitLength="1">true</response>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">14</service>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <status dataType="uint" bitLength="8">0</status>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeSingleResponse>
+ <servicesData dataType="byte" bitLength="16">0x0100</servicesData>
+ </GetAttributeSingleResponse>
+ </CipServiceResponse>
+ </CipService>
+ </service>
+ </UnConnectedDataItem>
+ </TypeId>
+ </typeIds>
+ </CipRRData>
+ </EipPacket>
+ </incoming-plc-message>
+ </steps>
+ </testcase>
+
+</test:driver-testsuite>
diff --git a/plc4go/assets/testing/protocols/eip/DriverTestsuiteConnected.xml b/plc4go/assets/testing/protocols/eip/DriverTestsuiteConnected.xml
index d4b6b9022e..6833499d42 100644
--- a/plc4go/assets/testing/protocols/eip/DriverTestsuiteConnected.xml
+++ b/plc4go/assets/testing/protocols/eip/DriverTestsuiteConnected.xml
@@ -152,42 +152,44 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- </GetAttributeAllRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">1</service>
+ <GetAttributeAllRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ </GetAttributeAllRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -225,23 +227,26 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">1</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <attributes>
- <CIPAttributes>
- <numberOfClasses dataType="uint" bitLength="16">2</numberOfClasses>
- <classId isList="true">
- <value dataType="uint" bitLength="16">2</value>
- <value dataType="uint" bitLength="16">6</value>
- </classId>
- <numberAvailable dataType="uint" bitLength="16">2</numberAvailable>
- <data dataType="byte" bitLength="0">0x</data>
- </CIPAttributes>
- </attributes>
- </GetAttributeAllResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeAllResponse>
+ <attributes>
+ <CIPAttributes>
+ <numberOfClasses dataType="uint" bitLength="16">2</numberOfClasses>
+ <classId isList="true">
+ <value dataType="uint" bitLength="16">2</value>
+ <value dataType="uint" bitLength="16">6</value>
+ </classId>
+ <numberAvailable dataType="uint" bitLength="16">2</numberAvailable>
+ <data dataType="byte" bitLength="0">0x</data>
+ </CIPAttributes>
+ </attributes>
+ </GetAttributeAllResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -281,130 +286,132 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">91</service>
- <CipConnectionManagerRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <priority dataType="uint" bitLength="4">0</priority>
- <tickTime dataType="uint" bitLength="4">10</tickTime>
- <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
- <otConnectionId dataType="uint" bitLength="32">536870914</otConnectionId>
- <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
- <connectionSerialNumber dataType="uint" bitLength="16">4660</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <timeoutMultiplier dataType="uint" bitLength="8">3</timeoutMultiplier>
- <reserved dataType="uint" bitLength="24">0</reserved>
- <otRpi dataType="uint" bitLength="32">2101812</otRpi>
- <otConnectionParameters>
- <NetworkConnectionParameters>
- <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- <owner dataType="bit" bitLength="1">false</owner>
- <connectionType dataType="uint" bitLength="2">2</connectionType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- <priority dataType="uint" bitLength="2">0</priority>
- <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- </NetworkConnectionParameters>
- </otConnectionParameters>
- <toRpi dataType="uint" bitLength="32">2113537</toRpi>
- <toConnectionParameters>
- <NetworkConnectionParameters>
- <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- <owner dataType="bit" bitLength="1">false</owner>
- <connectionType dataType="uint" bitLength="2">2</connectionType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- <priority dataType="uint" bitLength="2">0</priority>
- <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- </NetworkConnectionParameters>
- </toConnectionParameters>
- <transportType>
- <TransportType>
- <direction dataType="bit" bitLength="1">true</direction>
- <trigger dataType="uint" bitLength="3">2</trigger>
- <classTransport dataType="uint" bitLength="4">3</classTransport>
- </TransportType>
- </transportType>
- <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
- <connectionPaths isList="true">
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">0</pathSegment>
- <PortSegment>
- <segmentType>
- <PortSegmentType>
- <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
- <PortSegmentNormal>
- <port dataType="uint" bitLength="4">1</port>
- <linkAddress dataType="uint" bitLength="8">0</linkAddress>
- </PortSegmentNormal>
- </PortSegmentType>
- </segmentType>
- </PortSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </connectionPaths>
- </CipConnectionManagerRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">91</service>
+ <CipConnectionManagerRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <priority dataType="uint" bitLength="4">0</priority>
+ <tickTime dataType="uint" bitLength="4">10</tickTime>
+ <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
+ <otConnectionId dataType="uint" bitLength="32">536870914</otConnectionId>
+ <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
+ <connectionSerialNumber dataType="uint" bitLength="16">4660</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <timeoutMultiplier dataType="uint" bitLength="8">3</timeoutMultiplier>
+ <reserved dataType="uint" bitLength="24">0</reserved>
+ <otRpi dataType="uint" bitLength="32">2101812</otRpi>
+ <otConnectionParameters>
+ <NetworkConnectionParameters>
+ <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <owner dataType="bit" bitLength="1">false</owner>
+ <connectionType dataType="uint" bitLength="2">2</connectionType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ <priority dataType="uint" bitLength="2">0</priority>
+ <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ </NetworkConnectionParameters>
+ </otConnectionParameters>
+ <toRpi dataType="uint" bitLength="32">2113537</toRpi>
+ <toConnectionParameters>
+ <NetworkConnectionParameters>
+ <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <owner dataType="bit" bitLength="1">false</owner>
+ <connectionType dataType="uint" bitLength="2">2</connectionType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ <priority dataType="uint" bitLength="2">0</priority>
+ <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ </NetworkConnectionParameters>
+ </toConnectionParameters>
+ <transportType>
+ <TransportType>
+ <direction dataType="bit" bitLength="1">true</direction>
+ <trigger dataType="uint" bitLength="3">2</trigger>
+ <classTransport dataType="uint" bitLength="4">3</classTransport>
+ </TransportType>
+ </transportType>
+ <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
+ <connectionPaths isList="true">
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">0</pathSegment>
+ <PortSegment>
+ <segmentType>
+ <PortSegmentType>
+ <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
+ <PortSegmentNormal>
+ <port dataType="uint" bitLength="4">1</port>
+ <linkAddress dataType="uint" bitLength="8">0</linkAddress>
+ </PortSegmentNormal>
+ </PortSegmentType>
+ </segmentType>
+ </PortSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </connectionPaths>
+ </CipConnectionManagerRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -442,19 +449,25 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">91</service>
- <CipConnectionManagerResponse>
- <reserved dataType="uint" bitLength="24">0</reserved>
- <otConnectionId dataType="uint" bitLength="32">305419896</otConnectionId>
- <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
- <connectionSerialNumber dataType="uint" bitLength="16">4660</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <otApi dataType="uint" bitLength="32">2101812</otApi>
- <toApi dataType="uint" bitLength="32">2113537</toApi>
- <replySize dataType="uint" bitLength="8">0</replySize>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">91</service>
<reserved dataType="uint" bitLength="8">0</reserved>
- </CipConnectionManagerResponse>
+ <status dataType="uint" bitLength="8">0</status>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipConnectionManagerResponse>
+ <otConnectionId dataType="uint" bitLength="32">305419896</otConnectionId>
+ <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
+ <connectionSerialNumber dataType="uint" bitLength="16">4660</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <otApi dataType="uint" bitLength="32">2101812</otApi>
+ <toApi dataType="uint" bitLength="32">2113537</toApi>
+ <replySize dataType="uint" bitLength="8">0</replySize>
+ <reply dataType="byte" bitLength="0">0x</reply>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ </CipConnectionManagerResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -509,12 +522,14 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
</CipService>
</service>
</ConnectedDataItem>
@@ -554,21 +569,24 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</ConnectedDataItem>
@@ -658,17 +676,19 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CipWriteRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">77</service>
+ <CipWriteRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CipWriteRequest>
+ </CipServiceRequest>
</CipService>
</service>
</ConnectedDataItem>
@@ -708,12 +728,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">77</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- </CipWriteResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipWriteResponse>
+ </CipWriteResponse>
+ </CipServiceResponse>
</CipService>
</service>
</ConnectedDataItem>
diff --git a/plc4go/assets/testing/protocols/eip/DriverTestsuiteForcedUnconnected.xml b/plc4go/assets/testing/protocols/eip/DriverTestsuiteForcedUnconnected.xml
index 794bce63f0..fc4250b301 100644
--- a/plc4go/assets/testing/protocols/eip/DriverTestsuiteForcedUnconnected.xml
+++ b/plc4go/assets/testing/protocols/eip/DriverTestsuiteForcedUnconnected.xml
@@ -166,58 +166,62 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">10</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">10</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -255,21 +259,24 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
diff --git a/plc4go/assets/testing/protocols/eip/DriverTestsuiteMessageRouter.xml b/plc4go/assets/testing/protocols/eip/DriverTestsuiteMessageRouter.xml
index 1aac7c1878..595e80f0c4 100644
--- a/plc4go/assets/testing/protocols/eip/DriverTestsuiteMessageRouter.xml
+++ b/plc4go/assets/testing/protocols/eip/DriverTestsuiteMessageRouter.xml
@@ -148,42 +148,44 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- </GetAttributeAllRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">1</service>
+ <GetAttributeAllRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ </GetAttributeAllRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -222,22 +224,25 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">1</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <attributes>
- <CIPAttributes>
- <numberOfClasses dataType="uint" bitLength="16">1</numberOfClasses>
- <classId isList="true">
- <value dataType="uint" bitLength="16">2</value>
- </classId>
- <numberAvailable dataType="uint" bitLength="16">1</numberAvailable>
- <data dataType="byte" bitLength="0">0x</data>
- </CIPAttributes>
- </attributes>
- </GetAttributeAllResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeAllResponse>
+ <attributes>
+ <CIPAttributes>
+ <numberOfClasses dataType="uint" bitLength="16">1</numberOfClasses>
+ <classId isList="true">
+ <value dataType="uint" bitLength="16">2</value>
+ </classId>
+ <numberAvailable dataType="uint" bitLength="16">1</numberAvailable>
+ <data dataType="byte" bitLength="0">0x</data>
+ </CIPAttributes>
+ </attributes>
+ </GetAttributeAllResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -294,86 +299,94 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">34</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">10</service>
- <MultipleServiceRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <requestPath dataType="uint" bitLength="32">19137056</requestPath>
- <data>
- <Services>
- <serviceNb dataType="uint" bitLength="16">2</serviceNb>
- <offsets isList="true">
- <value dataType="uint" bitLength="16">6</value>
- <value dataType="uint" bitLength="16">16</value>
- </offsets>
- <services isList="true">
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">4</requestPathSize>
- <tag dataType="byte" bitLength="64">0x9105636f756e7400</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- </services>
- </Services>
- </data>
- </MultipleServiceRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">34</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">10</service>
+ <MultipleServiceRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <requestPath dataType="uint" bitLength="32">19137056</requestPath>
+ <data>
+ <Services>
+ <serviceNb dataType="uint" bitLength="16">2</serviceNb>
+ <offsets isList="true">
+ <value dataType="uint" bitLength="16">6</value>
+ <value dataType="uint" bitLength="16">16</value>
+ </offsets>
+ <services isList="true">
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">4</requestPathSize>
+ <tag dataType="byte" bitLength="64">0x9105636f756e7400</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </services>
+ </Services>
+ </data>
+ </MultipleServiceRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -411,18 +424,21 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">10</service>
- <MultipleServiceResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">10</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <serviceNb dataType="uint" bitLength="16">2</serviceNb>
- <offsets isList="true">
- <value dataType="uint" bitLength="16">6</value>
- <value dataType="uint" bitLength="16">16</value>
- </offsets>
- <servicesData dataType="byte" bitLength="160">0xcc000000c40000000216cc000000c4002a000000</servicesData>
- </MultipleServiceResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <MultipleServiceResponse>
+ <serviceNb dataType="uint" bitLength="16">2</serviceNb>
+ <offsets isList="true">
+ <value dataType="uint" bitLength="16">6</value>
+ <value dataType="uint" bitLength="16">16</value>
+ </offsets>
+ <servicesData dataType="byte" bitLength="160">0xcc000000c40000000216cc000000c4002a000000</servicesData>
+ </MultipleServiceResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -529,63 +545,67 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">14</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
- </CIPDataTypeCode>
- </dataType>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CipWriteRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">14</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">77</service>
+ <CipWriteRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
+ </CIPDataTypeCode>
+ </dataType>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CipWriteRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -623,12 +643,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">77</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- </CipWriteResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipWriteResponse>
+ </CipWriteResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
diff --git a/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteBigEndian.xml b/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteBigEndian.xml
index 3329982f05..efafb5d234 100644
--- a/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteBigEndian.xml
+++ b/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteBigEndian.xml
@@ -83,58 +83,62 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">10</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
- <tag dataType="byte" bitLength="48">0x910472617465</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">4</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">10</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">3</requestPathSize>
+ <tag dataType="byte" bitLength="48">0x910472617465</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">4</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -178,20 +182,23 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x00000216</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x00000216</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -237,62 +244,66 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">22</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteRequest>
- <requestPathSize dataType="uint" bitLength="8">6</requestPathSize>
- <tag dataType="byte" bitLength="96">0x9116436172746f6e53697a65</tag>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
- </dataType>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- <data dataType="byte" bitLength="32">0x0000000e</data>
- </CipWriteRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">4</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">22</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">77</service>
+ <CipWriteRequest>
+ <requestPathSize dataType="uint" bitLength="8">6</requestPathSize>
+ <tag dataType="byte" bitLength="96">0x9116436172746f6e53697a65</tag>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
+ </dataType>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ <data dataType="byte" bitLength="32">0x0000000e</data>
+ </CipWriteRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">4</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -336,12 +347,76 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">77</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- </CipWriteResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipWriteResponse>
+ </CipWriteResponse>
+ </CipServiceResponse>
+ </CipService>
+ </service>
+ </UnConnectedDataItem>
+ </TypeId>
+ </typeIds>
+ </CipRRData>
+ </EipPacket>
+ </xml>
+ </testcase>
+ <testcase>
+ <name>CIP Read Response with additional status</name>
+ <!--
+ An error reply that actually carries extended status detail: general status 0x1F
+ (connection failure) followed by ONE 16-bit additional-status word (0x0204).
+ The 0x01 byte is that word count, not a status value of its own - see the note
+ above CipService in eip.mspec. Because the additional status consumes the rest of
+ the service, the optional CIPData payload is absent, which is what the
+ 'serviceLen - 4 - (2 * extStatusSize)' guard exists to get right.
+ -->
+ <raw>006F0016000012340000000001000000000000010000000000000000000000020000000000B20006CC001F010204</raw>
+ <root-type>EipPacket</root-type>
+ <parser-arguments>
+ <response>true</response>
+ </parser-arguments>
+ <xml>
+ <EipPacket>
+ <command dataType="uint" bitLength="16">111</command>
+ <packetLength dataType="uint" bitLength="16">22</packetLength>
+ <sessionHandle dataType="uint" bitLength="32">4660</sessionHandle>
+ <status dataType="uint" bitLength="32">0</status>
+ <senderContext dataType="byte" bitLength="64">0x0100000000000001</senderContext>
+ <options dataType="uint" bitLength="32">0</options>
+ <CipRRData>
+ <interfaceHandle dataType="uint" bitLength="32">0</interfaceHandle>
+ <timeout dataType="uint" bitLength="16">0</timeout>
+ <typeIdCount dataType="uint" bitLength="16">2</typeIdCount>
+ <typeIds isList="true">
+ <TypeId>
+ <id dataType="uint" bitLength="16">0</id>
+ <NullAddressItem>
+ <reserved dataType="uint" bitLength="16">0</reserved>
+ </NullAddressItem>
+ </TypeId>
+ <TypeId>
+ <id dataType="uint" bitLength="16">178</id>
+ <UnConnectedDataItem>
+ <packetSize dataType="uint" bitLength="16">6</packetSize>
+ <service>
+ <CipService>
+ <response dataType="bit" bitLength="1">true</response>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <status dataType="uint" bitLength="8">31</status>
+ <extStatusSize dataType="uint" bitLength="8">1</extStatusSize>
+ <extStatus isList="true">
+ <value dataType="uint" bitLength="16">516</value>
+ </extStatus>
+ <CipReadResponse>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -351,4 +426,5 @@
</EipPacket>
</xml>
</testcase>
+
</test:testsuite>
\ No newline at end of file
diff --git a/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteLittleEndian.xml b/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteLittleEndian.xml
index 6b5e53ab66..8a311e6aa3 100644
--- a/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteLittleEndian.xml
+++ b/plc4go/assets/testing/protocols/eip/ParserSerializerTestsuiteLittleEndian.xml
@@ -60,13 +60,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipConnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">13</requestPathSize>
- <pathSegments dataType="byte" bitLength="208">0x91124b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b910370707000</pathSegments>
- <reserved dataType="uint" bitLength="16">1</reserved>
- <reserved dataType="uint" bitLength="32">0</reserved>
- </CipConnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipConnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">13</requestPathSize>
+ <pathSegments dataType="byte" bitLength="208">0x91124b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b910370707000</pathSegments>
+ <reserved dataType="uint" bitLength="16">1</reserved>
+ <reserved dataType="uint" bitLength="32">0</reserved>
+ </CipConnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</ConnectedDataItem>
@@ -110,130 +112,132 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">91</service>
- <CipConnectionManagerRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <priority dataType="uint" bitLength="4">0</priority>
- <tickTime dataType="uint" bitLength="4">10</tickTime>
- <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
- <otConnectionId dataType="uint" bitLength="32">536870914</otConnectionId>
- <toConnectionId dataType="uint" bitLength="32">42420</toConnectionId>
- <connectionSerialNumber dataType="uint" bitLength="16">52011</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <timeoutMultiplier dataType="uint" bitLength="8">3</timeoutMultiplier>
- <reserved dataType="uint" bitLength="24">0</reserved>
- <otRpi dataType="uint" bitLength="32">2101812</otRpi>
- <otConnectionParameters>
- <NetworkConnectionParameters>
- <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- <owner dataType="bit" bitLength="1">false</owner>
- <connectionType dataType="uint" bitLength="2">2</connectionType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- <priority dataType="uint" bitLength="2">0</priority>
- <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- </NetworkConnectionParameters>
- </otConnectionParameters>
- <toRpi dataType="uint" bitLength="32">2113537</toRpi>
- <toConnectionParameters>
- <NetworkConnectionParameters>
- <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- <owner dataType="bit" bitLength="1">false</owner>
- <connectionType dataType="uint" bitLength="2">2</connectionType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- <priority dataType="uint" bitLength="2">0</priority>
- <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- </NetworkConnectionParameters>
- </toConnectionParameters>
- <transportType>
- <TransportType>
- <direction dataType="bit" bitLength="1">true</direction>
- <trigger dataType="uint" bitLength="3">2</trigger>
- <classTransport dataType="uint" bitLength="4">3</classTransport>
- </TransportType>
- </transportType>
- <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
- <connectionPaths isList="true">
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">0</pathSegment>
- <PortSegment>
- <segmentType>
- <PortSegmentType>
- <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
- <PortSegmentNormal>
- <port dataType="uint" bitLength="4">1</port>
- <linkAddress dataType="uint" bitLength="8">0</linkAddress>
- </PortSegmentNormal>
- </PortSegmentType>
- </segmentType>
- </PortSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </connectionPaths>
- </CipConnectionManagerRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">91</service>
+ <CipConnectionManagerRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <priority dataType="uint" bitLength="4">0</priority>
+ <tickTime dataType="uint" bitLength="4">10</tickTime>
+ <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
+ <otConnectionId dataType="uint" bitLength="32">536870914</otConnectionId>
+ <toConnectionId dataType="uint" bitLength="32">42420</toConnectionId>
+ <connectionSerialNumber dataType="uint" bitLength="16">52011</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <timeoutMultiplier dataType="uint" bitLength="8">3</timeoutMultiplier>
+ <reserved dataType="uint" bitLength="24">0</reserved>
+ <otRpi dataType="uint" bitLength="32">2101812</otRpi>
+ <otConnectionParameters>
+ <NetworkConnectionParameters>
+ <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <owner dataType="bit" bitLength="1">false</owner>
+ <connectionType dataType="uint" bitLength="2">2</connectionType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ <priority dataType="uint" bitLength="2">0</priority>
+ <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ </NetworkConnectionParameters>
+ </otConnectionParameters>
+ <toRpi dataType="uint" bitLength="32">2113537</toRpi>
+ <toConnectionParameters>
+ <NetworkConnectionParameters>
+ <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <owner dataType="bit" bitLength="1">false</owner>
+ <connectionType dataType="uint" bitLength="2">2</connectionType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ <priority dataType="uint" bitLength="2">0</priority>
+ <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ </NetworkConnectionParameters>
+ </toConnectionParameters>
+ <transportType>
+ <TransportType>
+ <direction dataType="bit" bitLength="1">true</direction>
+ <trigger dataType="uint" bitLength="3">2</trigger>
+ <classTransport dataType="uint" bitLength="4">3</classTransport>
+ </TransportType>
+ </transportType>
+ <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
+ <connectionPaths isList="true">
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">0</pathSegment>
+ <PortSegment>
+ <segmentType>
+ <PortSegmentType>
+ <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
+ <PortSegmentNormal>
+ <port dataType="uint" bitLength="4">1</port>
+ <linkAddress dataType="uint" bitLength="8">0</linkAddress>
+ </PortSegmentNormal>
+ </PortSegmentType>
+ </segmentType>
+ </PortSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </connectionPaths>
+ </CipConnectionManagerRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -277,19 +281,25 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">91</service>
- <CipConnectionManagerResponse>
- <reserved dataType="uint" bitLength="24">0</reserved>
- <otConnectionId dataType="uint" bitLength="32">4294863707</otConnectionId>
- <toConnectionId dataType="uint" bitLength="32">42420</toConnectionId>
- <connectionSerialNumber dataType="uint" bitLength="16">52011</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <otApi dataType="uint" bitLength="32">2101812</otApi>
- <toApi dataType="uint" bitLength="32">2113537</toApi>
- <replySize dataType="uint" bitLength="8">0</replySize>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">91</service>
<reserved dataType="uint" bitLength="8">0</reserved>
- </CipConnectionManagerResponse>
+ <status dataType="uint" bitLength="8">0</status>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipConnectionManagerResponse>
+ <otConnectionId dataType="uint" bitLength="32">4294863707</otConnectionId>
+ <toConnectionId dataType="uint" bitLength="32">42420</toConnectionId>
+ <connectionSerialNumber dataType="uint" bitLength="16">52011</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <otApi dataType="uint" bitLength="32">2101812</otApi>
+ <toApi dataType="uint" bitLength="32">2113537</toApi>
+ <replySize dataType="uint" bitLength="8">0</replySize>
+ <reply dataType="byte" bitLength="0">0x</reply>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ </CipConnectionManagerResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -335,13 +345,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipConnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">8</requestPathSize>
- <pathSegments dataType="byte" bitLength="128">0x910d5a5a5a5f5a5a5a5f415252415900</pathSegments>
- <reserved dataType="uint" bitLength="16">1</reserved>
- <reserved dataType="uint" bitLength="32">0</reserved>
- </CipConnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipConnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">8</requestPathSize>
+ <pathSegments dataType="byte" bitLength="128">0x910d5a5a5a5f5a5a5a5f415252415900</pathSegments>
+ <reserved dataType="uint" bitLength="16">1</reserved>
+ <reserved dataType="uint" bitLength="32">0</reserved>
+ </CipConnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</ConnectedDataItem>
@@ -387,18 +399,21 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipConnectedResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">82</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <additionalStatusWords dataType="uint" bitLength="8">0</additionalStatusWords>
- <data>
- <CIPDataConnected>
- <value dataType="uint" bitLength="32">196</value>
- <tagStatus dataType="uint" bitLength="16">0</tagStatus>
- </CIPDataConnected>
- </data>
- </CipConnectedResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipConnectedResponse>
+ <data>
+ <CIPDataConnected>
+ <value dataType="uint" bitLength="32">196</value>
+ <tagStatus dataType="uint" bitLength="16">0</tagStatus>
+ </CIPDataConnected>
+ </data>
+ </CipConnectedResponse>
+ </CipServiceResponse>
</CipService>
</service>
</ConnectedDataItem>
@@ -444,16 +459,18 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteRequest>
- <requestPathSize dataType="uint" bitLength="8">9</requestPathSize>
- <tag dataType="byte" bitLength="144">0x910d5a5a5a5f5a5a5a5f4152524159002801</tag>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
- </dataType>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- <data dataType="byte" bitLength="32">0x01000000</data>
- </CipWriteRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">77</service>
+ <CipWriteRequest>
+ <requestPathSize dataType="uint" bitLength="8">9</requestPathSize>
+ <tag dataType="byte" bitLength="144">0x910d5a5a5a5f5a5a5a5f4152524159002801</tag>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
+ </dataType>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ <data dataType="byte" bitLength="32">0x01000000</data>
+ </CipWriteRequest>
+ </CipServiceRequest>
</CipService>
</service>
</ConnectedDataItem>
@@ -499,16 +516,18 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">77</service>
- <CipWriteRequest>
- <requestPathSize dataType="uint" bitLength="8">9</requestPathSize>
- <tag dataType="byte" bitLength="144">0x910d5a5a5a5f5a5a5a5f4152524159002801</tag>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
- </dataType>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- <data dataType="byte" bitLength="32">0x01000000</data>
- </CipWriteRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">77</service>
+ <CipWriteRequest>
+ <requestPathSize dataType="uint" bitLength="8">9</requestPathSize>
+ <tag dataType="byte" bitLength="144">0x910d5a5a5a5f5a5a5a5f4152524159002801</tag>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
+ </dataType>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ <data dataType="byte" bitLength="32">0x01000000</data>
+ </CipWriteRequest>
+ </CipServiceRequest>
</CipService>
</service>
</ConnectedDataItem>
@@ -552,94 +571,96 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">78</service>
- <CipConnectionManagerCloseRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <priority dataType="uint" bitLength="4">0</priority>
- <tickTime dataType="uint" bitLength="4">10</tickTime>
- <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
- <connectionSerialNumber dataType="uint" bitLength="16">52011</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
- <reserved dataType="byte" bitLength="8">0x00</reserved>
- <connectionPaths isList="true">
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">0</pathSegment>
- <PortSegment>
- <segmentType>
- <PortSegmentType>
- <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
- <PortSegmentNormal>
- <port dataType="uint" bitLength="4">1</port>
- <linkAddress dataType="uint" bitLength="8">0</linkAddress>
- </PortSegmentNormal>
- </PortSegmentType>
- </segmentType>
- </PortSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </connectionPaths>
- </CipConnectionManagerCloseRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">78</service>
+ <CipConnectionManagerCloseRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <priority dataType="uint" bitLength="4">0</priority>
+ <tickTime dataType="uint" bitLength="4">10</tickTime>
+ <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
+ <connectionSerialNumber dataType="uint" bitLength="16">52011</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
+ <reserved dataType="byte" bitLength="8">0x00</reserved>
+ <connectionPaths isList="true">
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">0</pathSegment>
+ <PortSegment>
+ <segmentType>
+ <PortSegmentType>
+ <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
+ <PortSegmentNormal>
+ <port dataType="uint" bitLength="4">1</port>
+ <linkAddress dataType="uint" bitLength="8">0</linkAddress>
+ </PortSegmentNormal>
+ </PortSegmentType>
+ </segmentType>
+ </PortSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </connectionPaths>
+ </CipConnectionManagerCloseRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -683,17 +704,20 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">78</service>
- <CipConnectionManagerCloseResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">78</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <additionalStatusWords dataType="uint" bitLength="8">0</additionalStatusWords>
- <connectionSerialNumber dataType="uint" bitLength="16">8592</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <applicationReplySize dataType="uint" bitLength="8">0</applicationReplySize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- </CipConnectionManagerCloseResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipConnectionManagerCloseResponse>
+ <connectionSerialNumber dataType="uint" bitLength="16">8592</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <applicationReplySize dataType="uint" bitLength="8">0</applicationReplySize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ </CipConnectionManagerCloseResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -804,58 +828,62 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipUnconnectedRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <reserved dataType="uint" bitLength="16">40197</reserved>
- <messageSize dataType="uint" bitLength="16">14</messageSize>
- <unconnectedService>
- <CipService>
- <response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">5</requestPathSize>
- <tag dataType="byte" bitLength="80">0x91084d79537472696e67</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
- </CipService>
- </unconnectedService>
- <route dataType="uint" bitLength="16">1</route>
- <backPlane dataType="int" bitLength="8">1</backPlane>
- <slot dataType="int" bitLength="8">0</slot>
- </CipUnconnectedRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">82</service>
+ <CipUnconnectedRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <reserved dataType="uint" bitLength="16">40197</reserved>
+ <messageSize dataType="uint" bitLength="16">14</messageSize>
+ <unconnectedService>
+ <CipService>
+ <response dataType="bit" bitLength="1">false</response>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">5</requestPathSize>
+ <tag dataType="byte" bitLength="80">0x91084d79537472696e67</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
+ </CipService>
+ </unconnectedService>
+ <route dataType="uint" bitLength="16">1</route>
+ <backPlane dataType="int" bitLength="8">1</backPlane>
+ <slot dataType="int" bitLength="8">0</slot>
+ </CipUnconnectedRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -899,20 +927,23 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="STRUCTURED">672</CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="720">0xce0f2b000000556d6d2c2049206e6f772073656520796f7520696e207468652077697265736861726b20636170747572650000000000000000000000000000000000000000000000000000000000000000000000000000000000</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="STRUCTURED">672</CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="720">0xce0f2b000000556d6d2c2049206e6f772073656520796f7520696e207468652077697265736861726b20636170747572650000000000000000000000000000000000000000000000000000000000000000000000000000000000</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -981,20 +1012,23 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="REAL">202</CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x00000000</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="REAL">202</CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x00000000</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</ConnectedDataItem>
@@ -1131,42 +1165,44 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- </GetAttributeAllRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">1</service>
+ <GetAttributeAllRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ </GetAttributeAllRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -1210,100 +1246,103 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">1</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <attributes>
- <CIPAttributes>
- <numberOfClasses dataType="uint" bitLength="16">78</numberOfClasses>
- <classId isList="true">
- <value dataType="uint" bitLength="16">826</value>
- <value dataType="uint" bitLength="16">119</value>
- <value dataType="uint" bitLength="16">102</value>
- <value dataType="uint" bitLength="16">67</value>
- <value dataType="uint" bitLength="16">246</value>
- <value dataType="uint" bitLength="16">55</value>
- <value dataType="uint" bitLength="16">245</value>
- <value dataType="uint" bitLength="16">940</value>
- <value dataType="uint" bitLength="16">95</value>
- <value dataType="uint" bitLength="16">93</value>
- <value dataType="uint" bitLength="16">94</value>
- <value dataType="uint" bitLength="16">768</value>
- <value dataType="uint" bitLength="16">939</value>
- <value dataType="uint" bitLength="16">823</value>
- <value dataType="uint" bitLength="16">933</value>
- <value dataType="uint" bitLength="16">772</value>
- <value dataType="uint" bitLength="16">72</value>
- <value dataType="uint" bitLength="16">834</value>
- <value dataType="uint" bitLength="16">932</value>
- <value dataType="uint" bitLength="16">139</value>
- <value dataType="uint" bitLength="16">815</value>
- <value dataType="uint" bitLength="16">1042</value>
- <value dataType="uint" bitLength="16">950</value>
- <value dataType="uint" bitLength="16">946</value>
- <value dataType="uint" bitLength="16">947</value>
- <value dataType="uint" bitLength="16">944</value>
- <value dataType="uint" bitLength="16">945</value>
- <value dataType="uint" bitLength="16">816</value>
- <value dataType="uint" bitLength="16">79</value>
- <value dataType="uint" bitLength="16">78</value>
- <value dataType="uint" bitLength="16">938</value>
- <value dataType="uint" bitLength="16">936</value>
- <value dataType="uint" bitLength="16">935</value>
- <value dataType="uint" bitLength="16">934</value>
- <value dataType="uint" bitLength="16">878</value>
- <value dataType="uint" bitLength="16">880</value>
- <value dataType="uint" bitLength="16">818</value>
- <value dataType="uint" bitLength="16">817</value>
- <value dataType="uint" bitLength="16">813</value>
- <value dataType="uint" bitLength="16">791</value>
- <value dataType="uint" bitLength="16">178</value>
- <value dataType="uint" bitLength="16">841</value>
- <value dataType="uint" bitLength="16">821</value>
- <value dataType="uint" bitLength="16">113</value>
- <value dataType="uint" bitLength="16">114</value>
- <value dataType="uint" bitLength="16">888</value>
- <value dataType="uint" bitLength="16">172</value>
- <value dataType="uint" bitLength="16">176</value>
- <value dataType="uint" bitLength="16">811</value>
- <value dataType="uint" bitLength="16">177</value>
- <value dataType="uint" bitLength="16">115</value>
- <value dataType="uint" bitLength="16">103</value>
- <value dataType="uint" bitLength="16">107</value>
- <value dataType="uint" bitLength="16">104</value>
- <value dataType="uint" bitLength="16">893</value>
- <value dataType="uint" bitLength="16">141</value>
- <value dataType="uint" bitLength="16">140</value>
- <value dataType="uint" bitLength="16">109</value>
- <value dataType="uint" bitLength="16">106</value>
- <value dataType="uint" bitLength="16">824</value>
- <value dataType="uint" bitLength="16">794</value>
- <value dataType="uint" bitLength="16">105</value>
- <value dataType="uint" bitLength="16">69</value>
- <value dataType="uint" bitLength="16">242</value>
- <value dataType="uint" bitLength="16">116</value>
- <value dataType="uint" bitLength="16">110</value>
- <value dataType="uint" bitLength="16">142</value>
- <value dataType="uint" bitLength="16">112</value>
- <value dataType="uint" bitLength="16">108</value>
- <value dataType="uint" bitLength="16">2</value>
- <value dataType="uint" bitLength="16">874</value>
- <value dataType="uint" bitLength="16">100</value>
- <value dataType="uint" bitLength="16">161</value>
- <value dataType="uint" bitLength="16">244</value>
- <value dataType="uint" bitLength="16">1</value>
- <value dataType="uint" bitLength="16">193</value>
- <value dataType="uint" bitLength="16">192</value>
- <value dataType="uint" bitLength="16">6</value>
- </classId>
- <numberAvailable dataType="uint" bitLength="16">256</numberAvailable>
- <numberActive dataType="uint" bitLength="16">5</numberActive>
- <data dataType="byte" bitLength="0">0x</data>
- </CIPAttributes>
- </attributes>
- </GetAttributeAllResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeAllResponse>
+ <attributes>
+ <CIPAttributes>
+ <numberOfClasses dataType="uint" bitLength="16">78</numberOfClasses>
+ <classId isList="true">
+ <value dataType="uint" bitLength="16">826</value>
+ <value dataType="uint" bitLength="16">119</value>
+ <value dataType="uint" bitLength="16">102</value>
+ <value dataType="uint" bitLength="16">67</value>
+ <value dataType="uint" bitLength="16">246</value>
+ <value dataType="uint" bitLength="16">55</value>
+ <value dataType="uint" bitLength="16">245</value>
+ <value dataType="uint" bitLength="16">940</value>
+ <value dataType="uint" bitLength="16">95</value>
+ <value dataType="uint" bitLength="16">93</value>
+ <value dataType="uint" bitLength="16">94</value>
+ <value dataType="uint" bitLength="16">768</value>
+ <value dataType="uint" bitLength="16">939</value>
+ <value dataType="uint" bitLength="16">823</value>
+ <value dataType="uint" bitLength="16">933</value>
+ <value dataType="uint" bitLength="16">772</value>
+ <value dataType="uint" bitLength="16">72</value>
+ <value dataType="uint" bitLength="16">834</value>
+ <value dataType="uint" bitLength="16">932</value>
+ <value dataType="uint" bitLength="16">139</value>
+ <value dataType="uint" bitLength="16">815</value>
+ <value dataType="uint" bitLength="16">1042</value>
+ <value dataType="uint" bitLength="16">950</value>
+ <value dataType="uint" bitLength="16">946</value>
+ <value dataType="uint" bitLength="16">947</value>
+ <value dataType="uint" bitLength="16">944</value>
+ <value dataType="uint" bitLength="16">945</value>
+ <value dataType="uint" bitLength="16">816</value>
+ <value dataType="uint" bitLength="16">79</value>
+ <value dataType="uint" bitLength="16">78</value>
+ <value dataType="uint" bitLength="16">938</value>
+ <value dataType="uint" bitLength="16">936</value>
+ <value dataType="uint" bitLength="16">935</value>
+ <value dataType="uint" bitLength="16">934</value>
+ <value dataType="uint" bitLength="16">878</value>
+ <value dataType="uint" bitLength="16">880</value>
+ <value dataType="uint" bitLength="16">818</value>
+ <value dataType="uint" bitLength="16">817</value>
+ <value dataType="uint" bitLength="16">813</value>
+ <value dataType="uint" bitLength="16">791</value>
+ <value dataType="uint" bitLength="16">178</value>
+ <value dataType="uint" bitLength="16">841</value>
+ <value dataType="uint" bitLength="16">821</value>
+ <value dataType="uint" bitLength="16">113</value>
+ <value dataType="uint" bitLength="16">114</value>
+ <value dataType="uint" bitLength="16">888</value>
+ <value dataType="uint" bitLength="16">172</value>
+ <value dataType="uint" bitLength="16">176</value>
+ <value dataType="uint" bitLength="16">811</value>
+ <value dataType="uint" bitLength="16">177</value>
+ <value dataType="uint" bitLength="16">115</value>
+ <value dataType="uint" bitLength="16">103</value>
+ <value dataType="uint" bitLength="16">107</value>
+ <value dataType="uint" bitLength="16">104</value>
+ <value dataType="uint" bitLength="16">893</value>
+ <value dataType="uint" bitLength="16">141</value>
+ <value dataType="uint" bitLength="16">140</value>
+ <value dataType="uint" bitLength="16">109</value>
+ <value dataType="uint" bitLength="16">106</value>
+ <value dataType="uint" bitLength="16">824</value>
+ <value dataType="uint" bitLength="16">794</value>
+ <value dataType="uint" bitLength="16">105</value>
+ <value dataType="uint" bitLength="16">69</value>
+ <value dataType="uint" bitLength="16">242</value>
+ <value dataType="uint" bitLength="16">116</value>
+ <value dataType="uint" bitLength="16">110</value>
+ <value dataType="uint" bitLength="16">142</value>
+ <value dataType="uint" bitLength="16">112</value>
+ <value dataType="uint" bitLength="16">108</value>
+ <value dataType="uint" bitLength="16">2</value>
+ <value dataType="uint" bitLength="16">874</value>
+ <value dataType="uint" bitLength="16">100</value>
+ <value dataType="uint" bitLength="16">161</value>
+ <value dataType="uint" bitLength="16">244</value>
+ <value dataType="uint" bitLength="16">1</value>
+ <value dataType="uint" bitLength="16">193</value>
+ <value dataType="uint" bitLength="16">192</value>
+ <value dataType="uint" bitLength="16">6</value>
+ </classId>
+ <numberAvailable dataType="uint" bitLength="16">256</numberAvailable>
+ <numberActive dataType="uint" bitLength="16">5</numberActive>
+ <data dataType="byte" bitLength="0">0x</data>
+ </CIPAttributes>
+ </attributes>
+ </GetAttributeAllResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -1347,22 +1386,25 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">1</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <attributes>
- <CIPAttributes>
- <numberOfClasses dataType="uint" bitLength="16">0</numberOfClasses>
- <classId isList="true">
- </classId>
- <numberAvailable dataType="uint" bitLength="16">0</numberAvailable>
- <numberActive dataType="uint" bitLength="16">0</numberActive>
- <data dataType="byte" bitLength="16784">0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [...]
- </CIPAttributes>
- </attributes>
- </GetAttributeAllResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeAllResponse>
+ <attributes>
+ <CIPAttributes>
+ <numberOfClasses dataType="uint" bitLength="16">0</numberOfClasses>
+ <classId isList="true">
+ </classId>
+ <numberAvailable dataType="uint" bitLength="16">0</numberAvailable>
+ <numberActive dataType="uint" bitLength="16">0</numberActive>
+ <data dataType="byte" bitLength="16784">0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [...]
+ </CIPAttributes>
+ </attributes>
+ </GetAttributeAllResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -1407,12 +1449,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">1</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">8</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- </GetAttributeAllResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeAllResponse>
+ </GetAttributeAllResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -1456,12 +1501,15 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">82</service>
- <CipConnectedResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">82</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">8</status>
- <additionalStatusWords dataType="uint" bitLength="8">0</additionalStatusWords>
- </CipConnectedResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipConnectedResponse>
+ </CipConnectedResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
diff --git a/plc4go/assets/testing/protocols/logix/CompactLogixSimpleRead.xml b/plc4go/assets/testing/protocols/logix/CompactLogixSimpleRead.xml
index b39eb225b4..541880455d 100644
--- a/plc4go/assets/testing/protocols/logix/CompactLogixSimpleRead.xml
+++ b/plc4go/assets/testing/protocols/logix/CompactLogixSimpleRead.xml
@@ -159,42 +159,44 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- </GetAttributeAllRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">1</service>
+ <GetAttributeAllRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ </GetAttributeAllRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -238,62 +240,65 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">1</service>
- <GetAttributeAllResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">1</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <attributes>
- <CIPAttributes>
- <numberOfClasses dataType="uint" bitLength="16">42</numberOfClasses>
- <classId isList="true">
- <value dataType="uint" bitLength="16">1</value>
- <value dataType="uint" bitLength="16">2</value>
- <value dataType="uint" bitLength="16">6</value>
- <value dataType="uint" bitLength="16">772</value>
- <value dataType="uint" bitLength="16">244</value>
- <value dataType="uint" bitLength="16">161</value>
- <value dataType="uint" bitLength="16">55</value>
- <value dataType="uint" bitLength="16">119</value>
- <value dataType="uint" bitLength="16">115</value>
- <value dataType="uint" bitLength="16">103</value>
- <value dataType="uint" bitLength="16">104</value>
- <value dataType="uint" bitLength="16">105</value>
- <value dataType="uint" bitLength="16">106</value>
- <value dataType="uint" bitLength="16">107</value>
- <value dataType="uint" bitLength="16">108</value>
- <value dataType="uint" bitLength="16">109</value>
- <value dataType="uint" bitLength="16">110</value>
- <value dataType="uint" bitLength="16">111</value>
- <value dataType="uint" bitLength="16">112</value>
- <value dataType="uint" bitLength="16">114</value>
- <value dataType="uint" bitLength="16">116</value>
- <value dataType="uint" bitLength="16">127</value>
- <value dataType="uint" bitLength="16">139</value>
- <value dataType="uint" bitLength="16">140</value>
- <value dataType="uint" bitLength="16">141</value>
- <value dataType="uint" bitLength="16">142</value>
- <value dataType="uint" bitLength="16">126</value>
- <value dataType="uint" bitLength="16">162</value>
- <value dataType="uint" bitLength="16">163</value>
- <value dataType="uint" bitLength="16">242</value>
- <value dataType="uint" bitLength="16">172</value>
- <value dataType="uint" bitLength="16">176</value>
- <value dataType="uint" bitLength="16">177</value>
- <value dataType="uint" bitLength="16">811</value>
- <value dataType="uint" bitLength="16">178</value>
- <value dataType="uint" bitLength="16">821</value>
- <value dataType="uint" bitLength="16">794</value>
- <value dataType="uint" bitLength="16">791</value>
- <value dataType="uint" bitLength="16">792</value>
- <value dataType="uint" bitLength="16">790</value>
- <value dataType="uint" bitLength="16">793</value>
- <value dataType="uint" bitLength="16">100</value>
- </classId>
- <data dataType="byte" bitLength="0">0x</data>
- </CIPAttributes>
- </attributes>
- </GetAttributeAllResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <GetAttributeAllResponse>
+ <attributes>
+ <CIPAttributes>
+ <numberOfClasses dataType="uint" bitLength="16">42</numberOfClasses>
+ <classId isList="true">
+ <value dataType="uint" bitLength="16">1</value>
+ <value dataType="uint" bitLength="16">2</value>
+ <value dataType="uint" bitLength="16">6</value>
+ <value dataType="uint" bitLength="16">772</value>
+ <value dataType="uint" bitLength="16">244</value>
+ <value dataType="uint" bitLength="16">161</value>
+ <value dataType="uint" bitLength="16">55</value>
+ <value dataType="uint" bitLength="16">119</value>
+ <value dataType="uint" bitLength="16">115</value>
+ <value dataType="uint" bitLength="16">103</value>
+ <value dataType="uint" bitLength="16">104</value>
+ <value dataType="uint" bitLength="16">105</value>
+ <value dataType="uint" bitLength="16">106</value>
+ <value dataType="uint" bitLength="16">107</value>
+ <value dataType="uint" bitLength="16">108</value>
+ <value dataType="uint" bitLength="16">109</value>
+ <value dataType="uint" bitLength="16">110</value>
+ <value dataType="uint" bitLength="16">111</value>
+ <value dataType="uint" bitLength="16">112</value>
+ <value dataType="uint" bitLength="16">114</value>
+ <value dataType="uint" bitLength="16">116</value>
+ <value dataType="uint" bitLength="16">127</value>
+ <value dataType="uint" bitLength="16">139</value>
+ <value dataType="uint" bitLength="16">140</value>
+ <value dataType="uint" bitLength="16">141</value>
+ <value dataType="uint" bitLength="16">142</value>
+ <value dataType="uint" bitLength="16">126</value>
+ <value dataType="uint" bitLength="16">162</value>
+ <value dataType="uint" bitLength="16">163</value>
+ <value dataType="uint" bitLength="16">242</value>
+ <value dataType="uint" bitLength="16">172</value>
+ <value dataType="uint" bitLength="16">176</value>
+ <value dataType="uint" bitLength="16">177</value>
+ <value dataType="uint" bitLength="16">811</value>
+ <value dataType="uint" bitLength="16">178</value>
+ <value dataType="uint" bitLength="16">821</value>
+ <value dataType="uint" bitLength="16">794</value>
+ <value dataType="uint" bitLength="16">791</value>
+ <value dataType="uint" bitLength="16">792</value>
+ <value dataType="uint" bitLength="16">790</value>
+ <value dataType="uint" bitLength="16">793</value>
+ <value dataType="uint" bitLength="16">100</value>
+ </classId>
+ <data dataType="byte" bitLength="0">0x</data>
+ </CIPAttributes>
+ </attributes>
+ </GetAttributeAllResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -337,130 +342,132 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">91</service>
- <CipConnectionManagerRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <priority dataType="uint" bitLength="4">0</priority>
- <tickTime dataType="uint" bitLength="4">10</tickTime>
- <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
- <otConnectionId dataType="uint" bitLength="32">536870914</otConnectionId>
- <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
- <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <timeoutMultiplier dataType="uint" bitLength="8">3</timeoutMultiplier>
- <reserved dataType="uint" bitLength="24">0</reserved>
- <otRpi dataType="uint" bitLength="32">2101812</otRpi>
- <otConnectionParameters>
- <NetworkConnectionParameters>
- <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- <owner dataType="bit" bitLength="1">false</owner>
- <connectionType dataType="uint" bitLength="2">2</connectionType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- <priority dataType="uint" bitLength="2">0</priority>
- <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- </NetworkConnectionParameters>
- </otConnectionParameters>
- <toRpi dataType="uint" bitLength="32">2113537</toRpi>
- <toConnectionParameters>
- <NetworkConnectionParameters>
- <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- <owner dataType="bit" bitLength="1">false</owner>
- <connectionType dataType="uint" bitLength="2">2</connectionType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- <priority dataType="uint" bitLength="2">0</priority>
- <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
- <reserved dataType="bit" bitLength="1">false</reserved>
- </NetworkConnectionParameters>
- </toConnectionParameters>
- <transportType>
- <TransportType>
- <direction dataType="bit" bitLength="1">true</direction>
- <trigger dataType="uint" bitLength="3">2</trigger>
- <classTransport dataType="uint" bitLength="4">3</classTransport>
- </TransportType>
- </transportType>
- <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
- <connectionPaths isList="true">
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">0</pathSegment>
- <PortSegment>
- <segmentType>
- <PortSegmentType>
- <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
- <PortSegmentNormal>
- <port dataType="uint" bitLength="4">1</port>
- <linkAddress dataType="uint" bitLength="8">0</linkAddress>
- </PortSegmentNormal>
- </PortSegmentType>
- </segmentType>
- </PortSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </connectionPaths>
- </CipConnectionManagerRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">91</service>
+ <CipConnectionManagerRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <priority dataType="uint" bitLength="4">0</priority>
+ <tickTime dataType="uint" bitLength="4">10</tickTime>
+ <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
+ <otConnectionId dataType="uint" bitLength="32">536870914</otConnectionId>
+ <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
+ <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <timeoutMultiplier dataType="uint" bitLength="8">3</timeoutMultiplier>
+ <reserved dataType="uint" bitLength="24">0</reserved>
+ <otRpi dataType="uint" bitLength="32">2101812</otRpi>
+ <otConnectionParameters>
+ <NetworkConnectionParameters>
+ <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <owner dataType="bit" bitLength="1">false</owner>
+ <connectionType dataType="uint" bitLength="2">2</connectionType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ <priority dataType="uint" bitLength="2">0</priority>
+ <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ </NetworkConnectionParameters>
+ </otConnectionParameters>
+ <toRpi dataType="uint" bitLength="32">2113537</toRpi>
+ <toConnectionParameters>
+ <NetworkConnectionParameters>
+ <connectionSize dataType="uint" bitLength="16">4002</connectionSize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ <owner dataType="bit" bitLength="1">false</owner>
+ <connectionType dataType="uint" bitLength="2">2</connectionType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ <priority dataType="uint" bitLength="2">0</priority>
+ <connectionSizeType dataType="bit" bitLength="1">true</connectionSizeType>
+ <reserved dataType="bit" bitLength="1">false</reserved>
+ </NetworkConnectionParameters>
+ </toConnectionParameters>
+ <transportType>
+ <TransportType>
+ <direction dataType="bit" bitLength="1">true</direction>
+ <trigger dataType="uint" bitLength="3">2</trigger>
+ <classTransport dataType="uint" bitLength="4">3</classTransport>
+ </TransportType>
+ </transportType>
+ <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
+ <connectionPaths isList="true">
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">0</pathSegment>
+ <PortSegment>
+ <segmentType>
+ <PortSegmentType>
+ <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
+ <PortSegmentNormal>
+ <port dataType="uint" bitLength="4">1</port>
+ <linkAddress dataType="uint" bitLength="8">0</linkAddress>
+ </PortSegmentNormal>
+ </PortSegmentType>
+ </segmentType>
+ </PortSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </connectionPaths>
+ </CipConnectionManagerRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -504,19 +511,25 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">91</service>
- <CipConnectionManagerResponse>
- <reserved dataType="uint" bitLength="24">0</reserved>
- <otConnectionId dataType="uint" bitLength="32">4287709185</otConnectionId>
- <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
- <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <otApi dataType="uint" bitLength="32">2101812</otApi>
- <toApi dataType="uint" bitLength="32">2113537</toApi>
- <replySize dataType="uint" bitLength="8">0</replySize>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">91</service>
<reserved dataType="uint" bitLength="8">0</reserved>
- </CipConnectionManagerResponse>
+ <status dataType="uint" bitLength="8">0</status>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipConnectionManagerResponse>
+ <otConnectionId dataType="uint" bitLength="32">4287709185</otConnectionId>
+ <toConnectionId dataType="uint" bitLength="32">33944</toConnectionId>
+ <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <otApi dataType="uint" bitLength="32">2101812</otApi>
+ <toApi dataType="uint" bitLength="32">2113537</toApi>
+ <replySize dataType="uint" bitLength="8">0</replySize>
+ <reply dataType="byte" bitLength="0">0x</reply>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ </CipConnectionManagerResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
@@ -562,12 +575,14 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadRequest>
- <requestPathSize dataType="uint" bitLength="8">10</requestPathSize>
- <tag dataType="byte" bitLength="160">0x9112486f72697a6f6e74616c506f736974696f6e</tag>
- <elementNb dataType="uint" bitLength="16">1</elementNb>
- </CipReadRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">76</service>
+ <CipReadRequest>
+ <requestPathSize dataType="uint" bitLength="8">10</requestPathSize>
+ <tag dataType="byte" bitLength="160">0x9112486f72697a6f6e74616c506f736974696f6e</tag>
+ <elementNb dataType="uint" bitLength="16">1</elementNb>
+ </CipReadRequest>
+ </CipServiceRequest>
</CipService>
</service>
</ConnectedDataItem>
@@ -613,20 +628,23 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">76</service>
- <CipReadResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">76</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <extStatus dataType="uint" bitLength="8">0</extStatus>
- <data>
- <CIPData>
- <dataType>
- <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="REAL">202</CIPDataTypeCode>
- </dataType>
- <data dataType="byte" bitLength="32">0x00000000</data>
- </CIPData>
- </data>
- </CipReadResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipReadResponse>
+ <data>
+ <CIPData>
+ <dataType>
+ <CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="REAL">202</CIPDataTypeCode>
+ </dataType>
+ <data dataType="byte" bitLength="32">0x00000000</data>
+ </CIPData>
+ </data>
+ </CipReadResponse>
+ </CipServiceResponse>
</CipService>
</service>
</ConnectedDataItem>
@@ -670,94 +688,96 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">false</response>
- <service dataType="uint" bitLength="7">78</service>
- <CipConnectionManagerCloseRequest>
- <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
- <classSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">6</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </classSegment>
- <instanceSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </instanceSegment>
- <priority dataType="uint" bitLength="4">0</priority>
- <tickTime dataType="uint" bitLength="4">10</tickTime>
- <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
- <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
- <reserved dataType="byte" bitLength="8">0x00</reserved>
- <connectionPaths isList="true">
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">0</pathSegment>
- <PortSegment>
- <segmentType>
- <PortSegmentType>
- <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
- <PortSegmentNormal>
- <port dataType="uint" bitLength="4">1</port>
- <linkAddress dataType="uint" bitLength="8">0</linkAddress>
- </PortSegmentNormal>
- </PortSegmentType>
- </segmentType>
- </PortSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
- <ClassID>
- <format dataType="uint" bitLength="2">0</format>
- <segmentClass dataType="uint" bitLength="8">2</segmentClass>
- </ClassID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- <PathSegment>
- <pathSegment dataType="uint" bitLength="3">1</pathSegment>
- <LogicalSegment>
- <segmentType>
- <LogicalSegmentType>
- <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
- <InstanceID>
- <format dataType="uint" bitLength="2">0</format>
- <instance dataType="uint" bitLength="8">1</instance>
- </InstanceID>
- </LogicalSegmentType>
- </segmentType>
- </LogicalSegment>
- </PathSegment>
- </connectionPaths>
- </CipConnectionManagerCloseRequest>
+ <CipServiceRequest>
+ <service dataType="uint" bitLength="7">78</service>
+ <CipConnectionManagerCloseRequest>
+ <requestPathSize dataType="uint" bitLength="8">2</requestPathSize>
+ <classSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">6</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </classSegment>
+ <instanceSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </instanceSegment>
+ <priority dataType="uint" bitLength="4">0</priority>
+ <tickTime dataType="uint" bitLength="4">10</tickTime>
+ <timeoutTicks dataType="uint" bitLength="8">14</timeoutTicks>
+ <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <connectionPathSize dataType="uint" bitLength="8">3</connectionPathSize>
+ <reserved dataType="byte" bitLength="8">0x00</reserved>
+ <connectionPaths isList="true">
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">0</pathSegment>
+ <PortSegment>
+ <segmentType>
+ <PortSegmentType>
+ <extendedLinkAddress dataType="bit" bitLength="1">false</extendedLinkAddress>
+ <PortSegmentNormal>
+ <port dataType="uint" bitLength="4">1</port>
+ <linkAddress dataType="uint" bitLength="8">0</linkAddress>
+ </PortSegmentNormal>
+ </PortSegmentType>
+ </segmentType>
+ </PortSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">0</logicalSegmentType>
+ <ClassID>
+ <format dataType="uint" bitLength="2">0</format>
+ <segmentClass dataType="uint" bitLength="8">2</segmentClass>
+ </ClassID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ <PathSegment>
+ <pathSegment dataType="uint" bitLength="3">1</pathSegment>
+ <LogicalSegment>
+ <segmentType>
+ <LogicalSegmentType>
+ <logicalSegmentType dataType="uint" bitLength="3">1</logicalSegmentType>
+ <InstanceID>
+ <format dataType="uint" bitLength="2">0</format>
+ <instance dataType="uint" bitLength="8">1</instance>
+ </InstanceID>
+ </LogicalSegmentType>
+ </segmentType>
+ </LogicalSegment>
+ </PathSegment>
+ </connectionPaths>
+ </CipConnectionManagerCloseRequest>
+ </CipServiceRequest>
</CipService>
</service>
</UnConnectedDataItem>
@@ -801,17 +821,20 @@
<service>
<CipService>
<response dataType="bit" bitLength="1">true</response>
- <service dataType="uint" bitLength="7">78</service>
- <CipConnectionManagerCloseResponse>
+ <CipServiceResponse>
+ <service dataType="uint" bitLength="7">78</service>
<reserved dataType="uint" bitLength="8">0</reserved>
<status dataType="uint" bitLength="8">0</status>
- <additionalStatusWords dataType="uint" bitLength="8">0</additionalStatusWords>
- <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
- <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
- <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
- <applicationReplySize dataType="uint" bitLength="8">0</applicationReplySize>
- <reserved dataType="uint" bitLength="8">0</reserved>
- </CipConnectionManagerCloseResponse>
+ <extStatusSize dataType="uint" bitLength="8">0</extStatusSize>
+ <extStatus isList="true"/>
+ <CipConnectionManagerCloseResponse>
+ <connectionSerialNumber dataType="uint" bitLength="16">3907</connectionSerialNumber>
+ <originatorVendorId dataType="uint" bitLength="16">4919</originatorVendorId>
+ <originatorSerialNumber dataType="uint" bitLength="32">42</originatorSerialNumber>
+ <applicationReplySize dataType="uint" bitLength="8">0</applicationReplySize>
+ <reserved dataType="uint" bitLength="8">0</reserved>
+ </CipConnectionManagerCloseResponse>
+ </CipServiceResponse>
</CipService>
</service>
</UnConnectedDataItem>
diff --git a/plc4go/internal/modbus/mocks_test.go b/plc4go/internal/modbus/mocks_test.go
new file mode 100644
index 0000000000..edb518e388
--- /dev/null
+++ b/plc4go/internal/modbus/mocks_test.go
@@ -0,0 +1,314 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
+
+package modbus
+
+import (
+ "github.com/apache/plc4x/plc4go/protocols/modbus/readwrite/model"
+ "github.com/apache/plc4x/plc4go/spi"
+ mock "github.com/stretchr/testify/mock"
+)
+
+// newMockaduFactory creates a new instance of mockaduFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func newMockaduFactory(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *mockaduFactory {
+ mock := &mockaduFactory{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
+// mockaduFactory is an autogenerated mock type for the aduFactory type
+type mockaduFactory struct {
+ mock.Mock
+}
+
+type mockaduFactory_Expecter struct {
+ mock *mock.Mock
+}
+
+func (_m *mockaduFactory) EXPECT() *mockaduFactory_Expecter {
+ return &mockaduFactory_Expecter{mock: &_m.Mock}
+}
+
+// acceptsResponse provides a mock function for the type mockaduFactory
+func (_mock *mockaduFactory) acceptsResponse(request spi.Message, response spi.Message) bool {
+ ret := _mock.Called(request, response)
+
+ if len(ret) == 0 {
+ panic("no return value specified for acceptsResponse")
+ }
+
+ var r0 bool
+ if returnFunc, ok := ret.Get(0).(func(spi.Message, spi.Message) bool); ok {
+ r0 = returnFunc(request, response)
+ } else {
+ r0 = ret.Get(0).(bool)
+ }
+ return r0
+}
+
+// mockaduFactory_acceptsResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'acceptsResponse'
+type mockaduFactory_acceptsResponse_Call struct {
+ *mock.Call
+}
+
+// acceptsResponse is a helper method to define mock.On call
+// - request spi.Message
+// - response spi.Message
+func (_e *mockaduFactory_Expecter) acceptsResponse(request interface{}, response interface{}) *mockaduFactory_acceptsResponse_Call {
+ return &mockaduFactory_acceptsResponse_Call{Call: _e.mock.On("acceptsResponse", request, response)}
+}
+
+func (_c *mockaduFactory_acceptsResponse_Call) Run(run func(request spi.Message, response spi.Message)) *mockaduFactory_acceptsResponse_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ var arg0 spi.Message
+ if args[0] != nil {
+ arg0 = args[0].(spi.Message)
+ }
+ var arg1 spi.Message
+ if args[1] != nil {
+ arg1 = args[1].(spi.Message)
+ }
+ run(
+ arg0,
+ arg1,
+ )
+ })
+ return _c
+}
+
+func (_c *mockaduFactory_acceptsResponse_Call) Return(b bool) *mockaduFactory_acceptsResponse_Call {
+ _c.Call.Return(b)
+ return _c
+}
+
+func (_c *mockaduFactory_acceptsResponse_Call) RunAndReturn(run func(request spi.Message, response spi.Message) bool) *mockaduFactory_acceptsResponse_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
+// buildRequest provides a mock function for the type mockaduFactory
+func (_mock *mockaduFactory) buildRequest(transactionIdentifier uint16, unitIdentifier uint8, pdu model.ModbusPDU) spi.Message {
+ ret := _mock.Called(transactionIdentifier, unitIdentifier, pdu)
+
+ if len(ret) == 0 {
+ panic("no return value specified for buildRequest")
+ }
+
+ var r0 spi.Message
+ if returnFunc, ok := ret.Get(0).(func(uint16, uint8, model.ModbusPDU) spi.Message); ok {
+ r0 = returnFunc(transactionIdentifier, unitIdentifier, pdu)
+ } else {
+ if ret.Get(0) != nil {
+ r0 = ret.Get(0).(spi.Message)
+ }
+ }
+ return r0
+}
+
+// mockaduFactory_buildRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'buildRequest'
+type mockaduFactory_buildRequest_Call struct {
+ *mock.Call
+}
+
+// buildRequest is a helper method to define mock.On call
+// - transactionIdentifier uint16
+// - unitIdentifier uint8
+// - pdu model.ModbusPDU
+func (_e *mockaduFactory_Expecter) buildRequest(transactionIdentifier interface{}, unitIdentifier interface{}, pdu interface{}) *mockaduFactory_buildRequest_Call {
+ return &mockaduFactory_buildRequest_Call{Call: _e.mock.On("buildRequest", transactionIdentifier, unitIdentifier, pdu)}
+}
+
+func (_c *mockaduFactory_buildRequest_Call) Run(run func(transactionIdentifier uint16, unitIdentifier uint8, pdu model.ModbusPDU)) *mockaduFactory_buildRequest_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ var arg0 uint16
+ if args[0] != nil {
+ arg0 = args[0].(uint16)
+ }
+ var arg1 uint8
+ if args[1] != nil {
+ arg1 = args[1].(uint8)
+ }
+ var arg2 model.ModbusPDU
+ if args[2] != nil {
+ arg2 = args[2].(model.ModbusPDU)
+ }
+ run(
+ arg0,
+ arg1,
+ arg2,
+ )
+ })
+ return _c
+}
+
+func (_c *mockaduFactory_buildRequest_Call) Return(message spi.Message) *mockaduFactory_buildRequest_Call {
+ _c.Call.Return(message)
+ return _c
+}
+
+func (_c *mockaduFactory_buildRequest_Call) RunAndReturn(run func(transactionIdentifier uint16, unitIdentifier uint8, pdu model.ModbusPDU) spi.Message) *mockaduFactory_buildRequest_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
+// extractPdu provides a mock function for the type mockaduFactory
+func (_mock *mockaduFactory) extractPdu(message spi.Message) (model.ModbusPDU, error) {
+ ret := _mock.Called(message)
+
+ if len(ret) == 0 {
+ panic("no return value specified for extractPdu")
+ }
+
+ var r0 model.ModbusPDU
+ var r1 error
+ if returnFunc, ok := ret.Get(0).(func(spi.Message) (model.ModbusPDU, error)); ok {
+ return returnFunc(message)
+ }
+ if returnFunc, ok := ret.Get(0).(func(spi.Message) model.ModbusPDU); ok {
+ r0 = returnFunc(message)
+ } else {
+ if ret.Get(0) != nil {
+ r0 = ret.Get(0).(model.ModbusPDU)
+ }
+ }
+ if returnFunc, ok := ret.Get(1).(func(spi.Message) error); ok {
+ r1 = returnFunc(message)
+ } else {
+ r1 = ret.Error(1)
+ }
+ return r0, r1
+}
+
+// mockaduFactory_extractPdu_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'extractPdu'
+type mockaduFactory_extractPdu_Call struct {
+ *mock.Call
+}
+
+// extractPdu is a helper method to define mock.On call
+// - message spi.Message
+func (_e *mockaduFactory_Expecter) extractPdu(message interface{}) *mockaduFactory_extractPdu_Call {
+ return &mockaduFactory_extractPdu_Call{Call: _e.mock.On("extractPdu", message)}
+}
+
+func (_c *mockaduFactory_extractPdu_Call) Run(run func(message spi.Message)) *mockaduFactory_extractPdu_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ var arg0 spi.Message
+ if args[0] != nil {
+ arg0 = args[0].(spi.Message)
+ }
+ run(
+ arg0,
+ )
+ })
+ return _c
+}
+
+func (_c *mockaduFactory_extractPdu_Call) Return(modbusPDU model.ModbusPDU, err error) *mockaduFactory_extractPdu_Call {
+ _c.Call.Return(modbusPDU, err)
+ return _c
+}
+
+func (_c *mockaduFactory_extractPdu_Call) RunAndReturn(run func(message spi.Message) (model.ModbusPDU, error)) *mockaduFactory_extractPdu_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
+// newMockaduWithPdu creates a new instance of mockaduWithPdu. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func newMockaduWithPdu(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *mockaduWithPdu {
+ mock := &mockaduWithPdu{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
+// mockaduWithPdu is an autogenerated mock type for the aduWithPdu type
+type mockaduWithPdu struct {
+ mock.Mock
+}
+
+type mockaduWithPdu_Expecter struct {
+ mock *mock.Mock
+}
+
+func (_m *mockaduWithPdu) EXPECT() *mockaduWithPdu_Expecter {
+ return &mockaduWithPdu_Expecter{mock: &_m.Mock}
+}
+
+// GetPdu provides a mock function for the type mockaduWithPdu
+func (_mock *mockaduWithPdu) GetPdu() model.ModbusPDU {
+ ret := _mock.Called()
+
+ if len(ret) == 0 {
+ panic("no return value specified for GetPdu")
+ }
+
+ var r0 model.ModbusPDU
+ if returnFunc, ok := ret.Get(0).(func() model.ModbusPDU); ok {
+ r0 = returnFunc()
+ } else {
+ if ret.Get(0) != nil {
+ r0 = ret.Get(0).(model.ModbusPDU)
+ }
+ }
+ return r0
+}
+
+// mockaduWithPdu_GetPdu_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPdu'
+type mockaduWithPdu_GetPdu_Call struct {
+ *mock.Call
+}
+
+// GetPdu is a helper method to define mock.On call
+func (_e *mockaduWithPdu_Expecter) GetPdu() *mockaduWithPdu_GetPdu_Call {
+ return &mockaduWithPdu_GetPdu_Call{Call: _e.mock.On("GetPdu")}
+}
+
+func (_c *mockaduWithPdu_GetPdu_Call) Run(run func()) *mockaduWithPdu_GetPdu_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run()
+ })
+ return _c
+}
+
+func (_c *mockaduWithPdu_GetPdu_Call) Return(modbusPDU model.ModbusPDU) *mockaduWithPdu_GetPdu_Call {
+ _c.Call.Return(modbusPDU)
+ return _c
+}
+
+func (_c *mockaduWithPdu_GetPdu_Call) RunAndReturn(run func() model.ModbusPDU) *mockaduWithPdu_GetPdu_Call {
+ _c.Call.Return(run)
+ return _c
+}
diff --git a/plc4go/protocols/eip/readwrite/model/AttributeID.go b/plc4go/protocols/eip/readwrite/model/AttributeID.go
new file mode 100644
index 0000000000..981acb65f4
--- /dev/null
+++ b/plc4go/protocols/eip/readwrite/model/AttributeID.go
@@ -0,0 +1,341 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "context"
+ stdErrors "errors"
+ "fmt"
+
+ "github.com/rs/zerolog"
+
+ . "github.com/apache/plc4x/plc4go/spi/codegen/fields"
+ . "github.com/apache/plc4x/plc4go/spi/codegen/io"
+ "github.com/apache/plc4x/plc4go/spi/errors"
+ "github.com/apache/plc4x/plc4go/spi/utils"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AttributeID is the corresponding interface of AttributeID
+type AttributeID interface {
+ fmt.Stringer
+ utils.LengthAware
+ utils.Serializable
+ utils.Copyable
+ LogicalSegmentType
+ // GetFormat returns Format (property field)
+ GetFormat() uint8
+ // GetAttribute returns Attribute (property field)
+ GetAttribute() uint8
+ // IsAttributeID is a marker method to prevent unintentional type checks (interfaces of same signature)
+ IsAttributeID()
+ // CreateBuilder creates a AttributeIDBuilder
+ CreateAttributeIDBuilder() AttributeIDBuilder
+}
+
+// _AttributeID is the data-structure of this message
+type _AttributeID struct {
+ LogicalSegmentTypeContract
+ Format uint8
+ Attribute uint8
+}
+
+var _ AttributeID = (*_AttributeID)(nil)
+var _ LogicalSegmentTypeRequirements = (*_AttributeID)(nil)
+
+// NewAttributeID factory function for _AttributeID
+func NewAttributeID(format uint8, attribute uint8) *_AttributeID {
+ _result := &_AttributeID{
+ LogicalSegmentTypeContract: NewLogicalSegmentType(),
+ Format: format,
+ Attribute: attribute,
+ }
+ _result.LogicalSegmentTypeContract.(*_LogicalSegmentType)._SubType = _result
+ return _result
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Builder
+///////////////////////
+
+// AttributeIDBuilder is a builder for AttributeID
+type AttributeIDBuilder interface {
+ utils.Copyable
+ // WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
+ WithMandatoryFields(format uint8, attribute uint8) AttributeIDBuilder
+ // WithFormat adds Format (property field)
+ WithFormat(uint8) AttributeIDBuilder
+ // WithAttribute adds Attribute (property field)
+ WithAttribute(uint8) AttributeIDBuilder
+ // Done is used to finish work on this child and return (or create one if none) to the parent builder
+ Done() LogicalSegmentTypeBuilder
+ // Build builds the AttributeID or returns an error if something is wrong
+ Build() (AttributeID, error)
+ // MustBuild does the same as Build but panics on error
+ MustBuild() AttributeID
+}
+
+// NewAttributeIDBuilder() creates a AttributeIDBuilder
+func NewAttributeIDBuilder() AttributeIDBuilder {
+ return &_AttributeIDBuilder{_AttributeID: new(_AttributeID)}
+}
+
+type _AttributeIDBuilder struct {
+ *_AttributeID
+
+ parentBuilder *_LogicalSegmentTypeBuilder
+
+ collectedErr []error
+}
+
+var _ (AttributeIDBuilder) = (*_AttributeIDBuilder)(nil)
+
+func (b *_AttributeIDBuilder) setParent(contract LogicalSegmentTypeContract) {
+ b.LogicalSegmentTypeContract = contract
+ contract.(*_LogicalSegmentType)._SubType = b._AttributeID
+}
+
+func (b *_AttributeIDBuilder) WithMandatoryFields(format uint8, attribute uint8) AttributeIDBuilder {
+ return b.WithFormat(format).WithAttribute(attribute)
+}
+
+func (b *_AttributeIDBuilder) WithFormat(format uint8) AttributeIDBuilder {
+ b.Format = format
+ return b
+}
+
+func (b *_AttributeIDBuilder) WithAttribute(attribute uint8) AttributeIDBuilder {
+ b.Attribute = attribute
+ return b
+}
+
+func (b *_AttributeIDBuilder) Build() (AttributeID, error) {
+ if err := stdErrors.Join(b.collectedErr...); err != nil {
+ return nil, errors.Wrap(err, "error occurred during build")
+ }
+ return b._AttributeID.deepCopy(), nil
+}
+
+func (b *_AttributeIDBuilder) MustBuild() AttributeID {
+ build, err := b.Build()
+ if err != nil {
+ panic(err)
+ }
+ return build
+}
+
+func (b *_AttributeIDBuilder) Done() LogicalSegmentTypeBuilder {
+ if b.parentBuilder == nil {
+ b.parentBuilder = NewLogicalSegmentTypeBuilder().(*_LogicalSegmentTypeBuilder)
+ }
+ return b.parentBuilder
+}
+
+func (b *_AttributeIDBuilder) buildForLogicalSegmentType() (LogicalSegmentType, error) {
+ return b.Build()
+}
+
+func (b *_AttributeIDBuilder) DeepCopy() any {
+ _copy := b.CreateAttributeIDBuilder().(*_AttributeIDBuilder)
+ if b.collectedErr != nil {
+ copy(_copy.collectedErr, b.collectedErr)
+ }
+ return _copy
+}
+
+// CreateAttributeIDBuilder creates a AttributeIDBuilder
+func (b *_AttributeID) CreateAttributeIDBuilder() AttributeIDBuilder {
+ if b == nil {
+ return NewAttributeIDBuilder()
+ }
+ return &_AttributeIDBuilder{_AttributeID: b.deepCopy()}
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *_AttributeID) GetLogicalSegmentType() uint8 {
+ return 0x04
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AttributeID) GetParent() LogicalSegmentTypeContract {
+ return m.LogicalSegmentTypeContract
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AttributeID) GetFormat() uint8 {
+ return m.Format
+}
+
+func (m *_AttributeID) GetAttribute() uint8 {
+ return m.Attribute
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// Deprecated: use the interface for direct cast
+func CastAttributeID(structType any) AttributeID {
+ if casted, ok := structType.(AttributeID); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AttributeID); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AttributeID) GetPlx4xTypeName() string {
+ return "AttributeID"
+}
+
+func (m *_AttributeID) GetLengthInBits(ctx context.Context) uint64 {
+ lengthInBits := uint64(m.LogicalSegmentTypeContract.(*_LogicalSegmentType).getLengthInBits(ctx))
+
+ // Simple field (format)
+ lengthInBits += 2
+
+ // Simple field (attribute)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AttributeID) GetLengthInBytes(ctx context.Context) uint64 {
+ return m.GetLengthInBits(ctx) / 8
+}
+
+func (m *_AttributeID) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_LogicalSegmentType) (__attributeID AttributeID, err error) {
+ m.LogicalSegmentTypeContract = parent
+ parent._SubType = m
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AttributeID"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AttributeID")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ format, err := ReadSimpleField(ctx, "format", ReadUnsignedByte(readBuffer, uint8(2)))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'format' field"))
+ }
+ m.Format = format
+
+ attribute, err := ReadSimpleField(ctx, "attribute", ReadUnsignedByte(readBuffer, uint8(8)))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'attribute' field"))
+ }
+ m.Attribute = attribute
+
+ if closeErr := readBuffer.CloseContext("AttributeID"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AttributeID")
+ }
+
+ return m, nil
+}
+
+func (m *_AttributeID) Serialize() ([]byte, error) {
+ wb := utils.NewWriteBufferByteBased(utils.WithInitialSizeForByteBasedBuffer(int(m.GetLengthInBytes(context.Background()))))
+ if err := m.SerializeWithWriteBuffer(context.Background(), wb); err != nil {
+ return nil, err
+ }
+ return wb.GetBytes(), nil
+}
+
+func (m *_AttributeID) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ log := zerolog.Ctx(ctx)
+ _ = log
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AttributeID"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AttributeID")
+ }
+
+ if err := WriteSimpleField[uint8](ctx, "format", m.GetFormat(), WriteUnsignedByte(writeBuffer, 2)); err != nil {
+ return errors.Wrap(err, "Error serializing 'format' field")
+ }
+
+ if err := WriteSimpleField[uint8](ctx, "attribute", m.GetAttribute(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
+ return errors.Wrap(err, "Error serializing 'attribute' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AttributeID"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AttributeID")
+ }
+ return nil
+ }
+ return m.LogicalSegmentTypeContract.(*_LogicalSegmentType).serializeParent(ctx, writeBuffer, m, ser)
+}
+
+func (m *_AttributeID) IsAttributeID() {}
+
+func (m *_AttributeID) DeepCopy() any {
+ return m.deepCopy()
+}
+
+func (m *_AttributeID) deepCopy() *_AttributeID {
+ if m == nil {
+ return nil
+ }
+ _AttributeIDCopy := &_AttributeID{
+ m.LogicalSegmentTypeContract.(*_LogicalSegmentType).deepCopy(),
+ m.Format,
+ m.Attribute,
+ }
+ _AttributeIDCopy.LogicalSegmentTypeContract.(*_LogicalSegmentType)._SubType = m
+ return _AttributeIDCopy
+}
+
+func (m *_AttributeID) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ wb := utils.NewWriteBufferBoxBased(
+ utils.WithWriteBufferBoxBasedMergeSingleBoxes(),
+ utils.WithWriteBufferBoxBasedOmitEmptyBoxes(),
+ utils.WithWriteBufferBoxBasedPrintPosLengthFooter(),
+ )
+ if err := wb.WriteSerializable(context.Background(), m); err != nil {
+ return err.Error()
+ }
+ return wb.GetBox().String()
+}
diff --git a/plc4go/protocols/eip/readwrite/model/CipConnectedRequest.go b/plc4go/protocols/eip/readwrite/model/CipConnectedRequest.go
index 5112cd4087..4940939a6d 100644
--- a/plc4go/protocols/eip/readwrite/model/CipConnectedRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/CipConnectedRequest.go
@@ -40,7 +40,7 @@ type CipConnectedRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// GetPathSegments returns PathSegments (property field)
GetPathSegments() []byte
// IsCipConnectedRequest is a marker method to prevent unintentional type checks (interfaces of same signature)
@@ -51,7 +51,7 @@ type CipConnectedRequest interface {
// _CipConnectedRequest is the data-structure of this message
type _CipConnectedRequest struct {
- CipServiceContract
+ CipServiceRequestContract
PathSegments []byte
// Reserved Fields
reservedField0 *uint16
@@ -59,15 +59,15 @@ type _CipConnectedRequest struct {
}
var _ CipConnectedRequest = (*_CipConnectedRequest)(nil)
-var _ CipServiceRequirements = (*_CipConnectedRequest)(nil)
+var _ CipServiceRequestRequirements = (*_CipConnectedRequest)(nil)
// NewCipConnectedRequest factory function for _CipConnectedRequest
func NewCipConnectedRequest(pathSegments []byte) *_CipConnectedRequest {
_result := &_CipConnectedRequest{
- CipServiceContract: NewCipService(),
- PathSegments: pathSegments,
+ CipServiceRequestContract: NewCipServiceRequest(),
+ PathSegments: pathSegments,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -84,7 +84,7 @@ type CipConnectedRequestBuilder interface {
// WithPathSegments adds PathSegments (property field)
WithPathSegments(...byte) CipConnectedRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the CipConnectedRequest or returns an error if something is wrong
Build() (CipConnectedRequest, error)
// MustBuild does the same as Build but panics on error
@@ -99,16 +99,16 @@ func NewCipConnectedRequestBuilder() CipConnectedRequestBuilder {
type _CipConnectedRequestBuilder struct {
*_CipConnectedRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (CipConnectedRequestBuilder) = (*_CipConnectedRequestBuilder)(nil)
-func (b *_CipConnectedRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipConnectedRequest
+func (b *_CipConnectedRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._CipConnectedRequest
}
func (b *_CipConnectedRequestBuilder) WithMandatoryFields(pathSegments []byte) CipConnectedRequestBuilder {
@@ -135,14 +135,14 @@ func (b *_CipConnectedRequestBuilder) MustBuild() CipConnectedRequest {
return build
}
-func (b *_CipConnectedRequestBuilder) Done() CipServiceBuilder {
+func (b *_CipConnectedRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_CipConnectedRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_CipConnectedRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -176,10 +176,6 @@ func (m *_CipConnectedRequest) GetService() uint8 {
return 0x52
}
-func (m *_CipConnectedRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_CipConnectedRequest) GetConnected() bool {
return bool(true)
}
@@ -189,8 +185,8 @@ func (m *_CipConnectedRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipConnectedRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipConnectedRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
///////////////////////////////////////////////////////////
@@ -223,7 +219,7 @@ func (m *_CipConnectedRequest) GetPlx4xTypeName() string {
}
func (m *_CipConnectedRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
// Implicit Field (requestPathSize)
lengthInBits += 8
@@ -246,8 +242,8 @@ func (m *_CipConnectedRequest) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipConnectedRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipConnectedRequest CipConnectedRequest, err error) {
- m.CipServiceContract = parent
+func (m *_CipConnectedRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__cipConnectedRequest CipConnectedRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -327,7 +323,7 @@ func (m *_CipConnectedRequest) SerializeWithWriteBuffer(ctx context.Context, wri
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipConnectedRequest) IsCipConnectedRequest() {}
@@ -341,12 +337,12 @@ func (m *_CipConnectedRequest) deepCopy() *_CipConnectedRequest {
return nil
}
_CipConnectedRequestCopy := &_CipConnectedRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
utils.DeepCopySlice[byte, byte](m.PathSegments),
m.reservedField0,
m.reservedField1,
}
- _CipConnectedRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipConnectedRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _CipConnectedRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipConnectedResponse.go b/plc4go/protocols/eip/readwrite/model/CipConnectedResponse.go
index e71a1624f2..8e35c2e3ef 100644
--- a/plc4go/protocols/eip/readwrite/model/CipConnectedResponse.go
+++ b/plc4go/protocols/eip/readwrite/model/CipConnectedResponse.go
@@ -40,11 +40,7 @@ type CipConnectedResponse interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
- // GetStatus returns Status (property field)
- GetStatus() uint8
- // GetAdditionalStatusWords returns AdditionalStatusWords (property field)
- GetAdditionalStatusWords() uint8
+ CipServiceResponse
// GetData returns Data (property field)
GetData() CIPDataConnected
// IsCipConnectedResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
@@ -55,26 +51,20 @@ type CipConnectedResponse interface {
// _CipConnectedResponse is the data-structure of this message
type _CipConnectedResponse struct {
- CipServiceContract
- Status uint8
- AdditionalStatusWords uint8
- Data CIPDataConnected
- // Reserved Fields
- reservedField0 *uint8
+ CipServiceResponseContract
+ Data CIPDataConnected
}
var _ CipConnectedResponse = (*_CipConnectedResponse)(nil)
-var _ CipServiceRequirements = (*_CipConnectedResponse)(nil)
+var _ CipServiceResponseRequirements = (*_CipConnectedResponse)(nil)
// NewCipConnectedResponse factory function for _CipConnectedResponse
-func NewCipConnectedResponse(status uint8, additionalStatusWords uint8, data CIPDataConnected) *_CipConnectedResponse {
+func NewCipConnectedResponse(status uint8, extStatus []uint16, data CIPDataConnected) *_CipConnectedResponse {
_result := &_CipConnectedResponse{
- CipServiceContract: NewCipService(),
- Status: status,
- AdditionalStatusWords: additionalStatusWords,
- Data: data,
+ CipServiceResponseContract: NewCipServiceResponse(status, extStatus),
+ Data: data,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceResponseContract.(*_CipServiceResponse)._SubType = _result
return _result
}
@@ -87,17 +77,13 @@ func NewCipConnectedResponse(status uint8, additionalStatusWords uint8, data CIP
type CipConnectedResponseBuilder interface {
utils.Copyable
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
- WithMandatoryFields(status uint8, additionalStatusWords uint8) CipConnectedResponseBuilder
- // WithStatus adds Status (property field)
- WithStatus(uint8) CipConnectedResponseBuilder
- // WithAdditionalStatusWords adds AdditionalStatusWords (property field)
- WithAdditionalStatusWords(uint8) CipConnectedResponseBuilder
+ WithMandatoryFields() CipConnectedResponseBuilder
// WithData adds Data (property field)
WithOptionalData(CIPDataConnected) CipConnectedResponseBuilder
// WithOptionalDataBuilder adds Data (property field) which is build by the builder
WithOptionalDataBuilder(func(CIPDataConnectedBuilder) CIPDataConnectedBuilder) CipConnectedResponseBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceResponseBuilder
// Build builds the CipConnectedResponse or returns an error if something is wrong
Build() (CipConnectedResponse, error)
// MustBuild does the same as Build but panics on error
@@ -112,29 +98,19 @@ func NewCipConnectedResponseBuilder() CipConnectedResponseBuilder {
type _CipConnectedResponseBuilder struct {
*_CipConnectedResponse
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceResponseBuilder
collectedErr []error
}
var _ (CipConnectedResponseBuilder) = (*_CipConnectedResponseBuilder)(nil)
-func (b *_CipConnectedResponseBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipConnectedResponse
+func (b *_CipConnectedResponseBuilder) setParent(contract CipServiceResponseContract) {
+ b.CipServiceResponseContract = contract
+ contract.(*_CipServiceResponse)._SubType = b._CipConnectedResponse
}
-func (b *_CipConnectedResponseBuilder) WithMandatoryFields(status uint8, additionalStatusWords uint8) CipConnectedResponseBuilder {
- return b.WithStatus(status).WithAdditionalStatusWords(additionalStatusWords)
-}
-
-func (b *_CipConnectedResponseBuilder) WithStatus(status uint8) CipConnectedResponseBuilder {
- b.Status = status
- return b
-}
-
-func (b *_CipConnectedResponseBuilder) WithAdditionalStatusWords(additionalStatusWords uint8) CipConnectedResponseBuilder {
- b.AdditionalStatusWords = additionalStatusWords
+func (b *_CipConnectedResponseBuilder) WithMandatoryFields() CipConnectedResponseBuilder {
return b
}
@@ -168,14 +144,14 @@ func (b *_CipConnectedResponseBuilder) MustBuild() CipConnectedResponse {
return build
}
-func (b *_CipConnectedResponseBuilder) Done() CipServiceBuilder {
+func (b *_CipConnectedResponseBuilder) Done() CipServiceResponseBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
}
return b.parentBuilder
}
-func (b *_CipConnectedResponseBuilder) buildForCipService() (CipService, error) {
+func (b *_CipConnectedResponseBuilder) buildForCipServiceResponse() (CipServiceResponse, error) {
return b.Build()
}
@@ -209,21 +185,13 @@ func (m *_CipConnectedResponse) GetService() uint8 {
return 0x52
}
-func (m *_CipConnectedResponse) GetResponse() bool {
- return bool(true)
-}
-
-func (m *_CipConnectedResponse) GetConnected() bool {
- return false
-}
-
///////////////////////
///////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipConnectedResponse) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipConnectedResponse) GetParent() CipServiceResponseContract {
+ return m.CipServiceResponseContract
}
///////////////////////////////////////////////////////////
@@ -231,14 +199,6 @@ func (m *_CipConnectedResponse) GetParent() CipServiceContract {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_CipConnectedResponse) GetStatus() uint8 {
- return m.Status
-}
-
-func (m *_CipConnectedResponse) GetAdditionalStatusWords() uint8 {
- return m.AdditionalStatusWords
-}
-
func (m *_CipConnectedResponse) GetData() CIPDataConnected {
return m.Data
}
@@ -264,16 +224,7 @@ func (m *_CipConnectedResponse) GetPlx4xTypeName() string {
}
func (m *_CipConnectedResponse) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
-
- // Reserved Field (reserved)
- lengthInBits += 8
-
- // Simple field (status)
- lengthInBits += 8
-
- // Simple field (additionalStatusWords)
- lengthInBits += 8
+ lengthInBits := uint64(m.CipServiceResponseContract.(*_CipServiceResponse).getLengthInBits(ctx))
// Optional Field (data)
if m.Data != nil {
@@ -287,8 +238,8 @@ func (m *_CipConnectedResponse) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipConnectedResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipConnectedResponse CipConnectedResponse, err error) {
- m.CipServiceContract = parent
+func (m *_CipConnectedResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceResponse, extStatusSize uint8, connected bool, serviceLen uint16) (__cipConnectedResponse CipConnectedResponse, err error) {
+ m.CipServiceResponseContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -298,26 +249,8 @@ func (m *_CipConnectedResponse) parse(ctx context.Context, readBuffer utils.Read
currentPos := positionAware.GetPos()
_ = currentPos
- reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
- }
- m.reservedField0 = reservedField0
-
- status, err := ReadSimpleField(ctx, "status", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'status' field"))
- }
- m.Status = status
-
- additionalStatusWords, err := ReadSimpleField(ctx, "additionalStatusWords", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'additionalStatusWords' field"))
- }
- m.AdditionalStatusWords = additionalStatusWords
-
var data CIPDataConnected
- _data, err := ReadOptionalField[CIPDataConnected](ctx, "data", ReadComplex[CIPDataConnected](CIPDataConnectedParseWithBuffer, readBuffer), bool(((serviceLen)-(4)) > (0)))
+ _data, err := ReadOptionalField[CIPDataConnected](ctx, "data", ReadComplex[CIPDataConnected](CIPDataConnectedParseWithBuffer, readBuffer), bool((((serviceLen)-(4))-((2)*(extStatusSize))) > (0)))
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'data' field"))
}
@@ -351,18 +284,6 @@ func (m *_CipConnectedResponse) SerializeWithWriteBuffer(ctx context.Context, wr
return errors.Wrap(pushErr, "Error pushing for CipConnectedResponse")
}
- if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 1")
- }
-
- if err := WriteSimpleField[uint8](ctx, "status", m.GetStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'status' field")
- }
-
- if err := WriteSimpleField[uint8](ctx, "additionalStatusWords", m.GetAdditionalStatusWords(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'additionalStatusWords' field")
- }
-
if err := WriteOptionalField[CIPDataConnected](ctx, "data", new(m.GetData()), WriteComplex[CIPDataConnected](writeBuffer), true); err != nil {
return errors.Wrap(err, "Error serializing 'data' field")
}
@@ -372,7 +293,7 @@ func (m *_CipConnectedResponse) SerializeWithWriteBuffer(ctx context.Context, wr
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceResponseContract.(*_CipServiceResponse).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipConnectedResponse) IsCipConnectedResponse() {}
@@ -386,13 +307,10 @@ func (m *_CipConnectedResponse) deepCopy() *_CipConnectedResponse {
return nil
}
_CipConnectedResponseCopy := &_CipConnectedResponse{
- m.CipServiceContract.(*_CipService).deepCopy(),
- m.Status,
- m.AdditionalStatusWords,
+ m.CipServiceResponseContract.(*_CipServiceResponse).deepCopy(),
utils.DeepCopy[CIPDataConnected](m.Data),
- m.reservedField0,
}
- _CipConnectedResponseCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipConnectedResponseCopy.CipServiceResponseContract.(*_CipServiceResponse)._SubType = m
return _CipConnectedResponseCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseRequest.go b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseRequest.go
index 402a4b2550..23ae944cf2 100644
--- a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseRequest.go
@@ -40,7 +40,7 @@ type CipConnectionManagerCloseRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// GetRequestPathSize returns RequestPathSize (property field)
GetRequestPathSize() uint8
// GetClassSegment returns ClassSegment (property field)
@@ -71,7 +71,7 @@ type CipConnectionManagerCloseRequest interface {
// _CipConnectionManagerCloseRequest is the data-structure of this message
type _CipConnectionManagerCloseRequest struct {
- CipServiceContract
+ CipServiceRequestContract
RequestPathSize uint8
ClassSegment PathSegment
InstanceSegment PathSegment
@@ -88,7 +88,7 @@ type _CipConnectionManagerCloseRequest struct {
}
var _ CipConnectionManagerCloseRequest = (*_CipConnectionManagerCloseRequest)(nil)
-var _ CipServiceRequirements = (*_CipConnectionManagerCloseRequest)(nil)
+var _ CipServiceRequestRequirements = (*_CipConnectionManagerCloseRequest)(nil)
// NewCipConnectionManagerCloseRequest factory function for _CipConnectionManagerCloseRequest
func NewCipConnectionManagerCloseRequest(requestPathSize uint8, classSegment PathSegment, instanceSegment PathSegment, priority uint8, tickTime uint8, timeoutTicks uint8, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, connectionPathSize uint8, connectionPaths []PathSegment) *_CipConnectionManagerCloseRequest {
@@ -99,20 +99,20 @@ func NewCipConnectionManagerCloseRequest(requestPathSize uint8, classSegment Pat
panic("instanceSegment of type PathSegment for CipConnectionManagerCloseRequest must not be nil")
}
_result := &_CipConnectionManagerCloseRequest{
- CipServiceContract: NewCipService(),
- RequestPathSize: requestPathSize,
- ClassSegment: classSegment,
- InstanceSegment: instanceSegment,
- Priority: priority,
- TickTime: tickTime,
- TimeoutTicks: timeoutTicks,
- ConnectionSerialNumber: connectionSerialNumber,
- OriginatorVendorId: originatorVendorId,
- OriginatorSerialNumber: originatorSerialNumber,
- ConnectionPathSize: connectionPathSize,
- ConnectionPaths: connectionPaths,
- }
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ CipServiceRequestContract: NewCipServiceRequest(),
+ RequestPathSize: requestPathSize,
+ ClassSegment: classSegment,
+ InstanceSegment: instanceSegment,
+ Priority: priority,
+ TickTime: tickTime,
+ TimeoutTicks: timeoutTicks,
+ ConnectionSerialNumber: connectionSerialNumber,
+ OriginatorVendorId: originatorVendorId,
+ OriginatorSerialNumber: originatorSerialNumber,
+ ConnectionPathSize: connectionPathSize,
+ ConnectionPaths: connectionPaths,
+ }
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -153,7 +153,7 @@ type CipConnectionManagerCloseRequestBuilder interface {
// WithConnectionPaths adds ConnectionPaths (property field)
WithConnectionPaths(...PathSegment) CipConnectionManagerCloseRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the CipConnectionManagerCloseRequest or returns an error if something is wrong
Build() (CipConnectionManagerCloseRequest, error)
// MustBuild does the same as Build but panics on error
@@ -168,16 +168,16 @@ func NewCipConnectionManagerCloseRequestBuilder() CipConnectionManagerCloseReque
type _CipConnectionManagerCloseRequestBuilder struct {
*_CipConnectionManagerCloseRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (CipConnectionManagerCloseRequestBuilder) = (*_CipConnectionManagerCloseRequestBuilder)(nil)
-func (b *_CipConnectionManagerCloseRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipConnectionManagerCloseRequest
+func (b *_CipConnectionManagerCloseRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._CipConnectionManagerCloseRequest
}
func (b *_CipConnectionManagerCloseRequestBuilder) WithMandatoryFields(requestPathSize uint8, classSegment PathSegment, instanceSegment PathSegment, priority uint8, tickTime uint8, timeoutTicks uint8, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, connectionPathSize uint8, connectionPaths []PathSegment) CipConnectionManagerCloseRequestBuilder {
@@ -280,14 +280,14 @@ func (b *_CipConnectionManagerCloseRequestBuilder) MustBuild() CipConnectionMana
return build
}
-func (b *_CipConnectionManagerCloseRequestBuilder) Done() CipServiceBuilder {
+func (b *_CipConnectionManagerCloseRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_CipConnectionManagerCloseRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_CipConnectionManagerCloseRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -321,10 +321,6 @@ func (m *_CipConnectionManagerCloseRequest) GetService() uint8 {
return 0x4E
}
-func (m *_CipConnectionManagerCloseRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_CipConnectionManagerCloseRequest) GetConnected() bool {
return false
}
@@ -334,8 +330,8 @@ func (m *_CipConnectionManagerCloseRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipConnectionManagerCloseRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipConnectionManagerCloseRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
///////////////////////////////////////////////////////////
@@ -408,7 +404,7 @@ func (m *_CipConnectionManagerCloseRequest) GetPlx4xTypeName() string {
}
func (m *_CipConnectionManagerCloseRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
// Simple field (requestPathSize)
lengthInBits += 8
@@ -457,8 +453,8 @@ func (m *_CipConnectionManagerCloseRequest) GetLengthInBytes(ctx context.Context
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipConnectionManagerCloseRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipConnectionManagerCloseRequest CipConnectionManagerCloseRequest, err error) {
- m.CipServiceContract = parent
+func (m *_CipConnectionManagerCloseRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__cipConnectionManagerCloseRequest CipConnectionManagerCloseRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -618,7 +614,7 @@ func (m *_CipConnectionManagerCloseRequest) SerializeWithWriteBuffer(ctx context
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipConnectionManagerCloseRequest) IsCipConnectionManagerCloseRequest() {}
@@ -632,7 +628,7 @@ func (m *_CipConnectionManagerCloseRequest) deepCopy() *_CipConnectionManagerClo
return nil
}
_CipConnectionManagerCloseRequestCopy := &_CipConnectionManagerCloseRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
m.RequestPathSize,
utils.DeepCopy[PathSegment](m.ClassSegment),
utils.DeepCopy[PathSegment](m.InstanceSegment),
@@ -646,7 +642,7 @@ func (m *_CipConnectionManagerCloseRequest) deepCopy() *_CipConnectionManagerClo
utils.DeepCopySlice[PathSegment, PathSegment](m.ConnectionPaths),
m.reservedField0,
}
- _CipConnectionManagerCloseRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipConnectionManagerCloseRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _CipConnectionManagerCloseRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseResponse.go b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseResponse.go
index f400c2f286..e31b04c05d 100644
--- a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseResponse.go
+++ b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerCloseResponse.go
@@ -40,11 +40,7 @@ type CipConnectionManagerCloseResponse interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
- // GetStatus returns Status (property field)
- GetStatus() uint8
- // GetAdditionalStatusWords returns AdditionalStatusWords (property field)
- GetAdditionalStatusWords() uint8
+ CipServiceResponse
// GetConnectionSerialNumber returns ConnectionSerialNumber (property field)
GetConnectionSerialNumber() uint16
// GetOriginatorVendorId returns OriginatorVendorId (property field)
@@ -61,33 +57,28 @@ type CipConnectionManagerCloseResponse interface {
// _CipConnectionManagerCloseResponse is the data-structure of this message
type _CipConnectionManagerCloseResponse struct {
- CipServiceContract
- Status uint8
- AdditionalStatusWords uint8
+ CipServiceResponseContract
ConnectionSerialNumber uint16
OriginatorVendorId uint16
OriginatorSerialNumber uint32
ApplicationReplySize uint8
// Reserved Fields
reservedField0 *uint8
- reservedField1 *uint8
}
var _ CipConnectionManagerCloseResponse = (*_CipConnectionManagerCloseResponse)(nil)
-var _ CipServiceRequirements = (*_CipConnectionManagerCloseResponse)(nil)
+var _ CipServiceResponseRequirements = (*_CipConnectionManagerCloseResponse)(nil)
// NewCipConnectionManagerCloseResponse factory function for _CipConnectionManagerCloseResponse
-func NewCipConnectionManagerCloseResponse(status uint8, additionalStatusWords uint8, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, applicationReplySize uint8) *_CipConnectionManagerCloseResponse {
+func NewCipConnectionManagerCloseResponse(status uint8, extStatus []uint16, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, applicationReplySize uint8) *_CipConnectionManagerCloseResponse {
_result := &_CipConnectionManagerCloseResponse{
- CipServiceContract: NewCipService(),
- Status: status,
- AdditionalStatusWords: additionalStatusWords,
- ConnectionSerialNumber: connectionSerialNumber,
- OriginatorVendorId: originatorVendorId,
- OriginatorSerialNumber: originatorSerialNumber,
- ApplicationReplySize: applicationReplySize,
+ CipServiceResponseContract: NewCipServiceResponse(status, extStatus),
+ ConnectionSerialNumber: connectionSerialNumber,
+ OriginatorVendorId: originatorVendorId,
+ OriginatorSerialNumber: originatorSerialNumber,
+ ApplicationReplySize: applicationReplySize,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceResponseContract.(*_CipServiceResponse)._SubType = _result
return _result
}
@@ -100,11 +91,7 @@ func NewCipConnectionManagerCloseResponse(status uint8, additionalStatusWords ui
type CipConnectionManagerCloseResponseBuilder interface {
utils.Copyable
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
- WithMandatoryFields(status uint8, additionalStatusWords uint8, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, applicationReplySize uint8) CipConnectionManagerCloseResponseBuilder
- // WithStatus adds Status (property field)
- WithStatus(uint8) CipConnectionManagerCloseResponseBuilder
- // WithAdditionalStatusWords adds AdditionalStatusWords (property field)
- WithAdditionalStatusWords(uint8) CipConnectionManagerCloseResponseBuilder
+ WithMandatoryFields(connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, applicationReplySize uint8) CipConnectionManagerCloseResponseBuilder
// WithConnectionSerialNumber adds ConnectionSerialNumber (property field)
WithConnectionSerialNumber(uint16) CipConnectionManagerCloseResponseBuilder
// WithOriginatorVendorId adds OriginatorVendorId (property field)
@@ -114,7 +101,7 @@ type CipConnectionManagerCloseResponseBuilder interface {
// WithApplicationReplySize adds ApplicationReplySize (property field)
WithApplicationReplySize(uint8) CipConnectionManagerCloseResponseBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceResponseBuilder
// Build builds the CipConnectionManagerCloseResponse or returns an error if something is wrong
Build() (CipConnectionManagerCloseResponse, error)
// MustBuild does the same as Build but panics on error
@@ -129,30 +116,20 @@ func NewCipConnectionManagerCloseResponseBuilder() CipConnectionManagerCloseResp
type _CipConnectionManagerCloseResponseBuilder struct {
*_CipConnectionManagerCloseResponse
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceResponseBuilder
collectedErr []error
}
var _ (CipConnectionManagerCloseResponseBuilder) = (*_CipConnectionManagerCloseResponseBuilder)(nil)
-func (b *_CipConnectionManagerCloseResponseBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipConnectionManagerCloseResponse
+func (b *_CipConnectionManagerCloseResponseBuilder) setParent(contract CipServiceResponseContract) {
+ b.CipServiceResponseContract = contract
+ contract.(*_CipServiceResponse)._SubType = b._CipConnectionManagerCloseResponse
}
-func (b *_CipConnectionManagerCloseResponseBuilder) WithMandatoryFields(status uint8, additionalStatusWords uint8, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, applicationReplySize uint8) CipConnectionManagerCloseResponseBuilder {
- return b.WithStatus(status).WithAdditionalStatusWords(additionalStatusWords).WithConnectionSerialNumber(connectionSerialNumber).WithOriginatorVendorId(originatorVendorId).WithOriginatorSerialNumber(originatorSerialNumber).WithApplicationReplySize(applicationReplySize)
-}
-
-func (b *_CipConnectionManagerCloseResponseBuilder) WithStatus(status uint8) CipConnectionManagerCloseResponseBuilder {
- b.Status = status
- return b
-}
-
-func (b *_CipConnectionManagerCloseResponseBuilder) WithAdditionalStatusWords(additionalStatusWords uint8) CipConnectionManagerCloseResponseBuilder {
- b.AdditionalStatusWords = additionalStatusWords
- return b
+func (b *_CipConnectionManagerCloseResponseBuilder) WithMandatoryFields(connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, applicationReplySize uint8) CipConnectionManagerCloseResponseBuilder {
+ return b.WithConnectionSerialNumber(connectionSerialNumber).WithOriginatorVendorId(originatorVendorId).WithOriginatorSerialNumber(originatorSerialNumber).WithApplicationReplySize(applicationReplySize)
}
func (b *_CipConnectionManagerCloseResponseBuilder) WithConnectionSerialNumber(connectionSerialNumber uint16) CipConnectionManagerCloseResponseBuilder {
@@ -190,14 +167,14 @@ func (b *_CipConnectionManagerCloseResponseBuilder) MustBuild() CipConnectionMan
return build
}
-func (b *_CipConnectionManagerCloseResponseBuilder) Done() CipServiceBuilder {
+func (b *_CipConnectionManagerCloseResponseBuilder) Done() CipServiceResponseBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
}
return b.parentBuilder
}
-func (b *_CipConnectionManagerCloseResponseBuilder) buildForCipService() (CipService, error) {
+func (b *_CipConnectionManagerCloseResponseBuilder) buildForCipServiceResponse() (CipServiceResponse, error) {
return b.Build()
}
@@ -231,21 +208,13 @@ func (m *_CipConnectionManagerCloseResponse) GetService() uint8 {
return 0x4E
}
-func (m *_CipConnectionManagerCloseResponse) GetResponse() bool {
- return bool(true)
-}
-
-func (m *_CipConnectionManagerCloseResponse) GetConnected() bool {
- return false
-}
-
///////////////////////
///////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipConnectionManagerCloseResponse) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipConnectionManagerCloseResponse) GetParent() CipServiceResponseContract {
+ return m.CipServiceResponseContract
}
///////////////////////////////////////////////////////////
@@ -253,14 +222,6 @@ func (m *_CipConnectionManagerCloseResponse) GetParent() CipServiceContract {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_CipConnectionManagerCloseResponse) GetStatus() uint8 {
- return m.Status
-}
-
-func (m *_CipConnectionManagerCloseResponse) GetAdditionalStatusWords() uint8 {
- return m.AdditionalStatusWords
-}
-
func (m *_CipConnectionManagerCloseResponse) GetConnectionSerialNumber() uint16 {
return m.ConnectionSerialNumber
}
@@ -298,16 +259,7 @@ func (m *_CipConnectionManagerCloseResponse) GetPlx4xTypeName() string {
}
func (m *_CipConnectionManagerCloseResponse) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
-
- // Reserved Field (reserved)
- lengthInBits += 8
-
- // Simple field (status)
- lengthInBits += 8
-
- // Simple field (additionalStatusWords)
- lengthInBits += 8
+ lengthInBits := uint64(m.CipServiceResponseContract.(*_CipServiceResponse).getLengthInBits(ctx))
// Simple field (connectionSerialNumber)
lengthInBits += 16
@@ -331,8 +283,8 @@ func (m *_CipConnectionManagerCloseResponse) GetLengthInBytes(ctx context.Contex
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipConnectionManagerCloseResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipConnectionManagerCloseResponse CipConnectionManagerCloseResponse, err error) {
- m.CipServiceContract = parent
+func (m *_CipConnectionManagerCloseResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceResponse, connected bool, serviceLen uint16) (__cipConnectionManagerCloseResponse CipConnectionManagerCloseResponse, err error) {
+ m.CipServiceResponseContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -342,24 +294,6 @@ func (m *_CipConnectionManagerCloseResponse) parse(ctx context.Context, readBuff
currentPos := positionAware.GetPos()
_ = currentPos
- reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
- }
- m.reservedField0 = reservedField0
-
- status, err := ReadSimpleField(ctx, "status", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'status' field"))
- }
- m.Status = status
-
- additionalStatusWords, err := ReadSimpleField(ctx, "additionalStatusWords", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'additionalStatusWords' field"))
- }
- m.AdditionalStatusWords = additionalStatusWords
-
connectionSerialNumber, err := ReadSimpleField(ctx, "connectionSerialNumber", ReadUnsignedShort(readBuffer, uint8(16)))
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'connectionSerialNumber' field"))
@@ -384,11 +318,11 @@ func (m *_CipConnectionManagerCloseResponse) parse(ctx context.Context, readBuff
}
m.ApplicationReplySize = applicationReplySize
- reservedField1, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
+ reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
}
- m.reservedField1 = reservedField1
+ m.reservedField0 = reservedField0
if closeErr := readBuffer.CloseContext("CipConnectionManagerCloseResponse"); closeErr != nil {
return nil, errors.Wrap(closeErr, "Error closing for CipConnectionManagerCloseResponse")
@@ -415,18 +349,6 @@ func (m *_CipConnectionManagerCloseResponse) SerializeWithWriteBuffer(ctx contex
return errors.Wrap(pushErr, "Error pushing for CipConnectionManagerCloseResponse")
}
- if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 1")
- }
-
- if err := WriteSimpleField[uint8](ctx, "status", m.GetStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'status' field")
- }
-
- if err := WriteSimpleField[uint8](ctx, "additionalStatusWords", m.GetAdditionalStatusWords(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'additionalStatusWords' field")
- }
-
if err := WriteSimpleField[uint16](ctx, "connectionSerialNumber", m.GetConnectionSerialNumber(), WriteUnsignedShort(writeBuffer, 16)); err != nil {
return errors.Wrap(err, "Error serializing 'connectionSerialNumber' field")
}
@@ -444,7 +366,7 @@ func (m *_CipConnectionManagerCloseResponse) SerializeWithWriteBuffer(ctx contex
}
if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 2")
+ return errors.Wrap(err, "Error serializing 'reserved' field number 1")
}
if popErr := writeBuffer.PopContext("CipConnectionManagerCloseResponse"); popErr != nil {
@@ -452,7 +374,7 @@ func (m *_CipConnectionManagerCloseResponse) SerializeWithWriteBuffer(ctx contex
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceResponseContract.(*_CipServiceResponse).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipConnectionManagerCloseResponse) IsCipConnectionManagerCloseResponse() {}
@@ -466,17 +388,14 @@ func (m *_CipConnectionManagerCloseResponse) deepCopy() *_CipConnectionManagerCl
return nil
}
_CipConnectionManagerCloseResponseCopy := &_CipConnectionManagerCloseResponse{
- m.CipServiceContract.(*_CipService).deepCopy(),
- m.Status,
- m.AdditionalStatusWords,
+ m.CipServiceResponseContract.(*_CipServiceResponse).deepCopy(),
m.ConnectionSerialNumber,
m.OriginatorVendorId,
m.OriginatorSerialNumber,
m.ApplicationReplySize,
m.reservedField0,
- m.reservedField1,
}
- _CipConnectionManagerCloseResponseCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipConnectionManagerCloseResponseCopy.CipServiceResponseContract.(*_CipServiceResponse)._SubType = m
return _CipConnectionManagerCloseResponseCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerRequest.go b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerRequest.go
index aa44331903..55dcf3641c 100644
--- a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerRequest.go
@@ -40,7 +40,7 @@ type CipConnectionManagerRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// GetClassSegment returns ClassSegment (property field)
GetClassSegment() PathSegment
// GetInstanceSegment returns InstanceSegment (property field)
@@ -89,7 +89,7 @@ type CipConnectionManagerRequest interface {
// _CipConnectionManagerRequest is the data-structure of this message
type _CipConnectionManagerRequest struct {
- CipServiceContract
+ CipServiceRequestContract
ClassSegment PathSegment
InstanceSegment PathSegment
Priority uint8
@@ -113,7 +113,7 @@ type _CipConnectionManagerRequest struct {
}
var _ CipConnectionManagerRequest = (*_CipConnectionManagerRequest)(nil)
-var _ CipServiceRequirements = (*_CipConnectionManagerRequest)(nil)
+var _ CipServiceRequestRequirements = (*_CipConnectionManagerRequest)(nil)
// NewCipConnectionManagerRequest factory function for _CipConnectionManagerRequest
func NewCipConnectionManagerRequest(classSegment PathSegment, instanceSegment PathSegment, priority uint8, tickTime uint8, timeoutTicks uint8, otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, timeoutMultiplier uint8, otRpi uint32, otConnectionParameters NetworkConnectionParameters, toRpi uint32, toConnectionParameters NetworkConnectionParameters, transportType TransportType, connectionPathSize uint8, co [...]
@@ -133,27 +133,27 @@ func NewCipConnectionManagerRequest(classSegment PathSegment, instanceSegment Pa
panic("transportType of type TransportType for CipConnectionManagerRequest must not be nil")
}
_result := &_CipConnectionManagerRequest{
- CipServiceContract: NewCipService(),
- ClassSegment: classSegment,
- InstanceSegment: instanceSegment,
- Priority: priority,
- TickTime: tickTime,
- TimeoutTicks: timeoutTicks,
- OtConnectionId: otConnectionId,
- ToConnectionId: toConnectionId,
- ConnectionSerialNumber: connectionSerialNumber,
- OriginatorVendorId: originatorVendorId,
- OriginatorSerialNumber: originatorSerialNumber,
- TimeoutMultiplier: timeoutMultiplier,
- OtRpi: otRpi,
- OtConnectionParameters: otConnectionParameters,
- ToRpi: toRpi,
- ToConnectionParameters: toConnectionParameters,
- TransportType: transportType,
- ConnectionPathSize: connectionPathSize,
- ConnectionPaths: connectionPaths,
- }
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ CipServiceRequestContract: NewCipServiceRequest(),
+ ClassSegment: classSegment,
+ InstanceSegment: instanceSegment,
+ Priority: priority,
+ TickTime: tickTime,
+ TimeoutTicks: timeoutTicks,
+ OtConnectionId: otConnectionId,
+ ToConnectionId: toConnectionId,
+ ConnectionSerialNumber: connectionSerialNumber,
+ OriginatorVendorId: originatorVendorId,
+ OriginatorSerialNumber: originatorSerialNumber,
+ TimeoutMultiplier: timeoutMultiplier,
+ OtRpi: otRpi,
+ OtConnectionParameters: otConnectionParameters,
+ ToRpi: toRpi,
+ ToConnectionParameters: toConnectionParameters,
+ TransportType: transportType,
+ ConnectionPathSize: connectionPathSize,
+ ConnectionPaths: connectionPaths,
+ }
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -214,7 +214,7 @@ type CipConnectionManagerRequestBuilder interface {
// WithConnectionPaths adds ConnectionPaths (property field)
WithConnectionPaths(...PathSegment) CipConnectionManagerRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the CipConnectionManagerRequest or returns an error if something is wrong
Build() (CipConnectionManagerRequest, error)
// MustBuild does the same as Build but panics on error
@@ -229,16 +229,16 @@ func NewCipConnectionManagerRequestBuilder() CipConnectionManagerRequestBuilder
type _CipConnectionManagerRequestBuilder struct {
*_CipConnectionManagerRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (CipConnectionManagerRequestBuilder) = (*_CipConnectionManagerRequestBuilder)(nil)
-func (b *_CipConnectionManagerRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipConnectionManagerRequest
+func (b *_CipConnectionManagerRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._CipConnectionManagerRequest
}
func (b *_CipConnectionManagerRequestBuilder) WithMandatoryFields(classSegment PathSegment, instanceSegment PathSegment, priority uint8, tickTime uint8, timeoutTicks uint8, otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, timeoutMultiplier uint8, otRpi uint32, otConnectionParameters NetworkConnectionParameters, toRpi uint32, toConnectionParameters NetworkConnectionParameters, transportType TransportType [...]
@@ -415,14 +415,14 @@ func (b *_CipConnectionManagerRequestBuilder) MustBuild() CipConnectionManagerRe
return build
}
-func (b *_CipConnectionManagerRequestBuilder) Done() CipServiceBuilder {
+func (b *_CipConnectionManagerRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_CipConnectionManagerRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_CipConnectionManagerRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -456,10 +456,6 @@ func (m *_CipConnectionManagerRequest) GetService() uint8 {
return 0x5B
}
-func (m *_CipConnectionManagerRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_CipConnectionManagerRequest) GetConnected() bool {
return false
}
@@ -469,8 +465,8 @@ func (m *_CipConnectionManagerRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipConnectionManagerRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipConnectionManagerRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
///////////////////////////////////////////////////////////
@@ -571,7 +567,7 @@ func (m *_CipConnectionManagerRequest) GetPlx4xTypeName() string {
}
func (m *_CipConnectionManagerRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
// Implicit Field (requestPathSize)
lengthInBits += 8
@@ -644,8 +640,8 @@ func (m *_CipConnectionManagerRequest) GetLengthInBytes(ctx context.Context) uin
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipConnectionManagerRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipConnectionManagerRequest CipConnectionManagerRequest, err error) {
- m.CipServiceContract = parent
+func (m *_CipConnectionManagerRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__cipConnectionManagerRequest CipConnectionManagerRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -885,7 +881,7 @@ func (m *_CipConnectionManagerRequest) SerializeWithWriteBuffer(ctx context.Cont
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipConnectionManagerRequest) IsCipConnectionManagerRequest() {}
@@ -899,7 +895,7 @@ func (m *_CipConnectionManagerRequest) deepCopy() *_CipConnectionManagerRequest
return nil
}
_CipConnectionManagerRequestCopy := &_CipConnectionManagerRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
utils.DeepCopy[PathSegment](m.ClassSegment),
utils.DeepCopy[PathSegment](m.InstanceSegment),
m.Priority,
@@ -920,7 +916,7 @@ func (m *_CipConnectionManagerRequest) deepCopy() *_CipConnectionManagerRequest
utils.DeepCopySlice[PathSegment, PathSegment](m.ConnectionPaths),
m.reservedField0,
}
- _CipConnectionManagerRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipConnectionManagerRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _CipConnectionManagerRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerResponse.go b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerResponse.go
index f2c1875e87..aeb0805cd5 100644
--- a/plc4go/protocols/eip/readwrite/model/CipConnectionManagerResponse.go
+++ b/plc4go/protocols/eip/readwrite/model/CipConnectionManagerResponse.go
@@ -40,7 +40,7 @@ type CipConnectionManagerResponse interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceResponse
// GetOtConnectionId returns OtConnectionId (property field)
// ot = Originator (Client) Target (Server)
GetOtConnectionId() uint32
@@ -59,6 +59,8 @@ type CipConnectionManagerResponse interface {
// GetToApi returns ToApi (property field)
// to = Target (Server) Originator (Client)
GetToApi() uint32
+ // GetReply returns Reply (property field)
+ GetReply() []byte
// IsCipConnectionManagerResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
IsCipConnectionManagerResponse()
// CreateBuilder creates a CipConnectionManagerResponseBuilder
@@ -67,7 +69,7 @@ type CipConnectionManagerResponse interface {
// _CipConnectionManagerResponse is the data-structure of this message
type _CipConnectionManagerResponse struct {
- CipServiceContract
+ CipServiceResponseContract
OtConnectionId uint32
ToConnectionId uint32
ConnectionSerialNumber uint16
@@ -75,27 +77,28 @@ type _CipConnectionManagerResponse struct {
OriginatorSerialNumber uint32
OtApi uint32
ToApi uint32
+ Reply []byte
// Reserved Fields
- reservedField0 *uint32
- reservedField1 *uint8
+ reservedField0 *uint8
}
var _ CipConnectionManagerResponse = (*_CipConnectionManagerResponse)(nil)
-var _ CipServiceRequirements = (*_CipConnectionManagerResponse)(nil)
+var _ CipServiceResponseRequirements = (*_CipConnectionManagerResponse)(nil)
// NewCipConnectionManagerResponse factory function for _CipConnectionManagerResponse
-func NewCipConnectionManagerResponse(otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, otApi uint32, toApi uint32) *_CipConnectionManagerResponse {
+func NewCipConnectionManagerResponse(status uint8, extStatus []uint16, otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, otApi uint32, toApi uint32, reply []byte) *_CipConnectionManagerResponse {
_result := &_CipConnectionManagerResponse{
- CipServiceContract: NewCipService(),
- OtConnectionId: otConnectionId,
- ToConnectionId: toConnectionId,
- ConnectionSerialNumber: connectionSerialNumber,
- OriginatorVendorId: originatorVendorId,
- OriginatorSerialNumber: originatorSerialNumber,
- OtApi: otApi,
- ToApi: toApi,
+ CipServiceResponseContract: NewCipServiceResponse(status, extStatus),
+ OtConnectionId: otConnectionId,
+ ToConnectionId: toConnectionId,
+ ConnectionSerialNumber: connectionSerialNumber,
+ OriginatorVendorId: originatorVendorId,
+ OriginatorSerialNumber: originatorSerialNumber,
+ OtApi: otApi,
+ ToApi: toApi,
+ Reply: reply,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceResponseContract.(*_CipServiceResponse)._SubType = _result
return _result
}
@@ -108,7 +111,7 @@ func NewCipConnectionManagerResponse(otConnectionId uint32, toConnectionId uint3
type CipConnectionManagerResponseBuilder interface {
utils.Copyable
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
- WithMandatoryFields(otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, otApi uint32, toApi uint32) CipConnectionManagerResponseBuilder
+ WithMandatoryFields(otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, otApi uint32, toApi uint32, reply []byte) CipConnectionManagerResponseBuilder
// WithOtConnectionId adds OtConnectionId (property field)
WithOtConnectionId(uint32) CipConnectionManagerResponseBuilder
// WithToConnectionId adds ToConnectionId (property field)
@@ -123,8 +126,10 @@ type CipConnectionManagerResponseBuilder interface {
WithOtApi(uint32) CipConnectionManagerResponseBuilder
// WithToApi adds ToApi (property field)
WithToApi(uint32) CipConnectionManagerResponseBuilder
+ // WithReply adds Reply (property field)
+ WithReply(...byte) CipConnectionManagerResponseBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceResponseBuilder
// Build builds the CipConnectionManagerResponse or returns an error if something is wrong
Build() (CipConnectionManagerResponse, error)
// MustBuild does the same as Build but panics on error
@@ -139,20 +144,20 @@ func NewCipConnectionManagerResponseBuilder() CipConnectionManagerResponseBuilde
type _CipConnectionManagerResponseBuilder struct {
*_CipConnectionManagerResponse
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceResponseBuilder
collectedErr []error
}
var _ (CipConnectionManagerResponseBuilder) = (*_CipConnectionManagerResponseBuilder)(nil)
-func (b *_CipConnectionManagerResponseBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipConnectionManagerResponse
+func (b *_CipConnectionManagerResponseBuilder) setParent(contract CipServiceResponseContract) {
+ b.CipServiceResponseContract = contract
+ contract.(*_CipServiceResponse)._SubType = b._CipConnectionManagerResponse
}
-func (b *_CipConnectionManagerResponseBuilder) WithMandatoryFields(otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, otApi uint32, toApi uint32) CipConnectionManagerResponseBuilder {
- return b.WithOtConnectionId(otConnectionId).WithToConnectionId(toConnectionId).WithConnectionSerialNumber(connectionSerialNumber).WithOriginatorVendorId(originatorVendorId).WithOriginatorSerialNumber(originatorSerialNumber).WithOtApi(otApi).WithToApi(toApi)
+func (b *_CipConnectionManagerResponseBuilder) WithMandatoryFields(otConnectionId uint32, toConnectionId uint32, connectionSerialNumber uint16, originatorVendorId uint16, originatorSerialNumber uint32, otApi uint32, toApi uint32, reply []byte) CipConnectionManagerResponseBuilder {
+ return b.WithOtConnectionId(otConnectionId).WithToConnectionId(toConnectionId).WithConnectionSerialNumber(connectionSerialNumber).WithOriginatorVendorId(originatorVendorId).WithOriginatorSerialNumber(originatorSerialNumber).WithOtApi(otApi).WithToApi(toApi).WithReply(reply...)
}
func (b *_CipConnectionManagerResponseBuilder) WithOtConnectionId(otConnectionId uint32) CipConnectionManagerResponseBuilder {
@@ -190,6 +195,11 @@ func (b *_CipConnectionManagerResponseBuilder) WithToApi(toApi uint32) CipConnec
return b
}
+func (b *_CipConnectionManagerResponseBuilder) WithReply(reply ...byte) CipConnectionManagerResponseBuilder {
+ b.Reply = reply
+ return b
+}
+
func (b *_CipConnectionManagerResponseBuilder) Build() (CipConnectionManagerResponse, error) {
if err := stdErrors.Join(b.collectedErr...); err != nil {
return nil, errors.Wrap(err, "error occurred during build")
@@ -205,14 +215,14 @@ func (b *_CipConnectionManagerResponseBuilder) MustBuild() CipConnectionManagerR
return build
}
-func (b *_CipConnectionManagerResponseBuilder) Done() CipServiceBuilder {
+func (b *_CipConnectionManagerResponseBuilder) Done() CipServiceResponseBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
}
return b.parentBuilder
}
-func (b *_CipConnectionManagerResponseBuilder) buildForCipService() (CipService, error) {
+func (b *_CipConnectionManagerResponseBuilder) buildForCipServiceResponse() (CipServiceResponse, error) {
return b.Build()
}
@@ -246,21 +256,13 @@ func (m *_CipConnectionManagerResponse) GetService() uint8 {
return 0x5B
}
-func (m *_CipConnectionManagerResponse) GetResponse() bool {
- return bool(true)
-}
-
-func (m *_CipConnectionManagerResponse) GetConnected() bool {
- return false
-}
-
///////////////////////
///////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipConnectionManagerResponse) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipConnectionManagerResponse) GetParent() CipServiceResponseContract {
+ return m.CipServiceResponseContract
}
///////////////////////////////////////////////////////////
@@ -296,6 +298,10 @@ func (m *_CipConnectionManagerResponse) GetToApi() uint32 {
return m.ToApi
}
+func (m *_CipConnectionManagerResponse) GetReply() []byte {
+ return m.Reply
+}
+
///////////////////////
///////////////////////
///////////////////////////////////////////////////////////
@@ -317,10 +323,7 @@ func (m *_CipConnectionManagerResponse) GetPlx4xTypeName() string {
}
func (m *_CipConnectionManagerResponse) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
-
- // Reserved Field (reserved)
- lengthInBits += 24
+ lengthInBits := uint64(m.CipServiceResponseContract.(*_CipServiceResponse).getLengthInBits(ctx))
// Simple field (otConnectionId)
lengthInBits += 32
@@ -346,6 +349,11 @@ func (m *_CipConnectionManagerResponse) GetLengthInBits(ctx context.Context) uin
// Implicit Field (replySize)
lengthInBits += 8
+ // Array field
+ if len(m.Reply) > 0 {
+ lengthInBits += 8 * uint64(len(m.Reply))
+ }
+
// Reserved Field (reserved)
lengthInBits += 8
@@ -356,8 +364,8 @@ func (m *_CipConnectionManagerResponse) GetLengthInBytes(ctx context.Context) ui
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipConnectionManagerResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipConnectionManagerResponse CipConnectionManagerResponse, err error) {
- m.CipServiceContract = parent
+func (m *_CipConnectionManagerResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceResponse, connected bool, serviceLen uint16) (__cipConnectionManagerResponse CipConnectionManagerResponse, err error) {
+ m.CipServiceResponseContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -367,12 +375,6 @@ func (m *_CipConnectionManagerResponse) parse(ctx context.Context, readBuffer ut
currentPos := positionAware.GetPos()
_ = currentPos
- reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedInt(readBuffer, uint8(24)), uint32(0x000000))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
- }
- m.reservedField0 = reservedField0
-
otConnectionId, err := ReadSimpleField(ctx, "otConnectionId", ReadUnsignedInt(readBuffer, uint8(32)))
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'otConnectionId' field"))
@@ -421,11 +423,17 @@ func (m *_CipConnectionManagerResponse) parse(ctx context.Context, readBuffer ut
}
_ = replySize
- reservedField1, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
+ reply, err := readBuffer.ReadByteArray("reply", int(int32(replySize)*int32(int32(2))))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'reply' field"))
+ }
+ m.Reply = reply
+
+ reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
}
- m.reservedField1 = reservedField1
+ m.reservedField0 = reservedField0
if closeErr := readBuffer.CloseContext("CipConnectionManagerResponse"); closeErr != nil {
return nil, errors.Wrap(closeErr, "Error closing for CipConnectionManagerResponse")
@@ -452,10 +460,6 @@ func (m *_CipConnectionManagerResponse) SerializeWithWriteBuffer(ctx context.Con
return errors.Wrap(pushErr, "Error pushing for CipConnectionManagerResponse")
}
- if err := WriteReservedField[uint32](ctx, "reserved", uint32(0x000000), WriteUnsignedInt(writeBuffer, 24)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 1")
- }
-
if err := WriteSimpleField[uint32](ctx, "otConnectionId", m.GetOtConnectionId(), WriteUnsignedInt(writeBuffer, 32)); err != nil {
return errors.Wrap(err, "Error serializing 'otConnectionId' field")
}
@@ -483,13 +487,17 @@ func (m *_CipConnectionManagerResponse) SerializeWithWriteBuffer(ctx context.Con
if err := WriteSimpleField[uint32](ctx, "toApi", m.GetToApi(), WriteUnsignedInt(writeBuffer, 32)); err != nil {
return errors.Wrap(err, "Error serializing 'toApi' field")
}
- replySize := uint8(uint8(uint8(m.GetLengthInBytes(ctx))) - uint8(uint8(30)))
+ replySize := uint8(uint8(uint8(len(m.GetReply()))) / uint8(uint8(2)))
if err := WriteImplicitField(ctx, "replySize", replySize, WriteUnsignedByte(writeBuffer, 8)); err != nil {
return errors.Wrap(err, "Error serializing 'replySize' field")
}
+ if err := WriteByteArrayField(ctx, "reply", m.GetReply(), WriteByteArray(writeBuffer, 8)); err != nil {
+ return errors.Wrap(err, "Error serializing 'reply' field")
+ }
+
if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 2")
+ return errors.Wrap(err, "Error serializing 'reserved' field number 1")
}
if popErr := writeBuffer.PopContext("CipConnectionManagerResponse"); popErr != nil {
@@ -497,7 +505,7 @@ func (m *_CipConnectionManagerResponse) SerializeWithWriteBuffer(ctx context.Con
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceResponseContract.(*_CipServiceResponse).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipConnectionManagerResponse) IsCipConnectionManagerResponse() {}
@@ -511,7 +519,7 @@ func (m *_CipConnectionManagerResponse) deepCopy() *_CipConnectionManagerRespons
return nil
}
_CipConnectionManagerResponseCopy := &_CipConnectionManagerResponse{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceResponseContract.(*_CipServiceResponse).deepCopy(),
m.OtConnectionId,
m.ToConnectionId,
m.ConnectionSerialNumber,
@@ -519,10 +527,10 @@ func (m *_CipConnectionManagerResponse) deepCopy() *_CipConnectionManagerRespons
m.OriginatorSerialNumber,
m.OtApi,
m.ToApi,
+ utils.DeepCopySlice[byte, byte](m.Reply),
m.reservedField0,
- m.reservedField1,
}
- _CipConnectionManagerResponseCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipConnectionManagerResponseCopy.CipServiceResponseContract.(*_CipServiceResponse)._SubType = m
return _CipConnectionManagerResponseCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipReadRequest.go b/plc4go/protocols/eip/readwrite/model/CipReadRequest.go
index 080034fd2d..6216ac935a 100644
--- a/plc4go/protocols/eip/readwrite/model/CipReadRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/CipReadRequest.go
@@ -40,7 +40,7 @@ type CipReadRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// GetTag returns Tag (property field)
GetTag() []byte
// GetElementNb returns ElementNb (property field)
@@ -53,22 +53,22 @@ type CipReadRequest interface {
// _CipReadRequest is the data-structure of this message
type _CipReadRequest struct {
- CipServiceContract
+ CipServiceRequestContract
Tag []byte
ElementNb uint16
}
var _ CipReadRequest = (*_CipReadRequest)(nil)
-var _ CipServiceRequirements = (*_CipReadRequest)(nil)
+var _ CipServiceRequestRequirements = (*_CipReadRequest)(nil)
// NewCipReadRequest factory function for _CipReadRequest
func NewCipReadRequest(tag []byte, elementNb uint16) *_CipReadRequest {
_result := &_CipReadRequest{
- CipServiceContract: NewCipService(),
- Tag: tag,
- ElementNb: elementNb,
+ CipServiceRequestContract: NewCipServiceRequest(),
+ Tag: tag,
+ ElementNb: elementNb,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -87,7 +87,7 @@ type CipReadRequestBuilder interface {
// WithElementNb adds ElementNb (property field)
WithElementNb(uint16) CipReadRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the CipReadRequest or returns an error if something is wrong
Build() (CipReadRequest, error)
// MustBuild does the same as Build but panics on error
@@ -102,16 +102,16 @@ func NewCipReadRequestBuilder() CipReadRequestBuilder {
type _CipReadRequestBuilder struct {
*_CipReadRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (CipReadRequestBuilder) = (*_CipReadRequestBuilder)(nil)
-func (b *_CipReadRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipReadRequest
+func (b *_CipReadRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._CipReadRequest
}
func (b *_CipReadRequestBuilder) WithMandatoryFields(tag []byte, elementNb uint16) CipReadRequestBuilder {
@@ -143,14 +143,14 @@ func (b *_CipReadRequestBuilder) MustBuild() CipReadRequest {
return build
}
-func (b *_CipReadRequestBuilder) Done() CipServiceBuilder {
+func (b *_CipReadRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_CipReadRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_CipReadRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -184,10 +184,6 @@ func (m *_CipReadRequest) GetService() uint8 {
return 0x4C
}
-func (m *_CipReadRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_CipReadRequest) GetConnected() bool {
return false
}
@@ -197,8 +193,8 @@ func (m *_CipReadRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipReadRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipReadRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
///////////////////////////////////////////////////////////
@@ -235,7 +231,7 @@ func (m *_CipReadRequest) GetPlx4xTypeName() string {
}
func (m *_CipReadRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
// Implicit Field (requestPathSize)
lengthInBits += 8
@@ -255,8 +251,8 @@ func (m *_CipReadRequest) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipReadRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipReadRequest CipReadRequest, err error) {
- m.CipServiceContract = parent
+func (m *_CipReadRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__cipReadRequest CipReadRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -326,7 +322,7 @@ func (m *_CipReadRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuf
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipReadRequest) IsCipReadRequest() {}
@@ -340,11 +336,11 @@ func (m *_CipReadRequest) deepCopy() *_CipReadRequest {
return nil
}
_CipReadRequestCopy := &_CipReadRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
utils.DeepCopySlice[byte, byte](m.Tag),
m.ElementNb,
}
- _CipReadRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipReadRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _CipReadRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipReadResponse.go b/plc4go/protocols/eip/readwrite/model/CipReadResponse.go
index be8984461e..7cb19e6b40 100644
--- a/plc4go/protocols/eip/readwrite/model/CipReadResponse.go
+++ b/plc4go/protocols/eip/readwrite/model/CipReadResponse.go
@@ -40,11 +40,7 @@ type CipReadResponse interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
- // GetStatus returns Status (property field)
- GetStatus() uint8
- // GetExtStatus returns ExtStatus (property field)
- GetExtStatus() uint8
+ CipServiceResponse
// GetData returns Data (property field)
GetData() CIPData
// IsCipReadResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
@@ -55,26 +51,20 @@ type CipReadResponse interface {
// _CipReadResponse is the data-structure of this message
type _CipReadResponse struct {
- CipServiceContract
- Status uint8
- ExtStatus uint8
- Data CIPData
- // Reserved Fields
- reservedField0 *uint8
+ CipServiceResponseContract
+ Data CIPData
}
var _ CipReadResponse = (*_CipReadResponse)(nil)
-var _ CipServiceRequirements = (*_CipReadResponse)(nil)
+var _ CipServiceResponseRequirements = (*_CipReadResponse)(nil)
// NewCipReadResponse factory function for _CipReadResponse
-func NewCipReadResponse(status uint8, extStatus uint8, data CIPData) *_CipReadResponse {
+func NewCipReadResponse(status uint8, extStatus []uint16, data CIPData) *_CipReadResponse {
_result := &_CipReadResponse{
- CipServiceContract: NewCipService(),
- Status: status,
- ExtStatus: extStatus,
- Data: data,
+ CipServiceResponseContract: NewCipServiceResponse(status, extStatus),
+ Data: data,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceResponseContract.(*_CipServiceResponse)._SubType = _result
return _result
}
@@ -87,17 +77,13 @@ func NewCipReadResponse(status uint8, extStatus uint8, data CIPData) *_CipReadRe
type CipReadResponseBuilder interface {
utils.Copyable
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
- WithMandatoryFields(status uint8, extStatus uint8) CipReadResponseBuilder
- // WithStatus adds Status (property field)
- WithStatus(uint8) CipReadResponseBuilder
- // WithExtStatus adds ExtStatus (property field)
- WithExtStatus(uint8) CipReadResponseBuilder
+ WithMandatoryFields() CipReadResponseBuilder
// WithData adds Data (property field)
WithOptionalData(CIPData) CipReadResponseBuilder
// WithOptionalDataBuilder adds Data (property field) which is build by the builder
WithOptionalDataBuilder(func(CIPDataBuilder) CIPDataBuilder) CipReadResponseBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceResponseBuilder
// Build builds the CipReadResponse or returns an error if something is wrong
Build() (CipReadResponse, error)
// MustBuild does the same as Build but panics on error
@@ -112,29 +98,19 @@ func NewCipReadResponseBuilder() CipReadResponseBuilder {
type _CipReadResponseBuilder struct {
*_CipReadResponse
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceResponseBuilder
collectedErr []error
}
var _ (CipReadResponseBuilder) = (*_CipReadResponseBuilder)(nil)
-func (b *_CipReadResponseBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipReadResponse
+func (b *_CipReadResponseBuilder) setParent(contract CipServiceResponseContract) {
+ b.CipServiceResponseContract = contract
+ contract.(*_CipServiceResponse)._SubType = b._CipReadResponse
}
-func (b *_CipReadResponseBuilder) WithMandatoryFields(status uint8, extStatus uint8) CipReadResponseBuilder {
- return b.WithStatus(status).WithExtStatus(extStatus)
-}
-
-func (b *_CipReadResponseBuilder) WithStatus(status uint8) CipReadResponseBuilder {
- b.Status = status
- return b
-}
-
-func (b *_CipReadResponseBuilder) WithExtStatus(extStatus uint8) CipReadResponseBuilder {
- b.ExtStatus = extStatus
+func (b *_CipReadResponseBuilder) WithMandatoryFields() CipReadResponseBuilder {
return b
}
@@ -168,14 +144,14 @@ func (b *_CipReadResponseBuilder) MustBuild() CipReadResponse {
return build
}
-func (b *_CipReadResponseBuilder) Done() CipServiceBuilder {
+func (b *_CipReadResponseBuilder) Done() CipServiceResponseBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
}
return b.parentBuilder
}
-func (b *_CipReadResponseBuilder) buildForCipService() (CipService, error) {
+func (b *_CipReadResponseBuilder) buildForCipServiceResponse() (CipServiceResponse, error) {
return b.Build()
}
@@ -209,21 +185,13 @@ func (m *_CipReadResponse) GetService() uint8 {
return 0x4C
}
-func (m *_CipReadResponse) GetResponse() bool {
- return bool(true)
-}
-
-func (m *_CipReadResponse) GetConnected() bool {
- return false
-}
-
///////////////////////
///////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipReadResponse) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipReadResponse) GetParent() CipServiceResponseContract {
+ return m.CipServiceResponseContract
}
///////////////////////////////////////////////////////////
@@ -231,14 +199,6 @@ func (m *_CipReadResponse) GetParent() CipServiceContract {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_CipReadResponse) GetStatus() uint8 {
- return m.Status
-}
-
-func (m *_CipReadResponse) GetExtStatus() uint8 {
- return m.ExtStatus
-}
-
func (m *_CipReadResponse) GetData() CIPData {
return m.Data
}
@@ -264,16 +224,7 @@ func (m *_CipReadResponse) GetPlx4xTypeName() string {
}
func (m *_CipReadResponse) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
-
- // Reserved Field (reserved)
- lengthInBits += 8
-
- // Simple field (status)
- lengthInBits += 8
-
- // Simple field (extStatus)
- lengthInBits += 8
+ lengthInBits := uint64(m.CipServiceResponseContract.(*_CipServiceResponse).getLengthInBits(ctx))
// Optional Field (data)
if m.Data != nil {
@@ -287,8 +238,8 @@ func (m *_CipReadResponse) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipReadResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipReadResponse CipReadResponse, err error) {
- m.CipServiceContract = parent
+func (m *_CipReadResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceResponse, extStatusSize uint8, connected bool, serviceLen uint16) (__cipReadResponse CipReadResponse, err error) {
+ m.CipServiceResponseContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -298,26 +249,8 @@ func (m *_CipReadResponse) parse(ctx context.Context, readBuffer utils.ReadBuffe
currentPos := positionAware.GetPos()
_ = currentPos
- reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
- }
- m.reservedField0 = reservedField0
-
- status, err := ReadSimpleField(ctx, "status", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'status' field"))
- }
- m.Status = status
-
- extStatus, err := ReadSimpleField(ctx, "extStatus", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'extStatus' field"))
- }
- m.ExtStatus = extStatus
-
var data CIPData
- _data, err := ReadOptionalField[CIPData](ctx, "data", ReadComplex[CIPData](CIPDataParseWithBufferProducer((uint16)(uint16(serviceLen)-uint16(uint16(4)))), readBuffer), bool(((serviceLen)-(4)) > (0)))
+ _data, err := ReadOptionalField[CIPData](ctx, "data", ReadComplex[CIPData](CIPDataParseWithBufferProducer((uint16)(uint16(uint16(serviceLen)-uint16(uint16(4)))-uint16((uint16(uint16(2))*uint16(extStatusSize))))), readBuffer), bool((((serviceLen)-(4))-((2)*(extStatusSize))) > (0)))
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'data' field"))
}
@@ -351,18 +284,6 @@ func (m *_CipReadResponse) SerializeWithWriteBuffer(ctx context.Context, writeBu
return errors.Wrap(pushErr, "Error pushing for CipReadResponse")
}
- if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 1")
- }
-
- if err := WriteSimpleField[uint8](ctx, "status", m.GetStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'status' field")
- }
-
- if err := WriteSimpleField[uint8](ctx, "extStatus", m.GetExtStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'extStatus' field")
- }
-
if err := WriteOptionalField[CIPData](ctx, "data", new(m.GetData()), WriteComplex[CIPData](writeBuffer), true); err != nil {
return errors.Wrap(err, "Error serializing 'data' field")
}
@@ -372,7 +293,7 @@ func (m *_CipReadResponse) SerializeWithWriteBuffer(ctx context.Context, writeBu
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceResponseContract.(*_CipServiceResponse).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipReadResponse) IsCipReadResponse() {}
@@ -386,13 +307,10 @@ func (m *_CipReadResponse) deepCopy() *_CipReadResponse {
return nil
}
_CipReadResponseCopy := &_CipReadResponse{
- m.CipServiceContract.(*_CipService).deepCopy(),
- m.Status,
- m.ExtStatus,
+ m.CipServiceResponseContract.(*_CipServiceResponse).deepCopy(),
utils.DeepCopy[CIPData](m.Data),
- m.reservedField0,
}
- _CipReadResponseCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipReadResponseCopy.CipServiceResponseContract.(*_CipServiceResponse)._SubType = m
return _CipReadResponseCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipService.go b/plc4go/protocols/eip/readwrite/model/CipService.go
index 98f27b7b69..3b09fa2a18 100644
--- a/plc4go/protocols/eip/readwrite/model/CipService.go
+++ b/plc4go/protocols/eip/readwrite/model/CipService.go
@@ -35,6 +35,14 @@ import (
// Code generated by code-generation. DO NOT EDIT.
// CipService is the corresponding interface of CipService
+// Every CIP service response starts with the same 4-byte header: the service code
+// (with the response bit set), a reserved byte, a 1-byte general status, and a 1-byte
+// 'additional status size'. That last byte is a COUNT OF 16-BIT WORDS that follow it,
+// not a status value of its own. It is 0 for every successful response, which is why
+// modelling it as a plain 'extStatus uint 8' went unnoticed for years -- but as soon
+// as a device reports extended error detail, that byte is a length and everything
+// after it shifts. Hence extStatusSize + extStatus, and hence every trailing payload
+// length below subtracts '2 * extStatusSize'.
type CipService interface {
CipServiceContract
CipServiceRequirements
@@ -60,12 +68,8 @@ type CipServiceContract interface {
type CipServiceRequirements interface {
GetLengthInBits(ctx context.Context) uint64
GetLengthInBytes(ctx context.Context) uint64
- // GetConnected returns Connected (discriminator field)
- GetConnected() bool
// GetResponse returns Response (discriminator field)
GetResponse() bool
- // GetService returns Service (discriminator field)
- GetService() uint8
}
// _CipService is the data-structure of this message
@@ -93,56 +97,10 @@ type CipServiceBuilder interface {
utils.Copyable
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
WithMandatoryFields() CipServiceBuilder
- // AsGetAttributeAllRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsGetAttributeAllRequest() GetAttributeAllRequestBuilder
- // AsGetAttributeAllResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsGetAttributeAllResponse() GetAttributeAllResponseBuilder
- // AsSetAttributeAllRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsSetAttributeAllRequest() SetAttributeAllRequestBuilder
- // AsSetAttributeAllResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsSetAttributeAllResponse() SetAttributeAllResponseBuilder
- // AsGetAttributeListRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsGetAttributeListRequest() GetAttributeListRequestBuilder
- // AsGetAttributeListResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsGetAttributeListResponse() GetAttributeListResponseBuilder
- // AsSetAttributeListRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsSetAttributeListRequest() SetAttributeListRequestBuilder
- // AsSetAttributeListResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsSetAttributeListResponse() SetAttributeListResponseBuilder
- // AsMultipleServiceRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsMultipleServiceRequest() MultipleServiceRequestBuilder
- // AsMultipleServiceResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsMultipleServiceResponse() MultipleServiceResponseBuilder
- // AsGetAttributeSingleRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsGetAttributeSingleRequest() GetAttributeSingleRequestBuilder
- // AsGetAttributeSingleResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsGetAttributeSingleResponse() GetAttributeSingleResponseBuilder
- // AsSetAttributeSingleRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsSetAttributeSingleRequest() SetAttributeSingleRequestBuilder
- // AsSetAttributeSingleResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsSetAttributeSingleResponse() SetAttributeSingleResponseBuilder
- // AsCipReadRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipReadRequest() CipReadRequestBuilder
- // AsCipReadResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipReadResponse() CipReadResponseBuilder
- // AsCipWriteRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipWriteRequest() CipWriteRequestBuilder
- // AsCipWriteResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipWriteResponse() CipWriteResponseBuilder
- // AsCipConnectionManagerCloseRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipConnectionManagerCloseRequest() CipConnectionManagerCloseRequestBuilder
- // AsCipConnectionManagerCloseResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipConnectionManagerCloseResponse() CipConnectionManagerCloseResponseBuilder
- // AsCipUnconnectedRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipUnconnectedRequest() CipUnconnectedRequestBuilder
- // AsCipConnectedRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipConnectedRequest() CipConnectedRequestBuilder
- // AsCipConnectedResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipConnectedResponse() CipConnectedResponseBuilder
- // AsCipConnectionManagerRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipConnectionManagerRequest() CipConnectionManagerRequestBuilder
- // AsCipConnectionManagerResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
- AsCipConnectionManagerResponse() CipConnectionManagerResponseBuilder
+ // AsCipServiceRequest converts this build to a subType of CipService. It is always possible to return to current builder using Done()
+ AsCipServiceRequest() CipServiceRequestBuilder
+ // AsCipServiceResponse converts this build to a subType of CipService. It is always possible to return to current builder using Done()
+ AsCipServiceResponse() CipServiceResponseBuilder
// Build builds the CipService or returns an error if something is wrong
PartialBuild() (CipServiceContract, error)
// MustBuild does the same as Build but panics on error
@@ -193,251 +151,21 @@ func (b *_CipServiceBuilder) PartialMustBuild() CipServiceContract {
return build
}
-func (b *_CipServiceBuilder) AsGetAttributeAllRequest() GetAttributeAllRequestBuilder {
- if cb, ok := b.childBuilder.(GetAttributeAllRequestBuilder); ok {
+func (b *_CipServiceBuilder) AsCipServiceRequest() CipServiceRequestBuilder {
+ if cb, ok := b.childBuilder.(CipServiceRequestBuilder); ok {
return cb
}
- cb := NewGetAttributeAllRequestBuilder().(*_GetAttributeAllRequestBuilder)
+ cb := NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
cb.parentBuilder = b
b.childBuilder = cb
return cb
}
-func (b *_CipServiceBuilder) AsGetAttributeAllResponse() GetAttributeAllResponseBuilder {
- if cb, ok := b.childBuilder.(GetAttributeAllResponseBuilder); ok {
+func (b *_CipServiceBuilder) AsCipServiceResponse() CipServiceResponseBuilder {
+ if cb, ok := b.childBuilder.(CipServiceResponseBuilder); ok {
return cb
}
- cb := NewGetAttributeAllResponseBuilder().(*_GetAttributeAllResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsSetAttributeAllRequest() SetAttributeAllRequestBuilder {
- if cb, ok := b.childBuilder.(SetAttributeAllRequestBuilder); ok {
- return cb
- }
- cb := NewSetAttributeAllRequestBuilder().(*_SetAttributeAllRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsSetAttributeAllResponse() SetAttributeAllResponseBuilder {
- if cb, ok := b.childBuilder.(SetAttributeAllResponseBuilder); ok {
- return cb
- }
- cb := NewSetAttributeAllResponseBuilder().(*_SetAttributeAllResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsGetAttributeListRequest() GetAttributeListRequestBuilder {
- if cb, ok := b.childBuilder.(GetAttributeListRequestBuilder); ok {
- return cb
- }
- cb := NewGetAttributeListRequestBuilder().(*_GetAttributeListRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsGetAttributeListResponse() GetAttributeListResponseBuilder {
- if cb, ok := b.childBuilder.(GetAttributeListResponseBuilder); ok {
- return cb
- }
- cb := NewGetAttributeListResponseBuilder().(*_GetAttributeListResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsSetAttributeListRequest() SetAttributeListRequestBuilder {
- if cb, ok := b.childBuilder.(SetAttributeListRequestBuilder); ok {
- return cb
- }
- cb := NewSetAttributeListRequestBuilder().(*_SetAttributeListRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsSetAttributeListResponse() SetAttributeListResponseBuilder {
- if cb, ok := b.childBuilder.(SetAttributeListResponseBuilder); ok {
- return cb
- }
- cb := NewSetAttributeListResponseBuilder().(*_SetAttributeListResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsMultipleServiceRequest() MultipleServiceRequestBuilder {
- if cb, ok := b.childBuilder.(MultipleServiceRequestBuilder); ok {
- return cb
- }
- cb := NewMultipleServiceRequestBuilder().(*_MultipleServiceRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsMultipleServiceResponse() MultipleServiceResponseBuilder {
- if cb, ok := b.childBuilder.(MultipleServiceResponseBuilder); ok {
- return cb
- }
- cb := NewMultipleServiceResponseBuilder().(*_MultipleServiceResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsGetAttributeSingleRequest() GetAttributeSingleRequestBuilder {
- if cb, ok := b.childBuilder.(GetAttributeSingleRequestBuilder); ok {
- return cb
- }
- cb := NewGetAttributeSingleRequestBuilder().(*_GetAttributeSingleRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsGetAttributeSingleResponse() GetAttributeSingleResponseBuilder {
- if cb, ok := b.childBuilder.(GetAttributeSingleResponseBuilder); ok {
- return cb
- }
- cb := NewGetAttributeSingleResponseBuilder().(*_GetAttributeSingleResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsSetAttributeSingleRequest() SetAttributeSingleRequestBuilder {
- if cb, ok := b.childBuilder.(SetAttributeSingleRequestBuilder); ok {
- return cb
- }
- cb := NewSetAttributeSingleRequestBuilder().(*_SetAttributeSingleRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsSetAttributeSingleResponse() SetAttributeSingleResponseBuilder {
- if cb, ok := b.childBuilder.(SetAttributeSingleResponseBuilder); ok {
- return cb
- }
- cb := NewSetAttributeSingleResponseBuilder().(*_SetAttributeSingleResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipReadRequest() CipReadRequestBuilder {
- if cb, ok := b.childBuilder.(CipReadRequestBuilder); ok {
- return cb
- }
- cb := NewCipReadRequestBuilder().(*_CipReadRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipReadResponse() CipReadResponseBuilder {
- if cb, ok := b.childBuilder.(CipReadResponseBuilder); ok {
- return cb
- }
- cb := NewCipReadResponseBuilder().(*_CipReadResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipWriteRequest() CipWriteRequestBuilder {
- if cb, ok := b.childBuilder.(CipWriteRequestBuilder); ok {
- return cb
- }
- cb := NewCipWriteRequestBuilder().(*_CipWriteRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipWriteResponse() CipWriteResponseBuilder {
- if cb, ok := b.childBuilder.(CipWriteResponseBuilder); ok {
- return cb
- }
- cb := NewCipWriteResponseBuilder().(*_CipWriteResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipConnectionManagerCloseRequest() CipConnectionManagerCloseRequestBuilder {
- if cb, ok := b.childBuilder.(CipConnectionManagerCloseRequestBuilder); ok {
- return cb
- }
- cb := NewCipConnectionManagerCloseRequestBuilder().(*_CipConnectionManagerCloseRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipConnectionManagerCloseResponse() CipConnectionManagerCloseResponseBuilder {
- if cb, ok := b.childBuilder.(CipConnectionManagerCloseResponseBuilder); ok {
- return cb
- }
- cb := NewCipConnectionManagerCloseResponseBuilder().(*_CipConnectionManagerCloseResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipUnconnectedRequest() CipUnconnectedRequestBuilder {
- if cb, ok := b.childBuilder.(CipUnconnectedRequestBuilder); ok {
- return cb
- }
- cb := NewCipUnconnectedRequestBuilder().(*_CipUnconnectedRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipConnectedRequest() CipConnectedRequestBuilder {
- if cb, ok := b.childBuilder.(CipConnectedRequestBuilder); ok {
- return cb
- }
- cb := NewCipConnectedRequestBuilder().(*_CipConnectedRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipConnectedResponse() CipConnectedResponseBuilder {
- if cb, ok := b.childBuilder.(CipConnectedResponseBuilder); ok {
- return cb
- }
- cb := NewCipConnectedResponseBuilder().(*_CipConnectedResponseBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipConnectionManagerRequest() CipConnectionManagerRequestBuilder {
- if cb, ok := b.childBuilder.(CipConnectionManagerRequestBuilder); ok {
- return cb
- }
- cb := NewCipConnectionManagerRequestBuilder().(*_CipConnectionManagerRequestBuilder)
- cb.parentBuilder = b
- b.childBuilder = cb
- return cb
-}
-
-func (b *_CipServiceBuilder) AsCipConnectionManagerResponse() CipConnectionManagerResponseBuilder {
- if cb, ok := b.childBuilder.(CipConnectionManagerResponseBuilder); ok {
- return cb
- }
- cb := NewCipConnectionManagerResponseBuilder().(*_CipConnectionManagerResponseBuilder)
+ cb := NewCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
cb.parentBuilder = b
b.childBuilder = cb
return cb
@@ -505,8 +233,6 @@ func (m *_CipService) getLengthInBits(ctx context.Context) uint64 {
lengthInBits := uint64(0)
// Discriminator Field (response)
lengthInBits += 1
- // Discriminator Field (service)
- lengthInBits += 7
return lengthInBits
}
@@ -562,116 +288,19 @@ func (m *_CipService) parse(ctx context.Context, readBuffer utils.ReadBuffer, co
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'response' field"))
}
- service, err := ReadDiscriminatorField[uint8](ctx, "service", ReadUnsignedByte(readBuffer, uint8(7)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'service' field"))
- }
-
// Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
var _child CipService
switch {
- case service == 0x01 && response == bool(false): // GetAttributeAllRequest
- if _child, err = new(_GetAttributeAllRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeAllRequest for type-switch of CipService")
- }
- case service == 0x01 && response == bool(true): // GetAttributeAllResponse
- if _child, err = new(_GetAttributeAllResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeAllResponse for type-switch of CipService")
- }
- case service == 0x02 && response == bool(false): // SetAttributeAllRequest
- if _child, err = new(_SetAttributeAllRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeAllRequest for type-switch of CipService")
+ case response == bool(false): // CipServiceRequest
+ if _child, err = new(_CipServiceRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipServiceRequest for type-switch of CipService")
}
- case service == 0x02 && response == bool(true): // SetAttributeAllResponse
- if _child, err = new(_SetAttributeAllResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeAllResponse for type-switch of CipService")
- }
- case service == 0x03 && response == bool(false): // GetAttributeListRequest
- if _child, err = new(_GetAttributeListRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeListRequest for type-switch of CipService")
- }
- case service == 0x03 && response == bool(true): // GetAttributeListResponse
- if _child, err = new(_GetAttributeListResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeListResponse for type-switch of CipService")
- }
- case service == 0x04 && response == bool(false): // SetAttributeListRequest
- if _child, err = new(_SetAttributeListRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeListRequest for type-switch of CipService")
- }
- case service == 0x04 && response == bool(true): // SetAttributeListResponse
- if _child, err = new(_SetAttributeListResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeListResponse for type-switch of CipService")
- }
- case service == 0x0A && response == bool(false): // MultipleServiceRequest
- if _child, err = new(_MultipleServiceRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type MultipleServiceRequest for type-switch of CipService")
- }
- case service == 0x0A && response == bool(true): // MultipleServiceResponse
- if _child, err = new(_MultipleServiceResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type MultipleServiceResponse for type-switch of CipService")
- }
- case service == 0x0E && response == bool(false): // GetAttributeSingleRequest
- if _child, err = new(_GetAttributeSingleRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeSingleRequest for type-switch of CipService")
- }
- case service == 0x0E && response == bool(true): // GetAttributeSingleResponse
- if _child, err = new(_GetAttributeSingleResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeSingleResponse for type-switch of CipService")
- }
- case service == 0x10 && response == bool(false): // SetAttributeSingleRequest
- if _child, err = new(_SetAttributeSingleRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeSingleRequest for type-switch of CipService")
- }
- case service == 0x10 && response == bool(true): // SetAttributeSingleResponse
- if _child, err = new(_SetAttributeSingleResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeSingleResponse for type-switch of CipService")
- }
- case service == 0x4C && response == bool(false): // CipReadRequest
- if _child, err = new(_CipReadRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipReadRequest for type-switch of CipService")
- }
- case service == 0x4C && response == bool(true): // CipReadResponse
- if _child, err = new(_CipReadResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipReadResponse for type-switch of CipService")
- }
- case service == 0x4D && response == bool(false): // CipWriteRequest
- if _child, err = new(_CipWriteRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipWriteRequest for type-switch of CipService")
- }
- case service == 0x4D && response == bool(true): // CipWriteResponse
- if _child, err = new(_CipWriteResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipWriteResponse for type-switch of CipService")
- }
- case service == 0x4E && response == bool(false): // CipConnectionManagerCloseRequest
- if _child, err = new(_CipConnectionManagerCloseRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerCloseRequest for type-switch of CipService")
- }
- case service == 0x4E && response == bool(true): // CipConnectionManagerCloseResponse
- if _child, err = new(_CipConnectionManagerCloseResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerCloseResponse for type-switch of CipService")
- }
- case service == 0x52 && response == bool(false) && connected == bool(false): // CipUnconnectedRequest
- if _child, err = new(_CipUnconnectedRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipUnconnectedRequest for type-switch of CipService")
- }
- case service == 0x52 && response == bool(false) && connected == bool(true): // CipConnectedRequest
- if _child, err = new(_CipConnectedRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipConnectedRequest for type-switch of CipService")
- }
- case service == 0x52 && response == bool(true): // CipConnectedResponse
- if _child, err = new(_CipConnectedResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipConnectedResponse for type-switch of CipService")
- }
- case service == 0x5B && response == bool(false): // CipConnectionManagerRequest
- if _child, err = new(_CipConnectionManagerRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerRequest for type-switch of CipService")
- }
- case service == 0x5B && response == bool(true): // CipConnectionManagerResponse
- if _child, err = new(_CipConnectionManagerResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
- return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerResponse for type-switch of CipService")
+ case response == bool(true): // CipServiceResponse
+ if _child, err = new(_CipServiceResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipServiceResponse for type-switch of CipService")
}
default:
- return nil, errors.Errorf("Unmapped type for parameters [service=%v, response=%v, connected=%v]", service, response, connected)
+ return nil, errors.Errorf("Unmapped type for parameters [response=%v]", response)
}
if closeErr := readBuffer.CloseContext("CipService"); closeErr != nil {
@@ -697,10 +326,6 @@ func (pm *_CipService) serializeParent(ctx context.Context, writeBuffer utils.Wr
return errors.Wrap(err, "Error serializing 'response' field")
}
- if err := WriteDiscriminatorField(ctx, "service", m.GetService(), WriteUnsignedByte(writeBuffer, 7)); err != nil {
- return errors.Wrap(err, "Error serializing 'service' field")
- }
-
// Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
if _typeSwitchErr := serializeChildFunction(); _typeSwitchErr != nil {
return errors.Wrap(_typeSwitchErr, "Error serializing sub-type field")
diff --git a/plc4go/protocols/eip/readwrite/model/CipServiceRequest.go b/plc4go/protocols/eip/readwrite/model/CipServiceRequest.go
new file mode 100644
index 0000000000..87e784e5bf
--- /dev/null
+++ b/plc4go/protocols/eip/readwrite/model/CipServiceRequest.go
@@ -0,0 +1,541 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "context"
+ stdErrors "errors"
+ "fmt"
+
+ "github.com/rs/zerolog"
+
+ . "github.com/apache/plc4x/plc4go/spi/codegen/fields"
+ . "github.com/apache/plc4x/plc4go/spi/codegen/io"
+ "github.com/apache/plc4x/plc4go/spi/errors"
+ "github.com/apache/plc4x/plc4go/spi/utils"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// CipServiceRequest is the corresponding interface of CipServiceRequest
+type CipServiceRequest interface {
+ CipServiceRequestContract
+ CipServiceRequestRequirements
+ fmt.Stringer
+ utils.LengthAware
+ utils.Serializable
+ utils.Copyable
+ // IsCipServiceRequest is a marker method to prevent unintentional type checks (interfaces of same signature)
+ IsCipServiceRequest()
+ // CreateBuilder creates a CipServiceRequestBuilder
+ CreateCipServiceRequestBuilder() CipServiceRequestBuilder
+}
+
+// CipServiceRequestContract provides a set of functions which can be overwritten by a sub struct
+type CipServiceRequestContract interface {
+ CipServiceContract
+ // GetResponse returns Response (discriminator field)
+ GetResponse() bool
+ // IsCipServiceRequest is a marker method to prevent unintentional type checks (interfaces of same signature)
+ IsCipServiceRequest()
+ // CreateBuilder creates a CipServiceRequestBuilder
+ CreateCipServiceRequestBuilder() CipServiceRequestBuilder
+}
+
+// CipServiceRequestRequirements provides a set of functions which need to be implemented by a sub struct
+type CipServiceRequestRequirements interface {
+ CipServiceRequirements
+ GetLengthInBits(ctx context.Context) uint64
+ GetLengthInBytes(ctx context.Context) uint64
+}
+
+// _CipServiceRequest is the data-structure of this message
+type _CipServiceRequest struct {
+ CipServiceContract
+ _SubType interface {
+ CipServiceRequestContract
+ CipServiceRequestRequirements
+ }
+}
+
+var _ CipServiceRequestContract = (*_CipServiceRequest)(nil)
+
+// NewCipServiceRequest factory function for _CipServiceRequest
+func NewCipServiceRequest() *_CipServiceRequest {
+ _result := &_CipServiceRequest{
+ CipServiceContract: NewCipService(),
+ }
+ _result.CipServiceContract.(*_CipService)._SubType = _result._SubType
+ return _result
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Builder
+///////////////////////
+
+// CipServiceRequestBuilder is a builder for CipServiceRequest
+type CipServiceRequestBuilder interface {
+ utils.Copyable
+ // WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
+ WithMandatoryFields() CipServiceRequestBuilder
+ // AsGetAttributeAllRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsGetAttributeAllRequest() GetAttributeAllRequestBuilder
+ // AsSetAttributeAllRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsSetAttributeAllRequest() SetAttributeAllRequestBuilder
+ // AsGetAttributeListRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsGetAttributeListRequest() GetAttributeListRequestBuilder
+ // AsSetAttributeListRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsSetAttributeListRequest() SetAttributeListRequestBuilder
+ // AsMultipleServiceRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsMultipleServiceRequest() MultipleServiceRequestBuilder
+ // AsGetAttributeSingleRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsGetAttributeSingleRequest() GetAttributeSingleRequestBuilder
+ // AsSetAttributeSingleRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsSetAttributeSingleRequest() SetAttributeSingleRequestBuilder
+ // AsCipReadRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsCipReadRequest() CipReadRequestBuilder
+ // AsCipWriteRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsCipWriteRequest() CipWriteRequestBuilder
+ // AsCipConnectionManagerCloseRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsCipConnectionManagerCloseRequest() CipConnectionManagerCloseRequestBuilder
+ // AsCipUnconnectedRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsCipUnconnectedRequest() CipUnconnectedRequestBuilder
+ // AsCipConnectedRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsCipConnectedRequest() CipConnectedRequestBuilder
+ // AsCipConnectionManagerRequest converts this build to a subType of CipServiceRequest. It is always possible to return to current builder using Done()
+ AsCipConnectionManagerRequest() CipConnectionManagerRequestBuilder
+ // Build builds the CipServiceRequest or returns an error if something is wrong
+ PartialBuild() (CipServiceRequestContract, error)
+ // MustBuild does the same as Build but panics on error
+ PartialMustBuild() CipServiceRequestContract
+ // Done is used to finish work on this child and return (or create one if none) to the parent builder
+ Done() CipServiceBuilder
+ // Build builds the CipServiceRequest or returns an error if something is wrong
+ Build() (CipServiceRequest, error)
+ // MustBuild does the same as Build but panics on error
+ MustBuild() CipServiceRequest
+}
+
+// NewCipServiceRequestBuilder() creates a CipServiceRequestBuilder
+func NewCipServiceRequestBuilder() CipServiceRequestBuilder {
+ return &_CipServiceRequestBuilder{_CipServiceRequest: new(_CipServiceRequest)}
+}
+
+type _CipServiceRequestChildBuilder interface {
+ utils.Copyable
+ setParent(CipServiceRequestContract)
+ buildForCipServiceRequest() (CipServiceRequest, error)
+}
+
+type _CipServiceRequestBuilder struct {
+ *_CipServiceRequest
+
+ parentBuilder *_CipServiceBuilder
+
+ childBuilder _CipServiceRequestChildBuilder
+
+ collectedErr []error
+}
+
+var _ (CipServiceRequestBuilder) = (*_CipServiceRequestBuilder)(nil)
+
+func (b *_CipServiceRequestBuilder) setParent(contract CipServiceContract) {
+ b.CipServiceContract = contract
+ contract.(*_CipService)._SubType = b._CipServiceRequest
+}
+
+func (b *_CipServiceRequestBuilder) WithMandatoryFields() CipServiceRequestBuilder {
+ return b
+}
+
+func (b *_CipServiceRequestBuilder) PartialBuild() (CipServiceRequestContract, error) {
+ if err := stdErrors.Join(b.collectedErr...); err != nil {
+ return nil, errors.Wrap(err, "error occurred during build")
+ }
+ return b._CipServiceRequest.deepCopy(), nil
+}
+
+func (b *_CipServiceRequestBuilder) PartialMustBuild() CipServiceRequestContract {
+ build, err := b.PartialBuild()
+ if err != nil {
+ panic(err)
+ }
+ return build
+}
+
+func (b *_CipServiceRequestBuilder) AsGetAttributeAllRequest() GetAttributeAllRequestBuilder {
+ if cb, ok := b.childBuilder.(GetAttributeAllRequestBuilder); ok {
+ return cb
+ }
+ cb := NewGetAttributeAllRequestBuilder().(*_GetAttributeAllRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsSetAttributeAllRequest() SetAttributeAllRequestBuilder {
+ if cb, ok := b.childBuilder.(SetAttributeAllRequestBuilder); ok {
+ return cb
+ }
+ cb := NewSetAttributeAllRequestBuilder().(*_SetAttributeAllRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsGetAttributeListRequest() GetAttributeListRequestBuilder {
+ if cb, ok := b.childBuilder.(GetAttributeListRequestBuilder); ok {
+ return cb
+ }
+ cb := NewGetAttributeListRequestBuilder().(*_GetAttributeListRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsSetAttributeListRequest() SetAttributeListRequestBuilder {
+ if cb, ok := b.childBuilder.(SetAttributeListRequestBuilder); ok {
+ return cb
+ }
+ cb := NewSetAttributeListRequestBuilder().(*_SetAttributeListRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsMultipleServiceRequest() MultipleServiceRequestBuilder {
+ if cb, ok := b.childBuilder.(MultipleServiceRequestBuilder); ok {
+ return cb
+ }
+ cb := NewMultipleServiceRequestBuilder().(*_MultipleServiceRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsGetAttributeSingleRequest() GetAttributeSingleRequestBuilder {
+ if cb, ok := b.childBuilder.(GetAttributeSingleRequestBuilder); ok {
+ return cb
+ }
+ cb := NewGetAttributeSingleRequestBuilder().(*_GetAttributeSingleRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsSetAttributeSingleRequest() SetAttributeSingleRequestBuilder {
+ if cb, ok := b.childBuilder.(SetAttributeSingleRequestBuilder); ok {
+ return cb
+ }
+ cb := NewSetAttributeSingleRequestBuilder().(*_SetAttributeSingleRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsCipReadRequest() CipReadRequestBuilder {
+ if cb, ok := b.childBuilder.(CipReadRequestBuilder); ok {
+ return cb
+ }
+ cb := NewCipReadRequestBuilder().(*_CipReadRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsCipWriteRequest() CipWriteRequestBuilder {
+ if cb, ok := b.childBuilder.(CipWriteRequestBuilder); ok {
+ return cb
+ }
+ cb := NewCipWriteRequestBuilder().(*_CipWriteRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsCipConnectionManagerCloseRequest() CipConnectionManagerCloseRequestBuilder {
+ if cb, ok := b.childBuilder.(CipConnectionManagerCloseRequestBuilder); ok {
+ return cb
+ }
+ cb := NewCipConnectionManagerCloseRequestBuilder().(*_CipConnectionManagerCloseRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsCipUnconnectedRequest() CipUnconnectedRequestBuilder {
+ if cb, ok := b.childBuilder.(CipUnconnectedRequestBuilder); ok {
+ return cb
+ }
+ cb := NewCipUnconnectedRequestBuilder().(*_CipUnconnectedRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsCipConnectedRequest() CipConnectedRequestBuilder {
+ if cb, ok := b.childBuilder.(CipConnectedRequestBuilder); ok {
+ return cb
+ }
+ cb := NewCipConnectedRequestBuilder().(*_CipConnectedRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) AsCipConnectionManagerRequest() CipConnectionManagerRequestBuilder {
+ if cb, ok := b.childBuilder.(CipConnectionManagerRequestBuilder); ok {
+ return cb
+ }
+ cb := NewCipConnectionManagerRequestBuilder().(*_CipConnectionManagerRequestBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceRequestBuilder) Done() CipServiceBuilder {
+ if b.parentBuilder == nil {
+ b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ }
+ return b.parentBuilder
+}
+
+func (b *_CipServiceRequestBuilder) buildForCipService() (CipService, error) {
+ return b.Build()
+}
+
+func (b *_CipServiceRequestBuilder) Build() (CipServiceRequest, error) {
+ v, err := b.PartialBuild()
+ if err != nil {
+ return nil, errors.Wrap(err, "error occurred during partial build")
+ }
+ if b.childBuilder == nil {
+ return nil, errors.New("no child builder present")
+ }
+ b.childBuilder.setParent(v)
+ return b.childBuilder.buildForCipServiceRequest()
+}
+
+func (b *_CipServiceRequestBuilder) MustBuild() CipServiceRequest {
+ build, err := b.Build()
+ if err != nil {
+ panic(err)
+ }
+ return build
+}
+
+func (b *_CipServiceRequestBuilder) DeepCopy() any {
+ _copy := b.CreateCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
+ _copy.childBuilder = b.childBuilder.DeepCopy().(_CipServiceRequestChildBuilder)
+ _copy.childBuilder.setParent(_copy)
+ if b.collectedErr != nil {
+ copy(_copy.collectedErr, b.collectedErr)
+ }
+ return _copy
+}
+
+// CreateCipServiceRequestBuilder creates a CipServiceRequestBuilder
+func (b *_CipServiceRequest) CreateCipServiceRequestBuilder() CipServiceRequestBuilder {
+ if b == nil {
+ return NewCipServiceRequestBuilder()
+ }
+ return &_CipServiceRequestBuilder{_CipServiceRequest: b.deepCopy()}
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *_CipServiceRequest) GetResponse() bool {
+ return bool(false)
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// Deprecated: use the interface for direct cast
+func CastCipServiceRequest(structType any) CipServiceRequest {
+ if casted, ok := structType.(CipServiceRequest); ok {
+ return casted
+ }
+ if casted, ok := structType.(*CipServiceRequest); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_CipServiceRequest) GetPlx4xTypeName() string {
+ return "CipServiceRequest"
+}
+
+func (m *_CipServiceRequest) getLengthInBits(ctx context.Context) uint64 {
+ lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ // Discriminator Field (service)
+ lengthInBits += 7
+
+ return lengthInBits
+}
+
+func (m *_CipServiceRequest) GetLengthInBits(ctx context.Context) uint64 {
+ return m._SubType.GetLengthInBits(ctx)
+}
+
+func (m *_CipServiceRequest) GetLengthInBytes(ctx context.Context) uint64 {
+ return m._SubType.GetLengthInBits(ctx) / 8
+}
+
+func (m *_CipServiceRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipServiceRequest CipServiceRequest, err error) {
+ m.CipServiceContract = parent
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("CipServiceRequest"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for CipServiceRequest")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ service, err := ReadDiscriminatorField[uint8](ctx, "service", ReadUnsignedByte(readBuffer, uint8(7)))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'service' field"))
+ }
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ var _child CipServiceRequest
+ switch {
+ case service == 0x01: // GetAttributeAllRequest
+ if _child, err = new(_GetAttributeAllRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeAllRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x02: // SetAttributeAllRequest
+ if _child, err = new(_SetAttributeAllRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeAllRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x03: // GetAttributeListRequest
+ if _child, err = new(_GetAttributeListRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeListRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x04: // SetAttributeListRequest
+ if _child, err = new(_SetAttributeListRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeListRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x0A: // MultipleServiceRequest
+ if _child, err = new(_MultipleServiceRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type MultipleServiceRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x0E: // GetAttributeSingleRequest
+ if _child, err = new(_GetAttributeSingleRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeSingleRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x10: // SetAttributeSingleRequest
+ if _child, err = new(_SetAttributeSingleRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeSingleRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x4C: // CipReadRequest
+ if _child, err = new(_CipReadRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipReadRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x4D: // CipWriteRequest
+ if _child, err = new(_CipWriteRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipWriteRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x4E: // CipConnectionManagerCloseRequest
+ if _child, err = new(_CipConnectionManagerCloseRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerCloseRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x52 && connected == bool(false): // CipUnconnectedRequest
+ if _child, err = new(_CipUnconnectedRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipUnconnectedRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x52 && connected == bool(true): // CipConnectedRequest
+ if _child, err = new(_CipConnectedRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipConnectedRequest for type-switch of CipServiceRequest")
+ }
+ case service == 0x5B: // CipConnectionManagerRequest
+ if _child, err = new(_CipConnectionManagerRequest).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerRequest for type-switch of CipServiceRequest")
+ }
+ default:
+ return nil, errors.Errorf("Unmapped type for parameters [service=%v, connected=%v]", service, connected)
+ }
+
+ if closeErr := readBuffer.CloseContext("CipServiceRequest"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for CipServiceRequest")
+ }
+
+ parent._SubType = _child
+ return _child, nil
+}
+
+func (pm *_CipServiceRequest) serializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CipServiceRequest, serializeChildFunction func() error) error {
+ // We redirect all calls through client as some methods are only implemented there
+ m := child
+ _ = m
+ positionAware := writeBuffer
+ _ = positionAware
+ log := zerolog.Ctx(ctx)
+ _ = log
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("CipServiceRequest"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for CipServiceRequest")
+ }
+
+ if err := WriteDiscriminatorField(ctx, "service", m.GetService(), WriteUnsignedByte(writeBuffer, 7)); err != nil {
+ return errors.Wrap(err, "Error serializing 'service' field")
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ if _typeSwitchErr := serializeChildFunction(); _typeSwitchErr != nil {
+ return errors.Wrap(_typeSwitchErr, "Error serializing sub-type field")
+ }
+
+ if popErr := writeBuffer.PopContext("CipServiceRequest"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for CipServiceRequest")
+ }
+ return nil
+ }
+ return pm.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+}
+
+func (m *_CipServiceRequest) IsCipServiceRequest() {}
+
+func (m *_CipServiceRequest) DeepCopy() any {
+ return m.deepCopy()
+}
+
+func (m *_CipServiceRequest) deepCopy() *_CipServiceRequest {
+ if m == nil {
+ return nil
+ }
+ _CipServiceRequestCopy := &_CipServiceRequest{
+ m.CipServiceContract.(*_CipService).deepCopy(),
+ nil, // will be set by child
+ }
+ _CipServiceRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ return _CipServiceRequestCopy
+}
diff --git a/plc4go/protocols/eip/readwrite/model/CipServiceResponse.go b/plc4go/protocols/eip/readwrite/model/CipServiceResponse.go
new file mode 100644
index 0000000000..9c2f3ad141
--- /dev/null
+++ b/plc4go/protocols/eip/readwrite/model/CipServiceResponse.go
@@ -0,0 +1,623 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "context"
+ stdErrors "errors"
+ "fmt"
+
+ "github.com/rs/zerolog"
+
+ . "github.com/apache/plc4x/plc4go/spi/codegen/fields"
+ . "github.com/apache/plc4x/plc4go/spi/codegen/io"
+ "github.com/apache/plc4x/plc4go/spi/errors"
+ "github.com/apache/plc4x/plc4go/spi/utils"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// CipServiceResponse is the corresponding interface of CipServiceResponse
+type CipServiceResponse interface {
+ CipServiceResponseContract
+ CipServiceResponseRequirements
+ fmt.Stringer
+ utils.LengthAware
+ utils.Serializable
+ utils.Copyable
+ // IsCipServiceResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
+ IsCipServiceResponse()
+ // CreateBuilder creates a CipServiceResponseBuilder
+ CreateCipServiceResponseBuilder() CipServiceResponseBuilder
+}
+
+// CipServiceResponseContract provides a set of functions which can be overwritten by a sub struct
+type CipServiceResponseContract interface {
+ CipServiceContract
+ // GetStatus returns Status (property field)
+ GetStatus() uint8
+ // GetExtStatus returns ExtStatus (property field)
+ GetExtStatus() []uint16
+ // GetResponse returns Response (discriminator field)
+ GetResponse() bool
+ // IsCipServiceResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
+ IsCipServiceResponse()
+ // CreateBuilder creates a CipServiceResponseBuilder
+ CreateCipServiceResponseBuilder() CipServiceResponseBuilder
+}
+
+// CipServiceResponseRequirements provides a set of functions which need to be implemented by a sub struct
+type CipServiceResponseRequirements interface {
+ CipServiceRequirements
+ GetLengthInBits(ctx context.Context) uint64
+ GetLengthInBytes(ctx context.Context) uint64
+}
+
+// _CipServiceResponse is the data-structure of this message
+type _CipServiceResponse struct {
+ CipServiceContract
+ _SubType interface {
+ CipServiceResponseContract
+ CipServiceResponseRequirements
+ }
+ Status uint8
+ ExtStatus []uint16
+ // Reserved Fields
+ reservedField0 *uint8
+}
+
+var _ CipServiceResponseContract = (*_CipServiceResponse)(nil)
+
+// NewCipServiceResponse factory function for _CipServiceResponse
+func NewCipServiceResponse(status uint8, extStatus []uint16) *_CipServiceResponse {
+ _result := &_CipServiceResponse{
+ CipServiceContract: NewCipService(),
+ Status: status,
+ ExtStatus: extStatus,
+ }
+ _result.CipServiceContract.(*_CipService)._SubType = _result._SubType
+ return _result
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Builder
+///////////////////////
+
+// CipServiceResponseBuilder is a builder for CipServiceResponse
+type CipServiceResponseBuilder interface {
+ utils.Copyable
+ // WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
+ WithMandatoryFields(status uint8, extStatus []uint16) CipServiceResponseBuilder
+ // WithStatus adds Status (property field)
+ WithStatus(uint8) CipServiceResponseBuilder
+ // WithExtStatus adds ExtStatus (property field)
+ WithExtStatus(...uint16) CipServiceResponseBuilder
+ // AsGetAttributeAllResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsGetAttributeAllResponse() GetAttributeAllResponseBuilder
+ // AsSetAttributeAllResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsSetAttributeAllResponse() SetAttributeAllResponseBuilder
+ // AsGetAttributeListResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsGetAttributeListResponse() GetAttributeListResponseBuilder
+ // AsSetAttributeListResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsSetAttributeListResponse() SetAttributeListResponseBuilder
+ // AsMultipleServiceResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsMultipleServiceResponse() MultipleServiceResponseBuilder
+ // AsGetAttributeSingleResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsGetAttributeSingleResponse() GetAttributeSingleResponseBuilder
+ // AsSetAttributeSingleResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsSetAttributeSingleResponse() SetAttributeSingleResponseBuilder
+ // AsCipReadResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsCipReadResponse() CipReadResponseBuilder
+ // AsCipWriteResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsCipWriteResponse() CipWriteResponseBuilder
+ // AsCipConnectionManagerCloseResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsCipConnectionManagerCloseResponse() CipConnectionManagerCloseResponseBuilder
+ // AsCipConnectedResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsCipConnectedResponse() CipConnectedResponseBuilder
+ // AsCipConnectionManagerResponse converts this build to a subType of CipServiceResponse. It is always possible to return to current builder using Done()
+ AsCipConnectionManagerResponse() CipConnectionManagerResponseBuilder
+ // Build builds the CipServiceResponse or returns an error if something is wrong
+ PartialBuild() (CipServiceResponseContract, error)
+ // MustBuild does the same as Build but panics on error
+ PartialMustBuild() CipServiceResponseContract
+ // Done is used to finish work on this child and return (or create one if none) to the parent builder
+ Done() CipServiceBuilder
+ // Build builds the CipServiceResponse or returns an error if something is wrong
+ Build() (CipServiceResponse, error)
+ // MustBuild does the same as Build but panics on error
+ MustBuild() CipServiceResponse
+}
+
+// NewCipServiceResponseBuilder() creates a CipServiceResponseBuilder
+func NewCipServiceResponseBuilder() CipServiceResponseBuilder {
+ return &_CipServiceResponseBuilder{_CipServiceResponse: new(_CipServiceResponse)}
+}
+
+type _CipServiceResponseChildBuilder interface {
+ utils.Copyable
+ setParent(CipServiceResponseContract)
+ buildForCipServiceResponse() (CipServiceResponse, error)
+}
+
+type _CipServiceResponseBuilder struct {
+ *_CipServiceResponse
+
+ parentBuilder *_CipServiceBuilder
+
+ childBuilder _CipServiceResponseChildBuilder
+
+ collectedErr []error
+}
+
+var _ (CipServiceResponseBuilder) = (*_CipServiceResponseBuilder)(nil)
+
+func (b *_CipServiceResponseBuilder) setParent(contract CipServiceContract) {
+ b.CipServiceContract = contract
+ contract.(*_CipService)._SubType = b._CipServiceResponse
+}
+
+func (b *_CipServiceResponseBuilder) WithMandatoryFields(status uint8, extStatus []uint16) CipServiceResponseBuilder {
+ return b.WithStatus(status).WithExtStatus(extStatus...)
+}
+
+func (b *_CipServiceResponseBuilder) WithStatus(status uint8) CipServiceResponseBuilder {
+ b.Status = status
+ return b
+}
+
+func (b *_CipServiceResponseBuilder) WithExtStatus(extStatus ...uint16) CipServiceResponseBuilder {
+ b.ExtStatus = extStatus
+ return b
+}
+
+func (b *_CipServiceResponseBuilder) PartialBuild() (CipServiceResponseContract, error) {
+ if err := stdErrors.Join(b.collectedErr...); err != nil {
+ return nil, errors.Wrap(err, "error occurred during build")
+ }
+ return b._CipServiceResponse.deepCopy(), nil
+}
+
+func (b *_CipServiceResponseBuilder) PartialMustBuild() CipServiceResponseContract {
+ build, err := b.PartialBuild()
+ if err != nil {
+ panic(err)
+ }
+ return build
+}
+
+func (b *_CipServiceResponseBuilder) AsGetAttributeAllResponse() GetAttributeAllResponseBuilder {
+ if cb, ok := b.childBuilder.(GetAttributeAllResponseBuilder); ok {
+ return cb
+ }
+ cb := NewGetAttributeAllResponseBuilder().(*_GetAttributeAllResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsSetAttributeAllResponse() SetAttributeAllResponseBuilder {
+ if cb, ok := b.childBuilder.(SetAttributeAllResponseBuilder); ok {
+ return cb
+ }
+ cb := NewSetAttributeAllResponseBuilder().(*_SetAttributeAllResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsGetAttributeListResponse() GetAttributeListResponseBuilder {
+ if cb, ok := b.childBuilder.(GetAttributeListResponseBuilder); ok {
+ return cb
+ }
+ cb := NewGetAttributeListResponseBuilder().(*_GetAttributeListResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsSetAttributeListResponse() SetAttributeListResponseBuilder {
+ if cb, ok := b.childBuilder.(SetAttributeListResponseBuilder); ok {
+ return cb
+ }
+ cb := NewSetAttributeListResponseBuilder().(*_SetAttributeListResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsMultipleServiceResponse() MultipleServiceResponseBuilder {
+ if cb, ok := b.childBuilder.(MultipleServiceResponseBuilder); ok {
+ return cb
+ }
+ cb := NewMultipleServiceResponseBuilder().(*_MultipleServiceResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsGetAttributeSingleResponse() GetAttributeSingleResponseBuilder {
+ if cb, ok := b.childBuilder.(GetAttributeSingleResponseBuilder); ok {
+ return cb
+ }
+ cb := NewGetAttributeSingleResponseBuilder().(*_GetAttributeSingleResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsSetAttributeSingleResponse() SetAttributeSingleResponseBuilder {
+ if cb, ok := b.childBuilder.(SetAttributeSingleResponseBuilder); ok {
+ return cb
+ }
+ cb := NewSetAttributeSingleResponseBuilder().(*_SetAttributeSingleResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsCipReadResponse() CipReadResponseBuilder {
+ if cb, ok := b.childBuilder.(CipReadResponseBuilder); ok {
+ return cb
+ }
+ cb := NewCipReadResponseBuilder().(*_CipReadResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsCipWriteResponse() CipWriteResponseBuilder {
+ if cb, ok := b.childBuilder.(CipWriteResponseBuilder); ok {
+ return cb
+ }
+ cb := NewCipWriteResponseBuilder().(*_CipWriteResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsCipConnectionManagerCloseResponse() CipConnectionManagerCloseResponseBuilder {
+ if cb, ok := b.childBuilder.(CipConnectionManagerCloseResponseBuilder); ok {
+ return cb
+ }
+ cb := NewCipConnectionManagerCloseResponseBuilder().(*_CipConnectionManagerCloseResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsCipConnectedResponse() CipConnectedResponseBuilder {
+ if cb, ok := b.childBuilder.(CipConnectedResponseBuilder); ok {
+ return cb
+ }
+ cb := NewCipConnectedResponseBuilder().(*_CipConnectedResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) AsCipConnectionManagerResponse() CipConnectionManagerResponseBuilder {
+ if cb, ok := b.childBuilder.(CipConnectionManagerResponseBuilder); ok {
+ return cb
+ }
+ cb := NewCipConnectionManagerResponseBuilder().(*_CipConnectionManagerResponseBuilder)
+ cb.parentBuilder = b
+ b.childBuilder = cb
+ return cb
+}
+
+func (b *_CipServiceResponseBuilder) Done() CipServiceBuilder {
+ if b.parentBuilder == nil {
+ b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ }
+ return b.parentBuilder
+}
+
+func (b *_CipServiceResponseBuilder) buildForCipService() (CipService, error) {
+ return b.Build()
+}
+
+func (b *_CipServiceResponseBuilder) Build() (CipServiceResponse, error) {
+ v, err := b.PartialBuild()
+ if err != nil {
+ return nil, errors.Wrap(err, "error occurred during partial build")
+ }
+ if b.childBuilder == nil {
+ return nil, errors.New("no child builder present")
+ }
+ b.childBuilder.setParent(v)
+ return b.childBuilder.buildForCipServiceResponse()
+}
+
+func (b *_CipServiceResponseBuilder) MustBuild() CipServiceResponse {
+ build, err := b.Build()
+ if err != nil {
+ panic(err)
+ }
+ return build
+}
+
+func (b *_CipServiceResponseBuilder) DeepCopy() any {
+ _copy := b.CreateCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
+ _copy.childBuilder = b.childBuilder.DeepCopy().(_CipServiceResponseChildBuilder)
+ _copy.childBuilder.setParent(_copy)
+ if b.collectedErr != nil {
+ copy(_copy.collectedErr, b.collectedErr)
+ }
+ return _copy
+}
+
+// CreateCipServiceResponseBuilder creates a CipServiceResponseBuilder
+func (b *_CipServiceResponse) CreateCipServiceResponseBuilder() CipServiceResponseBuilder {
+ if b == nil {
+ return NewCipServiceResponseBuilder()
+ }
+ return &_CipServiceResponseBuilder{_CipServiceResponse: b.deepCopy()}
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *_CipServiceResponse) GetResponse() bool {
+ return bool(true)
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_CipServiceResponse) GetStatus() uint8 {
+ return m.Status
+}
+
+func (m *_CipServiceResponse) GetExtStatus() []uint16 {
+ return m.ExtStatus
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// Deprecated: use the interface for direct cast
+func CastCipServiceResponse(structType any) CipServiceResponse {
+ if casted, ok := structType.(CipServiceResponse); ok {
+ return casted
+ }
+ if casted, ok := structType.(*CipServiceResponse); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_CipServiceResponse) GetPlx4xTypeName() string {
+ return "CipServiceResponse"
+}
+
+func (m *_CipServiceResponse) getLengthInBits(ctx context.Context) uint64 {
+ lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ // Discriminator Field (service)
+ lengthInBits += 7
+
+ // Reserved Field (reserved)
+ lengthInBits += 8
+
+ // Simple field (status)
+ lengthInBits += 8
+
+ // Implicit Field (extStatusSize)
+ lengthInBits += 8
+
+ // Array field
+ if len(m.ExtStatus) > 0 {
+ lengthInBits += 16 * uint64(len(m.ExtStatus))
+ }
+
+ return lengthInBits
+}
+
+func (m *_CipServiceResponse) GetLengthInBits(ctx context.Context) uint64 {
+ return m._SubType.GetLengthInBits(ctx)
+}
+
+func (m *_CipServiceResponse) GetLengthInBytes(ctx context.Context) uint64 {
+ return m._SubType.GetLengthInBits(ctx) / 8
+}
+
+func (m *_CipServiceResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipServiceResponse CipServiceResponse, err error) {
+ m.CipServiceContract = parent
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("CipServiceResponse"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for CipServiceResponse")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ service, err := ReadDiscriminatorField[uint8](ctx, "service", ReadUnsignedByte(readBuffer, uint8(7)))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'service' field"))
+ }
+
+ reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
+ }
+ m.reservedField0 = reservedField0
+
+ status, err := ReadSimpleField(ctx, "status", ReadUnsignedByte(readBuffer, uint8(8)))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'status' field"))
+ }
+ m.Status = status
+
+ extStatusSize, err := ReadImplicitField[uint8](ctx, "extStatusSize", ReadUnsignedByte(readBuffer, uint8(8)))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'extStatusSize' field"))
+ }
+ _ = extStatusSize
+
+ extStatus, err := ReadCountArrayField[uint16](ctx, "extStatus", ReadUnsignedShort(readBuffer, uint8(16)), uint64(extStatusSize))
+ if err != nil {
+ return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'extStatus' field"))
+ }
+ m.ExtStatus = extStatus
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ var _child CipServiceResponse
+ switch {
+ case service == 0x01: // GetAttributeAllResponse
+ if _child, err = new(_GetAttributeAllResponse).parse(ctx, readBuffer, m, extStatusSize, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeAllResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x02: // SetAttributeAllResponse
+ if _child, err = new(_SetAttributeAllResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeAllResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x03: // GetAttributeListResponse
+ if _child, err = new(_GetAttributeListResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeListResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x04: // SetAttributeListResponse
+ if _child, err = new(_SetAttributeListResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeListResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x0A: // MultipleServiceResponse
+ if _child, err = new(_MultipleServiceResponse).parse(ctx, readBuffer, m, extStatusSize, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type MultipleServiceResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x0E: // GetAttributeSingleResponse
+ if _child, err = new(_GetAttributeSingleResponse).parse(ctx, readBuffer, m, extStatusSize, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type GetAttributeSingleResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x10: // SetAttributeSingleResponse
+ if _child, err = new(_SetAttributeSingleResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type SetAttributeSingleResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x4C: // CipReadResponse
+ if _child, err = new(_CipReadResponse).parse(ctx, readBuffer, m, extStatusSize, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipReadResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x4D: // CipWriteResponse
+ if _child, err = new(_CipWriteResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipWriteResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x4E: // CipConnectionManagerCloseResponse
+ if _child, err = new(_CipConnectionManagerCloseResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerCloseResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x52: // CipConnectedResponse
+ if _child, err = new(_CipConnectedResponse).parse(ctx, readBuffer, m, extStatusSize, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipConnectedResponse for type-switch of CipServiceResponse")
+ }
+ case service == 0x5B: // CipConnectionManagerResponse
+ if _child, err = new(_CipConnectionManagerResponse).parse(ctx, readBuffer, m, connected, serviceLen); err != nil {
+ return nil, errors.Wrap(err, "Error parsing sub-type CipConnectionManagerResponse for type-switch of CipServiceResponse")
+ }
+ default:
+ return nil, errors.Errorf("Unmapped type for parameters [service=%v]", service)
+ }
+
+ if closeErr := readBuffer.CloseContext("CipServiceResponse"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for CipServiceResponse")
+ }
+
+ parent._SubType = _child
+ return _child, nil
+}
+
+func (pm *_CipServiceResponse) serializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CipServiceResponse, serializeChildFunction func() error) error {
+ // We redirect all calls through client as some methods are only implemented there
+ m := child
+ _ = m
+ positionAware := writeBuffer
+ _ = positionAware
+ log := zerolog.Ctx(ctx)
+ _ = log
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("CipServiceResponse"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for CipServiceResponse")
+ }
+
+ if err := WriteDiscriminatorField(ctx, "service", m.GetService(), WriteUnsignedByte(writeBuffer, 7)); err != nil {
+ return errors.Wrap(err, "Error serializing 'service' field")
+ }
+
+ if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
+ return errors.Wrap(err, "Error serializing 'reserved' field number 1")
+ }
+
+ if err := WriteSimpleField[uint8](ctx, "status", m.GetStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
+ return errors.Wrap(err, "Error serializing 'status' field")
+ }
+ extStatusSize := uint8(uint8(len(m.GetExtStatus())))
+ if err := WriteImplicitField(ctx, "extStatusSize", extStatusSize, WriteUnsignedByte(writeBuffer, 8)); err != nil {
+ return errors.Wrap(err, "Error serializing 'extStatusSize' field")
+ }
+
+ if err := WriteSimpleTypeArrayField(ctx, "extStatus", m.GetExtStatus(), WriteUnsignedShort(writeBuffer, 16)); err != nil {
+ return errors.Wrap(err, "Error serializing 'extStatus' field")
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ if _typeSwitchErr := serializeChildFunction(); _typeSwitchErr != nil {
+ return errors.Wrap(_typeSwitchErr, "Error serializing sub-type field")
+ }
+
+ if popErr := writeBuffer.PopContext("CipServiceResponse"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for CipServiceResponse")
+ }
+ return nil
+ }
+ return pm.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+}
+
+func (m *_CipServiceResponse) IsCipServiceResponse() {}
+
+func (m *_CipServiceResponse) DeepCopy() any {
+ return m.deepCopy()
+}
+
+func (m *_CipServiceResponse) deepCopy() *_CipServiceResponse {
+ if m == nil {
+ return nil
+ }
+ _CipServiceResponseCopy := &_CipServiceResponse{
+ m.CipServiceContract.(*_CipService).deepCopy(),
+ nil, // will be set by child
+ m.Status,
+ utils.DeepCopySlice[uint16, uint16](m.ExtStatus),
+ m.reservedField0,
+ }
+ _CipServiceResponseCopy.CipServiceContract.(*_CipService)._SubType = m
+ return _CipServiceResponseCopy
+}
diff --git a/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go b/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go
index 61ef7d052c..3670d6f1a6 100644
--- a/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go
@@ -43,7 +43,7 @@ type CipUnconnectedRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// GetClassSegment returns ClassSegment (property field)
GetClassSegment() PathSegment
// GetInstanceSegment returns InstanceSegment (property field)
@@ -63,7 +63,7 @@ type CipUnconnectedRequest interface {
// _CipUnconnectedRequest is the data-structure of this message
type _CipUnconnectedRequest struct {
- CipServiceContract
+ CipServiceRequestContract
ClassSegment PathSegment
InstanceSegment PathSegment
UnconnectedService CipService
@@ -74,7 +74,7 @@ type _CipUnconnectedRequest struct {
}
var _ CipUnconnectedRequest = (*_CipUnconnectedRequest)(nil)
-var _ CipServiceRequirements = (*_CipUnconnectedRequest)(nil)
+var _ CipServiceRequestRequirements = (*_CipUnconnectedRequest)(nil)
// NewCipUnconnectedRequest factory function for _CipUnconnectedRequest
func NewCipUnconnectedRequest(classSegment PathSegment, instanceSegment PathSegment, unconnectedService CipService, backPlane int8, slot int8) *_CipUnconnectedRequest {
@@ -88,14 +88,14 @@ func NewCipUnconnectedRequest(classSegment PathSegment, instanceSegment PathSegm
panic("unconnectedService of type CipService for CipUnconnectedRequest must not be nil")
}
_result := &_CipUnconnectedRequest{
- CipServiceContract: NewCipService(),
- ClassSegment: classSegment,
- InstanceSegment: instanceSegment,
- UnconnectedService: unconnectedService,
- BackPlane: backPlane,
- Slot: slot,
- }
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ CipServiceRequestContract: NewCipServiceRequest(),
+ ClassSegment: classSegment,
+ InstanceSegment: instanceSegment,
+ UnconnectedService: unconnectedService,
+ BackPlane: backPlane,
+ Slot: slot,
+ }
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -126,7 +126,7 @@ type CipUnconnectedRequestBuilder interface {
// WithSlot adds Slot (property field)
WithSlot(int8) CipUnconnectedRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the CipUnconnectedRequest or returns an error if something is wrong
Build() (CipUnconnectedRequest, error)
// MustBuild does the same as Build but panics on error
@@ -141,16 +141,16 @@ func NewCipUnconnectedRequestBuilder() CipUnconnectedRequestBuilder {
type _CipUnconnectedRequestBuilder struct {
*_CipUnconnectedRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (CipUnconnectedRequestBuilder) = (*_CipUnconnectedRequestBuilder)(nil)
-func (b *_CipUnconnectedRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipUnconnectedRequest
+func (b *_CipUnconnectedRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._CipUnconnectedRequest
}
func (b *_CipUnconnectedRequestBuilder) WithMandatoryFields(classSegment PathSegment, instanceSegment PathSegment, unconnectedService CipService, backPlane int8, slot int8) CipUnconnectedRequestBuilder {
@@ -236,14 +236,14 @@ func (b *_CipUnconnectedRequestBuilder) MustBuild() CipUnconnectedRequest {
return build
}
-func (b *_CipUnconnectedRequestBuilder) Done() CipServiceBuilder {
+func (b *_CipUnconnectedRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_CipUnconnectedRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_CipUnconnectedRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -277,10 +277,6 @@ func (m *_CipUnconnectedRequest) GetService() uint8 {
return 0x52
}
-func (m *_CipUnconnectedRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_CipUnconnectedRequest) GetConnected() bool {
return bool(false)
}
@@ -290,8 +286,8 @@ func (m *_CipUnconnectedRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipUnconnectedRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipUnconnectedRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
///////////////////////////////////////////////////////////
@@ -353,7 +349,7 @@ func (m *_CipUnconnectedRequest) GetPlx4xTypeName() string {
}
func (m *_CipUnconnectedRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
// Implicit Field (requestPathSize)
lengthInBits += 8
@@ -389,8 +385,8 @@ func (m *_CipUnconnectedRequest) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipUnconnectedRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipUnconnectedRequest CipUnconnectedRequest, err error) {
- m.CipServiceContract = parent
+func (m *_CipUnconnectedRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__cipUnconnectedRequest CipUnconnectedRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -520,7 +516,7 @@ func (m *_CipUnconnectedRequest) SerializeWithWriteBuffer(ctx context.Context, w
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipUnconnectedRequest) IsCipUnconnectedRequest() {}
@@ -534,7 +530,7 @@ func (m *_CipUnconnectedRequest) deepCopy() *_CipUnconnectedRequest {
return nil
}
_CipUnconnectedRequestCopy := &_CipUnconnectedRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
utils.DeepCopy[PathSegment](m.ClassSegment),
utils.DeepCopy[PathSegment](m.InstanceSegment),
utils.DeepCopy[CipService](m.UnconnectedService),
@@ -542,7 +538,7 @@ func (m *_CipUnconnectedRequest) deepCopy() *_CipUnconnectedRequest {
m.Slot,
m.reservedField0,
}
- _CipUnconnectedRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipUnconnectedRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _CipUnconnectedRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go b/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go
index 144dad3ab1..b4979698c2 100644
--- a/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go
@@ -40,7 +40,7 @@ type CipWriteRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// GetTag returns Tag (property field)
GetTag() []byte
// GetDataType returns DataType (property field)
@@ -57,7 +57,7 @@ type CipWriteRequest interface {
// _CipWriteRequest is the data-structure of this message
type _CipWriteRequest struct {
- CipServiceContract
+ CipServiceRequestContract
Tag []byte
DataType CIPDataTypeCode
ElementNb uint16
@@ -65,18 +65,18 @@ type _CipWriteRequest struct {
}
var _ CipWriteRequest = (*_CipWriteRequest)(nil)
-var _ CipServiceRequirements = (*_CipWriteRequest)(nil)
+var _ CipServiceRequestRequirements = (*_CipWriteRequest)(nil)
// NewCipWriteRequest factory function for _CipWriteRequest
func NewCipWriteRequest(tag []byte, dataType CIPDataTypeCode, elementNb uint16, data []byte) *_CipWriteRequest {
_result := &_CipWriteRequest{
- CipServiceContract: NewCipService(),
- Tag: tag,
- DataType: dataType,
- ElementNb: elementNb,
- Data: data,
+ CipServiceRequestContract: NewCipServiceRequest(),
+ Tag: tag,
+ DataType: dataType,
+ ElementNb: elementNb,
+ Data: data,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -99,7 +99,7 @@ type CipWriteRequestBuilder interface {
// WithData adds Data (property field)
WithData(...byte) CipWriteRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the CipWriteRequest or returns an error if something is wrong
Build() (CipWriteRequest, error)
// MustBuild does the same as Build but panics on error
@@ -114,16 +114,16 @@ func NewCipWriteRequestBuilder() CipWriteRequestBuilder {
type _CipWriteRequestBuilder struct {
*_CipWriteRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (CipWriteRequestBuilder) = (*_CipWriteRequestBuilder)(nil)
-func (b *_CipWriteRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipWriteRequest
+func (b *_CipWriteRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._CipWriteRequest
}
func (b *_CipWriteRequestBuilder) WithMandatoryFields(tag []byte, dataType CIPDataTypeCode, elementNb uint16, data []byte) CipWriteRequestBuilder {
@@ -165,14 +165,14 @@ func (b *_CipWriteRequestBuilder) MustBuild() CipWriteRequest {
return build
}
-func (b *_CipWriteRequestBuilder) Done() CipServiceBuilder {
+func (b *_CipWriteRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_CipWriteRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_CipWriteRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -206,10 +206,6 @@ func (m *_CipWriteRequest) GetService() uint8 {
return 0x4D
}
-func (m *_CipWriteRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_CipWriteRequest) GetConnected() bool {
return false
}
@@ -219,8 +215,8 @@ func (m *_CipWriteRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipWriteRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_CipWriteRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
///////////////////////////////////////////////////////////
@@ -265,7 +261,7 @@ func (m *_CipWriteRequest) GetPlx4xTypeName() string {
}
func (m *_CipWriteRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
// Implicit Field (requestPathSize)
lengthInBits += 8
@@ -293,8 +289,8 @@ func (m *_CipWriteRequest) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipWriteRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipWriteRequest CipWriteRequest, err error) {
- m.CipServiceContract = parent
+func (m *_CipWriteRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__cipWriteRequest CipWriteRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -384,7 +380,7 @@ func (m *_CipWriteRequest) SerializeWithWriteBuffer(ctx context.Context, writeBu
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipWriteRequest) IsCipWriteRequest() {}
@@ -398,13 +394,13 @@ func (m *_CipWriteRequest) deepCopy() *_CipWriteRequest {
return nil
}
_CipWriteRequestCopy := &_CipWriteRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
utils.DeepCopySlice[byte, byte](m.Tag),
m.DataType,
m.ElementNb,
utils.DeepCopySlice[byte, byte](m.Data),
}
- _CipWriteRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipWriteRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _CipWriteRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go b/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go
index f6867c6db3..56920bf715 100644
--- a/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go
+++ b/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go
@@ -26,8 +26,6 @@ import (
"github.com/rs/zerolog"
- . "github.com/apache/plc4x/plc4go/spi/codegen/fields"
- . "github.com/apache/plc4x/plc4go/spi/codegen/io"
"github.com/apache/plc4x/plc4go/spi/errors"
"github.com/apache/plc4x/plc4go/spi/utils"
)
@@ -40,11 +38,7 @@ type CipWriteResponse interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
- // GetStatus returns Status (property field)
- GetStatus() uint8
- // GetExtStatus returns ExtStatus (property field)
- GetExtStatus() uint8
+ CipServiceResponse
// IsCipWriteResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
IsCipWriteResponse()
// CreateBuilder creates a CipWriteResponseBuilder
@@ -53,24 +47,18 @@ type CipWriteResponse interface {
// _CipWriteResponse is the data-structure of this message
type _CipWriteResponse struct {
- CipServiceContract
- Status uint8
- ExtStatus uint8
- // Reserved Fields
- reservedField0 *uint8
+ CipServiceResponseContract
}
var _ CipWriteResponse = (*_CipWriteResponse)(nil)
-var _ CipServiceRequirements = (*_CipWriteResponse)(nil)
+var _ CipServiceResponseRequirements = (*_CipWriteResponse)(nil)
// NewCipWriteResponse factory function for _CipWriteResponse
-func NewCipWriteResponse(status uint8, extStatus uint8) *_CipWriteResponse {
+func NewCipWriteResponse(status uint8, extStatus []uint16) *_CipWriteResponse {
_result := &_CipWriteResponse{
- CipServiceContract: NewCipService(),
- Status: status,
- ExtStatus: extStatus,
+ CipServiceResponseContract: NewCipServiceResponse(status, extStatus),
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceResponseContract.(*_CipServiceResponse)._SubType = _result
return _result
}
@@ -83,13 +71,9 @@ func NewCipWriteResponse(status uint8, extStatus uint8) *_CipWriteResponse {
type CipWriteResponseBuilder interface {
utils.Copyable
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
- WithMandatoryFields(status uint8, extStatus uint8) CipWriteResponseBuilder
- // WithStatus adds Status (property field)
- WithStatus(uint8) CipWriteResponseBuilder
- // WithExtStatus adds ExtStatus (property field)
- WithExtStatus(uint8) CipWriteResponseBuilder
+ WithMandatoryFields() CipWriteResponseBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceResponseBuilder
// Build builds the CipWriteResponse or returns an error if something is wrong
Build() (CipWriteResponse, error)
// MustBuild does the same as Build but panics on error
@@ -104,29 +88,19 @@ func NewCipWriteResponseBuilder() CipWriteResponseBuilder {
type _CipWriteResponseBuilder struct {
*_CipWriteResponse
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceResponseBuilder
collectedErr []error
}
var _ (CipWriteResponseBuilder) = (*_CipWriteResponseBuilder)(nil)
-func (b *_CipWriteResponseBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._CipWriteResponse
+func (b *_CipWriteResponseBuilder) setParent(contract CipServiceResponseContract) {
+ b.CipServiceResponseContract = contract
+ contract.(*_CipServiceResponse)._SubType = b._CipWriteResponse
}
-func (b *_CipWriteResponseBuilder) WithMandatoryFields(status uint8, extStatus uint8) CipWriteResponseBuilder {
- return b.WithStatus(status).WithExtStatus(extStatus)
-}
-
-func (b *_CipWriteResponseBuilder) WithStatus(status uint8) CipWriteResponseBuilder {
- b.Status = status
- return b
-}
-
-func (b *_CipWriteResponseBuilder) WithExtStatus(extStatus uint8) CipWriteResponseBuilder {
- b.ExtStatus = extStatus
+func (b *_CipWriteResponseBuilder) WithMandatoryFields() CipWriteResponseBuilder {
return b
}
@@ -145,14 +119,14 @@ func (b *_CipWriteResponseBuilder) MustBuild() CipWriteResponse {
return build
}
-func (b *_CipWriteResponseBuilder) Done() CipServiceBuilder {
+func (b *_CipWriteResponseBuilder) Done() CipServiceResponseBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
}
return b.parentBuilder
}
-func (b *_CipWriteResponseBuilder) buildForCipService() (CipService, error) {
+func (b *_CipWriteResponseBuilder) buildForCipServiceResponse() (CipServiceResponse, error) {
return b.Build()
}
@@ -186,41 +160,15 @@ func (m *_CipWriteResponse) GetService() uint8 {
return 0x4D
}
-func (m *_CipWriteResponse) GetResponse() bool {
- return bool(true)
-}
-
-func (m *_CipWriteResponse) GetConnected() bool {
- return false
-}
-
///////////////////////
///////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_CipWriteResponse) GetParent() CipServiceContract {
- return m.CipServiceContract
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *_CipWriteResponse) GetStatus() uint8 {
- return m.Status
+func (m *_CipWriteResponse) GetParent() CipServiceResponseContract {
+ return m.CipServiceResponseContract
}
-func (m *_CipWriteResponse) GetExtStatus() uint8 {
- return m.ExtStatus
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
// Deprecated: use the interface for direct cast
func CastCipWriteResponse(structType any) CipWriteResponse {
if casted, ok := structType.(CipWriteResponse); ok {
@@ -237,16 +185,7 @@ func (m *_CipWriteResponse) GetPlx4xTypeName() string {
}
func (m *_CipWriteResponse) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
-
- // Reserved Field (reserved)
- lengthInBits += 8
-
- // Simple field (status)
- lengthInBits += 8
-
- // Simple field (extStatus)
- lengthInBits += 8
+ lengthInBits := uint64(m.CipServiceResponseContract.(*_CipServiceResponse).getLengthInBits(ctx))
return lengthInBits
}
@@ -255,8 +194,8 @@ func (m *_CipWriteResponse) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_CipWriteResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__cipWriteResponse CipWriteResponse, err error) {
- m.CipServiceContract = parent
+func (m *_CipWriteResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceResponse, connected bool, serviceLen uint16) (__cipWriteResponse CipWriteResponse, err error) {
+ m.CipServiceResponseContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -266,24 +205,6 @@ func (m *_CipWriteResponse) parse(ctx context.Context, readBuffer utils.ReadBuff
currentPos := positionAware.GetPos()
_ = currentPos
- reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
- }
- m.reservedField0 = reservedField0
-
- status, err := ReadSimpleField(ctx, "status", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'status' field"))
- }
- m.Status = status
-
- extStatus, err := ReadSimpleField(ctx, "extStatus", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'extStatus' field"))
- }
- m.ExtStatus = extStatus
-
if closeErr := readBuffer.CloseContext("CipWriteResponse"); closeErr != nil {
return nil, errors.Wrap(closeErr, "Error closing for CipWriteResponse")
}
@@ -309,24 +230,12 @@ func (m *_CipWriteResponse) SerializeWithWriteBuffer(ctx context.Context, writeB
return errors.Wrap(pushErr, "Error pushing for CipWriteResponse")
}
- if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 1")
- }
-
- if err := WriteSimpleField[uint8](ctx, "status", m.GetStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'status' field")
- }
-
- if err := WriteSimpleField[uint8](ctx, "extStatus", m.GetExtStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'extStatus' field")
- }
-
if popErr := writeBuffer.PopContext("CipWriteResponse"); popErr != nil {
return errors.Wrap(popErr, "Error popping for CipWriteResponse")
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceResponseContract.(*_CipServiceResponse).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_CipWriteResponse) IsCipWriteResponse() {}
@@ -340,12 +249,9 @@ func (m *_CipWriteResponse) deepCopy() *_CipWriteResponse {
return nil
}
_CipWriteResponseCopy := &_CipWriteResponse{
- m.CipServiceContract.(*_CipService).deepCopy(),
- m.Status,
- m.ExtStatus,
- m.reservedField0,
+ m.CipServiceResponseContract.(*_CipServiceResponse).deepCopy(),
}
- _CipWriteResponseCopy.CipServiceContract.(*_CipService)._SubType = m
+ _CipWriteResponseCopy.CipServiceResponseContract.(*_CipServiceResponse)._SubType = m
return _CipWriteResponseCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/GetAttributeAllRequest.go b/plc4go/protocols/eip/readwrite/model/GetAttributeAllRequest.go
index ff8b433063..bf990d2ba8 100644
--- a/plc4go/protocols/eip/readwrite/model/GetAttributeAllRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/GetAttributeAllRequest.go
@@ -40,7 +40,7 @@ type GetAttributeAllRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// GetClassSegment returns ClassSegment (property field)
GetClassSegment() PathSegment
// GetInstanceSegment returns InstanceSegment (property field)
@@ -53,13 +53,13 @@ type GetAttributeAllRequest interface {
// _GetAttributeAllRequest is the data-structure of this message
type _GetAttributeAllRequest struct {
- CipServiceContract
+ CipServiceRequestContract
ClassSegment PathSegment
InstanceSegment PathSegment
}
var _ GetAttributeAllRequest = (*_GetAttributeAllRequest)(nil)
-var _ CipServiceRequirements = (*_GetAttributeAllRequest)(nil)
+var _ CipServiceRequestRequirements = (*_GetAttributeAllRequest)(nil)
// NewGetAttributeAllRequest factory function for _GetAttributeAllRequest
func NewGetAttributeAllRequest(classSegment PathSegment, instanceSegment PathSegment) *_GetAttributeAllRequest {
@@ -70,11 +70,11 @@ func NewGetAttributeAllRequest(classSegment PathSegment, instanceSegment PathSeg
panic("instanceSegment of type PathSegment for GetAttributeAllRequest must not be nil")
}
_result := &_GetAttributeAllRequest{
- CipServiceContract: NewCipService(),
- ClassSegment: classSegment,
- InstanceSegment: instanceSegment,
+ CipServiceRequestContract: NewCipServiceRequest(),
+ ClassSegment: classSegment,
+ InstanceSegment: instanceSegment,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -97,7 +97,7 @@ type GetAttributeAllRequestBuilder interface {
// WithInstanceSegmentBuilder adds InstanceSegment (property field) which is build by the builder
WithInstanceSegmentBuilder(func(PathSegmentBuilder) PathSegmentBuilder) GetAttributeAllRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the GetAttributeAllRequest or returns an error if something is wrong
Build() (GetAttributeAllRequest, error)
// MustBuild does the same as Build but panics on error
@@ -112,16 +112,16 @@ func NewGetAttributeAllRequestBuilder() GetAttributeAllRequestBuilder {
type _GetAttributeAllRequestBuilder struct {
*_GetAttributeAllRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (GetAttributeAllRequestBuilder) = (*_GetAttributeAllRequestBuilder)(nil)
-func (b *_GetAttributeAllRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._GetAttributeAllRequest
+func (b *_GetAttributeAllRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._GetAttributeAllRequest
}
func (b *_GetAttributeAllRequestBuilder) WithMandatoryFields(classSegment PathSegment, instanceSegment PathSegment) GetAttributeAllRequestBuilder {
@@ -179,14 +179,14 @@ func (b *_GetAttributeAllRequestBuilder) MustBuild() GetAttributeAllRequest {
return build
}
-func (b *_GetAttributeAllRequestBuilder) Done() CipServiceBuilder {
+func (b *_GetAttributeAllRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_GetAttributeAllRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_GetAttributeAllRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -220,10 +220,6 @@ func (m *_GetAttributeAllRequest) GetService() uint8 {
return 0x01
}
-func (m *_GetAttributeAllRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_GetAttributeAllRequest) GetConnected() bool {
return false
}
@@ -233,8 +229,8 @@ func (m *_GetAttributeAllRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_GetAttributeAllRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_GetAttributeAllRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
///////////////////////////////////////////////////////////
@@ -271,7 +267,7 @@ func (m *_GetAttributeAllRequest) GetPlx4xTypeName() string {
}
func (m *_GetAttributeAllRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
// Implicit Field (requestPathSize)
lengthInBits += 8
@@ -289,8 +285,8 @@ func (m *_GetAttributeAllRequest) GetLengthInBytes(ctx context.Context) uint64 {
return m.GetLengthInBits(ctx) / 8
}
-func (m *_GetAttributeAllRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__getAttributeAllRequest GetAttributeAllRequest, err error) {
- m.CipServiceContract = parent
+func (m *_GetAttributeAllRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__getAttributeAllRequest GetAttributeAllRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -360,7 +356,7 @@ func (m *_GetAttributeAllRequest) SerializeWithWriteBuffer(ctx context.Context,
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_GetAttributeAllRequest) IsGetAttributeAllRequest() {}
@@ -374,11 +370,11 @@ func (m *_GetAttributeAllRequest) deepCopy() *_GetAttributeAllRequest {
return nil
}
_GetAttributeAllRequestCopy := &_GetAttributeAllRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
utils.DeepCopy[PathSegment](m.ClassSegment),
utils.DeepCopy[PathSegment](m.InstanceSegment),
}
- _GetAttributeAllRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _GetAttributeAllRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _GetAttributeAllRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/GetAttributeAllResponse.go b/plc4go/protocols/eip/readwrite/model/GetAttributeAllResponse.go
index de06e05f2c..d1ecf84009 100644
--- a/plc4go/protocols/eip/readwrite/model/GetAttributeAllResponse.go
+++ b/plc4go/protocols/eip/readwrite/model/GetAttributeAllResponse.go
@@ -40,11 +40,7 @@ type GetAttributeAllResponse interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
- // GetStatus returns Status (property field)
- GetStatus() uint8
- // GetExtStatus returns ExtStatus (property field)
- GetExtStatus() uint8
+ CipServiceResponse
// GetAttributes returns Attributes (property field)
GetAttributes() CIPAttributes
// IsGetAttributeAllResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
@@ -55,26 +51,20 @@ type GetAttributeAllResponse interface {
// _GetAttributeAllResponse is the data-structure of this message
type _GetAttributeAllResponse struct {
- CipServiceContract
- Status uint8
- ExtStatus uint8
+ CipServiceResponseContract
Attributes CIPAttributes
- // Reserved Fields
- reservedField0 *uint8
}
var _ GetAttributeAllResponse = (*_GetAttributeAllResponse)(nil)
-var _ CipServiceRequirements = (*_GetAttributeAllResponse)(nil)
+var _ CipServiceResponseRequirements = (*_GetAttributeAllResponse)(nil)
// NewGetAttributeAllResponse factory function for _GetAttributeAllResponse
-func NewGetAttributeAllResponse(status uint8, extStatus uint8, attributes CIPAttributes) *_GetAttributeAllResponse {
+func NewGetAttributeAllResponse(status uint8, extStatus []uint16, attributes CIPAttributes) *_GetAttributeAllResponse {
_result := &_GetAttributeAllResponse{
- CipServiceContract: NewCipService(),
- Status: status,
- ExtStatus: extStatus,
- Attributes: attributes,
+ CipServiceResponseContract: NewCipServiceResponse(status, extStatus),
+ Attributes: attributes,
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceResponseContract.(*_CipServiceResponse)._SubType = _result
return _result
}
@@ -87,17 +77,13 @@ func NewGetAttributeAllResponse(status uint8, extStatus uint8, attributes CIPAtt
type GetAttributeAllResponseBuilder interface {
utils.Copyable
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
- WithMandatoryFields(status uint8, extStatus uint8) GetAttributeAllResponseBuilder
- // WithStatus adds Status (property field)
- WithStatus(uint8) GetAttributeAllResponseBuilder
- // WithExtStatus adds ExtStatus (property field)
- WithExtStatus(uint8) GetAttributeAllResponseBuilder
+ WithMandatoryFields() GetAttributeAllResponseBuilder
// WithAttributes adds Attributes (property field)
WithOptionalAttributes(CIPAttributes) GetAttributeAllResponseBuilder
// WithOptionalAttributesBuilder adds Attributes (property field) which is build by the builder
WithOptionalAttributesBuilder(func(CIPAttributesBuilder) CIPAttributesBuilder) GetAttributeAllResponseBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceResponseBuilder
// Build builds the GetAttributeAllResponse or returns an error if something is wrong
Build() (GetAttributeAllResponse, error)
// MustBuild does the same as Build but panics on error
@@ -112,29 +98,19 @@ func NewGetAttributeAllResponseBuilder() GetAttributeAllResponseBuilder {
type _GetAttributeAllResponseBuilder struct {
*_GetAttributeAllResponse
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceResponseBuilder
collectedErr []error
}
var _ (GetAttributeAllResponseBuilder) = (*_GetAttributeAllResponseBuilder)(nil)
-func (b *_GetAttributeAllResponseBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._GetAttributeAllResponse
+func (b *_GetAttributeAllResponseBuilder) setParent(contract CipServiceResponseContract) {
+ b.CipServiceResponseContract = contract
+ contract.(*_CipServiceResponse)._SubType = b._GetAttributeAllResponse
}
-func (b *_GetAttributeAllResponseBuilder) WithMandatoryFields(status uint8, extStatus uint8) GetAttributeAllResponseBuilder {
- return b.WithStatus(status).WithExtStatus(extStatus)
-}
-
-func (b *_GetAttributeAllResponseBuilder) WithStatus(status uint8) GetAttributeAllResponseBuilder {
- b.Status = status
- return b
-}
-
-func (b *_GetAttributeAllResponseBuilder) WithExtStatus(extStatus uint8) GetAttributeAllResponseBuilder {
- b.ExtStatus = extStatus
+func (b *_GetAttributeAllResponseBuilder) WithMandatoryFields() GetAttributeAllResponseBuilder {
return b
}
@@ -168,14 +144,14 @@ func (b *_GetAttributeAllResponseBuilder) MustBuild() GetAttributeAllResponse {
return build
}
-func (b *_GetAttributeAllResponseBuilder) Done() CipServiceBuilder {
+func (b *_GetAttributeAllResponseBuilder) Done() CipServiceResponseBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceResponseBuilder().(*_CipServiceResponseBuilder)
}
return b.parentBuilder
}
-func (b *_GetAttributeAllResponseBuilder) buildForCipService() (CipService, error) {
+func (b *_GetAttributeAllResponseBuilder) buildForCipServiceResponse() (CipServiceResponse, error) {
return b.Build()
}
@@ -209,21 +185,13 @@ func (m *_GetAttributeAllResponse) GetService() uint8 {
return 0x01
}
-func (m *_GetAttributeAllResponse) GetResponse() bool {
- return bool(true)
-}
-
-func (m *_GetAttributeAllResponse) GetConnected() bool {
- return false
-}
-
///////////////////////
///////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_GetAttributeAllResponse) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_GetAttributeAllResponse) GetParent() CipServiceResponseContract {
+ return m.CipServiceResponseContract
}
///////////////////////////////////////////////////////////
@@ -231,14 +199,6 @@ func (m *_GetAttributeAllResponse) GetParent() CipServiceContract {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_GetAttributeAllResponse) GetStatus() uint8 {
- return m.Status
-}
-
-func (m *_GetAttributeAllResponse) GetExtStatus() uint8 {
- return m.ExtStatus
-}
-
func (m *_GetAttributeAllResponse) GetAttributes() CIPAttributes {
return m.Attributes
}
@@ -264,16 +224,7 @@ func (m *_GetAttributeAllResponse) GetPlx4xTypeName() string {
}
func (m *_GetAttributeAllResponse) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
-
- // Reserved Field (reserved)
- lengthInBits += 8
-
- // Simple field (status)
- lengthInBits += 8
-
- // Simple field (extStatus)
- lengthInBits += 8
+ lengthInBits := uint64(m.CipServiceResponseContract.(*_CipServiceResponse).getLengthInBits(ctx))
// Optional Field (attributes)
if m.Attributes != nil {
@@ -287,8 +238,8 @@ func (m *_GetAttributeAllResponse) GetLengthInBytes(ctx context.Context) uint64
return m.GetLengthInBits(ctx) / 8
}
-func (m *_GetAttributeAllResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__getAttributeAllResponse GetAttributeAllResponse, err error) {
- m.CipServiceContract = parent
+func (m *_GetAttributeAllResponse) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceResponse, extStatusSize uint8, connected bool, serviceLen uint16) (__getAttributeAllResponse GetAttributeAllResponse, err error) {
+ m.CipServiceResponseContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -298,26 +249,8 @@ func (m *_GetAttributeAllResponse) parse(ctx context.Context, readBuffer utils.R
currentPos := positionAware.GetPos()
_ = currentPos
- reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(8)), uint8(0x00))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
- }
- m.reservedField0 = reservedField0
-
- status, err := ReadSimpleField(ctx, "status", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'status' field"))
- }
- m.Status = status
-
- extStatus, err := ReadSimpleField(ctx, "extStatus", ReadUnsignedByte(readBuffer, uint8(8)))
- if err != nil {
- return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'extStatus' field"))
- }
- m.ExtStatus = extStatus
-
var attributes CIPAttributes
- _attributes, err := ReadOptionalField[CIPAttributes](ctx, "attributes", ReadComplex[CIPAttributes](CIPAttributesParseWithBufferProducer((uint16)(uint16(serviceLen)-uint16(uint16(4)))), readBuffer), bool(((serviceLen)-(4)) > (0)))
+ _attributes, err := ReadOptionalField[CIPAttributes](ctx, "attributes", ReadComplex[CIPAttributes](CIPAttributesParseWithBufferProducer((uint16)(uint16(uint16(serviceLen)-uint16(uint16(4)))-uint16((uint16(uint16(2))*uint16(extStatusSize))))), readBuffer), bool((((serviceLen)-(4))-((2)*(extStatusSize))) > (0)))
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'attributes' field"))
}
@@ -351,18 +284,6 @@ func (m *_GetAttributeAllResponse) SerializeWithWriteBuffer(ctx context.Context,
return errors.Wrap(pushErr, "Error pushing for GetAttributeAllResponse")
}
- if err := WriteReservedField[uint8](ctx, "reserved", uint8(0x00), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'reserved' field number 1")
- }
-
- if err := WriteSimpleField[uint8](ctx, "status", m.GetStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'status' field")
- }
-
- if err := WriteSimpleField[uint8](ctx, "extStatus", m.GetExtStatus(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
- return errors.Wrap(err, "Error serializing 'extStatus' field")
- }
-
if err := WriteOptionalField[CIPAttributes](ctx, "attributes", new(m.GetAttributes()), WriteComplex[CIPAttributes](writeBuffer), true); err != nil {
return errors.Wrap(err, "Error serializing 'attributes' field")
}
@@ -372,7 +293,7 @@ func (m *_GetAttributeAllResponse) SerializeWithWriteBuffer(ctx context.Context,
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceResponseContract.(*_CipServiceResponse).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_GetAttributeAllResponse) IsGetAttributeAllResponse() {}
@@ -386,13 +307,10 @@ func (m *_GetAttributeAllResponse) deepCopy() *_GetAttributeAllResponse {
return nil
}
_GetAttributeAllResponseCopy := &_GetAttributeAllResponse{
- m.CipServiceContract.(*_CipService).deepCopy(),
- m.Status,
- m.ExtStatus,
+ m.CipServiceResponseContract.(*_CipServiceResponse).deepCopy(),
utils.DeepCopy[CIPAttributes](m.Attributes),
- m.reservedField0,
}
- _GetAttributeAllResponseCopy.CipServiceContract.(*_CipService)._SubType = m
+ _GetAttributeAllResponseCopy.CipServiceResponseContract.(*_CipServiceResponse)._SubType = m
return _GetAttributeAllResponseCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/GetAttributeListRequest.go b/plc4go/protocols/eip/readwrite/model/GetAttributeListRequest.go
index ce728793eb..237359eea1 100644
--- a/plc4go/protocols/eip/readwrite/model/GetAttributeListRequest.go
+++ b/plc4go/protocols/eip/readwrite/model/GetAttributeListRequest.go
@@ -38,7 +38,7 @@ type GetAttributeListRequest interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceRequest
// IsGetAttributeListRequest is a marker method to prevent unintentional type checks (interfaces of same signature)
IsGetAttributeListRequest()
// CreateBuilder creates a GetAttributeListRequestBuilder
@@ -47,18 +47,18 @@ type GetAttributeListRequest interface {
// _GetAttributeListRequest is the data-structure of this message
type _GetAttributeListRequest struct {
- CipServiceContract
+ CipServiceRequestContract
}
var _ GetAttributeListRequest = (*_GetAttributeListRequest)(nil)
-var _ CipServiceRequirements = (*_GetAttributeListRequest)(nil)
+var _ CipServiceRequestRequirements = (*_GetAttributeListRequest)(nil)
// NewGetAttributeListRequest factory function for _GetAttributeListRequest
func NewGetAttributeListRequest() *_GetAttributeListRequest {
_result := &_GetAttributeListRequest{
- CipServiceContract: NewCipService(),
+ CipServiceRequestContract: NewCipServiceRequest(),
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceRequestContract.(*_CipServiceRequest)._SubType = _result
return _result
}
@@ -73,7 +73,7 @@ type GetAttributeListRequestBuilder interface {
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
WithMandatoryFields() GetAttributeListRequestBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceRequestBuilder
// Build builds the GetAttributeListRequest or returns an error if something is wrong
Build() (GetAttributeListRequest, error)
// MustBuild does the same as Build but panics on error
@@ -88,16 +88,16 @@ func NewGetAttributeListRequestBuilder() GetAttributeListRequestBuilder {
type _GetAttributeListRequestBuilder struct {
*_GetAttributeListRequest
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceRequestBuilder
collectedErr []error
}
var _ (GetAttributeListRequestBuilder) = (*_GetAttributeListRequestBuilder)(nil)
-func (b *_GetAttributeListRequestBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._GetAttributeListRequest
+func (b *_GetAttributeListRequestBuilder) setParent(contract CipServiceRequestContract) {
+ b.CipServiceRequestContract = contract
+ contract.(*_CipServiceRequest)._SubType = b._GetAttributeListRequest
}
func (b *_GetAttributeListRequestBuilder) WithMandatoryFields() GetAttributeListRequestBuilder {
@@ -119,14 +119,14 @@ func (b *_GetAttributeListRequestBuilder) MustBuild() GetAttributeListRequest {
return build
}
-func (b *_GetAttributeListRequestBuilder) Done() CipServiceBuilder {
+func (b *_GetAttributeListRequestBuilder) Done() CipServiceRequestBuilder {
if b.parentBuilder == nil {
- b.parentBuilder = NewCipServiceBuilder().(*_CipServiceBuilder)
+ b.parentBuilder = NewCipServiceRequestBuilder().(*_CipServiceRequestBuilder)
}
return b.parentBuilder
}
-func (b *_GetAttributeListRequestBuilder) buildForCipService() (CipService, error) {
+func (b *_GetAttributeListRequestBuilder) buildForCipServiceRequest() (CipServiceRequest, error) {
return b.Build()
}
@@ -160,10 +160,6 @@ func (m *_GetAttributeListRequest) GetService() uint8 {
return 0x03
}
-func (m *_GetAttributeListRequest) GetResponse() bool {
- return bool(false)
-}
-
func (m *_GetAttributeListRequest) GetConnected() bool {
return false
}
@@ -173,8 +169,8 @@ func (m *_GetAttributeListRequest) GetConnected() bool {
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
-func (m *_GetAttributeListRequest) GetParent() CipServiceContract {
- return m.CipServiceContract
+func (m *_GetAttributeListRequest) GetParent() CipServiceRequestContract {
+ return m.CipServiceRequestContract
}
// Deprecated: use the interface for direct cast
@@ -193,7 +189,7 @@ func (m *_GetAttributeListRequest) GetPlx4xTypeName() string {
}
func (m *_GetAttributeListRequest) GetLengthInBits(ctx context.Context) uint64 {
- lengthInBits := uint64(m.CipServiceContract.(*_CipService).getLengthInBits(ctx))
+ lengthInBits := uint64(m.CipServiceRequestContract.(*_CipServiceRequest).getLengthInBits(ctx))
return lengthInBits
}
@@ -202,8 +198,8 @@ func (m *_GetAttributeListRequest) GetLengthInBytes(ctx context.Context) uint64
return m.GetLengthInBits(ctx) / 8
}
-func (m *_GetAttributeListRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipService, connected bool, serviceLen uint16) (__getAttributeListRequest GetAttributeListRequest, err error) {
- m.CipServiceContract = parent
+func (m *_GetAttributeListRequest) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_CipServiceRequest, connected bool, serviceLen uint16) (__getAttributeListRequest GetAttributeListRequest, err error) {
+ m.CipServiceRequestContract = parent
parent._SubType = m
positionAware := readBuffer
_ = positionAware
@@ -243,7 +239,7 @@ func (m *_GetAttributeListRequest) SerializeWithWriteBuffer(ctx context.Context,
}
return nil
}
- return m.CipServiceContract.(*_CipService).serializeParent(ctx, writeBuffer, m, ser)
+ return m.CipServiceRequestContract.(*_CipServiceRequest).serializeParent(ctx, writeBuffer, m, ser)
}
func (m *_GetAttributeListRequest) IsGetAttributeListRequest() {}
@@ -257,9 +253,9 @@ func (m *_GetAttributeListRequest) deepCopy() *_GetAttributeListRequest {
return nil
}
_GetAttributeListRequestCopy := &_GetAttributeListRequest{
- m.CipServiceContract.(*_CipService).deepCopy(),
+ m.CipServiceRequestContract.(*_CipServiceRequest).deepCopy(),
}
- _GetAttributeListRequestCopy.CipServiceContract.(*_CipService)._SubType = m
+ _GetAttributeListRequestCopy.CipServiceRequestContract.(*_CipServiceRequest)._SubType = m
return _GetAttributeListRequestCopy
}
diff --git a/plc4go/protocols/eip/readwrite/model/GetAttributeListResponse.go b/plc4go/protocols/eip/readwrite/model/GetAttributeListResponse.go
index 17e5bb9fe1..e9aff96e17 100644
--- a/plc4go/protocols/eip/readwrite/model/GetAttributeListResponse.go
+++ b/plc4go/protocols/eip/readwrite/model/GetAttributeListResponse.go
@@ -38,7 +38,7 @@ type GetAttributeListResponse interface {
utils.LengthAware
utils.Serializable
utils.Copyable
- CipService
+ CipServiceResponse
// IsGetAttributeListResponse is a marker method to prevent unintentional type checks (interfaces of same signature)
IsGetAttributeListResponse()
// CreateBuilder creates a GetAttributeListResponseBuilder
@@ -47,18 +47,18 @@ type GetAttributeListResponse interface {
// _GetAttributeListResponse is the data-structure of this message
type _GetAttributeListResponse struct {
- CipServiceContract
+ CipServiceResponseContract
}
var _ GetAttributeListResponse = (*_GetAttributeListResponse)(nil)
-var _ CipServiceRequirements = (*_GetAttributeListResponse)(nil)
+var _ CipServiceResponseRequirements = (*_GetAttributeListResponse)(nil)
// NewGetAttributeListResponse factory function for _GetAttributeListResponse
-func NewGetAttributeListResponse() *_GetAttributeListResponse {
+func NewGetAttributeListResponse(status uint8, extStatus []uint16) *_GetAttributeListResponse {
_result := &_GetAttributeListResponse{
- CipServiceContract: NewCipService(),
+ CipServiceResponseContract: NewCipServiceResponse(status, extStatus),
}
- _result.CipServiceContract.(*_CipService)._SubType = _result
+ _result.CipServiceResponseContract.(*_CipServiceResponse)._SubType = _result
return _result
}
@@ -73,7 +73,7 @@ type GetAttributeListResponseBuilder interface {
// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
WithMandatoryFields() GetAttributeListResponseBuilder
// Done is used to finish work on this child and return (or create one if none) to the parent builder
- Done() CipServiceBuilder
+ Done() CipServiceResponseBuilder
// Build builds the GetAttributeListResponse or returns an error if something is wrong
Build() (GetAttributeListResponse, error)
// MustBuild does the same as Build but panics on error
@@ -88,16 +88,16 @@ func NewGetAttributeListResponseBuilder() GetAttributeListResponseBuilder {
type _GetAttributeListResponseBuilder struct {
*_GetAttributeListResponse
- parentBuilder *_CipServiceBuilder
+ parentBuilder *_CipServiceResponseBuilder
collectedErr []error
}
var _ (GetAttributeListResponseBuilder) = (*_GetAttributeListResponseBuilder)(nil)
-func (b *_GetAttributeListResponseBuilder) setParent(contract CipServiceContract) {
- b.CipServiceContract = contract
- contract.(*_CipService)._SubType = b._GetAttributeListResponse
+func (b *_GetAttributeListResponseBuilder) setParent(contract CipServiceResponseContract) {
+ b.CipServiceResponseContract = contract
+ contract.(*_CipServiceResponse)._SubType = b._GetAttributeListResponse
}
func (b *_GetAttributeListResponseBuilder) WithMandatoryFields() GetAttributeListResponseBuilder {
... 10119 lines suppressed ...