fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Beijing Hardman Automation Equipment Co., LTD. All rights reserved.
|
||||
*
|
||||
* Project: adapter
|
||||
* File: address_test.go
|
||||
* Last: 2025-05-17 15:27:01
|
||||
* Author: wangcheng@bj-hardman.com
|
||||
*/
|
||||
|
||||
package preload
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"bjhardman.cn/bjhardman/goplc/s7"
|
||||
)
|
||||
|
||||
func TestAddress(t *testing.T) {
|
||||
addr := MAddress{
|
||||
LineId: 1,
|
||||
Name: "ttt",
|
||||
Desc: "xxx",
|
||||
Addr: s7.Address{
|
||||
Area: "M",
|
||||
DBNumber: 0,
|
||||
DataType: "",
|
||||
Offset: 100,
|
||||
BitOffset: 0,
|
||||
},
|
||||
}
|
||||
|
||||
t.Log(addr.String())
|
||||
t.Log(addr.Address())
|
||||
addr.Addr.Add(0, 1)
|
||||
t.Log(addr.String())
|
||||
t.Log(addr.Address())
|
||||
t.Log(addr.Addr.Add(0, 1))
|
||||
t.Log(addr.String())
|
||||
t.Log(addr.Address())
|
||||
}
|
||||
Reference in New Issue
Block a user