View Source Jeff.Device (jeff v0.5.0)
Peripheral Device configuration and handling
Link to this section Summary
Functions
Resets communication with a PD by setting the sequence number to 0 and resetting the secure channel state. Useful when a communication with a PD gets out of sync, such as when the PD reboots.
Link to this section Types
@type check_scheme() :: :checksum | :crc
@type sequence_number() :: 0..3
@type t() :: %Jeff.Device{ address: Jeff.osdp_address(), check_scheme: check_scheme(), commands: :queue.queue(term()), last_valid_reply: non_neg_integer(), secure_channel: term(), security?: boolean(), sequence: sequence_number() }
Link to this section Functions
@spec next_command(t()) :: {t(), Jeff.Command.t()}
Resets communication with a PD by setting the sequence number to 0 and resetting the secure channel state. Useful when a communication with a PD gets out of sync, such as when the PD reboots.
@spec send_command(t(), Jeff.Command.t()) :: t()