Documentation ¶
Overview ¶
Package vss holds the data structures and functions for working with signals from DIMOs VSS schema.
Code generated by "model-garage" DO NOT EDIT.
Code generated by "model-garage" DO NOT EDIT.
Code generated by "model-garage" DO NOT EDIT.
Index ¶
- Constants
- Variables
- func ChassisAxleRow1WheelLeftTirePressureFromV1Data(jsonData []byte) (ret float64, err error)
- func ChassisAxleRow1WheelLeftTirePressureFromV2Data(result gjson.Result) (ret float64, err error)
- func ChassisAxleRow1WheelRightTirePressureFromV1Data(jsonData []byte) (ret float64, err error)
- func ChassisAxleRow1WheelRightTirePressureFromV2Data(result gjson.Result) (ret float64, err error)
- func ChassisAxleRow2WheelLeftTirePressureFromV1Data(jsonData []byte) (ret float64, err error)
- func ChassisAxleRow2WheelLeftTirePressureFromV2Data(result gjson.Result) (ret float64, err error)
- func ChassisAxleRow2WheelRightTirePressureFromV1Data(jsonData []byte) (ret float64, err error)
- func ChassisAxleRow2WheelRightTirePressureFromV2Data(result gjson.Result) (ret float64, err error)
- func CurrentLocationAltitudeFromV1Data(jsonData []byte) (ret float64, err error)
- func CurrentLocationAltitudeFromV2Data(result gjson.Result) (ret float64, err error)
- func CurrentLocationLatitudeFromV1Data(jsonData []byte) (ret float64, err error)
- func CurrentLocationLatitudeFromV2Data(result gjson.Result) (ret float64, err error)
- func CurrentLocationLongitudeFromV1Data(jsonData []byte) (ret float64, err error)
- func CurrentLocationLongitudeFromV2Data(result gjson.Result) (ret float64, err error)
- func CurrentLocationTimestampFromV1Data(jsonData []byte) (ret float64, err error)
- func CurrentLocationTimestampFromV2Data(result gjson.Result) (ret float64, err error)
- func DIMOAftermarketHDOPFromV1Data(jsonData []byte) (ret float64, err error)
- func DIMOAftermarketHDOPFromV2Data(result gjson.Result) (ret float64, err error)
- func DIMOAftermarketNSATFromV1Data(jsonData []byte) (ret float64, err error)
- func DIMOAftermarketNSATFromV2Data(result gjson.Result) (ret float64, err error)
- func DIMOAftermarketSSIDFromV1Data(jsonData []byte) (ret string, err error)
- func DIMOAftermarketSSIDFromV2Data(result gjson.Result) (ret string, err error)
- func DIMOAftermarketWPAStateFromV1Data(jsonData []byte) (ret string, err error)
- func DIMOAftermarketWPAStateFromV2Data(result gjson.Result) (ret string, err error)
- func ExteriorAirTemperatureFromV1Data(jsonData []byte) (ret float64, err error)
- func ExteriorAirTemperatureFromV2Data(result gjson.Result) (ret float64, err error)
- func IsInvalidType(err error) bool
- func LowVoltageBatteryCurrentVoltageFromV1Data(jsonData []byte) (ret float64, err error)
- func LowVoltageBatteryCurrentVoltageFromV2Data(result gjson.Result) (ret float64, err error)
- func OBDBarometricPressureFromV1Data(jsonData []byte) (ret float64, err error)
- func OBDBarometricPressureFromV2Data(result gjson.Result) (ret float64, err error)
- func OBDEngineLoadFromV1Data(jsonData []byte) (ret float64, err error)
- func OBDEngineLoadFromV2Data(result gjson.Result) (ret float64, err error)
- func OBDIntakeTempFromV1Data(jsonData []byte) (ret float64, err error)
- func OBDIntakeTempFromV2Data(result gjson.Result) (ret float64, err error)
- func OBDRunTimeFromV1Data(jsonData []byte) (ret float64, err error)
- func OBDRunTimeFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainCombustionEngineECTFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainCombustionEngineECTFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainCombustionEngineEngineOilLevelFromV1Data(jsonData []byte) (ret string, err error)
- func PowertrainCombustionEngineEngineOilLevelFromV2Data(result gjson.Result) (ret string, err error)
- func PowertrainCombustionEngineMAFFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainCombustionEngineMAFFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainCombustionEngineSpeedFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainCombustionEngineSpeedFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainCombustionEngineTPSFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainCombustionEngineTPSFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainFuelSystemAbsoluteLevelFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainFuelSystemAbsoluteLevelFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainFuelSystemSupportedFuelTypesFromV1Data(jsonData []byte) (ret string, err error)
- func PowertrainFuelSystemSupportedFuelTypesFromV2Data(result gjson.Result) (ret string, err error)
- func PowertrainRangeFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainRangeFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainTractionBatteryChargingChargeLimitFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainTractionBatteryChargingChargeLimitFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainTractionBatteryChargingIsChargingFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainTractionBatteryChargingIsChargingFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainTractionBatteryGrossCapacityFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainTractionBatteryGrossCapacityFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainTractionBatteryStateOfChargeCurrentFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainTractionBatteryStateOfChargeCurrentFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainTransmissionTravelledDistanceFromV1Data(jsonData []byte) (ret float64, err error)
- func PowertrainTransmissionTravelledDistanceFromV2Data(result gjson.Result) (ret float64, err error)
- func PowertrainTypeFromV1Data(jsonData []byte) (ret string, err error)
- func PowertrainTypeFromV2Data(result gjson.Result) (ret string, err error)
- func SignalColNames() []string
- func SignalToSlice(obj Signal) []any
- func SpeedFromV1Data(jsonData []byte) (ret float64, err error)
- func SpeedFromV2Data(result gjson.Result) (ret float64, err error)
- func ToChassisAxleRow1WheelLeftTirePressure0(val float64) (float64, error)
- func ToChassisAxleRow1WheelRightTirePressure0(val float64) (float64, error)
- func ToChassisAxleRow2WheelLeftTirePressure0(val float64) (float64, error)
- func ToChassisAxleRow2WheelRightTirePressure0(val float64) (float64, error)
- func ToCurrentLocationAltitude0(val float64) (float64, error)
- func ToCurrentLocationLatitude0(val float64) (float64, error)
- func ToCurrentLocationLongitude0(val float64) (float64, error)
- func ToCurrentLocationTimestamp0(val string) (float64, error)
- func ToCurrentLocationTimestamp1(val float64) (float64, error)
- func ToDIMOAftermarketHDOP0(val float64) (float64, error)
- func ToDIMOAftermarketNSAT0(val float64) (float64, error)
- func ToDIMOAftermarketSSID0(val string) (string, error)
- func ToDIMOAftermarketWPAState0(val string) (string, error)
- func ToExteriorAirTemperature0(val float64) (float64, error)
- func ToLowVoltageBatteryCurrentVoltage0(val float64) (float64, error)
- func ToOBDBarometricPressure0(val float64) (float64, error)
- func ToOBDEngineLoad0(val float64) (float64, error)
- func ToOBDIntakeTemp0(val float64) (float64, error)
- func ToOBDRunTime0(val float64) (float64, error)
- func ToPowertrainCombustionEngineECT0(val float64) (float64, error)
- func ToPowertrainCombustionEngineEngineOilLevel0(oilLevel float64) (string, error)
- func ToPowertrainCombustionEngineMAF0(val float64) (float64, error)
- func ToPowertrainCombustionEngineSpeed0(val float64) (float64, error)
- func ToPowertrainCombustionEngineTPS0(val float64) (float64, error)
- func ToPowertrainFuelSystemAbsoluteLevel0(val float64) (float64, error)
- func ToPowertrainFuelSystemSupportedFuelTypes0(val string) (string, error)
- func ToPowertrainRange0(val float64) (float64, error)
- func ToPowertrainTractionBatteryChargingChargeLimit0(val float64) (float64, error)
- func ToPowertrainTractionBatteryChargingIsCharging0(val bool) (float64, error)
- func ToPowertrainTractionBatteryGrossCapacity0(val float64) (float64, error)
- func ToPowertrainTractionBatteryStateOfChargeCurrent0(val float64) (float64, error)
- func ToPowertrainTransmissionTravelledDistance0(val float64) (float64, error)
- func ToPowertrainType0(val string) (string, error)
- func ToSpeed0(val float64) (float64, error)
- func ToVehicleIdentificationBrand0(val string) (string, error)
- func ToVehicleIdentificationModel0(val string) (string, error)
- func ToVehicleIdentificationYear0(val float64) (float64, error)
- func VehicleIdentificationBrandFromV1Data(jsonData []byte) (ret string, err error)
- func VehicleIdentificationBrandFromV2Data(result gjson.Result) (ret string, err error)
- func VehicleIdentificationModelFromV1Data(jsonData []byte) (ret string, err error)
- func VehicleIdentificationModelFromV2Data(result gjson.Result) (ret string, err error)
- func VehicleIdentificationYearFromV1Data(jsonData []byte) (ret float64, err error)
- func VehicleIdentificationYearFromV2Data(result gjson.Result) (ret float64, err error)
- type Signal
Constants ¶
const ( // FieldChassisAxleRow1WheelLeftTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow1WheelLeftTirePressure = "Chassis_Axle_Row1_Wheel_Left_Tire_Pressure" // FieldChassisAxleRow1WheelRightTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow1WheelRightTirePressure = "Chassis_Axle_Row1_Wheel_Right_Tire_Pressure" // FieldChassisAxleRow2WheelLeftTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow2WheelLeftTirePressure = "Chassis_Axle_Row2_Wheel_Left_Tire_Pressure" // FieldChassisAxleRow2WheelRightTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow2WheelRightTirePressure = "Chassis_Axle_Row2_Wheel_Right_Tire_Pressure" // FieldCurrentLocationAltitude Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna. FieldCurrentLocationAltitude = "CurrentLocation_Altitude" // FieldCurrentLocationLatitude Current latitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna. FieldCurrentLocationLatitude = "CurrentLocation_Latitude" // FieldCurrentLocationLongitude Current longitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna. FieldCurrentLocationLongitude = "CurrentLocation_Longitude" // FieldCurrentLocationTimestamp Timestamp from GNSS system for current location, formatted according to ISO 8601 with UTC time zone. FieldCurrentLocationTimestamp = "CurrentLocation_Timestamp" // FieldDIMOAftermarketHDOP Horizontal dilution of precision of GPS FieldDIMOAftermarketHDOP = "DIMO_Aftermarket_HDOP" // FieldDIMOAftermarketNSAT Number of sync satellites for GPS FieldDIMOAftermarketNSAT = "DIMO_Aftermarket_NSAT" // FieldDIMOAftermarketSSID Service Set Ientifier for the wifi. FieldDIMOAftermarketSSID = "DIMO_Aftermarket_SSID" // FieldDIMOAftermarketWPAState Indicate the current wpa state for the devices wifi FieldDIMOAftermarketWPAState = "DIMO_Aftermarket_WPAState" // FieldExteriorAirTemperature Air temperature outside the vehicle. FieldExteriorAirTemperature = "Exterior_AirTemperature" // FieldLowVoltageBatteryCurrentVoltage Current Voltage of the low voltage battery. FieldLowVoltageBatteryCurrentVoltage = "LowVoltageBattery_CurrentVoltage" // FieldOBDBarometricPressure PID 33 - Barometric pressure FieldOBDBarometricPressure = "OBD_BarometricPressure" // FieldOBDEngineLoad PID 04 - Engine load in percent - 0 = no load, 100 = full load FieldOBDEngineLoad = "OBD_EngineLoad" // FieldOBDIntakeTemp PID 0F - Intake temperature FieldOBDIntakeTemp = "OBD_IntakeTemp" // FieldOBDRunTime PID 1F - Engine run time FieldOBDRunTime = "OBD_RunTime" // FieldPowertrainCombustionEngineECT Engine coolant temperature. FieldPowertrainCombustionEngineECT = "Powertrain_CombustionEngine_ECT" // FieldPowertrainCombustionEngineEngineOilLevel Engine oil level. FieldPowertrainCombustionEngineEngineOilLevel = "Powertrain_CombustionEngine_EngineOilLevel" // FieldPowertrainCombustionEngineMAF Grams of air drawn into engine per second. FieldPowertrainCombustionEngineMAF = "Powertrain_CombustionEngine_MAF" // FieldPowertrainCombustionEngineSpeed Engine speed measured as rotations per minute. FieldPowertrainCombustionEngineSpeed = "Powertrain_CombustionEngine_Speed" // FieldPowertrainCombustionEngineTPS Current throttle position. FieldPowertrainCombustionEngineTPS = "Powertrain_CombustionEngine_TPS" // FieldPowertrainFuelSystemAbsoluteLevel Current available fuel in the fuel tank expressed in liters. FieldPowertrainFuelSystemAbsoluteLevel = "Powertrain_FuelSystem_AbsoluteLevel" // FieldPowertrainFuelSystemSupportedFuelTypes High level information of fuel types supported FieldPowertrainFuelSystemSupportedFuelTypes = "Powertrain_FuelSystem_SupportedFuelTypes" // FieldPowertrainRange Remaining range in meters using all energy sources available in the vehicle. FieldPowertrainRange = "Powertrain_Range" // FieldPowertrainTractionBatteryChargingChargeLimit Target charge limit (state of charge) for battery. FieldPowertrainTractionBatteryChargingChargeLimit = "Powertrain_TractionBattery_Charging_ChargeLimit" // FieldPowertrainTractionBatteryChargingIsCharging True if charging is ongoing. Charging is considered to be ongoing if energy is flowing from charger to vehicle. FieldPowertrainTractionBatteryChargingIsCharging = "Powertrain_TractionBattery_Charging_IsCharging" // FieldPowertrainTractionBatteryGrossCapacity Gross capacity of the battery. FieldPowertrainTractionBatteryGrossCapacity = "Powertrain_TractionBattery_GrossCapacity" // FieldPowertrainTractionBatteryStateOfChargeCurrent Physical state of charge of the high voltage battery, relative to net capacity. This is not necessarily the state of charge being displayed to the customer. FieldPowertrainTractionBatteryStateOfChargeCurrent = "Powertrain_TractionBattery_StateOfCharge_Current" // FieldPowertrainTransmissionTravelledDistance Odometer reading, total distance travelled during the lifetime of the transmission. FieldPowertrainTransmissionTravelledDistance = "Powertrain_Transmission_TravelledDistance" // FieldPowertrainType Defines the powertrain type of the vehicle. FieldPowertrainType = "Powertrain_Type" // FieldSpeed Vehicle speed. FieldSpeed = "Speed" // FieldVehicleIdentificationBrand Vehicle brand or manufacturer. FieldVehicleIdentificationBrand = "VehicleIdentification_Brand" // FieldVehicleIdentificationModel Vehicle model. FieldVehicleIdentificationModel = "VehicleIdentification_Model" // FieldVehicleIdentificationYear Model year of the vehicle. FieldVehicleIdentificationYear = "VehicleIdentification_Year" )
const (
// TableName is the name of the distributed table in Clickhouse.
TableName = "signal"
)
Variables ¶
var JSONName2CHName = map[string]string{
"chassisAxleRow1WheelLeftTirePressure": "Chassis_Axle_Row1_Wheel_Left_Tire_Pressure",
"chassisAxleRow1WheelRightTirePressure": "Chassis_Axle_Row1_Wheel_Right_Tire_Pressure",
"chassisAxleRow2WheelLeftTirePressure": "Chassis_Axle_Row2_Wheel_Left_Tire_Pressure",
"chassisAxleRow2WheelRightTirePressure": "Chassis_Axle_Row2_Wheel_Right_Tire_Pressure",
"currentLocationAltitude": "CurrentLocation_Altitude",
"currentLocationLatitude": "CurrentLocation_Latitude",
"currentLocationLongitude": "CurrentLocation_Longitude",
"currentLocationTimestamp": "CurrentLocation_Timestamp",
"dIMOAftermarketHDOP": "DIMO_Aftermarket_HDOP",
"dIMOAftermarketNSAT": "DIMO_Aftermarket_NSAT",
"dIMOAftermarketSSID": "DIMO_Aftermarket_SSID",
"dIMOAftermarketWPAState": "DIMO_Aftermarket_WPAState",
"exteriorAirTemperature": "Exterior_AirTemperature",
"lowVoltageBatteryCurrentVoltage": "LowVoltageBattery_CurrentVoltage",
"oBDBarometricPressure": "OBD_BarometricPressure",
"oBDEngineLoad": "OBD_EngineLoad",
"oBDIntakeTemp": "OBD_IntakeTemp",
"oBDRunTime": "OBD_RunTime",
"powertrainCombustionEngineECT": "Powertrain_CombustionEngine_ECT",
"powertrainCombustionEngineEngineOilLevel": "Powertrain_CombustionEngine_EngineOilLevel",
"powertrainCombustionEngineMAF": "Powertrain_CombustionEngine_MAF",
"powertrainCombustionEngineSpeed": "Powertrain_CombustionEngine_Speed",
"powertrainCombustionEngineTPS": "Powertrain_CombustionEngine_TPS",
"powertrainFuelSystemAbsoluteLevel": "Powertrain_FuelSystem_AbsoluteLevel",
"powertrainFuelSystemSupportedFuelTypes": "Powertrain_FuelSystem_SupportedFuelTypes",
"powertrainRange": "Powertrain_Range",
"powertrainTractionBatteryChargingChargeLimit": "Powertrain_TractionBattery_Charging_ChargeLimit",
"powertrainTractionBatteryChargingIsCharging": "Powertrain_TractionBattery_Charging_IsCharging",
"powertrainTractionBatteryGrossCapacity": "Powertrain_TractionBattery_GrossCapacity",
"powertrainTractionBatteryStateOfChargeCurrent": "Powertrain_TractionBattery_StateOfCharge_Current",
"powertrainTransmissionTravelledDistance": "Powertrain_Transmission_TravelledDistance",
"powertrainType": "Powertrain_Type",
"speed": "Speed",
"vehicleIdentificationBrand": "VehicleIdentification_Brand",
"vehicleIdentificationModel": "VehicleIdentification_Model",
"vehicleIdentificationYear": "VehicleIdentification_Year",
}
JSONName2CHName maps the JSON field names to the Clickhouse column names.
Functions ¶
func ChassisAxleRow1WheelLeftTirePressureFromV1Data ¶
ChassisAxleRow1WheelLeftTirePressureFromData converts the given JSON data to a float64.
func ChassisAxleRow1WheelLeftTirePressureFromV2Data ¶
ChassisAxleRow1WheelLeftTirePressureFromData converts the given JSON data to a float64.
func ChassisAxleRow1WheelRightTirePressureFromV1Data ¶
ChassisAxleRow1WheelRightTirePressureFromData converts the given JSON data to a float64.
func ChassisAxleRow1WheelRightTirePressureFromV2Data ¶
ChassisAxleRow1WheelRightTirePressureFromData converts the given JSON data to a float64.
func ChassisAxleRow2WheelLeftTirePressureFromV1Data ¶
ChassisAxleRow2WheelLeftTirePressureFromData converts the given JSON data to a float64.
func ChassisAxleRow2WheelLeftTirePressureFromV2Data ¶
ChassisAxleRow2WheelLeftTirePressureFromData converts the given JSON data to a float64.
func ChassisAxleRow2WheelRightTirePressureFromV1Data ¶
ChassisAxleRow2WheelRightTirePressureFromData converts the given JSON data to a float64.
func ChassisAxleRow2WheelRightTirePressureFromV2Data ¶
ChassisAxleRow2WheelRightTirePressureFromData converts the given JSON data to a float64.
func CurrentLocationAltitudeFromV1Data ¶
CurrentLocationAltitudeFromData converts the given JSON data to a float64.
func CurrentLocationAltitudeFromV2Data ¶
CurrentLocationAltitudeFromData converts the given JSON data to a float64.
func CurrentLocationLatitudeFromV1Data ¶
CurrentLocationLatitudeFromData converts the given JSON data to a float64.
func CurrentLocationLatitudeFromV2Data ¶
CurrentLocationLatitudeFromData converts the given JSON data to a float64.
func CurrentLocationLongitudeFromV1Data ¶
CurrentLocationLongitudeFromData converts the given JSON data to a float64.
func CurrentLocationLongitudeFromV2Data ¶
CurrentLocationLongitudeFromData converts the given JSON data to a float64.
func CurrentLocationTimestampFromV1Data ¶
CurrentLocationTimestampFromData converts the given JSON data to a float64.
func CurrentLocationTimestampFromV2Data ¶
CurrentLocationTimestampFromData converts the given JSON data to a float64.
func DIMOAftermarketHDOPFromV1Data ¶
DIMOAftermarketHDOPFromData converts the given JSON data to a float64.
func DIMOAftermarketHDOPFromV2Data ¶
DIMOAftermarketHDOPFromData converts the given JSON data to a float64.
func DIMOAftermarketNSATFromV1Data ¶
DIMOAftermarketNSATFromData converts the given JSON data to a float64.
func DIMOAftermarketNSATFromV2Data ¶
DIMOAftermarketNSATFromData converts the given JSON data to a float64.
func DIMOAftermarketSSIDFromV1Data ¶
DIMOAftermarketSSIDFromData converts the given JSON data to a string.
func DIMOAftermarketSSIDFromV2Data ¶
DIMOAftermarketSSIDFromData converts the given JSON data to a string.
func DIMOAftermarketWPAStateFromV1Data ¶
DIMOAftermarketWPAStateFromData converts the given JSON data to a string.
func DIMOAftermarketWPAStateFromV2Data ¶
DIMOAftermarketWPAStateFromData converts the given JSON data to a string.
func ExteriorAirTemperatureFromV1Data ¶
ExteriorAirTemperatureFromData converts the given JSON data to a float64.
func ExteriorAirTemperatureFromV2Data ¶
ExteriorAirTemperatureFromData converts the given JSON data to a float64.
func IsInvalidType ¶
IsInvalidType returns true if the error is of type errInvalidType.
func LowVoltageBatteryCurrentVoltageFromV1Data ¶
LowVoltageBatteryCurrentVoltageFromData converts the given JSON data to a float64.
func LowVoltageBatteryCurrentVoltageFromV2Data ¶
LowVoltageBatteryCurrentVoltageFromData converts the given JSON data to a float64.
func OBDBarometricPressureFromV1Data ¶
OBDBarometricPressureFromData converts the given JSON data to a float64.
func OBDBarometricPressureFromV2Data ¶
OBDBarometricPressureFromData converts the given JSON data to a float64.
func OBDEngineLoadFromV1Data ¶
OBDEngineLoadFromData converts the given JSON data to a float64.
func OBDEngineLoadFromV2Data ¶
OBDEngineLoadFromData converts the given JSON data to a float64.
func OBDIntakeTempFromV1Data ¶
OBDIntakeTempFromData converts the given JSON data to a float64.
func OBDIntakeTempFromV2Data ¶
OBDIntakeTempFromData converts the given JSON data to a float64.
func OBDRunTimeFromV1Data ¶
OBDRunTimeFromData converts the given JSON data to a float64.
func OBDRunTimeFromV2Data ¶
OBDRunTimeFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineECTFromV1Data ¶
PowertrainCombustionEngineECTFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineECTFromV2Data ¶
PowertrainCombustionEngineECTFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineEngineOilLevelFromV1Data ¶
PowertrainCombustionEngineEngineOilLevelFromData converts the given JSON data to a string.
func PowertrainCombustionEngineEngineOilLevelFromV2Data ¶
func PowertrainCombustionEngineEngineOilLevelFromV2Data(result gjson.Result) (ret string, err error)
PowertrainCombustionEngineEngineOilLevelFromData converts the given JSON data to a string.
func PowertrainCombustionEngineMAFFromV1Data ¶
PowertrainCombustionEngineMAFFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineMAFFromV2Data ¶
PowertrainCombustionEngineMAFFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineSpeedFromV1Data ¶
PowertrainCombustionEngineSpeedFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineSpeedFromV2Data ¶
PowertrainCombustionEngineSpeedFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineTPSFromV1Data ¶
PowertrainCombustionEngineTPSFromData converts the given JSON data to a float64.
func PowertrainCombustionEngineTPSFromV2Data ¶
PowertrainCombustionEngineTPSFromData converts the given JSON data to a float64.
func PowertrainFuelSystemAbsoluteLevelFromV1Data ¶
PowertrainFuelSystemAbsoluteLevelFromData converts the given JSON data to a float64.
func PowertrainFuelSystemAbsoluteLevelFromV2Data ¶
PowertrainFuelSystemAbsoluteLevelFromData converts the given JSON data to a float64.
func PowertrainFuelSystemSupportedFuelTypesFromV1Data ¶
PowertrainFuelSystemSupportedFuelTypesFromData converts the given JSON data to a string.
func PowertrainFuelSystemSupportedFuelTypesFromV2Data ¶
PowertrainFuelSystemSupportedFuelTypesFromData converts the given JSON data to a string.
func PowertrainRangeFromV1Data ¶
PowertrainRangeFromData converts the given JSON data to a float64.
func PowertrainRangeFromV2Data ¶
PowertrainRangeFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryChargingChargeLimitFromV1Data ¶
func PowertrainTractionBatteryChargingChargeLimitFromV1Data(jsonData []byte) (ret float64, err error)
PowertrainTractionBatteryChargingChargeLimitFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryChargingChargeLimitFromV2Data ¶
func PowertrainTractionBatteryChargingChargeLimitFromV2Data(result gjson.Result) (ret float64, err error)
PowertrainTractionBatteryChargingChargeLimitFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryChargingIsChargingFromV1Data ¶
func PowertrainTractionBatteryChargingIsChargingFromV1Data(jsonData []byte) (ret float64, err error)
PowertrainTractionBatteryChargingIsChargingFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryChargingIsChargingFromV2Data ¶
func PowertrainTractionBatteryChargingIsChargingFromV2Data(result gjson.Result) (ret float64, err error)
PowertrainTractionBatteryChargingIsChargingFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryGrossCapacityFromV1Data ¶
PowertrainTractionBatteryGrossCapacityFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryGrossCapacityFromV2Data ¶
PowertrainTractionBatteryGrossCapacityFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryStateOfChargeCurrentFromV1Data ¶
func PowertrainTractionBatteryStateOfChargeCurrentFromV1Data(jsonData []byte) (ret float64, err error)
PowertrainTractionBatteryStateOfChargeCurrentFromData converts the given JSON data to a float64.
func PowertrainTractionBatteryStateOfChargeCurrentFromV2Data ¶
func PowertrainTractionBatteryStateOfChargeCurrentFromV2Data(result gjson.Result) (ret float64, err error)
PowertrainTractionBatteryStateOfChargeCurrentFromData converts the given JSON data to a float64.
func PowertrainTransmissionTravelledDistanceFromV1Data ¶
PowertrainTransmissionTravelledDistanceFromData converts the given JSON data to a float64.
func PowertrainTransmissionTravelledDistanceFromV2Data ¶
func PowertrainTransmissionTravelledDistanceFromV2Data(result gjson.Result) (ret float64, err error)
PowertrainTransmissionTravelledDistanceFromData converts the given JSON data to a float64.
func PowertrainTypeFromV1Data ¶
PowertrainTypeFromData converts the given JSON data to a string.
func PowertrainTypeFromV2Data ¶
PowertrainTypeFromData converts the given JSON data to a string.
func SignalColNames ¶
func SignalColNames() []string
SignalColNames returns the column names of the Signal struct.
func SignalToSlice ¶
SignalToSlice converts a Signal to an array of any for Clickhouse insertion. The order of the elements in the array is guaranteed to match the order of elements in the `SignalColNames`.
func SpeedFromV1Data ¶
SpeedFromData converts the given JSON data to a float64.
func SpeedFromV2Data ¶
SpeedFromData converts the given JSON data to a float64.
func ToChassisAxleRow1WheelLeftTirePressure0 ¶
ToChassisAxleRow1WheelLeftTirePressure0 converts data as float64 to float64.
func ToChassisAxleRow1WheelRightTirePressure0 ¶
ToChassisAxleRow1WheelRightTirePressure0 converts data as float64 to float64.
func ToChassisAxleRow2WheelLeftTirePressure0 ¶
ToChassisAxleRow2WheelLeftTirePressure0 converts data as float64 to float64.
func ToChassisAxleRow2WheelRightTirePressure0 ¶
ToChassisAxleRow2WheelRightTirePressure0 converts data as float64 to float64.
func ToCurrentLocationAltitude0 ¶
ToCurrentLocationAltitude0 converts data as float64 to float64.
func ToCurrentLocationLatitude0 ¶
ToCurrentLocationLatitude0 converts data as float64 to float64.
func ToCurrentLocationLongitude0 ¶
ToCurrentLocationLongitude0 converts data as float64 to float64.
func ToCurrentLocationTimestamp0 ¶
ToCurrentLocationTimestamp0 converts data as string to []time.Time.
func ToCurrentLocationTimestamp1 ¶
ToCurrentLocationTimestamp1 converts data as float64 to []time.Time.
func ToDIMOAftermarketHDOP0 ¶
ToDIMOAftermarketHDOP0 converts data as float64 to float64.
func ToDIMOAftermarketNSAT0 ¶
ToDIMOAftermarketNSAT0 converts data as float64 to float64.
func ToDIMOAftermarketSSID0 ¶
ToDIMOAftermarketSSID0 converts data as string to string.
func ToDIMOAftermarketWPAState0 ¶
ToDIMOAftermarketWPAState0 converts data as string to string.
func ToExteriorAirTemperature0 ¶
ToExteriorAirTemperature0 converts data as float64 to float64.
func ToLowVoltageBatteryCurrentVoltage0 ¶
ToLowVoltageBatteryCurrentVoltage0 converts data as float64 to float64.
func ToOBDBarometricPressure0 ¶
ToOBDBarometricPressure0 converts data as float64 to float64.
func ToOBDEngineLoad0 ¶
ToOBDEngineLoad0 converts data as float64 to float64.
func ToOBDIntakeTemp0 ¶
ToOBDIntakeTemp0 converts data as float64 to float64.
func ToOBDRunTime0 ¶
ToOBDRunTime0 converts data as float64 to float64.
func ToPowertrainCombustionEngineECT0 ¶
ToPowertrainCombustionEngineECT0 converts data as float64 to float64.
func ToPowertrainCombustionEngineEngineOilLevel0 ¶
ToPowertrainCombustionEngineEngineOilLevel0 converts data as float64 to any.
func ToPowertrainCombustionEngineMAF0 ¶
ToPowertrainCombustionEngineMAF0 converts data as float64 to float64.
func ToPowertrainCombustionEngineSpeed0 ¶
ToPowertrainCombustionEngineSpeed0 converts data as float64 to float64.
func ToPowertrainCombustionEngineTPS0 ¶
ToPowertrainCombustionEngineTPS0 converts data as float64 to float64.
func ToPowertrainFuelSystemAbsoluteLevel0 ¶
ToPowertrainFuelSystemAbsoluteLevel0 converts data as float64 to float64.
func ToPowertrainFuelSystemSupportedFuelTypes0 ¶
ToPowertrainFuelSystemSupportedFuelTypes0 converts data as string to any.
func ToPowertrainRange0 ¶
ToPowertrainRange0 converts data as float64 to float64.
func ToPowertrainTractionBatteryChargingChargeLimit0 ¶
ToPowertrainTractionBatteryChargingChargeLimit0 converts data as float64 to float64.
func ToPowertrainTractionBatteryChargingIsCharging0 ¶
ToPowertrainTractionBatteryChargingIsCharging0 converts data as bool to float64.
func ToPowertrainTractionBatteryGrossCapacity0 ¶
ToPowertrainTractionBatteryGrossCapacity0 converts data as float64 to float64.
func ToPowertrainTractionBatteryStateOfChargeCurrent0 ¶
ToPowertrainTractionBatteryStateOfChargeCurrent0 converts data as float64 to float64.
func ToPowertrainTransmissionTravelledDistance0 ¶
ToPowertrainTransmissionTravelledDistance0 converts data as float64 to float64.
func ToPowertrainType0 ¶
ToPowertrainType0 converts data as string to string.
func ToVehicleIdentificationBrand0 ¶
ToVehicleIdentificationBrand0 converts data as string to string.
func ToVehicleIdentificationModel0 ¶
ToVehicleIdentificationModel0 converts data as string to string.
func ToVehicleIdentificationYear0 ¶
ToVehicleIdentificationYear0 converts data as float64 to float64.
func VehicleIdentificationBrandFromV1Data ¶
VehicleIdentificationBrandFromData converts the given JSON data to a string.
func VehicleIdentificationBrandFromV2Data ¶
VehicleIdentificationBrandFromData converts the given JSON data to a string.
func VehicleIdentificationModelFromV1Data ¶
VehicleIdentificationModelFromData converts the given JSON data to a string.
func VehicleIdentificationModelFromV2Data ¶
VehicleIdentificationModelFromData converts the given JSON data to a string.
func VehicleIdentificationYearFromV1Data ¶
VehicleIdentificationYearFromData converts the given JSON data to a float64.
Types ¶
type Signal ¶
type Signal struct { // TokenID is the unique identifier of the device. TokenID uint32 `ch:"TokenID" json:"tokenID"` // Timestamp is when this data was collected. Timestamp time.Time `ch:"Timestamp" json:"timestamp"` // Name is the name of the signal collected. Name string `ch:"Name" json:"Name"` // ValueNumber is the value of the signal collected. ValueNumber float64 `ch:"ValueNumber" json:"valueNumber"` // ValueString is the value of the signal collected. ValueString string `ch:"ValueString" json:"valueString"` }
Signal represents a single signal collected from a device. This is the data format that is stored in the database.
func SignalsFromV1Data ¶
SignalsFromV1Data creates a slice of Signal from the given v1 status JSON data. On error, partial results may be returned.