Documentation
¶
Overview ¶
Package vss holds the data structures and functions for working with events from DIMOs VSS schema.
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 ¶
const ( // EventTableName is the name of the distributed table in Clickhouse. EventTableName = "event" // EventSubjectCol is the name of the subject column in Clickhouse. EventSubjectCol = "subject" // EventSourceCol is the name of the source column in Clickhouse. EventSourceCol = "source" // EventProducerCol is the name of the producer column in Clickhouse. EventProducerCol = "producer" // EventCloudEventIDCol is the name of the cloud_event_id column in Clickhouse. EventCloudEventIDCol = "cloud_event_id" // EventNameCol is the name of the name column in Clickhouse. EventNameCol = "name" // EventTimestampCol is the name of the timestamp column in Clickhouse. EventTimestampCol = "timestamp" // EventDurationNsCol is the name of the duration_ns column in Clickhouse. EventDurationNsCol = "duration_ns" // EventMetadataCol is the name of the metadata column in Clickhouse. EventMetadataCol = "metadata" // EventTagsCol is the name of the tags column in Clickhouse. EventTagsCol = "tags" // EventTypeCol is the name of the type column in Clickhouse. EventTypeCol = "type" // EventDataVersionCol is the name of the data_version column in Clickhouse. EventDataVersionCol = "data_version" )
const ( // TableName is the name of the distributed table in Clickhouse. TableName = "signal" // SubjectCol is the name of the subject column in ClickHouse. SubjectCol = "subject" // 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" // ProducerCol is the name of the producer column in Clickhouse. ProducerCol = "producer" // CloudEventIDCol is the name of the cloud_event_id column in Clickhouse. CloudEventIDCol = "cloud_event_id" // 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" // ValueLocationCol is the name of the value_location column in Clickhouse. ValueLocationCol = "value_location" )
const ( // FieldAngularVelocityYaw Vehicle rotation rate along Z (vertical). FieldAngularVelocityYaw = "angularVelocityYaw" // FieldBodyLightsIsAirbagWarningOn Indicates whether the airbag/SRS warning telltale is active. FieldBodyLightsIsAirbagWarningOn = "bodyLightsIsAirbagWarningOn" // FieldBodyLockIsLocked Indicates whether the vehicle is locked via the central locking system. True = vehicle locked. False = vehicle unlocked. FieldBodyLockIsLocked = "bodyLockIsLocked" // FieldBodyTrunkFrontIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldBodyTrunkFrontIsOpen = "bodyTrunkFrontIsOpen" // FieldBodyTrunkRearIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldBodyTrunkRearIsOpen = "bodyTrunkRearIsOpen" // FieldCabinDoorRow1DriverSideIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow1DriverSideIsOpen = "cabinDoorRow1DriverSideIsOpen" // FieldCabinDoorRow1DriverSideWindowIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow1DriverSideWindowIsOpen = "cabinDoorRow1DriverSideWindowIsOpen" // FieldCabinDoorRow1PassengerSideIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow1PassengerSideIsOpen = "cabinDoorRow1PassengerSideIsOpen" // FieldCabinDoorRow1PassengerSideWindowIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow1PassengerSideWindowIsOpen = "cabinDoorRow1PassengerSideWindowIsOpen" // FieldCabinDoorRow2DriverSideIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow2DriverSideIsOpen = "cabinDoorRow2DriverSideIsOpen" // FieldCabinDoorRow2DriverSideWindowIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow2DriverSideWindowIsOpen = "cabinDoorRow2DriverSideWindowIsOpen" // FieldCabinDoorRow2PassengerSideIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow2PassengerSideIsOpen = "cabinDoorRow2PassengerSideIsOpen" // FieldCabinDoorRow2PassengerSideWindowIsOpen Is item open or closed? True = Fully or partially open. False = Fully closed. FieldCabinDoorRow2PassengerSideWindowIsOpen = "cabinDoorRow2PassengerSideWindowIsOpen" // FieldCabinSeatRow1DriverSideIsBelted Is the belt engaged. FieldCabinSeatRow1DriverSideIsBelted = "cabinSeatRow1DriverSideIsBelted" // FieldCabinSeatRow1PassengerSideIsBelted Is the belt engaged. FieldCabinSeatRow1PassengerSideIsBelted = "cabinSeatRow1PassengerSideIsBelted" // FieldCabinSeatRow2DriverSideIsBelted Is the belt engaged. FieldCabinSeatRow2DriverSideIsBelted = "cabinSeatRow2DriverSideIsBelted" // FieldCabinSeatRow2MiddleIsBelted Is the belt engaged. FieldCabinSeatRow2MiddleIsBelted = "cabinSeatRow2MiddleIsBelted" // FieldCabinSeatRow2PassengerSideIsBelted Is the belt engaged. FieldCabinSeatRow2PassengerSideIsBelted = "cabinSeatRow2PassengerSideIsBelted" // FieldCabinSeatRow3DriverSideIsBelted Is the belt engaged. FieldCabinSeatRow3DriverSideIsBelted = "cabinSeatRow3DriverSideIsBelted" // FieldCabinSeatRow3PassengerSideIsBelted Is the belt engaged. FieldCabinSeatRow3PassengerSideIsBelted = "cabinSeatRow3PassengerSideIsBelted" // FieldChassisAxleRow1WheelLeftSpeed Rotational speed of a vehicle's wheel. FieldChassisAxleRow1WheelLeftSpeed = "chassisAxleRow1WheelLeftSpeed" // FieldChassisAxleRow1WheelLeftTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow1WheelLeftTirePressure = "chassisAxleRow1WheelLeftTirePressure" // FieldChassisAxleRow1WheelRightSpeed Rotational speed of a vehicle's wheel. FieldChassisAxleRow1WheelRightSpeed = "chassisAxleRow1WheelRightSpeed" // FieldChassisAxleRow1WheelRightTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow1WheelRightTirePressure = "chassisAxleRow1WheelRightTirePressure" // FieldChassisAxleRow2WheelLeftTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow2WheelLeftTirePressure = "chassisAxleRow2WheelLeftTirePressure" // FieldChassisAxleRow2WheelRightTirePressure Tire pressure in kilo-Pascal. FieldChassisAxleRow2WheelRightTirePressure = "chassisAxleRow2WheelRightTirePressure" // FieldChassisAxleRow3Weight Measured Load on axle row 3. FieldChassisAxleRow3Weight = "chassisAxleRow3Weight" // FieldChassisAxleRow4Weight Measured Load on axle row 3. FieldChassisAxleRow4Weight = "chassisAxleRow4Weight" // FieldChassisAxleRow5Weight Measured Load on axle row 3. FieldChassisAxleRow5Weight = "chassisAxleRow5Weight" // FieldChassisBrakeABSIsWarningOn Indicates whether the ABS warning telltale is active (any non-off state). FieldChassisBrakeABSIsWarningOn = "chassisBrakeABSIsWarningOn" // FieldChassisBrakeCircuit1PressurePrimary Pneumatic pressure in the service brake circuit or reservoir FieldChassisBrakeCircuit1PressurePrimary = "chassisBrakeCircuit1PressurePrimary" // FieldChassisBrakeCircuit2PressurePrimary Pneumatic pressure in the service brake circuit or reservoir FieldChassisBrakeCircuit2PressurePrimary = "chassisBrakeCircuit2PressurePrimary" // FieldChassisBrakeIsPedalPressed Indicates whether the brake pedal is pressed. FieldChassisBrakeIsPedalPressed = "chassisBrakeIsPedalPressed" // FieldChassisBrakePedalPosition Brake pedal position as percent. 0 = Not depressed. 100 = Fully depressed. FieldChassisBrakePedalPosition = "chassisBrakePedalPosition" // FieldChassisParkingBrakeIsEngaged Parking brake status. True = Parking Brake is Engaged. False = Parking Brake is not Engaged. FieldChassisParkingBrakeIsEngaged = "chassisParkingBrakeIsEngaged" // FieldChassisTireSystemIsWarningOn Indicates whether the tire system warning telltale is active FieldChassisTireSystemIsWarningOn = "chassisTireSystemIsWarningOn" // FieldConnectivityCellularIsJammingDetected Indicates whether cellular radio signal jamming or interference is detected that prevents normal communication. FieldConnectivityCellularIsJammingDetected = "connectivityCellularIsJammingDetected" // FieldCurrentLocationAltitude Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna. FieldCurrentLocationAltitude = "currentLocationAltitude" // FieldCurrentLocationCoordinates Current location of the vehicle in WGS 84 coordinates. FieldCurrentLocationCoordinates = "currentLocationCoordinates" // FieldCurrentLocationHeading Current heading relative to geographic north. 0 = North, 90 = East, 180 = South, 270 = West. FieldCurrentLocationHeading = "currentLocationHeading" // FieldExteriorAirTemperature Air temperature outside the vehicle. FieldExteriorAirTemperature = "exteriorAirTemperature" // FieldIsIgnitionOn Vehicle ignition status. False - off, True - on. FieldIsIgnitionOn = "isIgnitionOn" // 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" // FieldOBDCommandedEVAP PID 2E - Commanded evaporative purge (EVAP) valve FieldOBDCommandedEVAP = "obdCommandedEVAP" // FieldOBDDTCList List of currently active DTCs formatted according OBD II (SAE-J2012DA_201812) standard ([P|C|B|U]XXXXX ) FieldOBDDTCList = "obdDTCList" // 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" // FieldOBDEthanolPercent PID 52 - Percentage of ethanol in the fuel FieldOBDEthanolPercent = "obdEthanolPercent" // FieldOBDFuelPressure PID 0A - Fuel pressure FieldOBDFuelPressure = "obdFuelPressure" // FieldOBDFuelRailPressure Fuel rail pressure from OBD. Uses PID 0x22 (fuel rail pressure relative to manifold vacuum) when available, otherwise falls back to PID 0x23 (fuel rail pressure direct injection). FieldOBDFuelRailPressure = "obdFuelRailPressure" // FieldOBDFuelRate PID 5E - Engine fuel rate FieldOBDFuelRate = "obdFuelRate" // FieldOBDFuelTypeName Fuel type names decoded from PID 51. FieldOBDFuelTypeName = "obdFuelTypeName" // FieldOBDIntakeTemp PID 0F - Intake temperature FieldOBDIntakeTemp = "obdIntakeTemp" // FieldOBDIsEngineBlocked Engine block status, 0 = engine unblocked, 1 = engine blocked FieldOBDIsEngineBlocked = "obdIsEngineBlocked" // FieldOBDIsPTOActive PID 1E - Auxiliary input status (power take off) FieldOBDIsPTOActive = "obdIsPTOActive" // FieldOBDIsPluggedIn Aftermarket device plugged in status. 1 = device plugged in, 0 = device unplugged. FieldOBDIsPluggedIn = "obdIsPluggedIn" // FieldOBDLongTermFuelTrim1 PID 07 - Long Term (learned) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer FieldOBDLongTermFuelTrim1 = "obdLongTermFuelTrim1" // FieldOBDLongTermFuelTrim2 PID 09 - Long Term (learned) Fuel Trim - Bank 2 - negative percent leaner, positive percent richer FieldOBDLongTermFuelTrim2 = "obdLongTermFuelTrim2" // FieldOBDMAP PID 0B - Intake manifold pressure FieldOBDMAP = "obdMAP" // FieldOBDMaxMAF PID 50 - Maximum flow for mass air flow sensor FieldOBDMaxMAF = "obdMaxMAF" // FieldOBDO2WRSensor1Voltage PID 2x (byte CD) - Voltage for wide range/band oxygen sensor FieldOBDO2WRSensor1Voltage = "obdO2WRSensor1Voltage" // FieldOBDO2WRSensor2Voltage PID 2x (byte CD) - Voltage for wide range/band oxygen sensor FieldOBDO2WRSensor2Voltage = "obdO2WRSensor2Voltage" // FieldOBDOilTemperature PID 5C - Engine oil temperature FieldOBDOilTemperature = "obdOilTemperature" // 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" // FieldOBDStatusDTCCount Number of Diagnostic Trouble Codes (DTC) FieldOBDStatusDTCCount = "obdStatusDTCCount" // FieldOBDThrottlePosition PID 11 - Throttle position - 0 = closed throttle, 100 = open throttle FieldOBDThrottlePosition = "obdThrottlePosition" // FieldOBDWarmupsSinceDTCClear PID 30 - Number of warm-ups since codes cleared FieldOBDWarmupsSinceDTCClear = "obdWarmupsSinceDTCClear" // FieldPowertrainCombustionEngineDieselExhaustFluidCapacity Capacity in liters of the Diesel Exhaust Fluid Tank. FieldPowertrainCombustionEngineDieselExhaustFluidCapacity = "powertrainCombustionEngineDieselExhaustFluidCapacity" // FieldPowertrainCombustionEngineDieselExhaustFluidLevel Level of the Diesel Exhaust Fluid tank as percent of capacity. 0 = empty. 100 = full. FieldPowertrainCombustionEngineDieselExhaustFluidLevel = "powertrainCombustionEngineDieselExhaustFluidLevel" // FieldPowertrainCombustionEngineECT Engine coolant temperature. FieldPowertrainCombustionEngineECT = "powertrainCombustionEngineECT" // FieldPowertrainCombustionEngineEOP Engine oil pressure. FieldPowertrainCombustionEngineEOP = "powertrainCombustionEngineEOP" // FieldPowertrainCombustionEngineEOT Engine oil temperature. FieldPowertrainCombustionEngineEOT = "powertrainCombustionEngineEOT" // 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" // FieldPowertrainCombustionEngineTorque Current engine torque. Shall be reported as 0 during engine breaking. FieldPowertrainCombustionEngineTorque = "powertrainCombustionEngineTorque" // FieldPowertrainCombustionEngineTorquePercent Actual engine output torque as a percentage of reference engine torque (FMS / J1939 parameter SPN 513). FieldPowertrainCombustionEngineTorquePercent = "powertrainCombustionEngineTorquePercent" // FieldPowertrainFuelSystemAbsoluteLevel Current available fuel in the fuel tank expressed in liters. FieldPowertrainFuelSystemAbsoluteLevel = "powertrainFuelSystemAbsoluteLevel" // FieldPowertrainFuelSystemAccumulatedConsumption Accumulated fuel consumption (totalized) reported by the vehicle (FMS SPN 250). FieldPowertrainFuelSystemAccumulatedConsumption = "powertrainFuelSystemAccumulatedConsumption" // 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 kilometers using all energy sources available in the vehicle. FieldPowertrainRange = "powertrainRange" // FieldPowertrainTractionBatteryChargingAddedEnergy Amount of charge added to the high voltage battery during the current charging session, expressed in kilowatt-hours. FieldPowertrainTractionBatteryChargingAddedEnergy = "powertrainTractionBatteryChargingAddedEnergy" // FieldPowertrainTractionBatteryChargingChargeCurrentAC Current AC charging current (rms) at inlet. Negative if returning energy to grid. Used when per-phase numbers are unavailable. FieldPowertrainTractionBatteryChargingChargeCurrentAC = "powertrainTractionBatteryChargingChargeCurrentAC" // FieldPowertrainTractionBatteryChargingChargeLimit Target charge limit (state of charge) for battery. FieldPowertrainTractionBatteryChargingChargeLimit = "powertrainTractionBatteryChargingChargeLimit" // FieldPowertrainTractionBatteryChargingChargeVoltageUnknownType Current charging voltage at inlet. Used when the data source does not indicate the current type (AC or DC) in use. FieldPowertrainTractionBatteryChargingChargeVoltageUnknownType = "powertrainTractionBatteryChargingChargeVoltageUnknownType" // FieldPowertrainTractionBatteryChargingIsCharging True if charging is ongoing. Charging is considered to be ongoing if energy is flowing from charger to vehicle. FieldPowertrainTractionBatteryChargingIsCharging = "powertrainTractionBatteryChargingIsCharging" // FieldPowertrainTractionBatteryChargingIsChargingCableConnected Indicates if a charging cable is physically connected to the vehicle or not. FieldPowertrainTractionBatteryChargingIsChargingCableConnected = "powertrainTractionBatteryChargingIsChargingCableConnected" // FieldPowertrainTractionBatteryChargingPower Instantaneous charging power recorded during a charging event. FieldPowertrainTractionBatteryChargingPower = "powertrainTractionBatteryChargingPower" // 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" // FieldPowertrainTractionBatteryCurrentVoltage Current Voltage of the battery. FieldPowertrainTractionBatteryCurrentVoltage = "powertrainTractionBatteryCurrentVoltage" // FieldPowertrainTractionBatteryGrossCapacity Gross capacity of the battery. FieldPowertrainTractionBatteryGrossCapacity = "powertrainTractionBatteryGrossCapacity" // FieldPowertrainTractionBatteryRange Remaining range in kilometers using only battery. FieldPowertrainTractionBatteryRange = "powertrainTractionBatteryRange" // 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" // FieldPowertrainTractionBatteryStateOfChargeCurrentEnergy Physical state of charge of high voltage battery expressed in kWh. FieldPowertrainTractionBatteryStateOfChargeCurrentEnergy = "powertrainTractionBatteryStateOfChargeCurrentEnergy" // FieldPowertrainTractionBatteryStateOfHealth Calculated battery state of health at standard conditions. FieldPowertrainTractionBatteryStateOfHealth = "powertrainTractionBatteryStateOfHealth" // FieldPowertrainTractionBatteryTemperatureAverage Current average temperature of the battery cells. FieldPowertrainTractionBatteryTemperatureAverage = "powertrainTractionBatteryTemperatureAverage" // FieldPowertrainTransmissionActualGear Actual transmission gear currently engaged. 0 = neutral, 1-15 = gear number. FieldPowertrainTransmissionActualGear = "powertrainTransmissionActualGear" // FieldPowertrainTransmissionActualGearRatio Actual transmission gear ratio. FieldPowertrainTransmissionActualGearRatio = "powertrainTransmissionActualGearRatio" // FieldPowertrainTransmissionCurrentGear The current gear. 0=Neutral, 1/2/..=Forward, -1/-2/..=Reverse. FieldPowertrainTransmissionCurrentGear = "powertrainTransmissionCurrentGear" // FieldPowertrainTransmissionIsClutchSwitchOperated Indicates if the Clutch switch is operated, so engine and transmission are partially or fully decoupled. False = Clutch switch not operated. True = Clutch switch operated. FieldPowertrainTransmissionIsClutchSwitchOperated = "powertrainTransmissionIsClutchSwitchOperated" // FieldPowertrainTransmissionRetarderActualTorque Actual retarder torque as a percentage (FMS / J1939 SPN 520). FieldPowertrainTransmissionRetarderActualTorque = "powertrainTransmissionRetarderActualTorque" // FieldPowertrainTransmissionRetarderTorqueMode Active engine torque mode. FieldPowertrainTransmissionRetarderTorqueMode = "powertrainTransmissionRetarderTorqueMode" // FieldPowertrainTransmissionSelectedGear The selected gear. 0=Neutral, 1/2/..=Forward, -1/-2/..=Reverse, 126=Park. FieldPowertrainTransmissionSelectedGear = "powertrainTransmissionSelectedGear" // FieldPowertrainTransmissionTemperature The current gearbox temperature. FieldPowertrainTransmissionTemperature = "powertrainTransmissionTemperature" // FieldPowertrainTransmissionTravelledDistance Odometer reading, total distance travelled during the lifetime of the transmission. FieldPowertrainTransmissionTravelledDistance = "powertrainTransmissionTravelledDistance" // FieldPowertrainType Defines the powertrain type of the vehicle. FieldPowertrainType = "powertrainType" // FieldServiceDistanceToService Remaining distance to service (of any kind). Negative values indicate service overdue. FieldServiceDistanceToService = "serviceDistanceToService" // FieldServiceTimeToService Remaining time to service (of any kind). Negative values indicate service overdue. FieldServiceTimeToService = "serviceTimeToService" // FieldSpeed Vehicle speed. FieldSpeed = "speed" )
JSON names for defined signals
const ( // EventBehaviorExtremeBrakingName extremeBraking an event that indicates extreme braking was detected EventBehaviorExtremeBrakingName = "behavior.extremeBraking" // EventBehaviorHarshAccelerationName harshAcceleration an event that indicates a harsh acceleration was detected EventBehaviorHarshAccelerationName = "behavior.harshAcceleration" // EventBehaviorHarshBrakingName harshBraking an event that indicates a harsh braking was detected EventBehaviorHarshBrakingName = "behavior.harshBraking" // EventBehaviorHarshCorneringName harshCornering an event that indicates a harsh cornering was detected EventBehaviorHarshCorneringName = "behavior.harshCornering" // EventSafetyCollisionName collision an event that indicates a collision was detected EventSafetyCollisionName = "safety.collision" // EventSecurityEngineBlockName engineBlock an event that indicates the engine was blocked via a command EventSecurityEngineBlockName = "security.engineBlock" // EventSecurityEngineUnblockName engineUnblock an event that indicates the engine was unblocked via a command EventSecurityEngineUnblockName = "security.engineUnblock" )
JSON names for defined event names
Variables ¶
This section is empty.
Functions ¶
func EventColNames ¶ added in v0.6.2
func EventColNames() []string
EventColNames returns the column names of the Event struct.
func EventToSlice ¶ added in v0.6.2
EventToSlice converts an Event 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 `EventColNames`.
func SignalColNames ¶
func SignalColNames() []string
SignalColNames returns the column names of the Signal struct.
func SignalToSlice ¶
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 Event ¶ added in v0.6.2
type Event = cloudevent.CloudEvent[EventData]
Event represents a single event collected from a device. This is a CloudEvent with EventData as the payload.
func UnpackEvents ¶ added in v1.0.2
func UnpackEvents(msg EventCloudEvent) []Event
UnpackEvents extracts individual events from a wire CloudEvent. Each unpacked event inherits the envelope's header fields.
type EventCloudEvent ¶ added in v1.0.2
type EventCloudEvent = cloudevent.CloudEvent[EventsPayload]
EventCloudEvent is a CloudEvent carrying multiple events on the wire.
func PackEvents ¶ added in v1.0.2
func PackEvents(header cloudevent.CloudEventHeader, events []Event) EventCloudEvent
PackEvents wraps extracted events into a single CloudEvent for wire transport. Only EventData fields are preserved; per-event header fields are discarded in favor of the shared header.
type EventData ¶ added in v1.0.2
type EventData struct {
// Name is the name of the event indicated by the oracle transmitting it.
Name string `ch:"name" json:"name"`
// Timestamp is the time at which the event described occurred.
Timestamp time.Time `ch:"timestamp" json:"timestamp"`
// DurationNs is the duration in nanoseconds of the event.
DurationNs uint64 `ch:"duration_ns" json:"durationNs"`
// Metadata is arbitrary JSON metadata.
Metadata string `ch:"metadata" json:"metadata"`
// CloudEventID is the ID of the source CloudEvent that this event was extracted from.
// This is persisted to the database and is distinct from Event.ID, which is the
// event's own CloudEvent identity (not persisted).
CloudEventID string `ch:"cloud_event_id" json:"cloudEventId"`
// Tags are filterable labels for the event, preserved through pack/unpack.
// An empty slice is used instead of nil to ensure consistent JSON serialization.
Tags []string `ch:"tags" json:"tags"`
}
EventData holds the domain-specific payload for an event.
type EventsPayload ¶ added in v1.0.2
type EventsPayload struct {
Events []EventData `json:"events"`
}
EventsPayload is the data payload for an events CloudEvent on the wire.
type Location ¶ added in v0.7.0
type Location struct {
Latitude float64 `ch:"latitude" json:"latitude"`
Longitude float64 `ch:"longitude" json:"longitude"`
HDOP float64 `ch:"hdop" json:"hdop"`
Heading float64 `ch:"heading" json:"heading"`
}
Location represents a point on the earth in WSG-84 coordinates, optionally with a Horizontal Dilution of Position (HDOP) value or a heading value.
type Signal ¶
type Signal = cloudevent.CloudEvent[SignalData]
Signal represents a single signal collected from a device. This is a CloudEvent with SignalData as the payload.
func UnpackSignals ¶ added in v1.0.2
func UnpackSignals(msg SignalCloudEvent) []Signal
UnpackSignals extracts individual signals from a wire CloudEvent. Each unpacked Signal gets header fields from the envelope.
type SignalCloudEvent ¶ added in v1.0.2
type SignalCloudEvent = cloudevent.CloudEvent[SignalsPayload]
SignalCloudEvent is a CloudEvent carrying multiple signals on the wire.
func PackSignals ¶ added in v1.0.2
func PackSignals(header cloudevent.CloudEventHeader, signals []Signal) SignalCloudEvent
PackSignals wraps extracted signals into a single CloudEvent for wire transport. Only data fields (Timestamp, Name, Value*) are preserved from each Signal. Header fields on individual Signal structs are ignored — use the header param.
type SignalData ¶ added in v1.0.2
type SignalData struct {
// 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"`
// ValueLocation is the value of the signal collected.
ValueLocation Location `ch:"value_location" json:"valueLocation"`
// CloudEventID is the ID of the source CloudEvent that this signal was extracted from.
// This is persisted to the database and is distinct from Signal.ID, which is the
// signal's own CloudEvent identity (not persisted).
CloudEventID string `ch:"cloud_event_id" json:"cloudEventId"`
}
SignalData holds the per-signal data fields.
func (*SignalData) SetValue ¶ added in v1.0.2
func (s *SignalData) SetValue(val any)
SetValue dynamically set the appropriate value field based on the type of the value.
type SignalsPayload ¶ added in v1.0.2
type SignalsPayload struct {
Signals []SignalData `json:"signals"`
}
SignalsPayload is the data payload for a signals CloudEvent on the wire.