zhangqian
2023-08-24 e6c81b3916494ef51edc21774a27402d0f16c49c
constvar/const.go
@@ -20,3 +20,14 @@
   PlcAddressDataKeyFileName   = "plc_address_key"
   PlcAddressDataValueFileName = "plc_address_value"
)
type PlcMethod string
const (
   PlcMethodModbusTCP PlcMethod = "modbusTCP"
   PlcMethodSerial    PlcMethod = "serial"
)
func (slf PlcMethod) Valid() bool {
   return slf == PlcMethodModbusTCP || slf == PlcMethodSerial
}