lpcmanager

LPCCommand : switch to wx.Timer instead of regular python timer for the rapidfire protection. With regular python timers, some refresh order could pile eventloop when interacting with the GUI while doing initial loading of signals.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# XXX remove that crap, seriously
from connectors import WAMP
from autobahn.wamp import auth
class WampSession(WAMP.WampSession):
def onConnect(self):
self.join(u"Automation", [u"wampcra"], u"smarteh")
print("CRA checking ...")
def onChallenge(self, challenge):
if challenge.method == "wampcra":
key = auth.derive_key("smarteh", "salt123", 100, 16)
return auth.compute_wcs(key, challenge.extra['challenge'])
else:
raise Exception("don't know how to handle authmethod {}".format(challenge.method))