114 lines
3.5 KiB
Go
114 lines
3.5 KiB
Go
package model
|
|
|
|
type PostDataDto struct {
|
|
UpPacketSN int `json:"upPacketSN"`
|
|
UpDataSN int `json:"upDataSN"`
|
|
Topic string `json:"topic"`
|
|
Timestamp int64 `json:"timestamp"`
|
|
TenantId string `json:"tenantId"`
|
|
ServiceId int `json:"serviceId"`
|
|
Protocol string `json:"protocol"`
|
|
ProductId string `json:"productId"`
|
|
Payload interface{} `json:"payload"`
|
|
MessageType string `json:"messageType"`
|
|
DeviceType string `json:"deviceType"`
|
|
DeviceId string `json:"deviceId"`
|
|
AssocAssetId string `json:"assocAssetId"`
|
|
IMSI string `json:"IMSI"`
|
|
IMEI string `json:"IMEI"`
|
|
}
|
|
|
|
type Payload1 struct {
|
|
TemperatureState int `json:"temperature_state"`
|
|
Temperature int `json:"temperature"`
|
|
SmokeValue int `json:"smoke_value"`
|
|
SmokeState int `json:"smoke_state"`
|
|
BatteryVoltage float64 `json:"battery_voltage"`
|
|
BatteryValue int `json:"battery_value"`
|
|
}
|
|
type Payload2 struct {
|
|
Sinr int `json:"sinr"`
|
|
Rsrp int `json:"rsrp"`
|
|
Pci int `json:"pci"`
|
|
Ecl int `json:"ecl"`
|
|
CellId int `json:"cell_id"`
|
|
}
|
|
type Payload3 struct {
|
|
TerminalType string `json:"terminal_type"`
|
|
SoftwareVersion string `json:"software_version"`
|
|
ModuleType string `json:"module_type"`
|
|
ManufacturerName string `json:"manufacturer_name"`
|
|
HardwareVersion string `json:"hardware_version"`
|
|
IMEI string `json:"IMEI"`
|
|
ICCID string `json:"ICCID"`
|
|
}
|
|
|
|
type EventPullDto struct {
|
|
Timestamp int64 `json:"timestamp"`
|
|
TenantId string `json:"tenantId"`
|
|
ServiceId int `json:"serviceId"`
|
|
Protocol string `json:"protocol"`
|
|
ProductId string `json:"productId"`
|
|
MessageType string `json:"messageType"`
|
|
EventType int `json:"eventType"`
|
|
EventContent interface{} `json:"eventContent"`
|
|
DeviceSn string `json:"deviceSn"`
|
|
DeviceId string `json:"deviceId"`
|
|
IMSI string `json:"IMSI"`
|
|
IMEI string `json:"IMEI"`
|
|
}
|
|
|
|
// 烟感告警 1001
|
|
type SmokeAlarm struct {
|
|
SmokeState int `json:"smoke_state"`
|
|
SmokeValue int `json:"smoke_value"`
|
|
}
|
|
|
|
// 温度告警 1002
|
|
type TemperatureAlarm struct {
|
|
TemperatureState int `json:"temperature_state"`
|
|
Temperature int `json:"temperature"`
|
|
}
|
|
|
|
// 电池电量低告警 1003
|
|
type BatteryVoltageLowAlarm struct {
|
|
BatteryVoltage float64 `json:"battery_voltage"`
|
|
BatteryState int `json:"battery_state"`
|
|
}
|
|
|
|
// 防拆告警 1004
|
|
type TamperAlarm struct {
|
|
TamperState int `json:"tamper_state"`
|
|
}
|
|
|
|
// 故障1005
|
|
type ErrorCodeReport struct {
|
|
ErrorCode int `json:"error_code"`
|
|
}
|
|
|
|
type ReportPullDto struct {
|
|
Timestamp int64 `json:"timestamp"`
|
|
TenantId string `json:"tenantId"`
|
|
Protocol string `json:"protocol"`
|
|
ProductId string `json:"productId"`
|
|
ModuleParams struct {
|
|
Txpower string `json:"txpower"`
|
|
Softversion string `json:"softversion"`
|
|
Sinr string `json:"sinr"`
|
|
Rsrp string `json:"rsrp"`
|
|
Module string `json:"module"`
|
|
Imsi string `json:"imsi"`
|
|
Imei string `json:"imei"`
|
|
Iccid string `json:"iccid"`
|
|
Chiptype string `json:"chiptype"`
|
|
Cellid string `json:"cellid"`
|
|
} `json:"moduleParams"`
|
|
MessageType string `json:"messageType"`
|
|
Ipv4Address string `json:"ipv4Address"`
|
|
Iccid string `json:"iccid"`
|
|
EventType int `json:"eventType"`
|
|
DeviceId string `json:"deviceId"`
|
|
Imei string `json:"imei"`
|
|
AccessFlag int `json:"accessFlag"`
|
|
}
|