Exemplo n.º 1
0
            #
            dsfilename = iohub_conf.get('data_store', {}).get('filename')
            if dsfilename is None:
                dsfilename = 'events'
            dsfilepath = pjoin(DataCollectionRuntime.results_root_folder,
                                    DataCollectionRuntime.active_exp_name,
                                    dsfilename)
            iohub_conf.get('data_store', {})['filename'] = dsfilepath
            # save modified iohub_config for loading by upcoming session
            #
            dump(iohub_conf, file(pjoin(configurationDirectory,
                                new_iohubconfig_rpath), 'w'), Dumper = Dumper)
            iohub_conf = None
            # Create the experiment Session Runtime
            #
            runtime = DataCollectionRuntime(configurationDirectory,
                                            "..\\settings\\last_app_config.yaml")

            # Set the app web socket and send a msg indicating data collection
            # is ready
            #
            runtime.ui_server_websocket = proxy(ws)
            cmtype = "success"
            msg = {'msg_type': 'EXP_SESSION_STARTED', 'type': cmtype}
            runtime.sendToWebServer(msg)

            app_conf = None

            # Start the exp runtime
            #
            cmd, _ = runtime.start(app_config_file_name,pjoin(configurationDirectory,
                                                        new_iohubconfig_rpath))