code: public byte[] getMessage() {
          byte result[] = new byte[count * 2 + 4];
  
          int len = count * 2 + 2;
          result[0] = (byte)(len >> 8);
          result[1] = (byte)(len & 0xFF);
          result[2] = (byte)(count >> 8);
          result[3] = (byte)(count & 0xFF);
  
          for (int i = 0; i < count; i++) {
              byte value[] = registers[i].toBytes();
              result[i * 2 + 4] = value[0];
              result[i * 2 + 5] = value[1];
          }
          return result;
      }
docs: getMessage -- format the message into a byte array.
  @return Byte array of message