From 8b6a262a56942a1a5764526f315029f1cd410ede Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 16 四月 2024 11:31:09 +0800 Subject: [PATCH] 开始生产去掉时间未到限制 --- constvar/const.go | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/constvar/const.go b/constvar/const.go index 65d9828..d92819b 100644 --- a/constvar/const.go +++ b/constvar/const.go @@ -15,10 +15,23 @@ type PlcStartAddressType int const ( - PlcStartAddressTypeFinishNumber PlcStartAddressType = 1 - PlcStartAddressTypeTotalNumber PlcStartAddressType = 2 + PlcStartAddressTypeFinishNumber PlcStartAddressType = 1 + PlcStartAddressTypeTotalNumber PlcStartAddressType = 2 + PlcStartAddressTypeTotalNumberWrite PlcStartAddressType = 3 ) +type EndianType string + +const ( + EndianTypeBig EndianType = "big" + EndianTypeLittle EndianType = "little" + EndianTypeMix EndianType = "mix" +) + +func (t EndianType) Valid() bool { + return t == EndianTypeBig || t == EndianTypeLittle || t == EndianTypeMix +} + type PlcStartAddressValueType string const ( -- Gitblit v1.8.0