vss

package
v0.2.18 Latest Latest
Warning

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

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

Documentation

Overview

Package vss holds the data structures and functions for working with signals from DIMOs VSS schema.

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

Index

Constants

View Source
const (
	// TableName is the name of the distributed table in Clickhouse.
	TableName = "signal"

	// TokenIDCol is the name of the token_id column in Clickhouse.
	TokenIDCol = "token_id"
	// TimestampCol is the name of the timestamp column in Clickhouse.
	TimestampCol = "timestamp"
	// SourceCol is the name of the source column in Clickhouse.
	SourceCol = "source"
	// NameCol is the name of the name column in Clickhouse.
	NameCol = "name"
	// ValueNumberCol is the name of the value_number column in Clickhouse.
	ValueNumberCol = "value_number"
	// ValueStringCol is the name of the value_string column in Clickhouse.
	ValueStringCol = "value_string"
)
View Source
const (
	// FieldChassisAxleRow1WheelLeftTirePressure Tire pressure in kilo-Pascal.
	FieldChassisAxleRow1WheelLeftTirePressure = "chassisAxleRow1WheelLeftTirePressure"
	// FieldChassisAxleRow1WheelRightTirePressure Tire pressure in kilo-Pascal.
	FieldChassisAxleRow1WheelRightTirePressure = "chassisAxleRow1WheelRightTirePressure"
	// FieldChassisAxleRow2WheelLeftTirePressure Tire pressure in kilo-Pascal.
	FieldChassisAxleRow2WheelLeftTirePressure = "chassisAxleRow2WheelLeftTirePressure"
	// FieldChassisAxleRow2WheelRightTirePressure Tire pressure in kilo-Pascal.
	FieldChassisAxleRow2WheelRightTirePressure = "chassisAxleRow2WheelRightTirePressure"
	// FieldCurrentLocationAltitude Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna.
	FieldCurrentLocationAltitude = "currentLocationAltitude"
	// FieldCurrentLocationIsRedacted Indicates if the latitude and longitude signals at the current timestamp have been redacted using a privacy zone.
	FieldCurrentLocationIsRedacted = "currentLocationIsRedacted"
	// FieldCurrentLocationLatitude Current latitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.
	FieldCurrentLocationLatitude = "currentLocationLatitude"
	// FieldCurrentLocationLongitude Current longitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.
	FieldCurrentLocationLongitude = "currentLocationLongitude"
	// FieldDIMOAftermarketHDOP Horizontal dilution of precision of GPS
	FieldDIMOAftermarketHDOP = "dimoAftermarketHDOP"
	// FieldDIMOAftermarketNSAT Number of sync satellites for GPS
	FieldDIMOAftermarketNSAT = "dimoAftermarketNSAT"
	// FieldDIMOAftermarketSSID Service Set Identifier for the wifi.
	FieldDIMOAftermarketSSID = "dimoAftermarketSSID"
	// FieldDIMOAftermarketWPAState Indicate the current WPA state for the device's wifi
	FieldDIMOAftermarketWPAState = "dimoAftermarketWPAState"
	// FieldExteriorAirTemperature Air temperature outside the vehicle.
	FieldExteriorAirTemperature = "exteriorAirTemperature"
	// FieldLowVoltageBatteryCurrentVoltage Current Voltage of the low voltage battery.
	FieldLowVoltageBatteryCurrentVoltage = "lowVoltageBatteryCurrentVoltage"
	// FieldOBDBarometricPressure PID 33 - Barometric pressure
	FieldOBDBarometricPressure = "obdBarometricPressure"
	// FieldOBDCommandedEGR PID 2C - Commanded exhaust gas recirculation (EGR)
	FieldOBDCommandedEGR = "obdCommandedEGR"
	// FieldOBDDistanceSinceDTCClear PID 31 - Distance traveled since codes cleared
	FieldOBDDistanceSinceDTCClear = "obdDistanceSinceDTCClear"
	// FieldOBDDistanceWithMIL PID 21 - Distance traveled with MIL on
	FieldOBDDistanceWithMIL = "obdDistanceWithMIL"
	// FieldOBDEngineLoad PID 04 - Engine load in percent - 0 = no load, 100 = full load
	FieldOBDEngineLoad = "obdEngineLoad"
	// FieldOBDIntakeTemp PID 0F - Intake temperature
	FieldOBDIntakeTemp = "obdIntakeTemp"
	// FieldOBDLongTermFuelTrim1 PID 07 - Long Term (learned) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer
	FieldOBDLongTermFuelTrim1 = "obdLongTermFuelTrim1"
	// FieldOBDMAP PID 0B - Intake manifold pressure
	FieldOBDMAP = "obdMAP"
	// FieldOBDRunTime PID 1F - Engine run time
	FieldOBDRunTime = "obdRunTime"
	// FieldOBDShortTermFuelTrim1 PID 06 - Short Term (immediate) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer
	FieldOBDShortTermFuelTrim1 = "obdShortTermFuelTrim1"
	// FieldOBDWarmupsSinceDTCClear PID 30 - Number of warm-ups since codes cleared
	FieldOBDWarmupsSinceDTCClear = "obdWarmupsSinceDTCClear"
	// FieldPowertrainCombustionEngineECT Engine coolant temperature.
	FieldPowertrainCombustionEngineECT = "powertrainCombustionEngineECT"
	// FieldPowertrainCombustionEngineEngineOilLevel Engine oil level.
	FieldPowertrainCombustionEngineEngineOilLevel = "powertrainCombustionEngineEngineOilLevel"
	// FieldPowertrainCombustionEngineEngineOilRelativeLevel Engine oil level as a percentage.
	FieldPowertrainCombustionEngineEngineOilRelativeLevel = "powertrainCombustionEngineEngineOilRelativeLevel"
	// FieldPowertrainCombustionEngineMAF Grams of air drawn into engine per second.
	FieldPowertrainCombustionEngineMAF = "powertrainCombustionEngineMAF"
	// FieldPowertrainCombustionEngineSpeed Engine speed measured as rotations per minute.
	FieldPowertrainCombustionEngineSpeed = "powertrainCombustionEngineSpeed"
	// FieldPowertrainCombustionEngineTPS Current throttle position.
	FieldPowertrainCombustionEngineTPS = "powertrainCombustionEngineTPS"
	// FieldPowertrainFuelSystemAbsoluteLevel Current available fuel in the fuel tank expressed in liters.
	FieldPowertrainFuelSystemAbsoluteLevel = "powertrainFuelSystemAbsoluteLevel"
	// FieldPowertrainFuelSystemRelativeLevel Level in fuel tank as percent of capacity. 0 = empty. 100 = full.
	FieldPowertrainFuelSystemRelativeLevel = "powertrainFuelSystemRelativeLevel"
	// FieldPowertrainFuelSystemSupportedFuelTypes High level information of fuel types supported
	FieldPowertrainFuelSystemSupportedFuelTypes = "powertrainFuelSystemSupportedFuelTypes"
	// FieldPowertrainRange Remaining range in meters using all energy sources available in the vehicle.
	FieldPowertrainRange = "powertrainRange"
	// FieldPowertrainTractionBatteryChargingChargeLimit Target charge limit (state of charge) for battery.
	FieldPowertrainTractionBatteryChargingChargeLimit = "powertrainTractionBatteryChargingChargeLimit"
	// FieldPowertrainTractionBatteryChargingIsCharging True if charging is ongoing. Charging is considered to be ongoing if energy is flowing from charger to vehicle.
	FieldPowertrainTractionBatteryChargingIsCharging = "powertrainTractionBatteryChargingIsCharging"
	// FieldPowertrainTractionBatteryCurrentPower 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.
	FieldPowertrainTractionBatteryCurrentPower = "powertrainTractionBatteryCurrentPower"
	// FieldPowertrainTractionBatteryGrossCapacity Gross capacity of the battery.
	FieldPowertrainTractionBatteryGrossCapacity = "powertrainTractionBatteryGrossCapacity"
	// FieldPowertrainTractionBatteryStateOfChargeCurrent Physical state of charge of the high voltage battery, relative to net capacity. This is not necessarily the state of charge being displayed to the customer.
	FieldPowertrainTractionBatteryStateOfChargeCurrent = "powertrainTractionBatteryStateOfChargeCurrent"
	// FieldPowertrainTransmissionTravelledDistance Odometer reading, total distance travelled during the lifetime of the transmission.
	FieldPowertrainTransmissionTravelledDistance = "powertrainTransmissionTravelledDistance"
	// FieldPowertrainType Defines the powertrain type of the vehicle.
	FieldPowertrainType = "powertrainType"
	// FieldSpeed Vehicle speed.
	FieldSpeed = "speed"
)

Variables

This section is empty.

Functions

func SignalColNames

func SignalColNames() []string

SignalColNames returns the column names of the Signal struct.

func SignalToSlice

func SignalToSlice(obj Signal) []any

SignalToSlice converts a Signal to an array of any for Clickhouse insertion. The order of the elements in the array is guaranteed to match the order of elements in the `SignalColNames`.

Types

type Signal

type Signal struct {
	// TokenID is the unique identifier of the device.
	TokenID uint32 `ch:"token_id" json:"tokenId"`

	// Timestamp is when this data was collected.
	Timestamp time.Time `ch:"timestamp" json:"timestamp"`

	// Name is the name of the signal collected.
	Name string `ch:"name" json:"name"`

	// ValueNumber is the value of the signal collected.
	ValueNumber float64 `ch:"value_number" json:"valueNumber"`

	// ValueString is the value of the signal collected.
	ValueString string `ch:"value_string" json:"valueString"`

	// Source is the source of the signal collected.
	Source string `ch:"source" json:"source"`
}

Signal represents a single signal collected from a device. This is the data format that is stored in the database.

func (*Signal) SetValue

func (s *Signal) SetValue(val any)

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

Directories

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

Jump to

Keyboard shortcuts

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