ruptela

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ruptela provides a funcions for managing Ruptela payloads.

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

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

Index

Constants

This section is empty.

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 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 Convert114

func Convert114(rawValue string) (float64, error)

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

func Convert207

func Convert207(rawValue string) (float64, error)

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

func Convert30

func Convert30(rawValue string) (float64, error)

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

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 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 CurrentLocationAltitudeFromV1Data

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

CurrentLocationAltitudeFromV1Data 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 CurrentLocationLongitudeFromV1Data

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

CurrentLocationLongitudeFromV1Data 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 DIMOAftermarketNSATFromV1Data

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

DIMOAftermarketNSATFromV1Data converts the given JSON data to a float64.

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 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 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 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 PowertrainRangeFromV1Data

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

PowertrainRangeFromV1Data 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 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 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(jsonData []byte) ([]vss.Signal, error)

SignalsFromV1Payload gets a slice signals from a v1 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 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 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 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 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 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 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 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.30' of type string to 'Vehicle.LowVoltageBattery.CurrentVoltage' of type float64. Vehicle.LowVoltageBattery.CurrentVoltage: Current Voltage of the low voltage battery. Unit: 'V'

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 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 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 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 ToPowertrainRange0

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

ToPowertrainRange0 converts data from field 'signals.723' of type string 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 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 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 TokenIDFromData

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

TokenIDFromData gets a tokenID from a V2 payload.

Types

This section is empty.

Jump to

Keyboard shortcuts

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