Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CBUS CGate Driver
#41
Unfortunately I havent kept my version of CQC uptodate so I cant test but I did find this post

http://www.charmedquark.com/vb_forum/sho...hp?t=11674

which suggests the DefBindLocal is no longer available and so I need to modify the driver.

I'll have alook next week and if your willing to do trial and error we may be able to resolve.

The problem code is here

Method GetCommResource() Returns Boolean
Begin

If (GetVerboseLevel() >= VerboseLvls.High)
LogMsg(">>GetCommResource");
EndIf;


If (!m_Sock.GetIsBound())
Try
m_Sock.DefBindLocal(SockProtos.TCP);


EndTry;

Catch
If (GetVerboseLevel() >= VerboseLvls.Low)
LogMsg1( "Exception in GetCommResource(), ErrorText=%(1)", $Exception.GetErrorText() );
EndIf;

Return False;

EndCatch;
EndIf;

If (!m_EvtSock.GetIsBound())
Try
m_EvtSock.DefBindLocal(SockProtos.TCP);


EndTry;

Catch
If (GetVerboseLevel() >= VerboseLvls.Low)
LogMsg1( "Exception in GetCommResource(), ErrorText=%(1)", $Exception.GetErrorText() );
EndIf;

Return False;

EndCatch;
EndIf;

If (GetVerboseLevel() >= VerboseLvls.High)
LogMsg("<<GetCommResource");
EndIf;

Return True;
EndMethod;
Reply
#42
I'll fix it for you later today and update the first post. The fix is easy, but I need to look at what type of socket it is. Are they datagram sockets or stream sockets? If stream sockets, just remove the binding calls (and related try/catch blocks around them) altogether since they aren't needed. If they are datagram sockets being used to listen, then we'll have to have a bind but a slightly different one.
Dean Roddey
Explorans limites defectum
Reply
#43
Thanks very much for the prompt response & actions Dean & Martin. C-Gate uses TCP sockets, so to answer Dean's question, I believe that they will be stream sockets.
Regards, Brad.
Reply
#44
If that's true, just remove those binding calls and probably it'll be happy. If not, let me know.
Dean Roddey
Explorans limites defectum
Reply
#45
Oops, I didn't notice he said next week before he'd get a chance to look at it. I updated the first post with a 'SocketBinding' version. Give that a try. Import the package and do a reconfigure on the driver to pick up the changes.
Dean Roddey
Explorans limites defectum
Reply
#46
Thanks Dean, it works perfectly!
Reply
#47
A really old thread but something i am just trying now.

How does the Trigger field work?
Mykel Koblenz
Illawarra Smart Home
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  New Driver - How hard would this be? kblagron 4 503 05-20-2019, 11:28 AM
Last Post: zaccari
  Cytech Comfort Driver znelbok 6 471 04-10-2019, 05:39 PM
Last Post: znelbok
  OpenHAB Driver whozeawhat 6 2,313 01-16-2019, 06:45 AM
Last Post: greymatter
  LIFX Driver bobskie708 14 3,902 01-10-2019, 06:36 PM
Last Post: Dean Roddey
  XBMC Driver wuench 428 185,581 12-28-2018, 11:07 AM
Last Post: dogman
  Amazon Echo Hue Simulator Driver wuench 117 49,645 12-24-2018, 11:10 AM
Last Post: Dean Roddey
  RunTimer2 driver rbroders 15 5,580 12-14-2018, 05:28 PM
Last Post: rbroders
  Driver for Bigass Fan lleo 7 922 11-25-2018, 08:57 AM
Last Post: Dean Roddey
  Generic Modbus Driver - Serial & IP znelbok 25 14,509 10-09-2018, 08:59 AM
Last Post: Ron Haley
  Issues debugging IP based driver jnolting 5 1,267 09-24-2018, 11:52 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)