| | |
| | | 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 ( |
| | |
| | | Length int `json:"length"` // 数据长度 |
| | | Type string `json:"type"` // 数据类型 |
| | | FieldName constvar.PlcStartAddressType `json:"fieldName"` // 对应系统字段,完成量或总量 |
| | | Endian constvar.EndianType `json:"endian" gorm:"type:varchar(255)"` // 字节存储顺序,big(ABCD)/little(CDBA)/mix(CDAB) |
| | | } |
| | | ) |
| | | |
| | |
| | | Length int `json:"length"` // 数据长度 |
| | | Type constvar.PlcStartAddressValueType `json:"type"` // 数据类型 |
| | | FieldName constvar.PlcStartAddressType `json:"fieldName"` // 对应系统字段 |
| | | Endian constvar.EndianType `json:"endian"` // 字节存储顺序,big(ABCD)/little(CDBA)/mix(CDAB) |
| | | } |
| | | |
| | | DevicePlcSearch struct { |