From c688f083caf965cd13f640098ad204d8fd8c9e69 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 19 十二月 2023 17:21:01 +0800 Subject: [PATCH] 接收字节序参数 --- model/common/common.go | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/model/common/common.go b/model/common/common.go index b0a9b22..d918026 100644 --- a/model/common/common.go +++ b/model/common/common.go @@ -90,12 +90,13 @@ } PlcAddress struct { - DeviceID string `json:"deviceID"` // 璁惧id - Channel int `json:"channel"` // 鐢熶骇閫氶亾on锛屼竴涓満鍣ㄥ彲鑳芥湁澶氫釜鏈轰綅锛岄渶瑕佸垎鍒厤缃畃lc鍦板潃 - StartAddress int `json:"startAddress"` // 鏁版嵁璧峰鍦板潃 - Length int `json:"length"` // 鏁版嵁闀垮害 - Type string `json:"type"` // 鏁版嵁绫诲瀷 - FieldName constvar.PlcStartAddressType `json:"fieldName"` // 瀵瑰簲绯荤粺瀛楁锛屽畬鎴愰噺鎴栨�婚噺 + DeviceID string `json:"deviceID"` // 璁惧id + Channel int `json:"channel"` // 鐢熶骇閫氶亾on锛屼竴涓満鍣ㄥ彲鑳芥湁澶氫釜鏈轰綅锛岄渶瑕佸垎鍒厤缃畃lc鍦板潃 + StartAddress int `json:"startAddress"` // 鏁版嵁璧峰鍦板潃 + Length int `json:"length"` // 鏁版嵁闀垮害 + Type string `json:"type"` // 鏁版嵁绫诲瀷 + FieldName constvar.PlcStartAddressType `json:"fieldName"` // 瀵瑰簲绯荤粺瀛楁锛屽畬鎴愰噺鎴栨�婚噺 + Endian constvar.EndianType `json:"endian" gorm:"type:varchar(255)"` // 瀛楄妭瀛樺偍椤哄簭锛宐ig(ABCD)/little(CDBA)/mix(CDAB) } ) -- Gitblit v1.8.0