|
From: <ni...@us...> - 2010-11-19 23:47:18
|
Revision: 142
http://openautomation.svn.sourceforge.net/openautomation/?rev=142&view=rev
Author: nilss1
Date: 2010-11-19 23:47:12 +0000 (Fri, 19 Nov 2010)
Log Message:
-----------
Fix send Connection
Modified Paths:
--------------
PyWireGate/trunk/knx_connector/KNX_Connector.py
Modified: PyWireGate/trunk/knx_connector/KNX_Connector.py
===================================================================
--- PyWireGate/trunk/knx_connector/KNX_Connector.py 2010-11-19 21:54:32 UTC (rev 141)
+++ PyWireGate/trunk/knx_connector/KNX_Connector.py 2010-11-19 23:47:12 UTC (rev 142)
@@ -61,7 +61,8 @@
## Deafaultconfig
defaultconfig = {
'url':'ip:127.0.0.1',
- 'parser' : 'groupsocket'
+ 'parser' : 'groupsocket',
+ 'checktime' : 300
}
## check Defaultconfig Options in main configfile
@@ -162,20 +163,17 @@
def _sendloop(self):
addr = 0
msg = []
- KNX = EIBConnection.EIBConnection()
try:
- KNX.EIBSocketURL(self.config['url'])
while self.isrunning:
try:
(addr,msg) = self.sendQueue.get(timeout=1)
- KNX.EIBSendGroup(addr,msg)
+ self.KNX.EIBSendGroup(addr,msg)
except Empty:
pass
except:
self.WG.errorlog("Failed send %r %r" % (addr,msg))
finally:
self._sendThread = None
- KNX.EIBClose()
def send(self,msg,dstaddr,flag=KNXWRITEFLAG):
@@ -237,7 +235,7 @@
## wait 500ms between checks
self.idle(.5)
## wait 5 Minutes
- self.idle(300)
+ self.idle(self.config['checktime'])
finally:
self._checkThread = None
KNX.EIBClose()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|