rtCommon.webServer
Web Server module which provides the web user interface to control and monitor experiments
Module Contents
Classes
Cloud service web-interface that is the front-end to the data processing. |
|
Command handler for commands that the javascript running in the web browser can call |
Functions
|
Read output from runSession process and queue into lineQueue for logging |
|
Used to remember users who are currently logged in. |
Attributes
- rtCommon.webServer.CommonOutputDir = '/rtfmriData/'
- rtCommon.webServer.moduleDir
- rtCommon.webServer.rootDir
- rtCommon.webServer.logger
- class rtCommon.webServer.Web
Cloud service web-interface that is the front-end to the data processing.
- app
- httpServer
- started = False
- httpPort = 8888
- webDir
- htmlDir
- ioLoopInst
- testMode = False
- webDisplayInterface
- static start(params, cfg, testMode=False)
Start the web server running. Function does not return.
- static addHandlers(handlers)
- static stop()
Stop the web server.
- static close()
- class rtCommon.webServer.WsBrowserRequestHandler(webDisplayInterface, params, cfg)
Command handler for commands that the javascript running in the web browser can call
- _addScript(name, path, type)
Add the experiment script to be connected to the various run button of the web page. These include ‘mainScript’ for classification processing, ‘initScript’ for session initialization, and ‘finalizeScript’ for any final processing at the end of a session.
- on_getDefaultConfig()
Return default configuration settings for the project
- on_getDataPoints()
Return data points that have been plotted
- on_getRunStatus()
Return run status from the project server
- on_clearDataPoints()
Clear all plot datapoints
- on_runScript(name)
Run one of the project scripts in a separate process
- on_stop()
Stop execution of the currently running project script (only one can run at a time)
- on_uploadFiles(request)
Upload files from the dataServer to the cloud computer
- _wsBrowserCallback(client, message)
The main message handler for messages received over web sockets from the web page javascript. It will parse the message and call the corresponding function above to handle the request.
- _runSession(cfg, pyScript, tag, logType='run')
Run the experimenter provided python script as a separate process. Forward the script’s printed output to the web page’s log message area.
- _uploadFilesHandler(request)
Handle requests from the web interface to upload files to this computer.
- _setError(errStr)
- rtCommon.webServer.procOutputReader(proc, lineQueue)
Read output from runSession process and queue into lineQueue for logging
- rtCommon.webServer.getCookieSecret(dir)
Used to remember users who are currently logged in.