2025-01-20 16:20:21 +08:00
|
|
|
// Package network define struct of network operation
|
|
|
|
|
package network
|
|
|
|
|
|
|
|
|
|
// RealTimeDataReceiveRequest defines request params of real time data receive api
|
|
|
|
|
type RealTimeDataReceiveRequest struct {
|
|
|
|
|
PayLoad RealTimeDataReceivePayload `json:"payload"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// RealTimeDataReceivePayload defines request payload of real time data receive api
|
|
|
|
|
type RealTimeDataReceivePayload struct {
|
2025-10-27 16:47:04 +08:00
|
|
|
ComponentUUID string `json:"component_uuid"`
|
|
|
|
|
Point string `json:"point"`
|
|
|
|
|
Values []RealTimeDataPoint `json:"values"`
|
2025-01-20 16:20:21 +08:00
|
|
|
}
|
|
|
|
|
|
2025-10-27 16:47:04 +08:00
|
|
|
// RealTimeDataPoint define struct of real time data point
|
|
|
|
|
type RealTimeDataPoint struct {
|
|
|
|
|
Time int64 `json:"time" example:"1678886400"`
|
|
|
|
|
Value float64 `json:"value" example:"123.1"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// RealTimeDataPayload define struct of real time data payload
|
|
|
|
|
type RealTimeDataPayload struct {
|
|
|
|
|
// TODO 增加example tag
|
|
|
|
|
RealTimeDataPoints []RealTimeDataPoint `json:"sub_pos" swaggertype:"object"`
|
2025-01-20 16:20:21 +08:00
|
|
|
}
|