View Source Jeff.Device (jeff v0.4.0)

Peripheral Device configuration and handling

Link to this section Summary

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 inc_sequence(t()) :: t()
@spec new(keyword()) :: t()
@spec next_command(t()) :: {t(), Jeff.Command.t()}
@spec online?(t()) :: boolean()
Link to this function

receive_valid_reply(device)

View Source
@spec receive_valid_reply(t()) :: t()
Link to this function

send_command(device, command)

View Source
@spec send_command(t(), Jeff.Command.t()) :: t()