read_typed()#
- ModbusTransport.read_typed(
- register_type: Literal['holding', 'input', 'coil', 'discrete'],
- address: int,
- data_type: Literal['uint16', 'int16', 'uint32', 'int32', 'uint64', 'int64', 'float32', 'float64', 'bool'],
- *,
- unit_id: int,
- byte_swap: bool = False,
- word_swap: bool = False,
- long_swap: bool = False,
Read
addressasdata_type, dispatching byregister_typeand decoding across registers.Coils and discrete inputs are single-bit, so
data_typemust be"bool"and the read returns abool.