Ankündigung

Einklappen

Serverwartung 21.2.



Am 21.2. im Laufe des späten Abends wird eine Serverwartung durchgeführt. Das Forum ist dadurch für gut zwei Stunden nicht erreichbar.
Es wird eine Wartungsseite geschaltet.

Mehr anzeigen
Weniger anzeigen

Feedback Codegenerator

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Feedback Codegenerator

    Moin,

    ich habe gerade den Codegenerator ausprobiert (Input und Output im Anhang)

    Warum sind hier die Namen
    Code:
    #define COMOBJ_null 0
    #define COMOBJ_null 1
    usw.
    "null"?

    Damit wird soetwas:
    Code:
    typeTemp = (int) Konnekting.getUINT8Param(PARAM_tempSendUpdate);
    Ja nicht funktionieren.

    Was ich außerdem unschön finde ist, dass es keine Funktion Konnekting.getParam() gibt, sondern dass man den Typ benötigt.

    Gruß,
    Hendrik
    Angehängte Dateien

    #2
    wenn man keinen Namen vergibt, kommt null raus:
    Code:
    <Parameter Id="0">
    So könnte es aussehen:
    Code:
    <Parameter Id="0" IdName="Geraeteanlaufzeit">
    Beispiel:
    https://github.com/KONNEKTING/Konnek...device.xml#L10

    Kommentar


      #3
      Hallo,

      danke, jetzt bin ich weiter.
      Nur der letzte Block zeigt noch "null".
      Code:
      #define MANUFACTURER_ID 57005
      #define DEVICE_ID 1
      #define REVISION 0
      
      #define COMOBJ_moisture 0
      #define COMOBJ_LowerAlarm 1
      #define COMOBJ_UpperAlarm 2
      #define COMOBJ_Resistance 3
      #define PARAM_Geraeteanlaufzeit 0
      #define PARAM_cyclic 1
      #define PARAM_cycle 2
      #define PARAM_DeltaMoisture 3
      #define PARAM_SendOnChange 4
      #define PARAM_LowerAlarm 5
      #define PARAM_SendOnLowerAlarm 6
      #define PARAM_UpperAlarm 7
      #define PARAM_SendOnUpperAlarm 8
      #define PARAM_Samples 9
              
      KnxComObject KnxDevice::_comObjectsList[] = {
          /* Index 0 - moisture */ KnxComObject(KNX_DPT_9_006, 0x34),
          /* Index 1 - LowerAlarm */ KnxComObject(KNX_DPT_1_001, 0x34),
          /* Index 2 - UpperAlarm */ KnxComObject(KNX_DPT_1_001, 0x34),
          /* Index 3 - Resistance */ KnxComObject(KNX_DPT_7_001, 0x34)
      };
      const byte KnxDevice::_numberOfComObjects = sizeof (_comObjectsList) / sizeof (KnxComObject); // do not change this code
             
      byte KonnektingDevice::_paramSizeList[] = {
          /* Index 0 - Geraeteanlaufzeit */ PARAM_UINT8,
          /* Index 1 - cyclic */ PARAM_UINT8,
          /* Index 2 - cycle */ PARAM_UINT32,
          /* Index 3 - DeltaMoisture */ PARAM_UINT8,
          /* Index 4 - SendOnChange */ PARAM_UINT8,
          /* Index 5 - LowerAlarm */ PARAM_INT16,
          /* Index 6 - SendOnLowerAlarm */ PARAM_UINT8,
          /* Index 7 - UpperAlarm */ PARAM_INT16,
          /* Index 8 - SendOnUpperAlarm */ PARAM_UINT8,
          /* Index 9 - Samples */ PARAM_UINT16
      };
      const byte KonnektingDevice::_numberOfParams = sizeof (_paramSizeList); // do not change this code /* Index 8 - null */ PARAM_UINT8,
          /* Index 9 - null */ PARAM_UINT32,
          /* Index 10 - null */ PARAM_UINT8,
          /* Index 11 - null */ PARAM_UINT8,
          /* Index 12 - null */ PARAM_INT16,
          /* Index 13 - null */ PARAM_UINT8,
          /* Index 14 - null */ PARAM_INT16,
          /* Index 15 - null */ PARAM_UINT8,
          /* Index 16 - null */ PARAM_UINT32,
          /* Index 17 - null */ PARAM_UINT8,
          /* Index 18 - null */ PARAM_UINT8,
          /* Index 19 - null */ PARAM_INT16,
          /* Index 20 - null */ PARAM_UINT8,
          /* Index 21 - null */ PARAM_UINT16,
          /* Index 22 - null */ PARAM_UINT16
      };
      Im deinem Beispiel ist der leer. Bei diesem hier auch:
      https://github.com/KONNEKTING/Exampl...ture_DS18B20.h

      Wie kommt das?

      Gruß,
      Hendrik

      Kommentar


        #4
        in der alten XML war eine Gruppe doppelt vorhanden (die selbe ID=1).
        Check mal ob jede ID eindeutig ist, ansonsten brauche ich XML...

        Kommentar


          #5
          Hallo,

          ich habe vielleicht die xml nicht gespeichert gehabt.
          Ich habe es gerade nochmal versucht und jetzt funktioniert es wie erwartet. Danke!

          Gruß,
          Hendrik

          Kommentar

          Lädt...
          X