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/10/28 18:07:54 UTC

[plc4x] branch develop updated (e8ff4a88b -> 23fcdce5f)

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

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


    from e8ff4a88b build(deps): bump protobuf-java from 3.21.8 to 3.21.9 (#562)
     new ac272549c fix(plc4xpcapanalyzer): fix handling of cap files
     new e54ee39ad fix(plc4xpcapanalyzer): fix file navigation
     new 3c11cbd73 fix(plc4xpcapanalyzer): guard against unknown protocols
     new decb3b9ca feat(plc4xpcapanalyzer): set default output lines for outputs to now crash application on big pcaps
     new 23fcdce5f feat(plc4xbrowser): set default output lines for outputs to now crash application on long sessions

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 plc4go/tools/plc4xbrowser/ui/config.go                       | 5 ++++-
 plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go | 4 +++-
 plc4go/tools/plc4xpcapanalyzer/ui/commands.go                | 4 +++-
 plc4go/tools/plc4xpcapanalyzer/ui/config.go                  | 5 ++++-
 4 files changed, 14 insertions(+), 4 deletions(-)


[plc4x] 03/05: fix(plc4xpcapanalyzer): guard against unknown protocols

Posted by sr...@apache.org.
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

commit 3c11cbd7360d8c95dc640fc5d6483a83dfa17190
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Oct 28 18:13:18 2022 +0200

    fix(plc4xpcapanalyzer): guard against unknown protocols
---
 plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go b/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go
index b814b5691..016e6f6d0 100644
--- a/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go
+++ b/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go
@@ -70,7 +70,7 @@ func AnalyzeWithOutputAndCallback(pcapFile, protocolType string, stdout, stderr
 	}
 	var byteOutput = hex.Dump
 	switch protocolType {
-	case "bacnet":
+	case "bacnetip":
 		packageParse = bacnetanalyzer.PackageParse
 		serializePackage = bacnetanalyzer.SerializePackage
 	case "c-bus":
@@ -84,6 +84,8 @@ func AnalyzeWithOutputAndCallback(pcapFile, protocolType string, stdout, stderr
 		} else {
 			log.Info().Msg("Custom mapping disabled")
 		}
+	default:
+		return errors.Errorf("Unsupported protocol type %s", protocolType)
 	}
 	bar := progressbar.NewOptions(numberOfPackage, progressbar.OptionSetWriter(ansi.NewAnsiStderr()),
 		progressbar.OptionSetVisibility(!config.RootConfigInstance.HideProgressBar),


[plc4x] 01/05: fix(plc4xpcapanalyzer): fix handling of cap files

Posted by sr...@apache.org.
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

commit ac272549c245f6071afddf58e587585073aee6a6
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Oct 28 18:08:04 2022 +0200

    fix(plc4xpcapanalyzer): fix handling of cap files
---
 plc4go/tools/plc4xpcapanalyzer/ui/commands.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4go/tools/plc4xpcapanalyzer/ui/commands.go b/plc4go/tools/plc4xpcapanalyzer/ui/commands.go
index 84678de57..e44dc8c89 100644
--- a/plc4go/tools/plc4xpcapanalyzer/ui/commands.go
+++ b/plc4go/tools/plc4xpcapanalyzer/ui/commands.go
@@ -143,7 +143,7 @@ var rootCommand = Command{
 				for _, dirEntry := range readDir {
 					name := dirEntry.Name()
 					name = strings.TrimPrefix(name, currentDir)
-					if strings.HasSuffix(dirEntry.Name(), ".pcap") || strings.HasSuffix(name, ".pcapng") {
+					if strings.HasSuffix(dirEntry.Name(), ".cap") || strings.HasSuffix(dirEntry.Name(), ".pcap") || strings.HasSuffix(name, ".pcapng") {
 						entries = append(entries, name)
 					}
 				}


[plc4x] 05/05: feat(plc4xbrowser): set default output lines for outputs to now crash application on long sessions

Posted by sr...@apache.org.
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

commit 23fcdce5f739aab1ba3087af56dde5ca163036d5
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Oct 28 18:55:26 2022 +0200

    feat(plc4xbrowser): set default output lines for outputs to now crash application on long sessions
---
 plc4go/tools/plc4xbrowser/ui/config.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plc4go/tools/plc4xbrowser/ui/config.go b/plc4go/tools/plc4xbrowser/ui/config.go
index d10f990ec..1ec878825 100644
--- a/plc4go/tools/plc4xbrowser/ui/config.go
+++ b/plc4go/tools/plc4xbrowser/ui/config.go
@@ -31,7 +31,10 @@ import (
 
 var plc4xBrowserConfigDir string
 var configFile string
-var config Config
+var config = Config{
+	MaxConsoleLines: 500,
+	MaxOutputLines:  500,
+}
 
 type Config struct {
 	History struct {


[plc4x] 04/05: feat(plc4xpcapanalyzer): set default output lines for outputs to now crash application on big pcaps

Posted by sr...@apache.org.
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

commit decb3b9ca523842ab109d41a3bbcfd3c7825ce37
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Oct 28 18:55:01 2022 +0200

    feat(plc4xpcapanalyzer): set default output lines for outputs to now crash application on big pcaps
---
 plc4go/tools/plc4xpcapanalyzer/ui/config.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plc4go/tools/plc4xpcapanalyzer/ui/config.go b/plc4go/tools/plc4xpcapanalyzer/ui/config.go
index 100f8c440..f856ef362 100644
--- a/plc4go/tools/plc4xpcapanalyzer/ui/config.go
+++ b/plc4go/tools/plc4xpcapanalyzer/ui/config.go
@@ -31,7 +31,10 @@ import (
 
 var plc4xpcapanalyzerConfigDir string
 var configFile string
-var config Config
+var config = Config{
+	MaxConsoleLines: 500,
+	MaxOutputLines:  500,
+}
 
 type Config struct {
 	HostIp  string `yaml:"host_ip"`


[plc4x] 02/05: fix(plc4xpcapanalyzer): fix file navigation

Posted by sr...@apache.org.
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

commit e54ee39ad4f7a9de31e6e16a49a3d843332a4918
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Oct 28 18:08:21 2022 +0200

    fix(plc4xpcapanalyzer): fix file navigation
---
 plc4go/tools/plc4xpcapanalyzer/ui/commands.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plc4go/tools/plc4xpcapanalyzer/ui/commands.go b/plc4go/tools/plc4xpcapanalyzer/ui/commands.go
index e44dc8c89..bffd10e44 100644
--- a/plc4go/tools/plc4xpcapanalyzer/ui/commands.go
+++ b/plc4go/tools/plc4xpcapanalyzer/ui/commands.go
@@ -83,6 +83,8 @@ var rootCommand = Command{
 					proposedCurrentDir = currentDir + strings.TrimPrefix(newDir, ".")
 				} else if strings.HasPrefix(newDir, ""+string(os.PathSeparator)) {
 					proposedCurrentDir = newDir
+				} else {
+					proposedCurrentDir = currentDir + string(os.PathSeparator) + newDir
 				}
 				stat, err := os.Stat(proposedCurrentDir)
 				if err != nil {