Jeff.ACU (jeff v0.3.0) View Source

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.

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

Specs

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

address_availability()

View Source

Specs

address_availability() :: :available | :registered | :timeout | :error

Specs

device_opt() :: {:check_scheme, atom()}

Specs

osdp_address() :: Jeff.osdp_address()

Specs

start_opt() :: {:name, atom()} | {:serial_port, String.t()}

Link to this section Functions

Link to this function

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

View Source

Specs

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

Specs

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

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

View Source

Specs

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

Specs

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.

Specs

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

Start the ACU process.