Example #1
0
    def setup(self, ctxConfig, drvConfig):
        superClass.setup(self, ctxConfig, drvConfig)

        SIM = SimulatorModel()
        REGISTRY['SIM'] = SIM
        
        LOG("Setup standalone CFG interface")
        dataPath = Config.getRuntimeDir()
        driverConfig = self.getDriverConfig()
        simulationPath = driverConfig['SimPath']
        simulationFile = self.getContextConfig().getDriverParameter('Simulation')
        home = Config.getHome()
        
        if home is None:
            raise DriverException("SPELL home is not defined")
        
        LOG("Loading simulation: " + simulationFile)
        simulationFile = dataPath + os.sep +  simulationPath + \
                         os.sep + simulationFile
                         
        SIM.tmClass = REGISTRY['TM']
        SIM.tcClass = REGISTRY['TC']
        SIM.setup( simulationFile )
        
        self.__ready = True