AutoApi.Property (auto_api v13.2.0) View Source
Data wrapper for state properties.
The struct contains three fields: data
, timestamp
and failure
.
The data
field can be either a scalar or a map, and when set it contains
the actual value of the state property.
The timestamp
field indicates when the data was last updated, and it is
in DateTime
format.
The failure
is set if there was an error that prevented retrieving the
property data.
The availability
fields indicates how often the data is updated, and any
limitation on how many times the property can receive updates in a specific
time frame.
Link to this section Summary
Link to this section Types
Specs
applies_per() :: :app | :vehicle
Specs
availability() :: %{ update_rate: update_rate(), rate_limit: AutoApi.UnitType.frequency(), applies_per: applies_per() }
Specs
Specs
reason() :: :rate_limit | :execution_timeout | :format_error | :unauthorised | :unknown | :pending | :oem_error | :privacy_mode_active
Specs
Specs
Specs
t(data) :: %AutoApi.Property{ availability: nil | availability(), data: data, failure: nil | failure(), timestamp: nil | DateTime.t() }
Specs
update_rate() :: :trip_high | :trip | :trip_start_end | :trip_end | :unknown | :not_available | :on_change
Link to this section Functions
Specs
Converts Property struct to binary format
Specs
Converts Property binary to struct