123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package envitem
- import "github.com/go-redis/redis/v8"
- type (
- Options struct {
- GtServerIp string
- Cache *redis.Client
- AdjustValue bool
- // 批量获取点位值
- FetchMultiItem bool
- }
- EnvItem struct {
- ProjectId int64 `json:"project_id"`
- DeviceCode string `json:"device_code"`
- PlcDeviceId string `json:"plc_device_id"`
- Item string `json:"item"`
- DefaultVal interface{} `json:"default_val"`
- Value interface{} `json:"value"`
- Htime string `json:"htime"`
- }
- MultiEnvItem map[string]*EnvItem
- ItemValueResp struct {
- Alias string `json:"alias"`
- DataAddress string `json:"dataAddress"`
- DataType string `json:"datatype"`
- DevName string `json:"devName"`
- DevID string `json:"devid"`
- HTime string `json:"htime"`
- ItemID string `json:"itemid"`
- ItemName string `json:"itemname"`
- Quality string `json:"quality"`
- ReadOnly bool `json:"readOnly"`
- SpecificType string `json:"specificType"`
- Val string `json:"val"`
- }
- ItemValueResps struct {
- Code int `json:"code"`
- Data []*ItemValueResp `json:"data"`
- }
- ItemValueReq struct {
- DeviceId string `json:"deviceId"`
- DeviceItems string `json:"deviceItems"`
- ProjectId int64 `json:"project_id"`
- }
- )
|