AVModbus.Serial (avmodbus v0.1.0)

Copy Markdown View Source

Modbus serial-line implementation で共有する transport-independent helper です。

Summary

Functions

data の先頭から expected adapter echo と一致する部分を取り除きます。

Functions

strip_echo(echo, data)

@spec strip_echo(binary(), binary()) :: {binary(), binary()}

data の先頭から expected adapter echo と一致する部分を取り除きます。

{remaining_echo, data_after_echo} を返します。echo が複数 UART read に分割されても処理できます。 受信 data が expected echo と異なった時点で matching を終了し、その data は response input として保持します。