Files
agent/machinery/src/models/MotionData.go
T
olokos 204359c6be MotionData: Implement saving changed pixels into filename
Attempt to fix saving changes detected into filename
models/MotionData.go is meant to be a model containing all of the data in regards to currently recorded video

Since I currently mostly need pixel changed saved in the filename properly, I've created 2 structs:

Partial= Timestamp + Changes working
Full= Everything - Not yet used but prepared for fully implementing the rest of data into the filename

Currently filename only saves proper timestamp and the rest is hardcoded, this is one step forwards to have it fully save a dynamic filename.
2022-08-15 02:15:39 +02:00

17 lines
635 B
Go

package models
type MotionDataPartial struct {
Timestamp int64 `json:"timestamp" bson:"timestamp"`
NumberOfChanges int `json:"numberOfChanges" bson:"numberOfChanges"`
}
type MotionDataFull struct {
Timestamp int64 `json:"timestamp" bson:"timestamp"`
Size float64 `json:"size" bson:"size"`
Microseconds float64 `json:"microseconds" bson:"microseconds"`
DeviceName string `json:"deviceName" bson:"deviceName"`
Region string `json:"region" bson:"region"`
NumberOfChanges int `json:"numberOfChanges" bson:"numberOfChanges"`
Token int `json:"token" bson:"token"`
}