Modbux.Helper (Modbux v0.3.14)

View Source

Binary helper module

Summary

Functions

bin_to_bitlist(count, arg)

@spec bin_to_bitlist(integer(), <<_::8, _::_*8>>) :: [any()]

bin_to_reglist(count, arg)

@spec bin_to_reglist(pos_integer(), <<_::16, _::_*8>>) :: [char(), ...]

bitlist_to_bin(values)

@spec bitlist_to_bin(any()) :: any()

bool_to_byte(value)

@spec bool_to_byte(0 | 1) :: 0 | 255

byte_count(count)

@spec byte_count(integer()) :: integer()

crc(data)

@spec crc(binary()) :: <<_::16>>

reglist_to_bin(values)

@spec reglist_to_bin(any()) :: any()