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/05/25 09:24:29 UTC

[plc4x] 04/06: chore(documentation): Copied the "documentation" on the camel integration to a place where it gets published on our website.

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

commit 27e9112596bf87a1625d6e36e5c7b0cfbb1999fc
Author: cdutz <ch...@c-ware.de>
AuthorDate: Wed May 25 11:21:03 2022 +0200

    chore(documentation): Copied the "documentation" on the camel integration to a place where it gets published on our website.
---
 .../asciidoc/users/integrations/apache-camel.adoc  | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/src/site/asciidoc/users/integrations/apache-camel.adoc b/src/site/asciidoc/users/integrations/apache-camel.adoc
index 6f2fba0a80..31024dd7b2 100644
--- a/src/site/asciidoc/users/integrations/apache-camel.adoc
+++ b/src/site/asciidoc/users/integrations/apache-camel.adoc
@@ -18,3 +18,47 @@
 :icons: font
 
 == Apache Camel
+The Camel Component for PLC4X allows you to create routes using the PLC4X API to read from a PLC device or write to it.
+
+=== Maven dependency
+To use the Camel component, just add following dependency to your project
+----
+<dependency>
+  <groupId>org.apache.plc4x</groupId>
+  <artifactId>plc4j-apache-camel</artifactId>
+  <version>{current-last-released-version}</version>
+</dependency>
+----
+
+== Endpoint
+[cols="2"]
+|===
+|Name |Value
+
+|*Tags*   | The tags to read as `Map<String,String>` containing the tagname associated to its query
+|*Trigger*|(*Consumer*) Query to a trigger. On a rising edge of the trigger, the tags will be read once
+|*Period* |(*Consumer*) Interval on which the Trigger should be checked
+|*Driver parameters* | Every Parameter unknown to the Component will be passed to the driver
+|===
+=== URI Format
+----
+plc4x:[driver-code]://[IP|host][?parameters]
+----
+Note that sometimes you want to add the `Transport` code after the `Driver` code:
+
+----
+plc4x:[driver-code]:[transport-code]://[IP|host][?parameters]
+----
+== Consumer
+The consumer supports one-time reading or Triggered Reading. (_Schedulded Reading using Period only soon_).To read from
+the PLC, use a  `Map<String,String>` containing the Alias and Queries for the Data you want.
+
+The Body create by the Consumer will be a `Map<String,Object>` containing the Aliases and there associated value
+read from the PLC.
+
+== Producer
+To write data to the PLC, we also use a `Map`. The difference with the Producer is that the `Value` of the Map has also to
+be a Map. Also, this `Map` has to be set into the `Body` of the `Message`
+
+The used `Map` would be a `Map<String,Map<String,Object>` where the `Map<String,Object>` represent the Query and the
+data we want to write to it.