# Constants

Constants For Modbus Server/Client.

This is the single location for storing default values for the servers and clients.

class pymodbus.constants.DeviceInformation(*values)

  Bases: `IntEnum`

  Represents what type of device information to read.

  BASIC

    This is the basic (required) device information to be returned. This includes VendorName, ProductCode, and MajorMinorRevision code.

  REGULAR

    In addition to basic data objects, the device provides additional and optional identification and description data objects. All of the objects of this category are defined in the standard but their implementation is optional.

  EXTENDED

    In addition to regular data objects, the device provides additional and optional identification and description private data about the physical device itself. All of these data are device dependent.

  SPECIFIC

    Request to return a single data object.

  BASIC = 1
  EXTENDED = 3
  REGULAR = 2
  SPECIFIC = 4

class pymodbus.constants.ExcCodes(*values)

  Bases: `IntEnum`

  Represents the allowed exception codes.

  ACKNOWLEDGE = 5
  DEVICE_BUSY = 6
  DEVICE_FAILURE = 4
  GATEWAY_NO_RESPONSE = 11
  GATEWAY_PATH_UNAVIABLE = 10
  ILLEGAL_ADDRESS = 2
  ILLEGAL_FUNCTION = 1
  ILLEGAL_VALUE = 3
  MEMORY_PARITY_ERROR = 8
  NEGATIVE_ACKNOWLEDGE = 7

class pymodbus.constants.ModbusPlusOperation(*values)

  Bases: `IntEnum`

  Represents the type of modbus plus request.

  GET_STATISTICS

    Operation requesting that the current modbus plus statistics be returned in the response.

  CLEAR_STATISTICS

    Operation requesting that the current modbus plus statistics be cleared and not returned in the response.

  CLEAR_STATISTICS = 4
  GET_STATISTICS = 3

class pymodbus.constants.ModbusStatus(*values)

  Bases: `IntEnum`

  These represent various status codes in the modbus protocol.

  WAITING

    This indicates that a modbus device is currently waiting for a given request to finish some running task.

  READY

    This indicates that a modbus device is currently free to perform the next request task.

  ON

    This indicates that the given modbus entity is on

  OFF

    This indicates that the given modbus entity is off

  OFF = 0
  ON = 65280
  READY = 0
  WAITING = 65535

class pymodbus.constants.MoreData(*values)

  Bases: `IntEnum`

  Represents the more follows condition.

  NOTHING

    This indicates that no more objects are going to be returned.

  KEEP_READING

    This indicates that there are more objects to be returned.

  KEEP_READING = 255
  NOTHING = 0