コード例 #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
ファイル: updaterHandler.py プロジェクト: AlexDus/weio
    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
ファイル: updaterHandler.py プロジェクト: ukicar/weio-1
    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
ファイル: userSettingsHandler.py プロジェクト: seipekm/weio
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.errObject = []
        self.errReason = ""

        self.callbacks = {
            'updateSettings': self.updateUserData,
            'updataNetwork': self.updateNetworkData
        }
コード例 #6
0
ファイル: userSettingsHandler.py プロジェクト: jordonwu/weio
    def __init__(self, *args, **kwargs):
        SockJSConnection.__init__(self, *args, **kwargs)
        self.errObject = []
        self.errReason = ""

        self.callbacks = {
        'updateSettings' : self.updateUserData,
        'updataNetwork' : self.updateNetworkData
        }
コード例 #7
0
ファイル: wifiHandler.py プロジェクト: francxk/weio
    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
ファイル: updaterHandler.py プロジェクト: zousenming/weio
 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
コード例 #13
0
 def __init__(self, *args, **kwargs):
     self.global_obj_key = ""
     SockJSConnection.__init__(self, *args, **kwargs)
コード例 #14
0
ファイル: weioJSPYHandler.py プロジェクト: WRTIOT/weio
 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
ファイル: dashboardHandler.py プロジェクト: Capt-Cpt/weio
 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
ファイル: weioJSPYHandler.py プロジェクト: sethkontny/weio
 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
ファイル: handlers.py プロジェクト: cmusatyalab/opendiamond
 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
ファイル: websocket.py プロジェクト: demophoon/vim-talk
 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
ファイル: socket.py プロジェクト: fibasile/pi.mill
 def __init__(self,session):
     SockJSConnection.__init__(self, session)
     self._logger = logging.getLogger(__name__)
     self.sender = None
コード例 #25
0
ファイル: handlers.py プロジェクト: joegana/opendiamond
 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 = ""