nativestatus

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package nativestatus provides a function to generate conversion functions for a vehicle struct.

Code generated by github.com/DIMO-Network/model-garage.

Code generated by github.com/DIMO-Network/model-garage DO NOT EDIT.

Code generated by github.com/DIMO-Network/model-garage DO NOT EDIT.

Index

Constants

View Source
const (
	// StatusV1 is the version string for payloads with the version 1.0 schema.
	StatusV1 = "v1.0.0"
	// StatusV1Converted is the version string for payloads that have been converted to the 1.0 schema.
	StatusV1Converted = "v1.1.0"
	// StatusV2 is the version string for payloads with the version 2.0 schema.
	StatusV2 = "v2.0.0"
)

Variables

This section is empty.

Functions

func AngularVelocityYawFromV1Data

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

AngularVelocityYawFromV1Data converts the given JSON data to a float64.

func AngularVelocityYawFromV2Data

func AngularVelocityYawFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

AngularVelocityYawFromData converts the given JSON data to a float64.

func ChassisAxleRow1WheelLeftSpeedFromV1Data

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

ChassisAxleRow1WheelLeftSpeedFromV1Data converts the given JSON data to a float64.

func ChassisAxleRow1WheelLeftSpeedFromV2Data

func ChassisAxleRow1WheelLeftSpeedFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

ChassisAxleRow1WheelLeftSpeedFromData converts the given JSON data to a float64.

func ChassisAxleRow1WheelLeftTirePressureFromV1Data

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

ChassisAxleRow1WheelLeftTirePressureFromV1Data converts the given JSON data to a float64.

func ChassisAxleRow1WheelLeftTirePressureFromV2Data

func ChassisAxleRow1WheelLeftTirePressureFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

ChassisAxleRow1WheelLeftTirePressureFromData converts the given JSON data to a float64.

func ChassisAxleRow1WheelRightSpeedFromV1Data

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

ChassisAxleRow1WheelRightSpeedFromV1Data converts the given JSON data to a float64.

func ChassisAxleRow1WheelRightSpeedFromV2Data

func ChassisAxleRow1WheelRightSpeedFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

ChassisAxleRow1WheelRightSpeedFromData converts the given JSON data to a float64.

func ChassisAxleRow1WheelRightTirePressureFromV1Data

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

ChassisAxleRow1WheelRightTirePressureFromV1Data converts the given JSON data to a float64.

func ChassisAxleRow1WheelRightTirePressureFromV2Data

func ChassisAxleRow1WheelRightTirePressureFromV2Data(originalDoc []byte, 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)

ChassisAxleRow2WheelLeftTirePressureFromV1Data converts the given JSON data to a float64.

func ChassisAxleRow2WheelLeftTirePressureFromV2Data

func ChassisAxleRow2WheelLeftTirePressureFromV2Data(originalDoc []byte, 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)

ChassisAxleRow2WheelRightTirePressureFromV1Data converts the given JSON data to a float64.

func ChassisAxleRow2WheelRightTirePressureFromV2Data

func ChassisAxleRow2WheelRightTirePressureFromV2Data(originalDoc []byte, 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)

CurrentLocationAltitudeFromV1Data converts the given JSON data to a float64.

func CurrentLocationAltitudeFromV2Data

func CurrentLocationAltitudeFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

CurrentLocationAltitudeFromData converts the given JSON data to a float64.

func CurrentLocationIsRedactedFromV1Data

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

CurrentLocationIsRedactedFromV1Data converts the given JSON data to a float64.

func CurrentLocationIsRedactedFromV2Data

func CurrentLocationIsRedactedFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

CurrentLocationIsRedactedFromData converts the given JSON data to a float64.

func CurrentLocationLatitudeFromV1Data

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

CurrentLocationLatitudeFromV1Data converts the given JSON data to a float64.

func CurrentLocationLatitudeFromV2Data

func CurrentLocationLatitudeFromV2Data(originalDoc []byte, 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)

CurrentLocationLongitudeFromV1Data converts the given JSON data to a float64.

func CurrentLocationLongitudeFromV2Data

func CurrentLocationLongitudeFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

CurrentLocationLongitudeFromData converts the given JSON data to a float64.

func DIMOAftermarketHDOPFromV1Data

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

DIMOAftermarketHDOPFromV1Data converts the given JSON data to a float64.

func DIMOAftermarketHDOPFromV2Data

func DIMOAftermarketHDOPFromV2Data(originalDoc []byte, 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)

DIMOAftermarketNSATFromV1Data converts the given JSON data to a float64.

func DIMOAftermarketNSATFromV2Data

func DIMOAftermarketNSATFromV2Data(originalDoc []byte, 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)

DIMOAftermarketSSIDFromV1Data converts the given JSON data to a string.

func DIMOAftermarketSSIDFromV2Data

func DIMOAftermarketSSIDFromV2Data(originalDoc []byte, 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)

DIMOAftermarketWPAStateFromV1Data converts the given JSON data to a string.

func DIMOAftermarketWPAStateFromV2Data

func DIMOAftermarketWPAStateFromV2Data(originalDoc []byte, 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)

ExteriorAirTemperatureFromV1Data converts the given JSON data to a float64.

func ExteriorAirTemperatureFromV2Data

func ExteriorAirTemperatureFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

ExteriorAirTemperatureFromData converts the given JSON data to a float64.

func GetSchemaVersion

func GetSchemaVersion(jsonData []byte) string

GetSchemaVersion returns the version string of the schema used in the payload.

func LowVoltageBatteryCurrentVoltageFromV1Data

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

LowVoltageBatteryCurrentVoltageFromV1Data converts the given JSON data to a float64.

func LowVoltageBatteryCurrentVoltageFromV2Data

func LowVoltageBatteryCurrentVoltageFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

LowVoltageBatteryCurrentVoltageFromData converts the given JSON data to a float64.

func NameFromV2Signal

func NameFromV2Signal(sigResult gjson.Result) (string, error)

NameFromV2Signal gets a name from a V2 signal.

func OBDBarometricPressureFromV1Data

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

OBDBarometricPressureFromV1Data converts the given JSON data to a float64.

func OBDBarometricPressureFromV2Data

func OBDBarometricPressureFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDBarometricPressureFromData converts the given JSON data to a float64.

func OBDCommandedEGRFromV1Data

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

OBDCommandedEGRFromV1Data converts the given JSON data to a float64.

func OBDCommandedEGRFromV2Data

func OBDCommandedEGRFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDCommandedEGRFromData converts the given JSON data to a float64.

func OBDCommandedEVAPFromV1Data added in v0.3.2

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

OBDCommandedEVAPFromV1Data converts the given JSON data to a float64.

func OBDCommandedEVAPFromV2Data added in v0.3.2

func OBDCommandedEVAPFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDCommandedEVAPFromData converts the given JSON data to a float64.

func OBDDistanceSinceDTCClearFromV1Data

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

OBDDistanceSinceDTCClearFromV1Data converts the given JSON data to a float64.

func OBDDistanceSinceDTCClearFromV2Data

func OBDDistanceSinceDTCClearFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDDistanceSinceDTCClearFromData converts the given JSON data to a float64.

func OBDDistanceWithMILFromV1Data

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

OBDDistanceWithMILFromV1Data converts the given JSON data to a float64.

func OBDDistanceWithMILFromV2Data

func OBDDistanceWithMILFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDDistanceWithMILFromData converts the given JSON data to a float64.

func OBDEngineLoadFromV1Data

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

OBDEngineLoadFromV1Data converts the given JSON data to a float64.

func OBDEngineLoadFromV2Data

func OBDEngineLoadFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDEngineLoadFromData converts the given JSON data to a float64.

func OBDFuelPressureFromV1Data added in v0.3.1

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

OBDFuelPressureFromV1Data converts the given JSON data to a float64.

func OBDFuelPressureFromV2Data added in v0.3.1

func OBDFuelPressureFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDFuelPressureFromData converts the given JSON data to a float64.

func OBDIntakeTempFromV1Data

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

OBDIntakeTempFromV1Data converts the given JSON data to a float64.

func OBDIntakeTempFromV2Data

func OBDIntakeTempFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDIntakeTempFromData converts the given JSON data to a float64.

func OBDLongTermFuelTrim1FromV1Data

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

OBDLongTermFuelTrim1FromV1Data converts the given JSON data to a float64.

func OBDLongTermFuelTrim1FromV2Data

func OBDLongTermFuelTrim1FromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDLongTermFuelTrim1FromData converts the given JSON data to a float64.

func OBDMAPFromV1Data

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

OBDMAPFromV1Data converts the given JSON data to a float64.

func OBDMAPFromV2Data

func OBDMAPFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDMAPFromData converts the given JSON data to a float64.

func OBDO2WRSensor1VoltageFromV1Data added in v0.3.2

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

OBDO2WRSensor1VoltageFromV1Data converts the given JSON data to a float64.

func OBDO2WRSensor1VoltageFromV2Data added in v0.3.2

func OBDO2WRSensor1VoltageFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDO2WRSensor1VoltageFromData converts the given JSON data to a float64.

func OBDO2WRSensor2VoltageFromV1Data added in v0.3.2

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

OBDO2WRSensor2VoltageFromV1Data converts the given JSON data to a float64.

func OBDO2WRSensor2VoltageFromV2Data added in v0.3.2

func OBDO2WRSensor2VoltageFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDO2WRSensor2VoltageFromData converts the given JSON data to a float64.

func OBDRunTimeFromV1Data

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

OBDRunTimeFromV1Data converts the given JSON data to a float64.

func OBDRunTimeFromV2Data

func OBDRunTimeFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDRunTimeFromData converts the given JSON data to a float64.

func OBDShortTermFuelTrim1FromV1Data

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

OBDShortTermFuelTrim1FromV1Data converts the given JSON data to a float64.

func OBDShortTermFuelTrim1FromV2Data

func OBDShortTermFuelTrim1FromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDShortTermFuelTrim1FromData converts the given JSON data to a float64.

func OBDWarmupsSinceDTCClearFromV1Data

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

OBDWarmupsSinceDTCClearFromV1Data converts the given JSON data to a float64.

func OBDWarmupsSinceDTCClearFromV2Data

func OBDWarmupsSinceDTCClearFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

OBDWarmupsSinceDTCClearFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineECTFromV1Data

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

PowertrainCombustionEngineECTFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineECTFromV2Data

func PowertrainCombustionEngineECTFromV2Data(originalDoc []byte, 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)

PowertrainCombustionEngineEngineOilLevelFromV1Data converts the given JSON data to a string.

func PowertrainCombustionEngineEngineOilLevelFromV2Data

func PowertrainCombustionEngineEngineOilLevelFromV2Data(originalDoc []byte, result gjson.Result) (ret string, err error)

PowertrainCombustionEngineEngineOilLevelFromData converts the given JSON data to a string.

func PowertrainCombustionEngineEngineOilRelativeLevelFromV1Data

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

PowertrainCombustionEngineEngineOilRelativeLevelFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineEngineOilRelativeLevelFromV2Data

func PowertrainCombustionEngineEngineOilRelativeLevelFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainCombustionEngineEngineOilRelativeLevelFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineMAFFromV1Data

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

PowertrainCombustionEngineMAFFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineMAFFromV2Data

func PowertrainCombustionEngineMAFFromV2Data(originalDoc []byte, 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)

PowertrainCombustionEngineSpeedFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineSpeedFromV2Data

func PowertrainCombustionEngineSpeedFromV2Data(originalDoc []byte, 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)

PowertrainCombustionEngineTPSFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineTPSFromV2Data

func PowertrainCombustionEngineTPSFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainCombustionEngineTPSFromData converts the given JSON data to a float64.

func PowertrainCombustionEngineTorqueFromV1Data added in v0.3.1

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

PowertrainCombustionEngineTorqueFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineTorqueFromV2Data added in v0.3.1

func PowertrainCombustionEngineTorqueFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainCombustionEngineTorqueFromData converts the given JSON data to a float64.

func PowertrainFuelSystemAbsoluteLevelFromV1Data

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

PowertrainFuelSystemAbsoluteLevelFromV1Data converts the given JSON data to a float64.

func PowertrainFuelSystemAbsoluteLevelFromV2Data

func PowertrainFuelSystemAbsoluteLevelFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainFuelSystemAbsoluteLevelFromData converts the given JSON data to a float64.

func PowertrainFuelSystemRelativeLevelFromV1Data

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

PowertrainFuelSystemRelativeLevelFromV1Data converts the given JSON data to a float64.

func PowertrainFuelSystemRelativeLevelFromV2Data

func PowertrainFuelSystemRelativeLevelFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainFuelSystemRelativeLevelFromData converts the given JSON data to a float64.

func PowertrainFuelSystemSupportedFuelTypesFromV1Data

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

PowertrainFuelSystemSupportedFuelTypesFromV1Data converts the given JSON data to a string.

func PowertrainFuelSystemSupportedFuelTypesFromV2Data

func PowertrainFuelSystemSupportedFuelTypesFromV2Data(originalDoc []byte, 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)

PowertrainRangeFromV1Data converts the given JSON data to a float64.

func PowertrainRangeFromV2Data

func PowertrainRangeFromV2Data(originalDoc []byte, 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)

PowertrainTractionBatteryChargingChargeLimitFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryChargingChargeLimitFromV2Data

func PowertrainTractionBatteryChargingChargeLimitFromV2Data(originalDoc []byte, 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)

PowertrainTractionBatteryChargingIsChargingFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryChargingIsChargingFromV2Data

func PowertrainTractionBatteryChargingIsChargingFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainTractionBatteryChargingIsChargingFromData converts the given JSON data to a float64.

func PowertrainTractionBatteryCurrentPowerFromV1Data

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

PowertrainTractionBatteryCurrentPowerFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryCurrentPowerFromV2Data

func PowertrainTractionBatteryCurrentPowerFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainTractionBatteryCurrentPowerFromData converts the given JSON data to a float64.

func PowertrainTractionBatteryCurrentVoltageFromV1Data added in v0.3.4

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

PowertrainTractionBatteryCurrentVoltageFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryCurrentVoltageFromV2Data added in v0.3.4

func PowertrainTractionBatteryCurrentVoltageFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainTractionBatteryCurrentVoltageFromData converts the given JSON data to a float64.

func PowertrainTractionBatteryGrossCapacityFromV1Data

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

PowertrainTractionBatteryGrossCapacityFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryGrossCapacityFromV2Data

func PowertrainTractionBatteryGrossCapacityFromV2Data(originalDoc []byte, 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)

PowertrainTractionBatteryStateOfChargeCurrentFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryStateOfChargeCurrentFromV2Data

func PowertrainTractionBatteryStateOfChargeCurrentFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainTractionBatteryStateOfChargeCurrentFromData converts the given JSON data to a float64.

func PowertrainTractionBatteryTemperatureAverageFromV1Data

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

PowertrainTractionBatteryTemperatureAverageFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryTemperatureAverageFromV2Data

func PowertrainTractionBatteryTemperatureAverageFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainTractionBatteryTemperatureAverageFromData converts the given JSON data to a float64.

func PowertrainTransmissionCurrentGearFromV1Data added in v0.3.1

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

PowertrainTransmissionCurrentGearFromV1Data converts the given JSON data to a float64.

func PowertrainTransmissionCurrentGearFromV2Data added in v0.3.1

func PowertrainTransmissionCurrentGearFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainTransmissionCurrentGearFromData converts the given JSON data to a float64.

func PowertrainTransmissionTemperatureFromV1Data added in v0.3.2

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

PowertrainTransmissionTemperatureFromV1Data converts the given JSON data to a float64.

func PowertrainTransmissionTemperatureFromV2Data added in v0.3.2

func PowertrainTransmissionTemperatureFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

PowertrainTransmissionTemperatureFromData converts the given JSON data to a float64.

func PowertrainTransmissionTravelledDistanceFromV1Data

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

PowertrainTransmissionTravelledDistanceFromV1Data converts the given JSON data to a float64.

func PowertrainTransmissionTravelledDistanceFromV2Data

func PowertrainTransmissionTravelledDistanceFromV2Data(originalDoc []byte, 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)

PowertrainTypeFromV1Data converts the given JSON data to a string.

func PowertrainTypeFromV2Data

func PowertrainTypeFromV2Data(originalDoc []byte, result gjson.Result) (ret string, err error)

PowertrainTypeFromData converts the given JSON data to a string.

func ServiceDistanceToServiceFromV1Data added in v0.3.4

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

ServiceDistanceToServiceFromV1Data converts the given JSON data to a float64.

func ServiceDistanceToServiceFromV2Data added in v0.3.4

func ServiceDistanceToServiceFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

ServiceDistanceToServiceFromData converts the given JSON data to a float64.

func SignalsFromPayload

func SignalsFromPayload(ctx context.Context, tokenGetter TokenIDGetter, jsonData []byte) ([]vss.Signal, error)

SignalsFromPayload extracts signals from a payload. It detects the payload version and calls the appropriate function.

func SignalsFromV1Data

func SignalsFromV1Data(baseSignal vss.Signal, jsonData []byte) ([]vss.Signal, []error)

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

func SignalsFromV1Payload

func SignalsFromV1Payload(ctx context.Context, tokenGetter TokenIDGetter, jsonData []byte) ([]vss.Signal, error)

SignalsFromV1Payload gets a slice signals from a v1 payload.

func SignalsFromV2Data

func SignalsFromV2Data(originalDoc []byte, baseSignal vss.Signal, signalName string, sigResult gjson.Result) ([]vss.Signal, error)

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

func SignalsFromV2Payload

func SignalsFromV2Payload(jsonData []byte) ([]vss.Signal, error)

SignalsFromV2Payload extracts signals from a V2 payload.

func SourceFromData

func SourceFromData(jsonData []byte) (string, error)

SourceFromData gets a source from a V2 payload.

func SpeedFromV1Data

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

SpeedFromV1Data converts the given JSON data to a float64.

func SpeedFromV2Data

func SpeedFromV2Data(originalDoc []byte, result gjson.Result) (ret float64, err error)

SpeedFromData converts the given JSON data to a float64.

func SubjectFromV1Data

func SubjectFromV1Data(jsonData []byte) (string, error)

SubjectFromV1Data gets a subject from a v1 payload.

func TimestampFromV1Data

func TimestampFromV1Data(jsonData []byte) (time.Time, error)

TimestampFromV1Data gets a timestamp from a v1 payload.

func TimestampFromV2Signal

func TimestampFromV2Signal(sigResult gjson.Result) (time.Time, error)

TimestampFromV2Signal gets a timestamp from a V2 signal.

func ToAngularVelocityYaw0

func ToAngularVelocityYaw0(originalDoc []byte, val float64) (float64, error)

ToAngularVelocityYaw0 converts data from field 'yawRate' of type float64 to 'Vehicle.AngularVelocity.Yaw' of type float64. Vehicle.AngularVelocity.Yaw: Vehicle rotation rate along Z (vertical). Unit: 'degrees/s'

func ToChassisAxleRow1WheelLeftSpeed0

func ToChassisAxleRow1WheelLeftSpeed0(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow1WheelLeftSpeed0 converts data from field 'frontlLeftWheelSpeed' of type float64 to 'Vehicle.Chassis.Axle.Row1.Wheel.Left.Speed' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Left.Speed: Rotational speed of a vehicle's wheel. Unit: 'km/h'

func ToChassisAxleRow1WheelLeftTirePressure0

func ToChassisAxleRow1WheelLeftTirePressure0(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow1WheelLeftTirePressure0 converts data from field 'tires.frontLeft' of type float64 to 'Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow1WheelLeftTirePressure1

func ToChassisAxleRow1WheelLeftTirePressure1(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow1WheelLeftTirePressure1 converts data from field 'tiresFrontLeft' of type float64 to 'Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow1WheelRightSpeed0

func ToChassisAxleRow1WheelRightSpeed0(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow1WheelRightSpeed0 converts data from field 'frontRightWheelSpeed' of type float64 to 'Vehicle.Chassis.Axle.Row1.Wheel.Right.Speed' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Right.Speed: Rotational speed of a vehicle's wheel. Unit: 'km/h'

func ToChassisAxleRow1WheelRightTirePressure0

func ToChassisAxleRow1WheelRightTirePressure0(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow1WheelRightTirePressure0 converts data from field 'tires.frontRight' of type float64 to 'Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow1WheelRightTirePressure1

func ToChassisAxleRow1WheelRightTirePressure1(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow1WheelRightTirePressure1 converts data from field 'tiresFrontRight' of type float64 to 'Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow2WheelLeftTirePressure0

func ToChassisAxleRow2WheelLeftTirePressure0(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow2WheelLeftTirePressure0 converts data from field 'tires.backLeft' of type float64 to 'Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow2WheelLeftTirePressure1

func ToChassisAxleRow2WheelLeftTirePressure1(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow2WheelLeftTirePressure1 converts data from field 'tiresBackLeft' of type float64 to 'Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow2WheelRightTirePressure0

func ToChassisAxleRow2WheelRightTirePressure0(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow2WheelRightTirePressure0 converts data from field 'tires.backRight' of type float64 to 'Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToChassisAxleRow2WheelRightTirePressure1

func ToChassisAxleRow2WheelRightTirePressure1(originalDoc []byte, val float64) (float64, error)

ToChassisAxleRow2WheelRightTirePressure1 converts data from field 'tiresBackRight' of type float64 to 'Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure' of type float64. Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure: Tire pressure in kilo-Pascal. Unit: 'kPa'

func ToCurrentLocationAltitude0

func ToCurrentLocationAltitude0(originalDoc []byte, val float64) (float64, error)

ToCurrentLocationAltitude0 converts data from field 'altitude' of type float64 to 'Vehicle.CurrentLocation.Altitude' of type float64. Vehicle.CurrentLocation.Altitude: Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna. Unit: 'm'

func ToCurrentLocationIsRedacted0

func ToCurrentLocationIsRedacted0(originalDoc []byte, val bool) (float64, error)

ToCurrentLocationIsRedacted0 converts data from field 'isRedacted' of type bool to 'Vehicle.CurrentLocation.IsRedacted' of type float64. Vehicle.CurrentLocation.IsRedacted: Indicates if the latitude and longitude signals at the current timestamp have been redacted using a privacy zone.

func ToCurrentLocationLatitude0

func ToCurrentLocationLatitude0(originalDoc []byte, val float64) (float64, error)

ToCurrentLocationLatitude0 converts data from field 'latitude' of type float64 to 'Vehicle.CurrentLocation.Latitude' of type float64. Vehicle.CurrentLocation.Latitude: Current latitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna. Unit: 'degrees' Min: '-90' Max: '90'

func ToCurrentLocationLongitude0

func ToCurrentLocationLongitude0(originalDoc []byte, val float64) (float64, error)

ToCurrentLocationLongitude0 converts data from field 'longitude' of type float64 to 'Vehicle.CurrentLocation.Longitude' of type float64. Vehicle.CurrentLocation.Longitude: Current longitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna. Unit: 'degrees' Min: '-180' Max: '180'

func ToDIMOAftermarketHDOP0

func ToDIMOAftermarketHDOP0(originalDoc []byte, val float64) (float64, error)

ToDIMOAftermarketHDOP0 converts data from field 'hdop' of type float64 to 'Vehicle.DIMO.Aftermarket.HDOP' of type float64. Vehicle.DIMO.Aftermarket.HDOP: Horizontal dilution of precision of GPS

func ToDIMOAftermarketNSAT0

func ToDIMOAftermarketNSAT0(originalDoc []byte, val float64) (float64, error)

ToDIMOAftermarketNSAT0 converts data from field 'nsat' of type float64 to 'Vehicle.DIMO.Aftermarket.NSAT' of type float64. Vehicle.DIMO.Aftermarket.NSAT: Number of sync satellites for GPS

func ToDIMOAftermarketSSID0

func ToDIMOAftermarketSSID0(originalDoc []byte, val string) (string, error)

ToDIMOAftermarketSSID0 converts data from field 'ssid' of type string to 'Vehicle.DIMO.Aftermarket.SSID' of type string. Vehicle.DIMO.Aftermarket.SSID: Service Set Identifier for the wifi.

func ToDIMOAftermarketSSID1

func ToDIMOAftermarketSSID1(originalDoc []byte, val string) (string, error)

ToDIMOAftermarketSSID1 converts data from field 'wifi.ssid' of type string to 'Vehicle.DIMO.Aftermarket.SSID' of type string. Vehicle.DIMO.Aftermarket.SSID: Service Set Identifier for the wifi.

func ToDIMOAftermarketWPAState0

func ToDIMOAftermarketWPAState0(originalDoc []byte, val string) (string, error)

ToDIMOAftermarketWPAState0 converts data from field 'wpa_state' of type string to 'Vehicle.DIMO.Aftermarket.WPAState' of type string. Vehicle.DIMO.Aftermarket.WPAState: Indicate the current WPA state for the device's wifi

func ToDIMOAftermarketWPAState1

func ToDIMOAftermarketWPAState1(originalDoc []byte, val string) (string, error)

ToDIMOAftermarketWPAState1 converts data from field 'wifi.wpaState' of type string to 'Vehicle.DIMO.Aftermarket.WPAState' of type string. Vehicle.DIMO.Aftermarket.WPAState: Indicate the current WPA state for the device's wifi

func ToExteriorAirTemperature0

func ToExteriorAirTemperature0(originalDoc []byte, val float64) (float64, error)

ToExteriorAirTemperature0 converts data from field 'ambientAirTemp' of type float64 to 'Vehicle.Exterior.AirTemperature' of type float64. Vehicle.Exterior.AirTemperature: Air temperature outside the vehicle. Unit: 'celsius'

func ToExteriorAirTemperature1

func ToExteriorAirTemperature1(originalDoc []byte, val float64) (float64, error)

ToExteriorAirTemperature1 converts data from field 'ambientTemp' of type float64 to 'Vehicle.Exterior.AirTemperature' of type float64. Vehicle.Exterior.AirTemperature: Air temperature outside the vehicle. Unit: 'celsius'

func ToLowVoltageBatteryCurrentVoltage0

func ToLowVoltageBatteryCurrentVoltage0(originalDoc []byte, val float64) (float64, error)

ToLowVoltageBatteryCurrentVoltage0 converts data from field 'batteryVoltage' of type float64 to 'Vehicle.LowVoltageBattery.CurrentVoltage' of type float64. Vehicle.LowVoltageBattery.CurrentVoltage: Current Voltage of the low voltage battery. Unit: 'V'

func ToOBDBarometricPressure0

func ToOBDBarometricPressure0(originalDoc []byte, val float64) (float64, error)

ToOBDBarometricPressure0 converts data from field 'barometricPressure' of type float64 to 'Vehicle.OBD.BarometricPressure' of type float64. Vehicle.OBD.BarometricPressure: PID 33 - Barometric pressure Unit: 'kPa'

func ToOBDCommandedEGR0

func ToOBDCommandedEGR0(originalDoc []byte, val float64) (float64, error)

ToOBDCommandedEGR0 converts data from field 'commandedEgr' of type float64 to 'Vehicle.OBD.CommandedEGR' of type float64. Vehicle.OBD.CommandedEGR: PID 2C - Commanded exhaust gas recirculation (EGR) Unit: 'percent'

func ToOBDCommandedEVAP0 added in v0.3.2

func ToOBDCommandedEVAP0(originalDoc []byte, val float64) (float64, error)

ToOBDCommandedEVAP0 converts data from field 'evap' of type float64 to 'Vehicle.OBD.CommandedEVAP' of type float64. Vehicle.OBD.CommandedEVAP: PID 2E - Commanded evaporative purge (EVAP) valve Unit: 'percent'

func ToOBDDistanceSinceDTCClear0

func ToOBDDistanceSinceDTCClear0(originalDoc []byte, val float64) (float64, error)

ToOBDDistanceSinceDTCClear0 converts data from field 'distanceSinceDtcClear' of type float64 to 'Vehicle.OBD.DistanceSinceDTCClear' of type float64. Vehicle.OBD.DistanceSinceDTCClear: PID 31 - Distance traveled since codes cleared Unit: 'km'

func ToOBDDistanceWithMIL0

func ToOBDDistanceWithMIL0(originalDoc []byte, val float64) (float64, error)

ToOBDDistanceWithMIL0 converts data from field 'distanceWMil' of type float64 to 'Vehicle.OBD.DistanceWithMIL' of type float64. Vehicle.OBD.DistanceWithMIL: PID 21 - Distance traveled with MIL on Unit: 'km'

func ToOBDEngineLoad0

func ToOBDEngineLoad0(originalDoc []byte, val float64) (float64, error)

ToOBDEngineLoad0 converts data from field 'engineLoad' of type float64 to 'Vehicle.OBD.EngineLoad' of type float64. Vehicle.OBD.EngineLoad: PID 04 - Engine load in percent - 0 = no load, 100 = full load Unit: 'percent'

func ToOBDFuelPressure0 added in v0.3.1

func ToOBDFuelPressure0(originalDoc []byte, val float64) (float64, error)

ToOBDFuelPressure0 converts data from field 'fuelTankPressure' of type float64 to 'Vehicle.OBD.FuelPressure' of type float64. Vehicle.OBD.FuelPressure: PID 0A - Fuel pressure Unit: 'kPa'

func ToOBDIntakeTemp0

func ToOBDIntakeTemp0(originalDoc []byte, val float64) (float64, error)

ToOBDIntakeTemp0 converts data from field 'intakeTemp' of type float64 to 'Vehicle.OBD.IntakeTemp' of type float64. Vehicle.OBD.IntakeTemp: PID 0F - Intake temperature Unit: 'celsius'

func ToOBDLongTermFuelTrim10

func ToOBDLongTermFuelTrim10(originalDoc []byte, val float64) (float64, error)

ToOBDLongTermFuelTrim10 converts data from field 'longTermFuelTrim1' of type float64 to 'Vehicle.OBD.LongTermFuelTrim1' of type float64. Vehicle.OBD.LongTermFuelTrim1: PID 07 - Long Term (learned) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer Unit: 'percent'

func ToOBDMAP0

func ToOBDMAP0(originalDoc []byte, val float64) (float64, error)

ToOBDMAP0 converts data from field 'intakePressure' of type float64 to 'Vehicle.OBD.MAP' of type float64. Vehicle.OBD.MAP: PID 0B - Intake manifold pressure Unit: 'kPa'

func ToOBDO2WRSensor1Voltage0 added in v0.3.2

func ToOBDO2WRSensor1Voltage0(originalDoc []byte, val float64) (float64, error)

ToOBDO2WRSensor1Voltage0 converts data from field 'oxygenSensor1' of type float64 to 'Vehicle.OBD.O2WR.Sensor1.Voltage' of type float64. Vehicle.OBD.O2WR.Sensor1.Voltage: PID 2x (byte CD) - Voltage for wide range/band oxygen sensor Unit: 'V'

func ToOBDO2WRSensor2Voltage0 added in v0.3.2

func ToOBDO2WRSensor2Voltage0(originalDoc []byte, val float64) (float64, error)

ToOBDO2WRSensor2Voltage0 converts data from field 'oxygenSensor2' of type float64 to 'Vehicle.OBD.O2WR.Sensor2.Voltage' of type float64. Vehicle.OBD.O2WR.Sensor2.Voltage: PID 2x (byte CD) - Voltage for wide range/band oxygen sensor Unit: 'V'

func ToOBDRunTime0

func ToOBDRunTime0(originalDoc []byte, val float64) (float64, error)

ToOBDRunTime0 converts data from field 'runTime' of type float64 to 'Vehicle.OBD.RunTime' of type float64. Vehicle.OBD.RunTime: PID 1F - Engine run time Unit: 's'

func ToOBDShortTermFuelTrim10

func ToOBDShortTermFuelTrim10(originalDoc []byte, val float64) (float64, error)

ToOBDShortTermFuelTrim10 converts data from field 'shortTermFuelTrim1' of type float64 to 'Vehicle.OBD.ShortTermFuelTrim1' of type float64. Vehicle.OBD.ShortTermFuelTrim1: PID 06 - Short Term (immediate) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer Unit: 'percent'

func ToOBDWarmupsSinceDTCClear0

func ToOBDWarmupsSinceDTCClear0(originalDoc []byte, val float64) (float64, error)

ToOBDWarmupsSinceDTCClear0 converts data from field 'warmupsSinceDtcClear' of type float64 to 'Vehicle.OBD.WarmupsSinceDTCClear' of type float64. Vehicle.OBD.WarmupsSinceDTCClear: PID 30 - Number of warm-ups since codes cleared

func ToPowertrainCombustionEngineECT0

func ToPowertrainCombustionEngineECT0(originalDoc []byte, val float64) (float64, error)

ToPowertrainCombustionEngineECT0 converts data from field 'coolantTemp' of type float64 to 'Vehicle.Powertrain.CombustionEngine.ECT' of type float64. Vehicle.Powertrain.CombustionEngine.ECT: Engine coolant temperature. Unit: 'celsius'

func ToPowertrainCombustionEngineEngineOilLevel0

func ToPowertrainCombustionEngineEngineOilLevel0(originalDoc []byte, val float64) (string, error)

ToPowertrainCombustionEngineEngineOilLevel0 converts data from field 'oil' of type float64 to 'Vehicle.Powertrain.CombustionEngine.EngineOilLevel' of type string. Vehicle.Powertrain.CombustionEngine.EngineOilLevel: Engine oil level.

func ToPowertrainCombustionEngineEngineOilLevel1

func ToPowertrainCombustionEngineEngineOilLevel1(originalDoc []byte, val float64) (string, error)

ToPowertrainCombustionEngineEngineOilLevel1 converts data from field 'oilLife' of type float64 to 'Vehicle.Powertrain.CombustionEngine.EngineOilLevel' of type string. Vehicle.Powertrain.CombustionEngine.EngineOilLevel: Engine oil level.

func ToPowertrainCombustionEngineEngineOilRelativeLevel0

func ToPowertrainCombustionEngineEngineOilRelativeLevel0(originalDoc []byte, val float64) (float64, error)

ToPowertrainCombustionEngineEngineOilRelativeLevel0 converts data from field 'oil' of type float64 to 'Vehicle.Powertrain.CombustionEngine.EngineOilRelativeLevel' of type float64. Vehicle.Powertrain.CombustionEngine.EngineOilRelativeLevel: Engine oil level as a percentage. Unit: 'percent' Min: '0' Max: '100'

func ToPowertrainCombustionEngineMAF0

func ToPowertrainCombustionEngineMAF0(originalDoc []byte, val float64) (float64, error)

ToPowertrainCombustionEngineMAF0 converts data from field 'maf' of type float64 to 'Vehicle.Powertrain.CombustionEngine.MAF' of type float64. Vehicle.Powertrain.CombustionEngine.MAF: Grams of air drawn into engine per second. Unit: 'g/s'

func ToPowertrainCombustionEngineSpeed0

func ToPowertrainCombustionEngineSpeed0(originalDoc []byte, val float64) (float64, error)

ToPowertrainCombustionEngineSpeed0 converts data from field 'rpm' of type float64 to 'Vehicle.Powertrain.CombustionEngine.Speed' of type float64. Vehicle.Powertrain.CombustionEngine.Speed: Engine speed measured as rotations per minute. Unit: 'rpm'

func ToPowertrainCombustionEngineSpeed1

func ToPowertrainCombustionEngineSpeed1(originalDoc []byte, val float64) (float64, error)

ToPowertrainCombustionEngineSpeed1 converts data from field 'engineSpeed' of type float64 to 'Vehicle.Powertrain.CombustionEngine.Speed' of type float64. Vehicle.Powertrain.CombustionEngine.Speed: Engine speed measured as rotations per minute. Unit: 'rpm'

func ToPowertrainCombustionEngineTPS0

func ToPowertrainCombustionEngineTPS0(originalDoc []byte, val float64) (float64, error)

ToPowertrainCombustionEngineTPS0 converts data from field 'throttlePosition' of type float64 to 'Vehicle.Powertrain.CombustionEngine.TPS' of type float64. Vehicle.Powertrain.CombustionEngine.TPS: Current throttle position. Unit: 'percent' Max: '100'

func ToPowertrainCombustionEngineTorque0 added in v0.3.1

func ToPowertrainCombustionEngineTorque0(originalDoc []byte, val float64) (float64, error)

ToPowertrainCombustionEngineTorque0 converts data from field 'engineTorque' of type float64 to 'Vehicle.Powertrain.CombustionEngine.Torque' of type float64. Vehicle.Powertrain.CombustionEngine.Torque: Current engine torque. Shall be reported as 0 during engine breaking. Unit: 'Nm'

func ToPowertrainFuelSystemAbsoluteLevel0

func ToPowertrainFuelSystemAbsoluteLevel0(originalDoc []byte, val float64) (float64, error)

ToPowertrainFuelSystemAbsoluteLevel0 converts data from field 'fuelLevelLiters' of type float64 to 'Vehicle.Powertrain.FuelSystem.AbsoluteLevel' of type float64. Vehicle.Powertrain.FuelSystem.AbsoluteLevel: Current available fuel in the fuel tank expressed in liters. Unit: 'l'

func ToPowertrainFuelSystemRelativeLevel0

func ToPowertrainFuelSystemRelativeLevel0(originalDoc []byte, val float64) (float64, error)

ToPowertrainFuelSystemRelativeLevel0 converts data from field 'fuelLevel' of type float64 to 'Vehicle.Powertrain.FuelSystem.RelativeLevel' of type float64. Vehicle.Powertrain.FuelSystem.RelativeLevel: Level in fuel tank as percent of capacity. 0 = empty. 100 = full. Unit: 'percent' Min: '0' Max: '100'

func ToPowertrainFuelSystemRelativeLevel1

func ToPowertrainFuelSystemRelativeLevel1(originalDoc []byte, val float64) (float64, error)

ToPowertrainFuelSystemRelativeLevel1 converts data from field 'fuelPercentRemaining' of type float64 to 'Vehicle.Powertrain.FuelSystem.RelativeLevel' of type float64. Vehicle.Powertrain.FuelSystem.RelativeLevel: Level in fuel tank as percent of capacity. 0 = empty. 100 = full. Unit: 'percent' Min: '0' Max: '100'

func ToPowertrainFuelSystemSupportedFuelTypes0

func ToPowertrainFuelSystemSupportedFuelTypes0(originalDoc []byte, val string) (string, error)

ToPowertrainFuelSystemSupportedFuelTypes0 converts data from field 'fuelType' of type string to 'Vehicle.Powertrain.FuelSystem.SupportedFuelTypes' of type string. Vehicle.Powertrain.FuelSystem.SupportedFuelTypes: High level information of fuel types supported

func ToPowertrainRange0

func ToPowertrainRange0(originalDoc []byte, val float64) (float64, error)

ToPowertrainRange0 converts data from field 'range' of type float64 to 'Vehicle.Powertrain.Range' of type float64. Vehicle.Powertrain.Range: Remaining range in meters using all energy sources available in the vehicle. Unit: 'm'

func ToPowertrainTractionBatteryChargingChargeLimit0

func ToPowertrainTractionBatteryChargingChargeLimit0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTractionBatteryChargingChargeLimit0 converts data from field 'chargeLimit' of type float64 to 'Vehicle.Powertrain.TractionBattery.Charging.ChargeLimit' of type float64. Vehicle.Powertrain.TractionBattery.Charging.ChargeLimit: Target charge limit (state of charge) for battery. Unit: 'percent' Min: '0' Max: '100'

func ToPowertrainTractionBatteryChargingIsCharging0

func ToPowertrainTractionBatteryChargingIsCharging0(originalDoc []byte, val bool) (float64, error)

ToPowertrainTractionBatteryChargingIsCharging0 converts data from field 'charging' of type bool to 'Vehicle.Powertrain.TractionBattery.Charging.IsCharging' of type float64. Vehicle.Powertrain.TractionBattery.Charging.IsCharging: True if charging is ongoing. Charging is considered to be ongoing if energy is flowing from charger to vehicle.

func ToPowertrainTractionBatteryCurrentPower0

func ToPowertrainTractionBatteryCurrentPower0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTractionBatteryCurrentPower0 converts data from field 'charger.power' of type float64 to 'Vehicle.Powertrain.TractionBattery.CurrentPower' of type float64. Vehicle.Powertrain.TractionBattery.CurrentPower: Current electrical energy flowing in/out of battery. Positive = Energy flowing in to battery, e.g. during charging. Negative = Energy flowing out of battery, e.g. during driving. Unit: 'W'

func ToPowertrainTractionBatteryCurrentVoltage0 added in v0.3.4

func ToPowertrainTractionBatteryCurrentVoltage0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTractionBatteryCurrentVoltage0 converts data from field 'hvBatteryVoltage' of type float64 to 'Vehicle.Powertrain.TractionBattery.CurrentVoltage' of type float64. Vehicle.Powertrain.TractionBattery.CurrentVoltage: Current Voltage of the battery. Unit: 'V'

func ToPowertrainTractionBatteryGrossCapacity0

func ToPowertrainTractionBatteryGrossCapacity0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTractionBatteryGrossCapacity0 converts data from field 'batteryCapacity' of type float64 to 'Vehicle.Powertrain.TractionBattery.GrossCapacity' of type float64. Vehicle.Powertrain.TractionBattery.GrossCapacity: Gross capacity of the battery. Unit: 'kWh'

func ToPowertrainTractionBatteryStateOfChargeCurrent0

func ToPowertrainTractionBatteryStateOfChargeCurrent0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTractionBatteryStateOfChargeCurrent0 converts data from field 'soc' of type float64 to 'Vehicle.Powertrain.TractionBattery.StateOfCharge.Current' of type float64. Vehicle.Powertrain.TractionBattery.StateOfCharge.Current: 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. Unit: 'percent' Min: '0' Max: '100.0'

func ToPowertrainTractionBatteryTemperatureAverage0

func ToPowertrainTractionBatteryTemperatureAverage0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTractionBatteryTemperatureAverage0 converts data from field 'hvBatteryCoolantTemperature' of type float64 to 'Vehicle.Powertrain.TractionBattery.Temperature.Average' of type float64. Vehicle.Powertrain.TractionBattery.Temperature.Average: Current average temperature of the battery cells. Unit: 'celsius'

func ToPowertrainTransmissionCurrentGear0 added in v0.3.1

func ToPowertrainTransmissionCurrentGear0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTransmissionCurrentGear0 converts data from field 'gearSelection' of type float64 to 'Vehicle.Powertrain.Transmission.CurrentGear' of type float64. Vehicle.Powertrain.Transmission.CurrentGear: The current gear. 0=Neutral, 1/2/..=Forward, -1/-2/..=Reverse.

func ToPowertrainTransmissionTemperature0 added in v0.3.2

func ToPowertrainTransmissionTemperature0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTransmissionTemperature0 converts data from field 'atfTemperature' of type float64 to 'Vehicle.Powertrain.Transmission.Temperature' of type float64. Vehicle.Powertrain.Transmission.Temperature: The current gearbox temperature. Unit: 'celsius'

func ToPowertrainTransmissionTravelledDistance0

func ToPowertrainTransmissionTravelledDistance0(originalDoc []byte, val float64) (float64, error)

ToPowertrainTransmissionTravelledDistance0 converts data from field 'odometer' of type float64 to 'Vehicle.Powertrain.Transmission.TravelledDistance' of type float64. Vehicle.Powertrain.Transmission.TravelledDistance: Odometer reading, total distance travelled during the lifetime of the transmission. Unit: 'km'

func ToPowertrainType0

func ToPowertrainType0(originalDoc []byte, val string) (string, error)

ToPowertrainType0 converts data from field 'fuelType' of type string to 'Vehicle.Powertrain.Type' of type string. Vehicle.Powertrain.Type: Defines the powertrain type of the vehicle.

func ToServiceDistanceToService0 added in v0.3.4

func ToServiceDistanceToService0(originalDoc []byte, val float64) (float64, error)

ToServiceDistanceToService0 converts data from field 'serviceInterval' of type float64 to 'Vehicle.Service.DistanceToService' of type float64. Vehicle.Service.DistanceToService: Remaining distance to service (of any kind). Negative values indicate service overdue. Unit: 'km'

func ToSpeed0

func ToSpeed0(originalDoc []byte, val float64) (float64, error)

ToSpeed0 converts data from field 'vehicleSpeed' of type float64 to 'Vehicle.Speed' of type float64. Vehicle.Speed: Vehicle speed. Unit: 'km/h'

func ToSpeed1

func ToSpeed1(originalDoc []byte, val float64) (float64, error)

ToSpeed1 converts data from field 'speed' of type float64 to 'Vehicle.Speed' of type float64. Vehicle.Speed: Vehicle speed. Unit: 'km/h'

func TokenIDFromData

func TokenIDFromData(jsonData []byte) (uint32, error)

TokenIDFromData gets a tokenID from a V2 payload.

func TokenIDFromV1Data

func TokenIDFromV1Data(ctx context.Context, jsonData []byte, tokenGetter TokenIDGetter) (uint32, error)

TokenIDFromV1Data gets a tokenID from a v1 payload. attempts to get the tokenID from the vehicleTokenId field. If the field is not found and tokenGetter is not nil it will attempt to get the tokenId using the subject field and the tokenGetter.

Types

type TokenIDGetter

type TokenIDGetter interface {
	TokenIDFromSubject(ctx context.Context, subject string) (uint32, error)
}

TokenIDGetter is an interface to get a tokenID from a subject.

Directories

Path Synopsis
Package schema information for converting native dimo status objects
Package schema information for converting native dimo status objects

Jump to

Keyboard shortcuts

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