You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
package GZGZM
|
|
|
|
import "goUpload/config"
|
|
|
|
type ConfigFile struct {
|
|
config.Consumer
|
|
IoConfig ioConfig `json:"ioConfig"`
|
|
SensorConfig
|
|
}
|
|
type ioConfig struct {
|
|
In In `json:"in"`
|
|
Out OUT `json:"out"`
|
|
}
|
|
type In struct {
|
|
Kafka config.KafkaConfig `json:"kafka"`
|
|
CronStr string `json:"cronStr"`
|
|
}
|
|
|
|
type OUT struct {
|
|
Http config.HttpConfig `json:"http"`
|
|
}
|
|
|
|
type SensorConfig struct {
|
|
SensorInfoMap map[string]SensorInfo `json:"sensorInfoMap"`
|
|
}
|
|
|
|
type SensorInfo struct {
|
|
Name string `json:"name"` //测点名称
|
|
BranchCode string `json:"branchCode"` //分部编码,必填
|
|
Code string `json:"code"` //测点编号
|
|
Contractor string `json:"contractor"` //厂商编码或者名称
|
|
DeviceSn string `json:"deviceSn"` //设备code
|
|
DeviceIp string `json:"deviceIp"` //设备ip
|
|
Type string `json:"type"` //监测类型
|
|
InitAmount1 float64 `json:"initAmount1"` ///检测归零值1(初值)
|
|
InitAmount2 float64 `json:"initAmount2"` ///检测归零值2(初值)
|
|
InitAmount3 float64 `json:"initAmount3"` ///检测归零值3(初值)
|
|
Unit string `json:"unit"`
|
|
}
|
|
|