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
  Issues debugging IP based driver jnolting 5 115 31 minutes ago
Last Post: Dean Roddey
  Enhance Driver Test Harness Field Monitor rbroders 1 5 1 hour ago
Last Post: Dean Roddey
  Koyo Click PLC Driver rbroders 75 26,610 Yesterday, 01:18 PM
Last Post: rbroders
  Carrier Infinity HVAC Driver beelzerob 34 12,274 09-07-2018, 01:15 PM
Last Post: lleo
  Amazon Echo Hue Simulator Driver wuench 113 35,731 09-02-2018, 07:24 AM
Last Post: TurboSam
  Sony TV IP driver dogman 10 704 08-01-2018, 03:53 PM
Last Post: znelbok
  Generic Modbus Driver - Serial & IP znelbok 24 10,904 07-20-2018, 01:21 PM
Last Post: znelbok
  Sony Bravia TV Driver znelbok 12 1,650 06-11-2018, 09:19 AM
Last Post: Dean Roddey
  XBMC Driver wuench 427 153,372 05-29-2018, 03:02 AM
Last Post: znelbok
  OpenHAB Driver whozeawhat 5 715 05-28-2018, 08:50 AM
Last Post: whozeawhat

Forum Jump:


Users browsing this thread: 1 Guest(s)