Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-49278

QModbusServer Report Server ID data fields to add

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P4: Low
    • 5.6.0
    • None
    • SerialBus: MOD Bus
    • None
    • 342db05cd2a1bc72d23f5cf027d4f8adb8f49a1f

    Description

      For implementing Report Server ID (function code 17), the following data fields and corresponding get/set functions are required in QModbusServer as public functions to parameterize an instance:

      • QByteArray serverId()
      • void setServerId(const QByteArray &deviceIdentifierCode)
        The device identifier code is manufacturer specific. Although originally Modicon used a 1-byte field, I've seen two-byte fields as well. It can be a code (numerical) or something else, so I would leave that as a QByteArray to be defined by the user.
      • bool runIndicatorStatus()
      • void setRunIndicatorStatus(bool running)

      The run indicator is originally meant as an indicator if a PLC system is in RUN (processing the program) or in STOP mode (not processing progam).

      To avoid making this too specific for programs that use QModbusServer as a communication instance, the program needs to set this indicator by itself if it uses such an indicator. The Report Server ID response encodes RUN as 0xFF, STOP as 0x00.

      Device specific Data:

      I propose a QByteArray that can be encoded like the users want to. The usage can be transmitting firmware revision numbers, manufacturer ID strings or diagnostic registers.

      QByteArray reportServerIdData();
      void setServerIData(const QByteArray &data);

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            heimrich Karsten Heimrich
            rnolden Marie Loise Nolden (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes