Ankündigung

Einklappen
Keine Ankündigung bisher.

Falcon SDK & Busmonitor

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

    Falcon SDK & Busmonitor

    Hallo zusammen,

    ich bin gerade dabei eine einfach Busmonitor mit C#/.net und dem Falcon SDK zu stricken (leider sind die Busmon Klassen nicht dokumentiert).

    Es funktioniert alles soweit ganz gut aber nach ~ 20 Sekunden - 5 Minuten (je nach Laune ) werden keine Events mehr in der App (Eventhandler wird nicht mehr aufgerufen) erzeugt (also keine Telegramme an den Handler weitergegeben). Hat vielleicht jemand eine Idee woran es liegen könnte (Threading,...)?

    Vielen Dank im Voraus & Gruß,
    Blockbustaa

    OS: Windows 7
    Falcon SDK: Latest
    .net: 4.5

    #2
    Falcon

    Hi,

    I am student. I am also trying to record message in PC using c# visual studio. I did not get any solution. can you help me..?

    Kommentar


      #3
      Ich habe auch meine eigene .NET-Implementierung mittels Falcon geschrieben und kann ähnliches beobachten.

      Beim synchronen Read erhalte ich nach wenigen Stunden eine Fehlermeldung, dass nichts gelesen werden konnte.

      Beim asynchronen Read erhalte ich nach wenigen Stunde keine Events mehr.

      Arbeitet noch jemand auf einer Selbst-Implementierung und hat ggf. Erfahrungen oder BestPractices für die Verwendung des Falcon SDKs?

      Kommentar


        #4
        Kann ich nicht bestätigen. Das funktioniert eigentlich bestens.

        Könnte ein Problem mit der Lebensdauer der Objekte sein; wenn keine Referenz mehr existiert, räumt der GC irgendwann evtl. noch benötigte Objekte weg.

        Wenn die Kommunikation über IP geht, können auch Firewalls oder bei Multicast der Switch dicht machen.

        Gruß, Klaus

        Kommentar


          #5
          Zitat von Klaus Gütter Beitrag anzeigen
          Kann ich nicht bestätigen. Das funktioniert eigentlich bestens.

          Könnte ein Problem mit der Lebensdauer der Objekte sein; wenn keine Referenz mehr existiert, räumt der GC irgendwann evtl. noch benötigte Objekte weg.

          Wenn die Kommunikation über IP geht, können auch Firewalls oder bei Multicast der Switch dicht machen.

          Gruß, Klaus
          Hi Klaus,

          okay, das beruhigt mich ein wenig, danke.

          Also der GC kann es nicht sein, meine managed objects existieren definitiv noch. Ich erhalte bei einem synchronen Read eine HResult-Fehlermeldung aus der COM-Library mit der Info "Verbindung konnte nicht hergestellt werden".

          Interessanter wird es dann schon beim Netzwerk: mein MDT IP Interface hängt an einem Switch. Am gleichen Switch hängt auch der Rechner, an dem die Anwendung läuft. Die Firewall für den verwendeten Port ist dort deaktiviert. Als Verbindung zum IP Router nutze ich die Routing Option.

          Was meinst du mit Multicast des Switches?

          Sonst fällt mir nix mehr ein, höchstens, dass das Netz ausfällt. Aber eigentlich unrealistisch...

          Kommentar


            #6
            Zitat von mymazl Beitrag anzeigen
            Was meinst du mit Multicast des Switches
            Multicast = KNXnet/IP Routing.

            Versuch mal Tunneling, das ist deutlich robuster.

            Gruß, Klaus

            Kommentar


              #7
              Muss nochmal schnell nachfragen: Tunneling ist dann das direkte Zugreifen auf den KNX IP Router? Also direkt über seine Emailadresse?

              Darf ich noch fragen, wie du das SDK nutzt?

              Arbeitest du event-based? etwa so:
              Code:
              [FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]
               var[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=#000000] connectionObj = [/COLOR][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]ConnectionObject[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=#000000]();[/COLOR]
               [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] groupDataObj = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]GroupData[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]();
              
               connectionObj.Mode = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]ConnectionMode[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].ConnectionModeRemoteConnectionless;
               [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]
              var[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] devOpenErr = connectionObj.Open2([/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"FalconEibnetEdi.EibnetEdi"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"=Name='KNX IP Router';IpAddr='192.168.1.X';Port='3671';NAT='off'"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]);
               [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]
              if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] (devOpenErr == [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceOpenError[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].DeviceOpenErrorNoError)
               groupDataObj.Connection = connectionObj;
               [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]else
              [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]throw[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]InvalidOperationException[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]([/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Format([/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"Could not connect to bus: [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#3cb371][FONT=Consolas][SIZE=2][COLOR=#3cb371][FONT=Consolas][SIZE=2][COLOR=#3cb371]{0}[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2], devOpenErr));
              
               groupDataObj.GroupDataIndicationResponse += OnGroupDataIndicationResponse;
               groupDataObj.GroupDataIndicationRead += OnGroupDataIndicationRead;
               groupDataObj.GroupDataIndicationWrite += OnGroupDataIndicationWrite;
               [/SIZE][/FONT][/SIZE][/FONT]
              Siehe dort auch den Connection.Open2-Aufruf, den ich als "Tunneling" verstanden habe.

              Kommentar


                #8
                Ja, das ist Tunneling (du hattest vorher was von "Routing Option" geschrieben, deswegen mein Einwurf).

                Code sieht soweit gut aus (ich gehe mal davon aus, dass connectionObj und groupDataObj noch referenziert bleiben).

                Next stop: wireshark. Oder KNX Support. Oder beides.

                Gruß, Klaus

                Kommentar


                  #9
                  Zitat von Klaus Gütter Beitrag anzeigen
                  Ja, das ist Tunneling (du hattest vorher was von "Routing Option" geschrieben, deswegen mein Einwurf).
                  Ich hatte noch einen anderen String-Parameter, den ich jetzt auskommentiert habe. Test läuft.

                  Zitat von Klaus Gütter Beitrag anzeigen
                  Next stop: wireshark. Oder KNX Support. Oder beides.
                  Stimmt wireshark wäre eine gute Idee. Kann ich ja einfach im Hintergrund mittracen lassen.

                  Danke für deine Hilfe.

                  Kommentar

                  Lädt...
                  X