59 lines
2.5 KiB
Go
59 lines
2.5 KiB
Go
package common
|
|
|
|
import "time"
|
|
|
|
type DigitalTwinRequest struct {
|
|
VIN string `json:"vin" validate:"vin"`
|
|
}
|
|
|
|
type JSONDigitalTwin struct {
|
|
VIN string `json:"vin"`
|
|
Online bool `json:"online"`
|
|
OnlineHMI bool `json:"online_hmi"`
|
|
VehicleSpeed *VehicleSpeed `json:"vehicle_speed,omitempty"`
|
|
Gear *Gear `json:"gear,omitempty"`
|
|
Battery *JSONBattery `json:"battery,omitempty"`
|
|
Doors *Doors `json:"doors,omitempty"`
|
|
Location *Location `json:"location,omitempty"`
|
|
Locks *Locks `json:"door_locks,omitempty"`
|
|
Windows *JSONWindows `json:"windows,omitempty"`
|
|
ClimateControl *JSONClimateControl `json:"climate_control,omitempty"`
|
|
TRexVersion string `json:"trex_version,omitempty"`
|
|
IP string `json:"ip,omitempty"`
|
|
VehicleReadyState *VehicleReadyState `json:"vehicle_ready_state,omitempty"`
|
|
ExpandedSignals *ExpandedSignals `json:"expanded_signals,omitempty"`
|
|
UpdatedAt *time.Time `json:"updated,omitempty"`
|
|
}
|
|
|
|
type JSONBattery struct {
|
|
Percent *int `json:"percent,omitempty"`
|
|
MaxMiles *int `json:"max_miles,omitempty"`
|
|
AvgCellTemperature *int `json:"avg_cell_temp,omitempty"`
|
|
ChargeType *string `json:"charge_type,omitempty"`
|
|
RemainingChargingTime *int `json:"remaining_charging_time,omitempty"`
|
|
RemainingChargingTimeFull *int `json:"remaining_charging_time_full,omitempty"`
|
|
StateOfCharge *int `json:"state_of_charge,omitempty"`
|
|
TotalMileageOdometer *int `json:"total_mileage_odometer,omitempty"`
|
|
}
|
|
|
|
type JSONWindows struct {
|
|
LeftFront int `json:"left_front"`
|
|
LeftRear int `json:"left_rear"`
|
|
LeftRearQuarter int `json:"left_rear_quarter"`
|
|
RightFront int `json:"right_front"`
|
|
RightRear int `json:"right_rear"`
|
|
RightRearQuarter int `json:"right_rear_quarter"`
|
|
RearWindshield int `json:"rear_windshield"`
|
|
Sunroof int `json:"sunroof"`
|
|
}
|
|
|
|
type JSONClimateControl struct {
|
|
CabinTemperature int `json:"cabin_temperature"`
|
|
RearDefrost bool `json:"rear_defrost"`
|
|
DriverSeatHeat int `json:"driver_seat_heat"`
|
|
PassengerSeatHeat int `json:"passenger_seat_heat"`
|
|
SteeringWheelHeat bool `json:"steering_wheel_heat"`
|
|
AmbientTemperature int `json:"ambient_temperature"`
|
|
InternalTemperature int `json:"internal_temperature"`
|
|
}
|