ruptela

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

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.

Code generated by github.com/DIMO-Network/pkg/ruptela/codegen DO NOT EDIT.

Index

Constants

View Source
const (
	EventNameHarshBraking   = "HarshBraking"
	EventNameExtremeBraking = "ExtremeBraking"
	EventNameAcceleration   = "HarshAcceleration"
	EventNameCornering      = "HarshCornering"
)
View Source
const (
	// StatusEventDS is the data version for status events.
	StatusEventDS = "r/v0/s"
	// DevStatusDS is the data version for device status events.
	DevStatusDS = "r/v0/dev"
	// LocationEventDS is the data version for location events.
	LocationEventDS = "r/v0/loc"
	// DTCEventDS is the data version for DTC events.
	DTCEventDS = "r/v0/dtc"
)

Variables

This section is empty.

Functions

func ChassisAxleRow1WheelLeftTirePressureFromV1Data

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

ChassisAxleRow1WheelLeftTirePressureFromV1Data 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 ChassisAxleRow2WheelLeftTirePressureFromV1Data

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

ChassisAxleRow2WheelLeftTirePressureFromV1Data 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 Convert29 added in v0.3.3

func Convert29(rawValue string) (float64, error)

Convert29 converts the given raw value to a float64. Unit: 'mV' Min: '0' Max: '65535'.

func Convert94 added in v0.3.3

func Convert94(rawValue string) (float64, error)

Convert94 converts the given raw value to a float64. Unit: 'RPM' Min: '0' Max: '65,535'.

func Convert95

func Convert95(rawValue string) (float64, error)

Convert95 converts the given raw value to a float64. Unit: 'km/h' Min: '0' Max: '255'.

func Convert96

func Convert96(rawValue string) (float64, error)

Convert96 converts the given raw value to a float64. Unit: '°C' Min: '0' Max: '255'.

func Convert97

func Convert97(rawValue string) (float64, error)

Convert97 converts the given raw value to a float64. Unit: '°C' Min: '0' Max: '255'.

func Convert98

func Convert98(rawValue string) (float64, error)

Convert98 converts the given raw value to a float64. Unit: '%' Min: '0' Max: '255'.

func Convert99

func Convert99(rawValue string) (float64, error)

Convert99 converts the given raw value to a float64. Unit: '-'.

func Convert102

func Convert102(rawValue string) (float64, error)

Convert102 converts the given raw value to a float64. Unit: 'km' Min: '0' Max: '65535'.

func Convert103

func Convert103(rawValue string) (float64, error)

Convert103 converts the given raw value to a float64. Unit: '%' Min: '0' Max: '255'.

func Convert107

func Convert107(rawValue string) (float64, error)

Convert107 converts the given raw value to a float64. Min: '0' Max: '65535'.

func Convert108 added in v0.6.7

func Convert108(rawValue string) (float64, error)

Convert108 converts the given raw value to a float64. Unit: '-' Min: '0'.

func Convert114

func Convert114(rawValue string) (float64, error)

Convert114 converts the given raw value to a float64. Unit: 'm' Min: '0' Max: '4211081215'.

func Convert205 added in v0.3.3

func Convert205(rawValue string) (float64, error)

Convert205 converts the given raw value to a float64. Unit: 'l' Min: '0' Max: '65535'.

func Convert207

func Convert207(rawValue string) (float64, error)

Convert207 converts the given raw value to a float64. Unit: '%' Min: '0' Max: '250'.

func Convert483

func Convert483(rawValue string) (float64, error)

Convert483 converts the given raw value to a float64. Unit: '-' Min: '0' Max: '250'.

func Convert642

func Convert642(rawValue string) (float64, error)

Convert642 converts the given raw value to a float64. Unit: 'l' Min: '0' Max: '0xFFFF or 65535'.

func Convert645

func Convert645(rawValue string) (float64, error)

Convert645 converts the given raw value to a float64. Unit: 'km' Min: '0' Max: '0xFFFFFFFF'.

func Convert722

func Convert722(rawValue string) (float64, error)

Convert722 converts the given raw value to a float64. Unit: '%' Min: '0' Max: '255'.

func Convert723

func Convert723(rawValue string) (float64, error)

Convert723 converts the given raw value to a float64. Unit: 'km' Min: '0' Max: '65535'.

func Convert950 added in v0.7.4

func Convert950(rawValue string) (float64, error)

Convert950 converts the given raw value to a float64. Unit: '%' Min: '0' Max: '10000'.

func Convert960 added in v0.3.3

func Convert960(rawValue string) (float64, error)

Convert960 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert961 added in v0.3.3

func Convert961(rawValue string) (float64, error)

Convert961 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert962 added in v0.3.3

func Convert962(rawValue string) (float64, error)

Convert962 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert963 added in v0.3.3

func Convert963(rawValue string) (float64, error)

Convert963 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert964 added in v0.3.3

func Convert964(rawValue string) (float64, error)

Convert964 converts the given raw value to a float64. Unit: '%' Min: '0' Max: '254'.

func Convert965 added in v0.6.1

func Convert965(rawValue string) (float64, error)

Convert965 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert966 added in v0.6.1

func Convert966(rawValue string) (float64, error)

Convert966 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert967 added in v0.6.1

func Convert967(rawValue string) (float64, error)

Convert967 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert968 added in v0.6.1

func Convert968(rawValue string) (float64, error)

Convert968 converts the given raw value to a float64. Unit: 'PSI' Min: '0' Max: '65534'.

func Convert1148 added in v0.4.0

func Convert1148(rawValue string) (float64, error)

Convert1148 converts the given raw value to a float64. Unit: 'liters' Min: '0' Max: '254'.

func Convert1149 added in v0.4.0

func Convert1149(rawValue string) (float64, error)

Convert1149 converts the given raw value to a float64. Unit: 'liters' Min: '0' Max: '254'.

func Convert1150 added in v0.4.0

func Convert1150(rawValue string) (float64, error)

Convert1150 converts the given raw value to a float64. Unit: '%' Min: '0' Max: '250'.

func Convert1190 added in v0.7.4

func Convert1190(rawValue string) (float64, error)

Convert1190 converts the given raw value to a float64. Unit: 'kW' Min: '0' Max: '4294967294'.

func Convert1191 added in v0.7.4

func Convert1191(rawValue string) (float64, error)

Convert1191 converts the given raw value to a float64. Unit: '-' Min: '0' Max: '1'.

func ConvertPSIToKPa added in v0.5.5

func ConvertPSIToKPa(psi float64) float64

ConvertPSIToKPa converts a pressure value from psi to kPa.

func CurrentLocationAltitudeFromLocationData added in v0.3.1

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

CurrentLocationAltitudeFromLocationData 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 CurrentLocationHeadingFromLocationData added in v0.6.8

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

CurrentLocationHeadingFromLocationData converts the given JSON data to a float64.

func CurrentLocationHeadingFromV1Data added in v0.6.8

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

CurrentLocationHeadingFromV1Data converts the given JSON data to a float64.

func CurrentLocationLatitudeFromLocationData added in v0.3.1

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

CurrentLocationLatitudeFromLocationData 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 CurrentLocationLongitudeFromLocationData added in v0.3.1

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

CurrentLocationLongitudeFromLocationData 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 DIMOAftermarketHDOPFromLocationData added in v0.3.1

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

DIMOAftermarketHDOPFromLocationData 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 DIMOAftermarketNSATFromLocationData added in v0.3.1

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

DIMOAftermarketNSATFromLocationData 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 DecodeEvent added in v0.6.3

func DecodeEvent(cEvent cloudevent.RawEvent) ([]vss.Event, error)

EventConvert converts a ruptela event to a vss event.

func DecodeFingerprint added in v0.5.0

func DecodeFingerprint(event cloudevent.RawEvent) (cloudevent.Fingerprint, error)

DecodeFingerprint decodes a fingerprint payload into a FingerprintEvent.

func DecodeStatusSignals added in v0.5.0

func DecodeStatusSignals(event cloudevent.RawEvent) ([]vss.Signal, error)

DecodeStatusSignals decodes a status message into a slice of signals.

func ExteriorAirTemperatureFromV1Data

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

ExteriorAirTemperatureFromV1Data converts the given JSON data to a float64.

func LowVoltageBatteryCurrentVoltageFromV1Data

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

LowVoltageBatteryCurrentVoltageFromV1Data converts the given JSON data to a float64.

func NameFromV2Signal added in v0.3.1

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

NameFromV2Signal gets a name from a V2 signal.

func OBDDTCListFromV1Data added in v0.4.6

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

OBDDTCListFromV1Data converts the given JSON data to a string.

func OBDDistanceWithMILFromV1Data

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

OBDDistanceWithMILFromV1Data 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 OBDStatusDTCCountFromV1Data added in v0.6.7

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

OBDStatusDTCCountFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineDieselExhaustFluidCapacityFromV1Data added in v0.4.0

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

PowertrainCombustionEngineDieselExhaustFluidCapacityFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineDieselExhaustFluidLevelFromV1Data added in v0.4.0

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

PowertrainCombustionEngineDieselExhaustFluidLevelFromV1Data 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 PowertrainCombustionEngineEngineOilLevelFromV1Data

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

PowertrainCombustionEngineEngineOilLevelFromV1Data converts the given JSON data to a string.

func PowertrainCombustionEngineEngineOilRelativeLevelFromV1Data added in v0.3.3

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

PowertrainCombustionEngineEngineOilRelativeLevelFromV1Data converts the given JSON data to a float64.

func PowertrainCombustionEngineSpeedFromV1Data added in v0.3.3

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

PowertrainCombustionEngineSpeedFromV1Data 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 PowertrainFuelSystemAbsoluteLevelFromV1Data

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

PowertrainFuelSystemAbsoluteLevelFromV1Data 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 PowertrainTractionBatteryChargingIsChargingCableConnectedFromV1Data added in v0.7.4

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

PowertrainTractionBatteryChargingIsChargingCableConnectedFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryChargingPowerFromV1Data added in v0.7.4

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

PowertrainTractionBatteryChargingPowerFromV1Data converts the given JSON data to a float64.

func PowertrainTractionBatteryRangeFromV1Data added in v0.4.1

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

PowertrainTractionBatteryRangeFromV1Data 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 PowertrainTractionBatteryStateOfHealthFromV1Data added in v0.7.4

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

PowertrainTractionBatteryStateOfHealthFromV1Data 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 PowertrainTypeFromV1Data

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

PowertrainTypeFromV1Data converts the given JSON data to a string.

func SignalsFromDTCPayload added in v0.5.0

func SignalsFromDTCPayload(event cloudevent.RawEvent) ([]vss.Signal, error)

SignalsFromDTCPayload gets a slice signals from a dtc payload.

func SignalsFromLocationData added in v0.3.1

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

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

func SignalsFromLocationPayload added in v0.3.1

func SignalsFromLocationPayload(event cloudevent.RawEvent) ([]vss.Signal, error)

SignalsFromLocationPayload extracts signals from a V2 payload.

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(event cloudevent.RawEvent) ([]vss.Signal, error)

SignalsFromV1Payload gets a slice signals from a v1 payload.

func SpeedFromLocationData added in v0.3.2

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

SpeedFromLocationData converts the given JSON data to a float64.

func SpeedFromV1Data

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

SpeedFromV1Data converts the given JSON data to a float64.

func TimestampFromLocationSignal added in v0.3.1

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

TimestampFromLocationSignal gets a timestamp from a V2 signal.

func ToAccelerationEvent added in v0.6.3

func ToAccelerationEvent(rawValue string) (vss.Event, error)

func ToBrakingEvents added in v0.6.3

func ToBrakingEvents(rawValue string) ([]vss.Event, error)

func ToChassisAxleRow1WheelLeftTirePressure0

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

ToChassisAxleRow1WheelLeftTirePressure0 converts data from field 'signals.960' of type string 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 added in v0.6.1

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

ToChassisAxleRow1WheelLeftTirePressure1 converts data from field 'signals.965' of type string 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 ToChassisAxleRow1WheelRightTirePressure0

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

ToChassisAxleRow1WheelRightTirePressure0 converts data from field 'signals.961' of type string 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 added in v0.6.1

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

ToChassisAxleRow1WheelRightTirePressure1 converts data from field 'signals.966' of type string 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 string) (float64, error)

ToChassisAxleRow2WheelLeftTirePressure0 converts data from field 'signals.962' of type string 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 added in v0.6.1

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

ToChassisAxleRow2WheelLeftTirePressure1 converts data from field 'signals.967' of type string 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 string) (float64, error)

ToChassisAxleRow2WheelRightTirePressure0 converts data from field 'signals.963' of type string 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 added in v0.6.1

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

ToChassisAxleRow2WheelRightTirePressure1 converts data from field 'signals.968' of type string 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 ToCorneringEvent added in v0.6.3

func ToCorneringEvent(rawValue string) (vss.Event, error)

func ToCurrentLocationAltitude0

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

ToCurrentLocationAltitude0 converts data from field 'pos.alt' 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 ToCurrentLocationHeading0 added in v0.6.8

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

ToCurrentLocationHeading0 converts data from field 'pos.dir' of type float64 to 'Vehicle.CurrentLocation.Heading' of type float64. Vehicle.CurrentLocation.Heading: Current heading relative to geographic north. 0 = North, 90 = East, 180 = South, 270 = West. Unit: 'degrees' Min: '0' Max: '360'

func ToCurrentLocationLatitude0

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

ToCurrentLocationLatitude0 converts data from field 'pos.lat' 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 'pos.lon' 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 'pos.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 'pos.sat' of type float64 to 'Vehicle.DIMO.Aftermarket.NSAT' of type float64. Vehicle.DIMO.Aftermarket.NSAT: Number of sync satellites for GPS

func ToExteriorAirTemperature0

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

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

func ToLowVoltageBatteryCurrentVoltage0

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

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

func ToOBDDTCList0 added in v0.4.6

func ToOBDDTCList0(originalDoc []byte, val any) (string, error)

ToOBDDTCList0 converts data from field 'dtc_codes' of type any to 'Vehicle.OBD.DTCList' of type string. Vehicle.OBD.DTCList: List of currently active DTCs formatted according OBD II (SAE-J2012DA_201812) standard ([P|C|B|U]XXXXX )

func ToOBDDistanceWithMIL0

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

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

func ToOBDRunTime0

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

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

func ToOBDStatusDTCCount0 added in v0.6.7

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

ToOBDStatusDTCCount0 converts data from field 'signals.108' of type string to 'Vehicle.OBD.Status.DTCCount' of type float64. Vehicle.OBD.Status.DTCCount: Number of Diagnostic Trouble Codes (DTC)

func ToPowertrainCombustionEngineDieselExhaustFluidCapacity0 added in v0.4.0

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

ToPowertrainCombustionEngineDieselExhaustFluidCapacity0 converts data from field 'signals.1148' of type string to 'Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Capacity' of type float64. Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Capacity: Capacity in liters of the Diesel Exhaust Fluid Tank. Unit: 'l'

func ToPowertrainCombustionEngineDieselExhaustFluidCapacity1 added in v0.4.0

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

ToPowertrainCombustionEngineDieselExhaustFluidCapacity1 converts data from field 'signals.1149' of type string to 'Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Capacity' of type float64. Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Capacity: Capacity in liters of the Diesel Exhaust Fluid Tank. Unit: 'l'

func ToPowertrainCombustionEngineDieselExhaustFluidLevel0 added in v0.4.0

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

ToPowertrainCombustionEngineDieselExhaustFluidLevel0 converts data from field 'signals.1150' of type string to 'Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Level' of type float64. Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Level: Level of the Diesel Exhaust Fluid tank as percent of capacity. 0 = empty. 100 = full. Unit: 'percent' Min: '0' Max: '100'

func ToPowertrainCombustionEngineECT0

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

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

func ToPowertrainCombustionEngineEngineOilLevel0

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

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

func ToPowertrainCombustionEngineEngineOilRelativeLevel0 added in v0.3.3

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

ToPowertrainCombustionEngineEngineOilRelativeLevel0 converts data from field 'signals.964' of type string 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 ToPowertrainCombustionEngineSpeed0 added in v0.3.3

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

ToPowertrainCombustionEngineSpeed0 converts data from field 'signals.94' of type string 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 string) (float64, error)

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

func ToPowertrainFuelSystemAbsoluteLevel0

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

ToPowertrainFuelSystemAbsoluteLevel0 converts data from field 'signals.642' of type string 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 ToPowertrainFuelSystemAbsoluteLevel1 added in v0.3.3

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

ToPowertrainFuelSystemAbsoluteLevel1 converts data from field 'signals.205' of type string 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 string) (float64, error)

ToPowertrainFuelSystemRelativeLevel0 converts data from field 'signals.98' of type string 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 string) (float64, error)

ToPowertrainFuelSystemRelativeLevel1 converts data from field 'signals.207' of type string 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 ToPowertrainTractionBatteryChargingIsChargingCableConnected0 added in v0.7.4

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

ToPowertrainTractionBatteryChargingIsChargingCableConnected0 converts data from field 'signals.1191' of type string to 'Vehicle.Powertrain.TractionBattery.Charging.IsChargingCableConnected' of type float64. Vehicle.Powertrain.TractionBattery.Charging.IsChargingCableConnected: Indicates if a charging cable is physically connected to the vehicle or not.

func ToPowertrainTractionBatteryChargingPower0 added in v0.7.4

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

ToPowertrainTractionBatteryChargingPower0 converts data from field 'signals.1190' of type string to 'Vehicle.Powertrain.TractionBattery.Charging.Power' of type float64. Vehicle.Powertrain.TractionBattery.Charging.Power: Instantaneous charging power recorded during a charging event. Unit: 'kW'

func ToPowertrainTractionBatteryRange0 added in v0.4.1

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

ToPowertrainTractionBatteryRange0 converts data from field 'signals.723' of type string to 'Vehicle.Powertrain.TractionBattery.Range' of type float64. Vehicle.Powertrain.TractionBattery.Range: Remaining range in kilometers using only battery. Unit: 'km'

func ToPowertrainTractionBatteryStateOfChargeCurrent0

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

ToPowertrainTractionBatteryStateOfChargeCurrent0 converts data from field 'signals.722' of type string 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 ToPowertrainTractionBatteryStateOfHealth0 added in v0.7.4

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

ToPowertrainTractionBatteryStateOfHealth0 converts data from field 'signals.950' of type string to 'Vehicle.Powertrain.TractionBattery.StateOfHealth' of type float64. Vehicle.Powertrain.TractionBattery.StateOfHealth: Calculated battery state of health at standard conditions. Unit: 'percent' Min: '0' Max: '100'

func ToPowertrainTransmissionTravelledDistance0

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

ToPowertrainTransmissionTravelledDistance0 converts data from field 'signals.645' of type string 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 ToPowertrainTransmissionTravelledDistance1

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

ToPowertrainTransmissionTravelledDistance1 converts data from field 'signals.114' of type string 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 'signals.99' of type string to 'Vehicle.Powertrain.Type' of type string. Vehicle.Powertrain.Type: Defines the powertrain type of the vehicle.

func ToPowertrainType1

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

ToPowertrainType1 converts data from field 'signals.483' of type string to 'Vehicle.Powertrain.Type' of type string. Vehicle.Powertrain.Type: Defines the powertrain type of the vehicle.

func ToSpeed0

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

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

func ToSpeed1 added in v0.3.2

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

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

Types

type CounterMetadata added in v0.6.3

type CounterMetadata struct {
	CounterValue uint `json:"counterValue"`
}

CounterMetadata is the metadata for events with a counter value.

type DataContent added in v0.5.0

type DataContent struct {
	Signals map[string]string `json:"signals"`
}

type Module added in v0.5.0

type Module struct {
	ChainID                 uint64         `json:"chain_id"`
	AftermarketContractAddr common.Address `json:"aftermarket_contract_addr"`
	VehicleContractAddr     common.Address `json:"vehicle_contract_addr"`
}

Module is a module that converts ruptela messages to signals.

func (Module) CloudEventConvert added in v0.5.0

func (m Module) CloudEventConvert(_ context.Context, msgData []byte) ([]cloudevent.CloudEventHeader, []byte, error)

CloudEventConvert converts a message to cloud events.

func (*Module) EventConvert added in v0.6.3

func (*Module) EventConvert(_ context.Context, event cloudevent.RawEvent) ([]vss.Event, error)

EventConvert converts a message to events.

func (*Module) FingerprintConvert added in v0.5.0

func (*Module) FingerprintConvert(_ context.Context, event cloudevent.RawEvent) (cloudevent.Fingerprint, error)

FingerprintConvert converts a message to a fingerprint.

func (*Module) SignalConvert added in v0.5.0

func (*Module) SignalConvert(_ context.Context, event cloudevent.RawEvent) ([]vss.Signal, error)

SignalConvert converts a message to signals.

type RuptelaEvent added in v0.5.0

type RuptelaEvent struct {
	DS             string          `json:"ds"`
	Signature      string          `json:"signature"`
	Time           time.Time       `json:"time"`
	Data           json.RawMessage `json:"data"`
	VehicleTokenID *uint32         `json:"vehicleTokenId"`
	DeviceTokenID  *uint32         `json:"deviceTokenId"`
}

Directories

Path Synopsis
Package schema contains the embedded schema files for the ruptela devices
Package schema contains the embedded schema files for the ruptela devices

Jump to

Keyboard shortcuts

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