encode_value()#
- encode_value(
- value: int | float | bool,
- data_type: Literal['uint16', 'int16', 'uint32', 'int32', 'uint64', 'int64', 'float32', 'float64', 'bool'],
- byte_swap: bool = False,
- word_swap: bool = False,
- long_swap: bool = False,
Encode a typed value into 16-bit registers, applying byte/word/long swaps as configured.