You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by ot...@apache.org on 2024/04/17 15:56:09 UTC

(plc4x) 02/02: Revert "Delete src/site/asciidoc/developers/protocols directory"

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

otluk pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit a5d3765cdde8aa97611578891e28cdacdd904d16
Author: otluk <19...@users.noreply.github.com>
AuthorDate: Wed Apr 17 17:53:10 2024 +0200

    Revert "Delete src/site/asciidoc/developers/protocols directory"
    
    This reverts commit 58cd1f315d96362a740795d15f3aaa90bbb3a328.
---
 .../developers/protocols/ads/protocol.adoc         | 198 +++++++++++++++++++++
 .../developers/protocols/eip/protocol.adoc         | 132 ++++++++++++++
 2 files changed, 330 insertions(+)

diff --git a/src/site/asciidoc/developers/protocols/ads/protocol.adoc b/src/site/asciidoc/developers/protocols/ads/protocol.adoc
new file mode 100644
index 0000000000..d71aa79036
--- /dev/null
+++ b/src/site/asciidoc/developers/protocols/ads/protocol.adoc
@@ -0,0 +1,198 @@
+//
+//  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.
+//
+
+== Beckhoff ADS Protocol
+
+// https://plantuml.com/de/activity-diagram-legacy
+// https://deepu.js.org/svg-seq-diagram/Reference_Guide.pdf
+
+[plantuml,ads-statemachine,svg,opts="inline",svg-type="inline"]
+----
+@startuml
+
+(*) --> Connect
+
+partition "Connected" #EEEEEE {
+    ===Connected=== -->[API Browse Request] Browse
+    ===Connected=== -->[API Read Request] Read
+    ===Connected=== -->[API Write Request] Write
+    ===Connected=== -->[API Subscription Request] Subscribe
+    ===Connected=== -->[API Unsubscription Request] Unsubscribe
+}
+
+partition Connect #EEEECC {
+    (*) --> "initializing"
+    if "Using Authentication?" then
+        -->[true] "Send 'Add Or Update AMS Routes'"
+    else
+        -->[false] "Send 'ADS Read Device Info'"
+    endif
+    "Send 'Add Or Update AMS Routes'" ..> "Receive 'Add Or Update AMS Routes'"
+    "Receive 'Add Or Update AMS Routes'" --> "Send 'ADS Read Device Info'"
+    "Send 'ADS Read Device Info'" ..> "Receive 'ADS Read Device Info'"
+    if "Config: Monitor PLC changes?" then
+        -->[true] "Init Read Online and Offline Version"
+    else
+        -->[false] "Reset Symbol and Data-Type Data"
+    endif
+    "Init Read Online and Offline Version" --> "Send 'Read Online-Version (Symbolic)'"
+    "Init Read Online and Offline Version" --> "Send 'Read Offline-Version'"
+    "Send 'Read Online-Version (Symbolic)'" ..> "Receive 'Read Online-Version (Symbolic)'"
+    "Receive 'Read Online-Version (Symbolic)'" --> ===OnlineAndOfflineVersionRead===
+    "Send 'Read Offline-Version'" ..> "Receive 'Read Offline-Version'"
+    "Receive 'Read Offline-Version'" --> ===OnlineAndOfflineVersionRead===
+    ===OnlineAndOfflineVersionRead=== --> "Reset Symbol and Data-Type Data"
+    if "Config: Load Symbol- and Data-Type-Tables?" then
+        -->[true] "Send 'Read Symbol- and Data-Type-Table sizes'"
+    else
+        -->[false] ===FinishedReadingSymbolAndDataTypeTable===
+    endif
+    "Send 'Read Symbol- and Data-Type-Table sizes'" ..> "Receive 'Read Symbol- and Data-Type-Table sizes'"
+    "Receive 'Read Symbol- and Data-Type-Table sizes'" --> "Send 'Read Data-Type-Table'"
+    "Send 'Read Data-Type-Table'" ..> "Receive 'Read Data-Type-Table'"
+    "Receive 'Read Data-Type-Table'" --> ===FinishedReadingSymbolAndDataTypeTable===
+    "Receive 'Read Symbol- and Data-Type-Table sizes'" --> "Send 'Read Symbol-Table'"
+    "Send 'Read Symbol-Table'" ..> "Receive 'Read Symbol-Table'"
+    "Receive 'Read Symbol-Table'" --> ===FinishedReadingSymbolAndDataTypeTable===
+    if "Config: Monitor PLC changes?" then
+        -right->[true] "Subscribe to changes to the Online- and Offline Version"#EECCEE
+    endif
+    "Subscribe to changes to the Online- and Offline Version" ..>[Update the online- or offline version (Depending on wich one changed)] "Reset Symbol and Data-Type Data"
+    ===FinishedReadingSymbolAndDataTypeTable=== --> ===Connected===
+}
+
+partition Browse #CCCCEE {
+    "Browse" --> ===BrowseStart===
+    if "Is symbol- and data-type-table loaded?" then
+        -->[true] ===BrowseFinishedReadingSymbolAndDataTypeTable===
+    else
+        -->[false] "Browse: Send 'Read Symbol- and Data-Type-Table sizes'"
+        "Browse: Send 'Read Symbol- and Data-Type-Table sizes'" ..> "Browse: Receive 'Read Symbol- and Data-Type-Table sizes'"
+        "Browse: Receive 'Read Symbol- and Data-Type-Table sizes'" --> "Browse: Send 'Read Data-Type-Table'"
+        "Browse: Send 'Read Data-Type-Table'" ..> "Browse: Receive 'Read Data-Type-Table'"
+        "Browse: Receive 'Read Data-Type-Table'" --> ===BrowseFinishedReadingSymbolAndDataTypeTable===
+        "Browse: Receive 'Read Symbol- and Data-Type-Table sizes'" --> "Browse: Send 'Read Symbol-Table'"
+        "Browse: Send 'Read Symbol-Table'" ..> "Browse: Receive 'Read Symbol-Table'"
+        "Browse: Receive 'Read Symbol-Table'" --> ===BrowseFinishedReadingSymbolAndDataTypeTable===
+    endif
+    ===BrowseFinishedReadingSymbolAndDataTypeTable=== --> "Return API Browse Result"
+    "Return API Browse Result" --> ===Connected===
+}
+
+partition Read #CCEECC {
+    "Read" --> ===ReadStart===
+    if "Is single item read request?" then
+        -->[false] if "Are all field addresses resolved?" then
+            -->[unresolved] "Read: Send 'Multi Item Address Resolution' for unresolved"
+            "Read: Send 'Multi Item Address Resolution' for unresolved" ..> "Read: Receive 'Multi Item Address Resolution' for unresolved"
+            "Read: Receive 'Multi Item Address Resolution' for unresolved" --> ===ReadAllItemsResolved===
+        else
+            -->[resolved] ===ReadAllItemsResolved===
+        endif
+        ===ReadAllItemsResolved=== --> "Read: Send 'Multi Item Read'"
+        "Read: Send 'Multi Item Read'" ..> "Read: Receive 'Multi Item Read'"
+        "Read: Receive 'Multi Item Read'" --> "Read: Return API Read Result"
+    else
+        -->[true] if "Is the field address resolved?" then
+            -->[false] "Read: Send 'Single Item Address Resolution'"
+            "Read: Send 'Single Item Address Resolution'" ..> "Read: Receive 'Single Item Address Resolution'"
+            "Read: Receive 'Single Item Address Resolution'" --> "Read: Send 'Single Item Read'"
+        else
+            -->[true] "Read: Send 'Single Item Read'"
+        endif
+        "Read: Send 'Single Item Read'" ..> "Read: Receive 'Single Item Read'"
+        "Read: Receive 'Single Item Read'" --> "Read: Return API Read Result"
+    endif
+    "Read: Return API Read Result" --> ===Connected===
+}
+
+partition Write #EECCCC {
+    "Write" --> ===WriteStart===
+    if "Is single item write request?" then
+        -->[false] if "Are all field addresses resolved?" then
+            -->[unresolved] "Write: Send 'Multi Item Address Resolution' for unresolved"
+            "Write: Send 'Multi Item Address Resolution' for unresolved" ..> "Write: Receive 'Multi Item Address Resolution' for unresolved"
+            "Write: Receive 'Multi Item Address Resolution' for unresolved" --> ===WriteAllItemsResolved===
+        else
+            -->[resolved] ===WriteAllItemsResolved===
+        endif
+        ===WriteAllItemsResolved=== --> "Write: Send 'Multi Item Write'"
+        "Write: Send 'Multi Item Write'" ..> "Write: Receive 'Multi Item Write'"
+        "Write: Receive 'Multi Item Write'" --> "Write: Return API Write Result"
+    else
+        -->[true] if "Is the field address resolved?" then
+            -->[false] "Write: Send 'Single Item Address Resolution'"
+            "Write: Send 'Single Item Address Resolution'" ..> "Write: Receive 'Single Item Address Resolution'"
+            "Write: Receive 'Single Item Address Resolution'" --> "Write: Send 'Single Item Write'"
+        else
+            -->[true] "Write: Send 'Single Item Write'"
+        endif
+        "Write: Send 'Single Item Write'" ..> "Write: Receive 'Single Item Write'"
+        "Write: Receive 'Single Item Write'" --> "Write: Return API Write Result"
+    endif
+    "Write: Return API Write Result" --> ===Connected===
+}
+
+partition Subscribe #EECCEE {
+    "Subscribe" --> ===SubscribeStart===
+    if "Is single item subscription request?" then
+        -->[false] if "Are all field addresses resolved?" then
+            -->[unresolved] "Subscribe: Send 'Multi Item Address Resolution' for unresolved"
+            "Subscribe: Send 'Multi Item Address Resolution' for unresolved" ..> "Subscribe: Receive 'Multi Item Address Resolution' for unresolved"
+            "Subscribe: Receive 'Multi Item Address Resolution' for unresolved" --> ===SubscribeAllItemsResolved===
+        else
+            -->[resolved] ===SubscribeAllItemsResolved===
+        endif
+    else
+        -->[true] if "Is the field address resolved?" then
+            -->[false] "Subscribe: Send 'Single Item Address Resolution'"
+            "Subscribe: Send 'Single Item Address Resolution'" ..> "Subscribe: Receive 'Single Item Address Resolution'"
+            "Subscribe: Receive 'Single Item Address Resolution'" --> ===SubscribeAllItemsResolved===
+        else
+            -->[true] ===SubscribeAllItemsResolved===
+        endif
+        ===SubscribeAllItemsResolved=== --> "Subscribe: Send 'Single Item 1 Subscibe'"
+        "Subscribe: Send 'Single Item 1 Subscibe'" ..> "Subscribe: Receive 'Single Item 1 Subscibe'"
+        "Subscribe: Receive 'Single Item 1 Subscibe'" --> ===SubscribeAllItemsSubscribed===
+        ===SubscribeAllItemsResolved=== --> "Subscribe: Send 'Single Item 2 Subscibe'"
+        "Subscribe: Send 'Single Item 2 Subscibe'" ..> "Subscribe: Receive 'Single Item 2 Subscibe'"
+        "Subscribe: Receive 'Single Item 2 Subscibe'" --> ===SubscribeAllItemsSubscribed===
+        ===SubscribeAllItemsResolved=== --> "Subscribe: Send 'Single Item n Subscibe'"
+        "Subscribe: Send 'Single Item n Subscibe'" ..> "Subscribe: Receive 'Single Item n Subscibe'"
+        "Subscribe: Receive 'Single Item n Subscibe'" --> ===SubscribeAllItemsSubscribed===
+        ===SubscribeAllItemsSubscribed=== --> "Subscribe: Return API Write Result"
+    endif
+    "Subscribe: Return API Write Result" --> ===Connected===
+}
+
+partition Unsubscribe #LightSkyBlue {
+    "Unsubscribe" --> ===UnsubscribeStart===
+    ===UnsubscribeStart=== --> "Unsubscribe: Send 'Single Item 1 Unsubscribe'"
+    "Unsubscribe: Send 'Single Item 1 Unsubscribe'" ..> "Unsubscribe: Receive 'Single Item 1 Unsubscribe'"
+    "Unsubscribe: Receive 'Single Item 1 Unsubscribe'" --> ===UnsubscribeAllItemsUnsubscribed===
+    ===UnsubscribeStart=== --> "Unsubscribe: Send 'Single Item 2 Unsubscribe'"
+    "Unsubscribe: Send 'Single Item 2 Unsubscribe'" ..> "Unsubscribe: Receive 'Single Item 2 Unsubscribe'"
+    "Unsubscribe: Receive 'Single Item 2 Unsubscribe'" --> ===UnsubscribeAllItemsUnsubscribed===
+    ===UnsubscribeStart=== --> "Unsubscribe: Send 'Single Item n Unsubscribe'"
+    "Unsubscribe: Send 'Single Item n Unsubscribe'" ..> "Unsubscribe: Receive 'Single Item n Unsubscribe'"
+    "Unsubscribe: Receive 'Single Item n Unsubscribe'" --> ===UnsubscribeAllItemsUnsubscribed===
+    ===UnsubscribeAllItemsUnsubscribed=== --> "Unsubscribe: Return API Unsubscribe Result"
+    "Unsubscribe: Return API Unsubscribe Result" --> ===Connected===
+}
+
+@enduml
+----
\ No newline at end of file
diff --git a/src/site/asciidoc/developers/protocols/eip/protocol.adoc b/src/site/asciidoc/developers/protocols/eip/protocol.adoc
new file mode 100644
index 0000000000..1cf6bbbc4c
--- /dev/null
+++ b/src/site/asciidoc/developers/protocols/eip/protocol.adoc
@@ -0,0 +1,132 @@
+//
+//  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.
+//
+
+== EIP Protocol
+
+// https://plantuml.com/de/activity-diagram-legacy
+// https://deepu.js.org/svg-seq-diagram/Reference_Guide.pdf
+
+[plantuml,eip-statemachine,svg,opts="inline",svg-type="inline"]
+----
+@startuml
+
+(*) --> Connect
+
+partition "Connected" #EEEEEE {
+    ===Connected=== -->[API Browse Request] Browse
+    ===Connected=== -->[API Read Request] Read
+    ===Connected=== -->[API Write Request] Write
+    ===Connected=== -->[API Subscription Request] Subscribe
+    ===Connected=== -->[API Unsubscription Request] Unsubscribe
+    ===Connected=== -->[API Disconnect Request] Disconnect
+}
+
+partition Connect #EEEECC {
+    (*) --> "initializing"
+    "initializing" --> "Send ListServices request"
+    "Send ListServices request" ..> "Receive ListServices response"
+    "Receive ListServices response" -->[If successfull, extract 'CIP encapsulation support' setting] "Send EipConnectionRequest request"
+    "Send EipConnectionRequest request" ..> "Receive EipConnectionRequest response"
+    if "Response is an EipConnectionResponse"?
+        -->[true] "Send GetAllAttributes request"
+    else
+        -->[false] "Send OpenConnectionManager request"
+    endif
+    "Send GetAllAttributes request" ..> "Receive GetAllAttributes response"
+    if "Extract setting for 'useMessageRouter' and 'useConnectionManager'. If useConnectionManager"
+        -->[true] "Send OpenConnectionManager request"
+    else
+        -->[false] ===Connected===
+    endif
+    "Send OpenConnectionManager request" ..> "Receive OpenConnectionManager response"
+    "Receive OpenConnectionManager response" --> ===Connected===
+}
+
+partition Disconnect #EECCCC {
+    "Disconnect" --> ===DisconnectStart===
+    if "connectionId != 0"
+        -->[true] "Send ConnectionManagerClose request"
+    else
+        -->[false] "Send Disconnect request"
+    endif
+    "Send ConnectionManagerClose request" ..> "Receive ConnectionManagerClose response"
+    "Receive ConnectionManagerClose response" --> "Send Disconnect request"
+    "Send Disconnect request" ..> "Receive Disconnect response"
+    "Receive Disconnect response" --> ===Disconnected===
+}
+
+partition Browse #CCCCEE {
+    "Browse" --> ===BrowseStart===
+    ===BrowseStart=== --> ===Connected===
+}
+
+partition Read #CCEECC {
+    "Read" --> ===ReadStart===
+    if "useMessageRouter"
+        if "useConnectionManager"
+            -->[true] "readWithConnectionManager"
+        else
+            -->[false] "readWithoutConnectionManager"
+        endif
+    else
+        -->[false] "readWithoutMessageRouter"
+    endif
+    "readWithConnectionManager" --> "Send SendUnitData request"
+    "Send SendUnitData request" ..> "Receive SendUnitData response"
+    "Receive SendUnitData response" --> ===Connected===
+    "readWithoutConnectionManager" --> "Send CipRRData request"
+    "Send CipRRData request" ..> "Receive CipRRData response"
+    "Receive CipRRData response" --> ===Connected===
+    "readWithoutMessageRouter" --> "Send unconnected CipReadRequest request for each tag"
+    "Send unconnected CipReadRequest request for each tag" ..> "Receive unconnected CipReadRequest response"
+    "Receive unconnected CipReadRequest response" --> ===Connected===
+}
+
+partition Write #EECCCC {
+    "Write" --> ===WriteStart===
+    if "useMessageRouter"
+        if "useConnectionManager"
+            -->[true] "writeWithConnectionManager"
+        else
+            -->[false] "writeWithoutConnectionManager"
+        endif
+    else
+        -->[false] "writeWithoutMessageRouter"
+    endif
+    "writeWithConnectionManager" --> "Send SendUnitData request"
+    "Send SendUnitData request" ..> "Receive SendUnitData response"
+    "Receive SendUnitData response" --> ===Connected===
+    "writeWithoutConnectionManager" --> "Send CipRRData request"
+    "Send CipRRData request" ..> "Receive CipRRData response"
+    "Receive CipRRData response" --> ===Connected===
+    "writeWithoutMessageRouter" --> "Send unconnected CipWriteRequest request for each tag"
+    "Send unconnected CipWriteRequest request for each tag" ..> "Receive unconnected CipWriteRequest response"
+    "Receive unconnected CipWriteRequest response" --> ===Connected===
+}
+
+partition Subscribe #EECCEE {
+    "Subscribe" --> ===SubscribeStart===
+    ===SubscribeStart=== --> ===Connected===
+}
+
+partition Unsubscribe #LightSkyBlue {
+    "Unsubscribe" --> ===UnsubscribeStart===
+    ===UnsubscribeStart=== --> ===Connected===
+}
+
+@enduml
+----
\ No newline at end of file