IEC60870.CS101.Transport behaviour (ExIEC60870 v0.1.0)

Copy Markdown View Source

Transport abstraction for IEC 60870-5-101 serial / virtual links.

Any transport implementation delivers incoming bytes to the controlling process as {:cs101_transport_data, handle, binary_data} messages and implements send_data/2.

Summary

Functions

Sends raw bytes over a {module, handle} transport tuple.

Callbacks

close(handle)

@callback close(handle :: term()) :: :ok

send_data(handle, data)

@callback send_data(handle :: term(), data :: binary()) :: :ok | {:error, term()}

Functions

close(arg)

@spec close({module(), term()}) :: :ok

send_data(arg, data)

@spec send_data({module(), term()}, binary()) :: :ok | {:error, term()}

Sends raw bytes over a {module, handle} transport tuple.