Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetCPUInfo return “invalid CPU answer" #26

Open
ThinkontrolSY opened this issue May 11, 2020 · 0 comments
Open

GetCPUInfo return “invalid CPU answer" #26

ThinkontrolSY opened this issue May 11, 2020 · 0 comments

Comments

@ThinkontrolSY
Copy link
Contributor

ThinkontrolSY commented May 11, 2020

test CPU:
SIMENS S7-1211

func TestGetCpuInfo(t *testing.T) {
	handler := gos7.NewTCPClientHandler("192.168.1.3", 0, 1)
	handler.Timeout = 5 * time.Second
	handler.IdleTimeout = 5 * time.Second
	defer handler.Close()
	if err := handler.Connect(); err == nil {
		client := gos7.NewClient(handler)
		info, err := client.GetCPUInfo()
		t.Log(err)
		t.Log(info)
	} else {
		t.Fatal(err)
	}
}

return

=== RUN   TestGetCpuInfo
--- PASS: TestGetCpuInfo (0.07s)
    plc_test.go:20: CLI : invalid CPU answer
    plc_test.go:21: {    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant