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 2023/06/11 10:36:19 UTC

[plc4x] branch chore/profinet-phase-3 updated: chore(plc4j/profinet-ng): - Added some more documentation in the code comments.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch chore/profinet-phase-3
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/chore/profinet-phase-3 by this push:
     new 3e881f3bb0 chore(plc4j/profinet-ng):  - Added some more documentation in the code comments.
3e881f3bb0 is described below

commit 3e881f3bb0cf5151a8e79c6ea9b271b7833e007a
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Sun Jun 11 12:36:10 2023 +0200

    chore(plc4j/profinet-ng):
     - Added some more documentation in the code comments.
---
 .../apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java b/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
index b1de93aa68..c72d7fa249 100644
--- a/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
+++ b/plc4j/drivers/profinet-ng/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
@@ -133,7 +133,11 @@ public class ProfinetProtocolLogic extends Plc4xProtocolBase<Ethernet_Frame> imp
             // correct port, and we can calculate the object id based on the vendor id and device id, which we
             // already have from the discovery.
 
-            // If there's more at least one DAP, read the real identification data and prepare all the data-structures.
+            // If we've found a device profile with at least one dap, we request the "real identification data" from the
+            // device. The response contains information about which slots are present and which module identifiers
+            // apply to them as well as which subslots are present and which submodule identifiers these have.
+            // In this part of the code, we simply look up the gsd dap, modules and submodules that match these
+            // identifiers and save them in an easily accessible format in the deviceContext.
             else if(deviceProfile.getProfileBody().getApplicationProcess().getDeviceAccessPointList().size() > 0) {
                 // Build an index of the String names.
                 Map<String, String> textMapping = new HashMap<>();