View Source Jeff.ACU (jeff v0.4.0)

GenServer process for an ACU

Link to this section Summary

Functions

Register a peripheral device on the ACU communication bus.

Determine if a device is available to be registered on the bus.

Returns a specification to start this module under a supervisor.

Remove a peripheral device from the ACU communication bus.

Send a command to a peripheral device.

Send a command to a peripheral device that is not yet registered on the ACU. Intended to be used for maintenance/diagnostic purposes.

Start the ACU process.

Link to this section Types

@type acu() :: Jeff.acu()
Link to this type

address_availability()

View Source
@type address_availability() :: :available | :registered | :timeout | :error
@type device_opt() :: {:check_scheme, atom()}
@type osdp_address() :: Jeff.osdp_address()
@type start_opt() ::
  {:name, atom()}
  | {:serial_port, String.t()}
  | {:controlling_process, Process.dest()}

Link to this section Functions

Link to this function

add_device(acu, address, opts \\ [])

View Source
@spec add_device(acu(), osdp_address(), [device_opt()]) :: Jeff.Device.t()

Register a peripheral device on the ACU communication bus.

Link to this function

check_address(acu, address)

View Source
@spec check_address(acu(), osdp_address()) :: address_availability()

Determine if a device is available to be registered on the bus.

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

remove_device(acu, address)

View Source
@spec remove_device(acu(), osdp_address()) :: Jeff.Device.t()

Remove a peripheral device from the ACU communication bus.

Link to this function

send_command(acu, address, name, params \\ [])

View Source
@spec send_command(acu(), osdp_address(), atom(), keyword()) :: Jeff.Reply.t()

Send a command to a peripheral device.

Link to this function

send_command_oob(acu, address, name, params \\ [])

View Source
@spec send_command_oob(acu(), osdp_address(), atom(), keyword()) :: Jeff.Reply.t()

Send a command to a peripheral device that is not yet registered on the ACU. Intended to be used for maintenance/diagnostic purposes.

@spec start_link([start_opt()]) :: GenServer.on_start()

Start the ACU process.