fix
zhangqian
2023-12-01 8324f872ef3a4d0c978a9b1d062800c6a1701c12
constvar/const.go
@@ -8,6 +8,7 @@
   NsqTopicDeviceUpdate              = "aps.%v.device.update"           //设备信息更改
   NsqTopicPullDataRequest           = "aps.%v.pull.data.request"       //拉取数据请求
   NsqTopicPullDataResponse          = "aps.%v.pull.data.response"      //拉取数据响应
   NsqTopicApsClientReportData       = "aps.%v.apsClient.report.data"   //apsClient上报数据
)
type PlcStartAddressType int
@@ -21,7 +22,8 @@
const (
   PlcStartAddressValueTypeString PlcStartAddressValueType = "string"
   PlcStartAddressValueTypeInt    PlcStartAddressValueType = "int"
   PlcStartAddressValueTypeInt16  PlcStartAddressValueType = "int16"
   PlcStartAddressValueTypeInt32  PlcStartAddressValueType = "int32"
)
const (
@@ -80,7 +82,7 @@
   ParityNull Parity = 3 //无校验
)
func (p Parity) String() string {
func (p Parity) ToString() string {
   switch p {
   case ParityEven:
      return "E"
@@ -126,3 +128,10 @@
   SystemStatusValueNormal   SystemStatusValue = "1"
   SystemStatusValueUnNormal SystemStatusValue = "2"
)
type ReportType int //上报类型
const (
   ReportTypeSystemDeviceID ReportType = 1
   ReportTypeReportWork     ReportType = 2
)