Exemple #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 = "./"
Exemple #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"
 def __init__(self, session):
     SockJSConnection.__init__(self, session)
     self.mode = 0
     self.drawmode = False
     self.isRotate = False
     self.x = 0
     self.y = 0
Exemple #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"
Exemple #5
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.errObject = []
        self.errReason = ""

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

        self.callbacks = {
        'updateSettings' : self.updateUserData,
        'updataNetwork' : self.updateNetworkData
        }
Exemple #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,
        }
Exemple #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,
        }
Exemple #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
Exemple #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
Exemple #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
Exemple #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)
Exemple #14
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
Exemple #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)
Exemple #16
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.errObject = []
     self.errReason = ""
Exemple #17
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
Exemple #18
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.connections = weioRunnerGlobals.weioConnections
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.application = None
     self.request = None
     self._access_context_ = None
Exemple #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)
 def __init__(self, *args, **kwargs):
     self.global_obj_key = ""
     SockJSConnection.__init__(self, *args, **kwargs)
Exemple #22
0
 def __init__(self, *args, **kwargs):
     self.rows = 24
     self.cols = 80
     self.connected = False
     SockJSConnection.__init__(self, *args, **kwargs)
Exemple #23
0
	def __init__(self, session):
		SockJSConnection.__init__(self, session)
		self.db = Mongo.db.ui
Exemple #24
0
 def __init__(self,session):
     SockJSConnection.__init__(self, session)
     self._logger = logging.getLogger(__name__)
     self.sender = None
Exemple #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)
Exemple #26
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
     self.errObject = []
     self.errReason = ""