diff --git a/samples/anomaly-detection/cmd/main.go b/samples/anomaly-detection/cmd/main.go index 570fa79..b38d109 100644 --- a/samples/anomaly-detection/cmd/main.go +++ b/samples/anomaly-detection/cmd/main.go @@ -182,6 +182,7 @@ func run() error { Payload: payload.OutputInnerPayload{ CommonPayload: input.Payload.Payload.CommonPayload, MachineStatus: input.Payload.Payload.MachineStatus, + OperatingTime: input.Payload.Payload.OperatingTime, HumidityAnomalyFactor: humEwma, HumidityAnomaly: humAnomaly, TemperatureAnomalyFactor: tempEwma, diff --git a/samples/anomaly-detection/lib/payload/payload.go b/samples/anomaly-detection/lib/payload/payload.go index edf8a69..b034845 100644 --- a/samples/anomaly-detection/lib/payload/payload.go +++ b/samples/anomaly-detection/lib/payload/payload.go @@ -9,7 +9,8 @@ type InputPayload struct { type InputInnerPayload struct { CommonPayload - MaintenanceStatus string `json:"maintenanceStatus"` + OperatingTime int `json:"operating_time"` + MachineStatus int `json:"machine_status"` } type Payload[T any] struct { @@ -24,8 +25,6 @@ type CommonPayload struct { SerialNumber string `json:"serialNumber"` Site string `json:"site"` SourceTimestamp string `json:"sourceTimestamp"` - OperatingTime int `json:"operatingTime"` - MachineStatus int `json:"machine_status"` Humidity float64 `json:"humidity"` Temperature float64 `json:"temperature"` Vibration float64 `json:"vibration"` @@ -37,6 +36,7 @@ type OutputPayload struct { type OutputInnerPayload struct { CommonPayload + OperatingTime int `json:"operatingTime"` MachineStatus int `json:"machineStatus"` HumidityAnomalyFactor float64 `json:"humidityAnomalyFactor"` HumidityAnomaly bool `json:"humidityAnomaly"`