Skip to content

Commit

Permalink
fix(plc4j/profinet): Fixed issue with subslot and ident numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
hutcheb committed Feb 6, 2023
1 parent abbe70d commit ef74a15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Expand Up @@ -84,6 +84,7 @@ private void populateNode() {
if (module.getSystemDefinedSubmoduleList() != null) {
for (ProfinetInterfaceSubmoduleItem interfaceItem : module.getSystemDefinedSubmoduleList().getInterfaceSubmodules()) {
Integer identNumber = Integer.decode(interfaceItem.getSubmoduleIdentNumber());
Integer subSlotNumber = interfaceItem.getSubslotNumber();
inputIoPsApiBlocks.add(new PnIoCm_IoDataObject(
slot,
interfaceItem.getSubslotNumber(),
Expand All @@ -93,7 +94,7 @@ private void populateNode() {
interfaceItem.getSubslotNumber(),
outputIoCsOffset));
expectedSubModuleApiBlocks.add(new PnIoCm_Submodule_NoInputNoOutputData(
identNumber,
subSlotNumber,
identNumber,
false,
false,
Expand All @@ -105,6 +106,7 @@ private void populateNode() {
for (
ProfinetPortSubmoduleItem portItem : module.getSystemDefinedSubmoduleList().getPortSubmodules()) {
Integer identNumber = Integer.decode(portItem.getSubmoduleIdentNumber());
Integer subSlotNumber = portItem.getSubslotNumber();
inputIoPsApiBlocks.add(new PnIoCm_IoDataObject(
0,
portItem.getSubslotNumber(),
Expand All @@ -114,7 +116,7 @@ private void populateNode() {
portItem.getSubslotNumber(),
outputIoCsOffset));
expectedSubModuleApiBlocks.add(new PnIoCm_Submodule_NoInputNoOutputData(
identNumber,
subSlotNumber,
identNumber,
false,
false,
Expand Down
Expand Up @@ -101,24 +101,24 @@
['END_OF_LLDP' EndOfLldp
]
['CHASSIS_ID' TlvChassisId(uint 9 tlvIdLength)
[simple uint 8 chassisIdSubType ]
[simple vstring '(tlvIdLength - 1) * 8' chassisId ]
[simple uint 8 chassisIdSubType ]
[simple vstring '(tlvIdLength - 1) * 8' chassisId ]
]
['PORT_ID' TlvPortId(uint 9 tlvIdLength)
[simple uint 8 portIdSubType ]
[simple vstring '(tlvIdLength - 1) * 8' portId ]
[simple uint 8 portIdSubType ]
[simple vstring '(tlvIdLength - 1) * 8' portId ]
]
['TIME_TO_LIVE' TlvTimeToLive
[simple uint 16 tlvTimeToLiveUnit ]
[simple uint 16 tlvTimeToLiveUnit ]
]
['PORT_DESCRIPTION' TlvPortDescription(uint 9 tlvIdLength)
[simple vstring '(tlvIdLength) * 8' chassisId ]
[simple vstring '(tlvIdLength) * 8' chassisId ]
]
['SYSTEM_NAME' TlvSystemName(uint 9 tlvIdLength)
[simple vstring '(tlvIdLength) * 8' chassisId ]
[simple vstring '(tlvIdLength) * 8' chassisId ]
]
['SYSTEM_DESCRIPTION' TlvSystemDescription(uint 9 tlvIdLength)
[simple vstring '(tlvIdLength) * 8' chassisId ]
[simple vstring '(tlvIdLength) * 8' chassisId ]
]
['SYSTEM_CAPABILITIES' TlvSystemCapabilities
[reserved uint 8 '0x00' ]
Expand Down

0 comments on commit ef74a15

Please sign in to comment.