12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package main
- import (
- "encoding/hex"
- "fmt"
- "smart_tunnel_edge/protocol/envSensor"
- "testing"
- )
- func Test_verify(t *testing.T) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- dataPack := envSensor.DataPack{Address: "02", Start: []byte{0x00, 0x06}, DataLen: []byte{0x00, 0x01}}
- command := dataPack.GetEnvGatherCommand()
- fmt.Println("+++++", hex.EncodeToString(command.Bytes()))
- }
- func parseHexString(hexStr string) string {
-
- bytes, err := hex.DecodeString(hexStr)
- if err != nil {
- fmt.Println("错误: 十六进制字符串解析失败", err)
- return ""
- }
-
- return string(bytes)
- }
|