You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/08/09 14:36:50 UTC

[plc4x] branch develop updated: chore(plc4go/tools): added basic documentation for the tools

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

sruehl 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 1413bb797 chore(plc4go/tools): added basic documentation for the tools
1413bb797 is described below

commit 1413bb79751767ed8dede43657f9879e74580509
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Aug 9 16:36:44 2022 +0200

    chore(plc4go/tools): added basic documentation for the tools
---
 plc4go/tools/plc4xbrowser/doc.go              | 26 ++++++++++++++++++++++++++
 plc4go/tools/plc4xpcapanalyzer/cmd/analyze.go |  4 +++-
 plc4go/tools/plc4xpcapanalyzer/doc.go         | 26 ++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/plc4go/tools/plc4xbrowser/doc.go b/plc4go/tools/plc4xbrowser/doc.go
new file mode 100644
index 000000000..28ba99a16
--- /dev/null
+++ b/plc4go/tools/plc4xbrowser/doc.go
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+/* Package main contains the code for the plc4xbrowser
+
+The plc4xbrowser can be used to interactively talk to a plc using the plc4x api. Therefor it can be used by users to
+evaluate different API requests in a REPL style format.
+
+*/
+package main
diff --git a/plc4go/tools/plc4xpcapanalyzer/cmd/analyze.go b/plc4go/tools/plc4xpcapanalyzer/cmd/analyze.go
index 8cb867050..bd9840845 100644
--- a/plc4go/tools/plc4xpcapanalyzer/cmd/analyze.go
+++ b/plc4go/tools/plc4xpcapanalyzer/cmd/analyze.go
@@ -57,7 +57,9 @@ TODO: document me
 	Run: func(cmd *cobra.Command, args []string) {
 		protocolType := args[0]
 		pcapFile := args[1]
-		analyzer.Analyze(pcapFile, protocolType)
+		if err := analyzer.Analyze(pcapFile, protocolType); err != nil {
+			panic(err)
+		}
 		println("Done")
 	},
 }
diff --git a/plc4go/tools/plc4xpcapanalyzer/doc.go b/plc4go/tools/plc4xpcapanalyzer/doc.go
new file mode 100644
index 000000000..494f0de9a
--- /dev/null
+++ b/plc4go/tools/plc4xpcapanalyzer/doc.go
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+/* Package main contains the code for the plc4xpcapanalyzer
+
+The plc4xpcapanalyzer is meant to be used for internal plc4x development. It can be used to analyze pcap files using the
+parser/serializers of plc4x.
+
+*/
+package main