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

When using a KNX DPT with one byte data size the resulting TPDU created is wrong.

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.14.0
    • KNX
    • All

    Description

      The KNX spec mandates:

      Two different formats of the A_GroupValue_Write-PDU shall be used depending on
      the length of the value. The maximum length of the value shall be 14 octets.
      Unused data bits shall be set to zero. Values that only consist of 6 bits or less
      have the following optimized A_GroupValue_Write-PDU format ...

      The above specification was interpreted wrong and does not apply to DPT's with one byte
      data size and if all the bits can be used in the DPT implementation.

      The current code in QKnxTpdu::setData checks if a one byte value is to be set, and if there
      are only six bits used, and if so, it will create an optimized TPDU, which is wrong.

          case ApplicationControlField::GroupValueResponse:
          case ApplicationControlField::GroupValueWrite:
              if (data.size() > 1 || quint8(data.at(0)) > 0x3)
                  break;
          // build length optimized TPDU
      

      Attachments

        Activity

          People

            heimrich Karsten Heimrich
            heimrich Karsten Heimrich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: