Ejemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        #########################################################################
        # DEFINE CALLBACKS IN DICTIONARY
        # Second, associate key with right function to be called
        # key is comming from socket and call associated function
        self.callbacks = {
            'checkVersion' : self.checkForUpdates,
            'reinstallFw' : self.reinstallFw
        }

#        self.downloadTries = 0
#        self.estimatedInstallTime = 80

        self.fwMd5 = None
        self.downloadUpdateLink  = None

        self.fwDownloadLink = None
        self.fwDownloadSize = None
        self.fwSizeWatcherThread = None

        self.updateFileName = None

        if (platform.machine()=="mips") :
            # put file to RAM
            self.fwPath = "/tmp/"
        else :
            # this is where file will be saved on the PC
            self.fwPath = "./"
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        #########################################################################
        # DEFINE CALLBACKS IN DICTIONARY
        # Second, associate key with right function to be called
        # key is comming from socket and call associated function
        self.callbacks = {
            'checkVersion': self.checkForUpdates,
            'downloadUpdate': self.downloadUpdate,
            'reinstallFw': self.reinstallFw
        }

        self.downloadTries = 0
        self.estimatedInstallTime = 80

        self.fwMd5 = None
        self.downloadUpdateLink = None

        self.fwDownloadLink = None
        self.fwDownloadSize = None
        self.fwSizeWatcherThread = None

        if (platform.machine() == "mips"):
            self.fwPath = "/tmp/weio_recovery.bin"
        else:
            self.fwPath = "./weio_recovery.bin"
Ejemplo n.º 3
0
 def __init__(self, session):
     SockJSConnection.__init__(self, session)
     self.mode = 0
     self.drawmode = False
     self.isRotate = False
     self.x = 0
     self.y = 0
Ejemplo n.º 4
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        #########################################################################
        # DEFINE CALLBACKS IN DICTIONARY
        # Second, associate key with right function to be called
        # key is comming from socket and call associated function
        self.callbacks = {
            'checkVersion' : self.checkForUpdates,
            'downloadUpdate' : self.downloadUpdate,
            'reinstallFw' : self.reinstallFw
        }

        self.downloadTries = 0
        self.estimatedInstallTime = 80

        self.fwMd5 = None
        self.downloadUpdateLink  = None

        self.fwDownloadLink = None
        self.fwDownloadSize = None
        self.fwSizeWatcherThread = None

        if (platform.machine()=="mips") :
            self.fwPath = "/tmp/weio_recovery.bin"
        else :
            self.fwPath = "./weio_recovery.bin"
Ejemplo n.º 5
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.errObject = []
        self.errReason = ""

        self.callbacks = {
            'updateSettings': self.updateUserData,
            'updataNetwork': self.updateNetworkData
        }
Ejemplo n.º 6
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.errObject = []
        self.errReason = ""

        self.callbacks = {
        'updateSettings' : self.updateUserData,
        'updataNetwork' : self.updateNetworkData
        }
Ejemplo n.º 7
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.wifi = weioIdeGlobals.WIFI

        #########################################################################
        # DEFINE CALLBACKS IN DICTIONARY
        # Second, associate key with right function to be called
        # key is comming from socket and call associated function
        self.callbacks = {
            'scan' : self.scanCells,
            'goAp' : self.goToApMode,
            'goSta' : self.goToStaMode,
        }
Ejemplo n.º 8
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.wifi = weioIdeGlobals.WIFI

        #########################################################################
        # DEFINE CALLBACKS IN DICTIONARY
        # Second, associate key with right function to be called
        # key is comming from socket and call associated function
        self.callbacks = {
            'scan': self.scanCells,
            'goAp': self.goToApMode,
            'goSta': self.goToStaMode,
        }
Ejemplo n.º 9
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     #########################################################################
     # DEFINE CALLBACKS IN DICTIONARY
     # Second, associate key with right function to be called
     # key is comming from socket and call associated function
     self.callbacks = {
         'checkVersion' : self.checkForUpdates,
         'downloadUpdate' : self.downloadUpdate,
     }
     
     self.downloadTries = 0
     self.estimatedInstallTime = 35
Ejemplo n.º 10
0
    def __init__(self, userManager, eventManager, session):
        SockJSConnection.__init__(self, session)

        self._logger = logging.getLogger(__name__)

        self._temperatureBacklog = []
        self._temperatureBacklogMutex = threading.Lock()
        self._logBacklog = []
        self._logBacklogMutex = threading.Lock()
        self._messageBacklog = []
        self._messageBacklogMutex = threading.Lock()

        self._userManager = userManager
        self._eventManager = eventManager
Ejemplo n.º 11
0
	def __init__(self, userManager, eventManager, session):
		SockJSConnection.__init__(self, session)

		self._logger = logging.getLogger(__name__)

		self._temperatureBacklog = []
		self._temperatureBacklogMutex = threading.Lock()
		self._logBacklog = []
		self._logBacklogMutex = threading.Lock()
		self._messageBacklog = []
		self._messageBacklogMutex = threading.Lock()

		self._userManager = userManager
		self._eventManager = eventManager
Ejemplo n.º 12
0
	def __init__(self, printer, gcodeManager, userManager, eventManager, session):
		SockJSConnection.__init__(self, session)

		self._logger = logging.getLogger(__name__)

		self._temperatureBacklog = []
		self._temperatureBacklogMutex = threading.Lock()
		self._position = {"x": 0, "y": 0, "z": 0}
		self._positionMutex = threading.Lock()
		self._logBacklog = []
		self._logBacklogMutex = threading.Lock()
		self._messageBacklog = []
		self._messageBacklogMutex = threading.Lock()

		self._printer = printer
		self._gcodeManager = gcodeManager
		self._userManager = userManager
		self._eventManager = eventManager
 def __init__(self, *args, **kwargs):
     self.global_obj_key = ""
     SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 14
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 15
0
    def __init__(self, service_registry, *args, **kwargs):
        self.service_registry = service_registry
        self.client = SockJSClient(req_handler=self)

        SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 16
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.errObject = []
     self.errReason = ""
Ejemplo n.º 17
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 18
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.connections = weioRunnerGlobals.weioConnections
Ejemplo n.º 19
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.application = None
     self.request = None
     self._access_context_ = None
Ejemplo n.º 20
0
 def __init__(self, c2s_schema, s2c_schema, *args, **kwargs):
     self._c2s_schema = c2s_schema
     self._s2c_schema = s2c_schema
     SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 21
0
 def __init__(self, *args, **kwargs):
     self.global_obj_key = ""
     SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 22
0
 def __init__(self, *args, **kwargs):
     self.rows = 24
     self.cols = 80
     self.connected = False
     SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 23
0
	def __init__(self, session):
		SockJSConnection.__init__(self, session)
		self.db = Mongo.db.ui
Ejemplo n.º 24
0
 def __init__(self,session):
     SockJSConnection.__init__(self, session)
     self._logger = logging.getLogger(__name__)
     self.sender = None
Ejemplo n.º 25
0
 def __init__(self, c2s_schema, s2c_schema, *args, **kwargs):
     self._c2s_schema = c2s_schema
     self._s2c_schema = s2c_schema
     SockJSConnection.__init__(self, *args, **kwargs)
Ejemplo n.º 26
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.errObject = []
     self.errReason = ""