mei_message — MEI Modbus Messages

API Documentation

Encapsulated Interface (MEI) Transport Messages

class pymodbus.mei_message.ReadDeviceInformationRequest(read_code=None, object_id=0, **kwargs)

This function code allows reading the identification and additional information relative to the physical and functional description of a remote device, only.

The Read Device Identification interface is modeled as an address space composed of a set of addressable data elements. The data elements are called objects and an object Id identifies them.

__init__(read_code=None, object_id=0, **kwargs)

Initializes a new instance

Parameters:
  • read_code – The device information read code
  • object_id – The object to read from
__str__()

Builds a representation of the request

Returns:The string representation of the request
decode(data)

Decodes data part of the message.

Parameters:data – The incoming data
encode()

Encodes the request packet

Returns:The byte encoded packet
execute(context)

Run a read exeception status request against the store

Parameters:context – The datastore to request from
Returns:The populated response
class pymodbus.mei_message.ReadDeviceInformationResponse(read_code=None, information=None, **kwargs)
__init__(read_code=None, information=None, **kwargs)

Initializes a new instance

Parameters:
  • read_code – The device information read code
  • information – The requested information request
__str__()

Builds a representation of the response

Returns:The string representation of the response
classmethod calculateRtuFrameSize(buffer)

Calculates the size of the message

Parameters:buffer – A buffer containing the data that have been received.
Returns:The number of bytes in the response.
decode(data)

Decodes a the response

Parameters:data – The packet data to decode
encode()

Encodes the response

Returns:The byte encoded message