Permit proxy only and to avoid mapping zone names

parent e8e2d808
...@@ -5,7 +5,9 @@ baudrate: 9600 ...@@ -5,7 +5,9 @@ baudrate: 9600
enableTCPProxy: no enableTCPProxy: no
tcpport: 10001 tcpport: 10001
tcpaddr: 127.0.0.1 tcpaddr: 127.0.0.1
proxyonly: no
[panel] [panel]
autodetect: yes autodetect: yes
paneltype: MG5050 paneltype: MG5050
mapNames: yes
...@@ -161,6 +161,7 @@ class ParadoxProtocol(BaseProtocol): ...@@ -161,6 +161,7 @@ class ParadoxProtocol(BaseProtocol):
self.log.debug("Connection lost for "+str(reason)) self.log.debug("Connection lost for "+str(reason))
def connect(self): def connect(self):
if not genutils.isTrue(self.cfg.get('connection', 'proxyonly')):
self.write(p37b.MSG_CONNECT, expected_reply=p37b.REPLY_CONNECT) self.write(p37b.MSG_CONNECT, expected_reply=p37b.REPLY_CONNECT)
self.write(p37b.MSG_GETSTATUS, expected_reply=p37b.REPLY_GETSTATUS) self.write(p37b.MSG_GETSTATUS, expected_reply=p37b.REPLY_GETSTATUS)
self.write(p37b.MSG_SYNC, self._replySync, expected_reply=p37b.REPLY_SYNC) self.write(p37b.MSG_SYNC, self._replySync, expected_reply=p37b.REPLY_SYNC)
...@@ -182,13 +183,19 @@ class ParadoxProtocol(BaseProtocol): ...@@ -182,13 +183,19 @@ class ParadoxProtocol(BaseProtocol):
# when connecting. So, we just send both, hope # when connecting. So, we just send both, hope
# sometime i will fully understand what they do exactly. # sometime i will fully understand what they do exactly.
self.write(p37b.MSG_UNKWNOWN_HS1) self.write(p37b.MSG_UNKWNOWN_HS1)
self.write(p37b.MSG_UNKWNOWN_HS2) self.write(p37b.MSG_UNKWNOWN_HS2, self.mapNames)
def _processEvent(self, event): def _processEvent(self, event):
pass pass
def mapNames(self, reply=None):
if genutils.isTrue(self.cfg.get('connection', 'mapNames'):
pass
class ParadoxTCPProxy(Protocol): class ParadoxTCPProxy(Protocol):
cid = 0 cid = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment