sgr_commhandler.driver.modbus.modbus_helper
Attributes
Functions
|
|
|
|
|
|
|
|
|
Module Contents
- type sgr_commhandler.driver.modbus.modbus_helper.AnyModbusClient = AsyncModbusSerialClient | AsyncModbusTcpClient
- sgr_commhandler.driver.modbus.modbus_helper.decode_registers(client, registers, data_type, word_order='big', byte_order='big')
- Parameters:
client (AnyModbusClient)
registers (list[int])
data_type (sgr_specification.v0.product.modbus_types.ModbusDataType)
word_order (Literal['big', 'little'])
byte_order (Literal['big', 'little'])
- Return type:
Any
- sgr_commhandler.driver.modbus.modbus_helper.encode_registers(client, value, data_type, word_order='big', byte_order='big')
- Parameters:
client (AnyModbusClient)
value (Any)
data_type (sgr_specification.v0.product.modbus_types.ModbusDataType)
word_order (Literal['big', 'little'])
byte_order (Literal['big', 'little'])
- Return type:
list[int]
- sgr_commhandler.driver.modbus.modbus_helper.change_byte_order(word)
- Parameters:
word (int)
- Return type:
int
- sgr_commhandler.driver.modbus.modbus_helper.registers_as_hex(registers)
- Parameters:
registers (list[int])
- Return type:
str
- sgr_commhandler.driver.modbus.modbus_helper.get_data_type(modbus_type)
- Parameters:
modbus_type (sgr_specification.v0.product.modbus_types.ModbusDataType)
- Return type:
pymodbus.client.mixin.ModbusClientMixin.DATATYPE