View Source Jeff.ACU (jeff v0.5.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()
@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()} | {:transport_opts, Jeff.Transport.opts()}
Link to this section Functions
@spec add_device(acu(), osdp_address(), [device_opt()]) :: Jeff.Device.t()
Register a peripheral device on the ACU communication bus.
@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
.
@spec remove_device(acu(), osdp_address()) :: Jeff.Device.t()
Remove a peripheral device from the ACU communication bus.
@spec send_command(acu(), osdp_address(), atom(), keyword()) :: {:ok, Jeff.Reply.t()} | {:error, :timeout}
Send a command to a peripheral device.
@spec send_command_oob(acu(), osdp_address(), atom(), keyword()) :: {:ok, Jeff.Reply.t()} | {:error, :timeout | :registered}
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.