exbee v0.0.3 Exbee.Adapter behaviour View Source

Interface to a serial connection.

Link to this section Summary

Link to this section Types

Link to this type adapter_option() View Source
adapter_option ::
  {:speed, non_neg_integer} |
  {:data_bits, 5..8} |
  {:stop_bits, 1..2} |
  {:parity, :none | :even | :odd | :space | :mark} |
  {:flow_control, :none | :hardware | :software}

Link to this section Callbacks

Link to this callback enumerate() View Source
enumerate() :: map
Link to this callback open(pid, binary, list) View Source
open(pid, binary, [adapter_option]) :: :ok | {:error, term}
Link to this callback start_link() View Source
start_link() :: {:ok, pid} | {:error, term}
Link to this callback stop(pid) View Source
stop(pid) :: :ok | {:error, term}
Link to this callback write(pid, arg1) View Source
write(pid, binary | [byte]) :: :ok | {:error, term}