Documentation
¶
Overview ¶
Package tesla handles incoming Tesla messages, both from polling the Fleet API and streaming from Fleet Telemetry.
Index ¶
- type Module
- func (m Module) CloudEventConvert(_ context.Context, msgData []byte) ([]cloudevent.CloudEventHeader, []byte, error)
- func (m *Module) FingerprintConvert(_ context.Context, event cloudevent.RawEvent) (cloudevent.Fingerprint, error)
- func (m *Module) SignalConvert(_ context.Context, event cloudevent.RawEvent) ([]vss.Signal, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶ added in v0.5.0
type Module struct{}
Module holds dependencies for the Tesla module. At present, there are none. All of the functions on this struct delegate to the appropriate function in the api and telemetry submodules, according to the dataversion field.
func (Module) CloudEventConvert ¶ added in v0.5.0
func (m Module) CloudEventConvert(_ context.Context, msgData []byte) ([]cloudevent.CloudEventHeader, []byte, error)
CloudEventConvert converts an input message to Cloud Events. In the Tesla case the input messages always consist of signal values and include the VIN, so we want to create a fingerprint header pointing to the same data.
func (*Module) FingerprintConvert ¶ added in v0.5.0
func (m *Module) FingerprintConvert(_ context.Context, event cloudevent.RawEvent) (cloudevent.Fingerprint, error)
FingerprintConvert converts a Tesla CloudEvent to a FingerprintEvent.
func (*Module) SignalConvert ¶ added in v0.5.0
SignalConvert converts a Tesla CloudEvent to DIMO's VSS rows.
Directories
¶
| Path | Synopsis |
|---|---|
|
Code generated by github.com/DIMO-Network/model-garage.
|
Code generated by github.com/DIMO-Network/model-garage. |
|
Package telemetry converts batches of Tesla protobuf Payloads into VSS signals.
|
Package telemetry converts batches of Tesla protobuf Payloads into VSS signals. |
|
codegen
command
Package main contains the code generation command for transforming a definitions file into code that executes a conversion from Tesla Fleet Telemetry protobufs into VSS signals.
|
Package main contains the code generation command for transforming a definitions file into code that executes a conversion from Tesla Fleet Telemetry protobufs into VSS signals. |
|
parse
Package parse contains functions for parsing typed Tesla values out of strings.
|
Package parse contains functions for parsing typed Tesla values out of strings. |
|
schema
Package schema merely embeds the definitions file for conversions from Tesla Fleet Telemetry to VSS signals.
|
Package schema merely embeds the definitions file for conversions from Tesla Fleet Telemetry to VSS signals. |
|
unit
Package unit converts between commonly used units of measure for vehicle signals.
|
Package unit converts between commonly used units of measure for vehicle signals. |