ExCEP.Cluster.Handler behaviour (ex_cep v0.1.1)

Copy Markdown

Callback behaviour for handling Gateway-initiated ASDUs on the Cluster (Master) server.

Summary

Types

state()

@type state() :: term()

Callbacks

handle_asdu(gateway_id, asdu, channel, state)

@callback handle_asdu(
  gateway_id :: String.t(),
  asdu :: ExCEP.Codec.DataAsdu.t(),
  channel :: :management | :business,
  state :: state()
) :: {:reply, ExCEP.Codec.DataAsdu.t(), state()} | {:noreply, state()}

init(opts)

@callback init(opts :: term()) :: {:ok, state()}