vss

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

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

View Source
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"
)
View Source
const (
	// TableName is the name of the distributed table in Clickhouse.
	TableName = "signal"
)

Variables

View Source
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

func ChassisAxleRow1WheelLeftTirePressureFromV1Data(jsonData []byte) (ret float64, err error)

ChassisAxleRow1WheelLeftTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow1WheelLeftTirePressureFromV2Data

func ChassisAxleRow1WheelLeftTirePressureFromV2Data(result gjson.Result) (ret float64, err error)

ChassisAxleRow1WheelLeftTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow1WheelRightTirePressureFromV1Data

func ChassisAxleRow1WheelRightTirePressureFromV1Data(jsonData []byte) (ret float64, err error)

ChassisAxleRow1WheelRightTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow1WheelRightTirePressureFromV2Data

func ChassisAxleRow1WheelRightTirePressureFromV2Data(result gjson.Result) (ret float64, err error)

ChassisAxleRow1WheelRightTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow2WheelLeftTirePressureFromV1Data

func ChassisAxleRow2WheelLeftTirePressureFromV1Data(jsonData []byte) (ret float64, err error)

ChassisAxleRow2WheelLeftTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow2WheelLeftTirePressureFromV2Data

func ChassisAxleRow2WheelLeftTirePressureFromV2Data(result gjson.Result) (ret float64, err error)

ChassisAxleRow2WheelLeftTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow2WheelRightTirePressureFromV1Data

func ChassisAxleRow2WheelRightTirePressureFromV1Data(jsonData []byte) (ret float64, err error)

ChassisAxleRow2WheelRightTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow2WheelRightTirePressureFromV2Data

func ChassisAxleRow2WheelRightTirePressureFromV2Data(result gjson.Result) (ret float64, err error)

ChassisAxleRow2WheelRightTirePressureFromData converts the given JSON data to a float64.

func CurrentLocationAltitudeFromV1Data

func CurrentLocationAltitudeFromV1Data(jsonData []byte) (ret float64, err error)

CurrentLocationAltitudeFromData converts the given JSON data to a float64.

func CurrentLocationAltitudeFromV2Data

func CurrentLocationAltitudeFromV2Data(result gjson.Result) (ret float64, err error)

CurrentLocationAltitudeFromData converts the given JSON data to a float64.

func CurrentLocationLatitudeFromV1Data

func CurrentLocationLatitudeFromV1Data(jsonData []byte) (ret float64, err error)

CurrentLocationLatitudeFromData converts the given JSON data to a float64.

func CurrentLocationLatitudeFromV2Data

func CurrentLocationLatitudeFromV2Data(result gjson.Result) (ret float64, err error)

CurrentLocationLatitudeFromData converts the given JSON data to a float64.

func CurrentLocationLongitudeFromV1Data

func CurrentLocationLongitudeFromV1Data(jsonData []byte) (ret float64, err error)

CurrentLocationLongitudeFromData converts the given JSON data to a float64.

func CurrentLocationLongitudeFromV2Data

func CurrentLocationLongitudeFromV2Data(result gjson.Result) (ret float64, err error)

CurrentLocationLongitudeFromData converts the given JSON data to a float64.

func CurrentLocationTimestampFromV1Data

func CurrentLocationTimestampFromV1Data(jsonData []byte) (ret float64, err error)

CurrentLocationTimestampFromData converts the given JSON data to a float64.

func CurrentLocationTimestampFromV2Data

func CurrentLocationTimestampFromV2Data(result gjson.Result) (ret float64, err error)

CurrentLocationTimestampFromData converts the given JSON data to a float64.

func DIMOAftermarketHDOPFromV1Data

func DIMOAftermarketHDOPFromV1Data(jsonData []byte) (ret float64, err error)

DIMOAftermarketHDOPFromData converts the given JSON data to a float64.

func DIMOAftermarketHDOPFromV2Data

func DIMOAftermarketHDOPFromV2Data(result gjson.Result) (ret float64, err error)

DIMOAftermarketHDOPFromData converts the given JSON data to a float64.

func DIMOAftermarketNSATFromV1Data

func DIMOAftermarketNSATFromV1Data(jsonData []byte) (ret float64, err error)

DIMOAftermarketNSATFromData converts the given JSON data to a float64.

func DIMOAftermarketNSATFromV2Data

func DIMOAftermarketNSATFromV2Data(result gjson.Result) (ret float64, err error)

DIMOAftermarketNSATFromData converts the given JSON data to a float64.

func DIMOAftermarketSSIDFromV1Data

func DIMOAftermarketSSIDFromV1Data(jsonData []byte) (ret string, err error)

DIMOAftermarketSSIDFromData converts the given JSON data to a string.

func DIMOAftermarketSSIDFromV2Data

func DIMOAftermarketSSIDFromV2Data(result gjson.Result) (ret string, err error)

DIMOAftermarketSSIDFromData converts the given JSON data to a string.

func DIMOAftermarketWPAStateFromV1Data

func DIMOAftermarketWPAStateFromV1Data(jsonData []byte) (ret string, err error)

DIMOAftermarketWPAStateFromData converts the given JSON data to a string.

func DIMOAftermarketWPAStateFromV2Data

func DIMOAftermarketWPAStateFromV2Data(result gjson.Result) (ret string, err error)

DIMOAftermarketWPAStateFromData converts the given JSON data to a string.

func ExteriorAirTemperatureFromV1Data

func ExteriorAirTemperatureFromV1Data(jsonData []byte) (ret float64, err error)

ExteriorAirTemperatureFromData converts the given JSON data to a float64.

func ExteriorAirTemperatureFromV2Data

func ExteriorAirTemperatureFromV2Data(result gjson.Result) (ret float64, err error)

ExteriorAirTemperatureFromData converts the given JSON data to a float64.

func IsInvalidType

func IsInvalidType(err error) bool

IsInvalidType returns true if the error is of type errInvalidType.

func LowVoltageBatteryCurrentVoltageFromV1Data

func LowVoltageBatteryCurrentVoltageFromV1Data(jsonData []byte) (ret float64, err error)

LowVoltageBatteryCurrentVoltageFromData converts the given JSON data to a float64.

func LowVoltageBatteryCurrentVoltageFromV2Data

func LowVoltageBatteryCurrentVoltageFromV2Data(result gjson.Result) (ret float64, err error)

LowVoltageBatteryCurrentVoltageFromData converts the given JSON data to a float64.

func OBDBarometricPressureFromV1Data

func OBDBarometricPressureFromV1Data(jsonData []byte) (ret float64, err error)

OBDBarometricPressureFromData converts the given JSON data to a float64.

func OBDBarometricPressureFromV2Data

func OBDBarometricPressureFromV2Data(result gjson.Result) (ret float64, err error)

OBDBarometricPressureFromData converts the given JSON data to a float64.

func OBDEngineLoadFromV1Data

func OBDEngineLoadFromV1Data(jsonData []byte) (ret float64, err error)

OBDEngineLoadFromData converts the given JSON data to a float64.

func OBDEngineLoadFromV2Data

func OBDEngineLoadFromV2Data(result gjson.Result) (ret float64, err error)

OBDEngineLoadFromData converts the given JSON data to a float64.

func OBDIntakeTempFromV1Data

func OBDIntakeTempFromV1Data(jsonData []byte) (ret float64, err error)

OBDIntakeTempFromData converts the given JSON data to a float64.

func OBDIntakeTempFromV2Data

func OBDIntakeTempFromV2Data(result gjson.Result) (ret float64, err error)

OBDIntakeTempFromData converts the given JSON data to a float64.

func OBDRunTimeFromV1Data

func OBDRunTimeFromV1Data(jsonData []byte) (ret float64, err error)

OBDRunTimeFromData converts the given JSON data to a float64.

func OBDRunTimeFromV2Data

func OBDRunTimeFromV2Data(result gjson.Result) (ret float64, err error)

OBDRunTimeFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineECTFromV1Data

func PowertrainCombustionEngineECTFromV1Data(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineECTFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineECTFromV2Data

func PowertrainCombustionEngineECTFromV2Data(result gjson.Result) (ret float64, err error)

PowertrainCombustionEngineECTFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineEngineOilLevelFromV1Data

func PowertrainCombustionEngineEngineOilLevelFromV1Data(jsonData []byte) (ret string, err error)

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

func PowertrainCombustionEngineMAFFromV1Data(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineMAFFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineMAFFromV2Data

func PowertrainCombustionEngineMAFFromV2Data(result gjson.Result) (ret float64, err error)

PowertrainCombustionEngineMAFFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineSpeedFromV1Data

func PowertrainCombustionEngineSpeedFromV1Data(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineSpeedFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineSpeedFromV2Data

func PowertrainCombustionEngineSpeedFromV2Data(result gjson.Result) (ret float64, err error)

PowertrainCombustionEngineSpeedFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineTPSFromV1Data

func PowertrainCombustionEngineTPSFromV1Data(jsonData []byte) (ret float64, err error)

PowertrainCombustionEngineTPSFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineTPSFromV2Data

func PowertrainCombustionEngineTPSFromV2Data(result gjson.Result) (ret float64, err error)

PowertrainCombustionEngineTPSFromData converts the given JSON data to a float64.

func PowertrainFuelSystemAbsoluteLevelFromV1Data

func PowertrainFuelSystemAbsoluteLevelFromV1Data(jsonData []byte) (ret float64, err error)

PowertrainFuelSystemAbsoluteLevelFromData converts the given JSON data to a float64.

func PowertrainFuelSystemAbsoluteLevelFromV2Data

func PowertrainFuelSystemAbsoluteLevelFromV2Data(result gjson.Result) (ret float64, err error)

PowertrainFuelSystemAbsoluteLevelFromData converts the given JSON data to a float64.

func PowertrainFuelSystemSupportedFuelTypesFromV1Data

func PowertrainFuelSystemSupportedFuelTypesFromV1Data(jsonData []byte) (ret string, err error)

PowertrainFuelSystemSupportedFuelTypesFromData converts the given JSON data to a string.

func PowertrainFuelSystemSupportedFuelTypesFromV2Data

func PowertrainFuelSystemSupportedFuelTypesFromV2Data(result gjson.Result) (ret string, err error)

PowertrainFuelSystemSupportedFuelTypesFromData converts the given JSON data to a string.

func PowertrainRangeFromV1Data

func PowertrainRangeFromV1Data(jsonData []byte) (ret float64, err error)

PowertrainRangeFromData converts the given JSON data to a float64.

func PowertrainRangeFromV2Data

func PowertrainRangeFromV2Data(result gjson.Result) (ret float64, err error)

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

func PowertrainTractionBatteryGrossCapacityFromV1Data(jsonData []byte) (ret float64, err error)

PowertrainTractionBatteryGrossCapacityFromData converts the given JSON data to a float64.

func PowertrainTractionBatteryGrossCapacityFromV2Data

func PowertrainTractionBatteryGrossCapacityFromV2Data(result gjson.Result) (ret float64, err error)

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

func PowertrainTransmissionTravelledDistanceFromV1Data(jsonData []byte) (ret float64, err error)

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

func PowertrainTypeFromV1Data(jsonData []byte) (ret string, err error)

PowertrainTypeFromData converts the given JSON data to a string.

func PowertrainTypeFromV2Data

func PowertrainTypeFromV2Data(result gjson.Result) (ret string, err error)

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

func SignalToSlice(obj Signal) []any

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

func SpeedFromV1Data(jsonData []byte) (ret float64, err error)

SpeedFromData converts the given JSON data to a float64.

func SpeedFromV2Data

func SpeedFromV2Data(result gjson.Result) (ret float64, err error)

SpeedFromData converts the given JSON data to a float64.

func ToChassisAxleRow1WheelLeftTirePressure0

func ToChassisAxleRow1WheelLeftTirePressure0(val float64) (float64, error)

ToChassisAxleRow1WheelLeftTirePressure0 converts data as float64 to float64.

func ToChassisAxleRow1WheelRightTirePressure0

func ToChassisAxleRow1WheelRightTirePressure0(val float64) (float64, error)

ToChassisAxleRow1WheelRightTirePressure0 converts data as float64 to float64.

func ToChassisAxleRow2WheelLeftTirePressure0

func ToChassisAxleRow2WheelLeftTirePressure0(val float64) (float64, error)

ToChassisAxleRow2WheelLeftTirePressure0 converts data as float64 to float64.

func ToChassisAxleRow2WheelRightTirePressure0

func ToChassisAxleRow2WheelRightTirePressure0(val float64) (float64, error)

ToChassisAxleRow2WheelRightTirePressure0 converts data as float64 to float64.

func ToCurrentLocationAltitude0

func ToCurrentLocationAltitude0(val float64) (float64, error)

ToCurrentLocationAltitude0 converts data as float64 to float64.

func ToCurrentLocationLatitude0

func ToCurrentLocationLatitude0(val float64) (float64, error)

ToCurrentLocationLatitude0 converts data as float64 to float64.

func ToCurrentLocationLongitude0

func ToCurrentLocationLongitude0(val float64) (float64, error)

ToCurrentLocationLongitude0 converts data as float64 to float64.

func ToCurrentLocationTimestamp0

func ToCurrentLocationTimestamp0(val string) (float64, error)

ToCurrentLocationTimestamp0 converts data as string to []time.Time.

func ToCurrentLocationTimestamp1

func ToCurrentLocationTimestamp1(val float64) (float64, error)

ToCurrentLocationTimestamp1 converts data as float64 to []time.Time.

func ToDIMOAftermarketHDOP0

func ToDIMOAftermarketHDOP0(val float64) (float64, error)

ToDIMOAftermarketHDOP0 converts data as float64 to float64.

func ToDIMOAftermarketNSAT0

func ToDIMOAftermarketNSAT0(val float64) (float64, error)

ToDIMOAftermarketNSAT0 converts data as float64 to float64.

func ToDIMOAftermarketSSID0

func ToDIMOAftermarketSSID0(val string) (string, error)

ToDIMOAftermarketSSID0 converts data as string to string.

func ToDIMOAftermarketWPAState0

func ToDIMOAftermarketWPAState0(val string) (string, error)

ToDIMOAftermarketWPAState0 converts data as string to string.

func ToExteriorAirTemperature0

func ToExteriorAirTemperature0(val float64) (float64, error)

ToExteriorAirTemperature0 converts data as float64 to float64.

func ToLowVoltageBatteryCurrentVoltage0

func ToLowVoltageBatteryCurrentVoltage0(val float64) (float64, error)

ToLowVoltageBatteryCurrentVoltage0 converts data as float64 to float64.

func ToOBDBarometricPressure0

func ToOBDBarometricPressure0(val float64) (float64, error)

ToOBDBarometricPressure0 converts data as float64 to float64.

func ToOBDEngineLoad0

func ToOBDEngineLoad0(val float64) (float64, error)

ToOBDEngineLoad0 converts data as float64 to float64.

func ToOBDIntakeTemp0

func ToOBDIntakeTemp0(val float64) (float64, error)

ToOBDIntakeTemp0 converts data as float64 to float64.

func ToOBDRunTime0

func ToOBDRunTime0(val float64) (float64, error)

ToOBDRunTime0 converts data as float64 to float64.

func ToPowertrainCombustionEngineECT0

func ToPowertrainCombustionEngineECT0(val float64) (float64, error)

ToPowertrainCombustionEngineECT0 converts data as float64 to float64.

func ToPowertrainCombustionEngineEngineOilLevel0

func ToPowertrainCombustionEngineEngineOilLevel0(oilLevel float64) (string, error)

ToPowertrainCombustionEngineEngineOilLevel0 converts data as float64 to any.

func ToPowertrainCombustionEngineMAF0

func ToPowertrainCombustionEngineMAF0(val float64) (float64, error)

ToPowertrainCombustionEngineMAF0 converts data as float64 to float64.

func ToPowertrainCombustionEngineSpeed0

func ToPowertrainCombustionEngineSpeed0(val float64) (float64, error)

ToPowertrainCombustionEngineSpeed0 converts data as float64 to float64.

func ToPowertrainCombustionEngineTPS0

func ToPowertrainCombustionEngineTPS0(val float64) (float64, error)

ToPowertrainCombustionEngineTPS0 converts data as float64 to float64.

func ToPowertrainFuelSystemAbsoluteLevel0

func ToPowertrainFuelSystemAbsoluteLevel0(val float64) (float64, error)

ToPowertrainFuelSystemAbsoluteLevel0 converts data as float64 to float64.

func ToPowertrainFuelSystemSupportedFuelTypes0

func ToPowertrainFuelSystemSupportedFuelTypes0(val string) (string, error)

ToPowertrainFuelSystemSupportedFuelTypes0 converts data as string to any.

func ToPowertrainRange0

func ToPowertrainRange0(val float64) (float64, error)

ToPowertrainRange0 converts data as float64 to float64.

func ToPowertrainTractionBatteryChargingChargeLimit0

func ToPowertrainTractionBatteryChargingChargeLimit0(val float64) (float64, error)

ToPowertrainTractionBatteryChargingChargeLimit0 converts data as float64 to float64.

func ToPowertrainTractionBatteryChargingIsCharging0

func ToPowertrainTractionBatteryChargingIsCharging0(val bool) (float64, error)

ToPowertrainTractionBatteryChargingIsCharging0 converts data as bool to float64.

func ToPowertrainTractionBatteryGrossCapacity0

func ToPowertrainTractionBatteryGrossCapacity0(val float64) (float64, error)

ToPowertrainTractionBatteryGrossCapacity0 converts data as float64 to float64.

func ToPowertrainTractionBatteryStateOfChargeCurrent0

func ToPowertrainTractionBatteryStateOfChargeCurrent0(val float64) (float64, error)

ToPowertrainTractionBatteryStateOfChargeCurrent0 converts data as float64 to float64.

func ToPowertrainTransmissionTravelledDistance0

func ToPowertrainTransmissionTravelledDistance0(val float64) (float64, error)

ToPowertrainTransmissionTravelledDistance0 converts data as float64 to float64.

func ToPowertrainType0

func ToPowertrainType0(val string) (string, error)

ToPowertrainType0 converts data as string to string.

func ToSpeed0

func ToSpeed0(val float64) (float64, error)

ToSpeed0 converts data as float64 to float64.

func ToVehicleIdentificationBrand0

func ToVehicleIdentificationBrand0(val string) (string, error)

ToVehicleIdentificationBrand0 converts data as string to string.

func ToVehicleIdentificationModel0

func ToVehicleIdentificationModel0(val string) (string, error)

ToVehicleIdentificationModel0 converts data as string to string.

func ToVehicleIdentificationYear0

func ToVehicleIdentificationYear0(val float64) (float64, error)

ToVehicleIdentificationYear0 converts data as float64 to float64.

func VehicleIdentificationBrandFromV1Data

func VehicleIdentificationBrandFromV1Data(jsonData []byte) (ret string, err error)

VehicleIdentificationBrandFromData converts the given JSON data to a string.

func VehicleIdentificationBrandFromV2Data

func VehicleIdentificationBrandFromV2Data(result gjson.Result) (ret string, err error)

VehicleIdentificationBrandFromData converts the given JSON data to a string.

func VehicleIdentificationModelFromV1Data

func VehicleIdentificationModelFromV1Data(jsonData []byte) (ret string, err error)

VehicleIdentificationModelFromData converts the given JSON data to a string.

func VehicleIdentificationModelFromV2Data

func VehicleIdentificationModelFromV2Data(result gjson.Result) (ret string, err error)

VehicleIdentificationModelFromData converts the given JSON data to a string.

func VehicleIdentificationYearFromV1Data

func VehicleIdentificationYearFromV1Data(jsonData []byte) (ret float64, err error)

VehicleIdentificationYearFromData converts the given JSON data to a float64.

func VehicleIdentificationYearFromV2Data

func VehicleIdentificationYearFromV2Data(result gjson.Result) (ret float64, err error)

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

func SignalsFromV1Data(tokenID uint32, timestamp time.Time, jsonData []byte) ([]Signal, error)

SignalsFromV1Data creates a slice of Signal from the given v1 status JSON data. On error, partial results may be returned.

func SignalsFromV2Data

func SignalsFromV2Data(tokenID uint32, timestamp time.Time, signalName string, sigResult gjson.Result) ([]Signal, error)

SignalsFromData converts the given JSON data to a slice of signals.

func (*Signal) SetValue

func (s *Signal) SetValue(val any)

SetValue dynamically set the appropriate value field based on the type of the value.

Directories

Path Synopsis
Package convert provides a function to generate conversion functions for a vehicle struct.
Package convert provides a function to generate conversion functions for a vehicle struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL