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
Software Geek Extraordinaire
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
Software Geek Extraordinaire
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
Software Geek Extraordinaire
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
  LIFX Driver bobskie708 12 2,148 11-26-2018, 05:23 PM
Last Post: Dean Roddey
  Driver for Bigass Fan lleo 7 224 11-25-2018, 08:57 AM
Last Post: Dean Roddey
  Amazon Echo Hue Simulator Driver wuench 115 41,942 11-08-2018, 06:49 AM
Last Post: karenlee
  RunTimer2 driver rbroders 14 4,177 10-15-2018, 11:45 AM
Last Post: rbroders
  Generic Modbus Driver - Serial & IP znelbok 25 12,622 10-09-2018, 08:59 AM
Last Post: Ron Haley
  Issues debugging IP based driver jnolting 5 568 09-24-2018, 11:52 AM
Last Post: Dean Roddey
  Enhance Driver Test Harness Field Monitor rbroders 1 323 09-24-2018, 10:49 AM
Last Post: Dean Roddey
  Koyo Click PLC Driver rbroders 75 29,100 09-23-2018, 01:18 PM
Last Post: rbroders
  Carrier Infinity HVAC Driver beelzerob 34 13,963 09-07-2018, 01:15 PM
Last Post: lleo
  Sony TV IP driver dogman 10 1,361 08-01-2018, 03:53 PM
Last Post: znelbok

Forum Jump:


Users browsing this thread: 1 Guest(s)