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 2022/09/01 08:11:17 UTC

[plc4x] branch develop updated: chore(protocols/ads): Started documenting the ADS driver State-Machine.

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 106286923 chore(protocols/ads): Started documenting the ADS driver State-Machine.
106286923 is described below

commit 1062869233a855121ae10753a9560dd426bb58cb
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Sep 1 10:11:01 2022 +0200

    chore(protocols/ads): Started documenting the ADS driver State-Machine.
---
 protocols/ads/src/site/asciidoc/protocol.adoc | 107 ++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/protocols/ads/src/site/asciidoc/protocol.adoc b/protocols/ads/src/site/asciidoc/protocol.adoc
new file mode 100644
index 000000000..a30c6ff58
--- /dev/null
+++ b/protocols/ads/src/site/asciidoc/protocol.adoc
@@ -0,0 +1,107 @@
+//
+//  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
+
+[plantuml,ads-statemachine,svg,opts="inline",svg-type="inline"]
+----
+@startuml
+
+(*) --> Connect
+
+partition Connect {
+    (*) --> "initializing"
+    if "Using Authentication?" then
+        -->[true] "Send 'Add Or Update AMS Routes'"
+    else
+        -->[false] ===Connected===
+    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: Load Symbol- and Data-Type-Tables?" then
+        -->[true] "Send 'Read Symbol- and Data-Type-Table sizes'"
+    else
+        -->[false] ===Connected===
+    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'" --> "Send 'Read Symbol-Table'"
+    "Send 'Read Symbol-Table'" ..> "Receive 'Read Symbol-Table'"
+    "Receive 'Read Symbol-Table'" --> ===Connected===
+}
+
+===Connected=== -->[API Browse Request] Browse
+
+partition Browse {
+    if "Is symbol- and data-type-table loaded?" then
+        -->[true] "Return API Browse Result"
+    else
+        -->[false] "Do something"
+        "Do something" --> "Return API Browse Result"
+    endif
+    "Return API Browse Result" --> ===Connected===
+}
+
+===Connected=== -->[API Read Request] Read
+
+partition Read {
+    if "Is single item read request?" then
+        if "Are all field addresses resolved?" then
+            -->[true] "Send 'Multi Item Address Resolution'"
+            "Send 'Multi Item Address Resolution'" --> "Receive 'Multi Item Address Resolution'"
+            "Receive 'Multi Item Address Resolution'" --> "Send 'Multi Item Read'"
+        else
+            -->[false] "Send 'Multi Item Read'"
+        endif
+        "Send 'Multi Item Read'" ..> "Receive 'Multi Item Read'"
+        "Receive 'Multi Item Read'" --> "Return API Read Result"
+    else
+        if "Is the field address resolved?" then
+            -->[true] "Send 'Single Item Address Resolution'"
+            "Send 'Single Item Address Resolution'" --> "Receive 'Single Item Address Resolution'"
+            "Receive 'Single Item Address Resolution'" --> "Send 'Single Item Read'"
+        else
+            -->[false] "Send 'Single Item Read'"
+        endif
+        "Send 'Single Item Read'" ..> "Receive 'Single Item Read'"
+        "Receive 'Single Item Read'" --> "Return API Read Result"
+    endif
+    "Return API Read Result" --> ===Connected===
+}
+
+===Connected=== -->[API Write Request] Write
+
+partition Write {
+    WriteTest --> ===Connected===
+}
+
+===Connected=== -->[API Subscription Request] Subscribe
+
+partition Subscribe {
+    SubscribeTest --> ===Connected===
+}
+
+===Connected=== -->[API Unsubscription Request] Unsubscribe
+
+partition Unsubscribe {
+    UnsubscribeTest --> ===Connected===
+}
+
+@enduml
+----
\ No newline at end of file