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 ex terminum 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 ex terminum 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 ex terminum 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
  OpenHAB Driver whozeawhat 6 1,391 01-16-2019, 06:45 AM
Last Post: greymatter
  LIFX Driver bobskie708 14 2,597 01-10-2019, 06:36 PM
Last Post: Dean Roddey
  XBMC Driver wuench 428 172,532 12-28-2018, 11:07 AM
Last Post: dogman
  Amazon Echo Hue Simulator Driver wuench 117 43,948 12-24-2018, 11:10 AM
Last Post: Dean Roddey
  RunTimer2 driver rbroders 15 4,579 12-14-2018, 05:28 PM
Last Post: rbroders
  Driver for Bigass Fan lleo 7 364 11-25-2018, 08:57 AM
Last Post: Dean Roddey
  Generic Modbus Driver - Serial & IP znelbok 25 13,205 10-09-2018, 08:59 AM
Last Post: Ron Haley
  Issues debugging IP based driver jnolting 5 724 09-24-2018, 11:52 AM
Last Post: Dean Roddey
  Enhance Driver Test Harness Field Monitor rbroders 1 446 09-24-2018, 10:49 AM
Last Post: Dean Roddey
  Koyo Click PLC Driver rbroders 75 29,787 09-23-2018, 01:18 PM
Last Post: rbroders

Forum Jump:


Users browsing this thread: 1 Guest(s)