示例#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 = "./"
示例#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"
示例#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
示例#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"
示例#5
0
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.errObject = []
        self.errReason = ""

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

        self.callbacks = {
        'updateSettings' : self.updateUserData,
        'updataNetwork' : self.updateNetworkData
        }
示例#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,
        }
示例#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,
        }
示例#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
示例#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
示例#11
0
文件: util.py 项目: KyleXYY/MPrintBox
	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
示例#12
0
文件: util.py 项目: tbfleming/OctoCut
	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)
示例#14
0
 def __init__(self, *args, **kwargs):
     SockJSConnection.__init__(self, *args, **kwargs)
示例#15
0
文件: sockjs.py 项目: ntrrgc/snorky
    def __init__(self, service_registry, *args, **kwargs):
        self.service_registry = service_registry
        self.client = SockJSClient(req_handler=self)

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