Exemplo n.º 1
0
 def newModule(self, module_name, **args ):
     from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper 
     registry = get_module_registry()
     controller = self.app.get_controller()
     package_name = args.get('package', self.dv3dpkg )
     namespace = args.get('ns', '' )
     descriptor = registry.get_descriptor_by_name( package_name, module_name, namespace )
     module = controller.create_module_from_descriptor(descriptor)
     DV3DPipelineHelper.add_module( module.id, self.sheetName, self.cell_address )
     ports = args.get( 'ports', {} )
     for portItem in ports.items():
         self.setPortValue( module, portItem[0], portItem[1] )      
     return module
Exemplo n.º 2
0
 def newModule(self, module_name, **args):
     from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper
     registry = get_module_registry()
     controller = self.app.get_controller()
     package_name = args.get('package', self.dv3dpkg)
     namespace = args.get('ns', '')
     descriptor = registry.get_descriptor_by_name(package_name, module_name,
                                                  namespace)
     module = controller.create_module_from_descriptor(descriptor)
     DV3DPipelineHelper.add_module(module.id, self.sheetName,
                                   self.cell_address)
     ports = args.get('ports', {})
     for portItem in ports.items():
         self.setPortValue(module, portItem[0], portItem[1])
     return module
Exemplo n.º 3
0
    def log(self, pobj, msg, print_stack=False):
        from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper

        cell_coords = (
            DV3DPipelineHelper.getCellCoordinates(pobj.moduleID) if (pobj and hasattr(pobj, "moduleID")) else "xx"
        )
        mid = pobj.moduleID if (pobj and hasattr(pobj, "moduleID")) else 0
        if self.diagnostics_file == None:
            self.diagnostics_file = open(self.diagnostics_file_path, "w")
        self.diagnostics_file.write("---%s--- %s[%d]: %s\n" % (str(cell_coords), pobj.__class__.__name__, mid, msg))
        if print_stack:
            traceback.print_stack(file=self.diagnostics_file)
        self.diagnostics_file.flush()
Exemplo n.º 4
0
 def log(self, pobj, msg, print_stack=False):
     from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper
     cell_coords = DV3DPipelineHelper.getCellCoordinates(
         pobj.moduleID) if (pobj and hasattr(pobj, 'moduleID')) else "xx"
     mid = pobj.moduleID if (pobj and hasattr(pobj, 'moduleID')) else 0
     if self.diagnostics_file == None:
         self.diagnostics_file = open(self.diagnostics_file_path, 'w')
     self.diagnostics_file.write(
         "---%s--- %s[%d]: %s\n" %
         (str(cell_coords), pobj.__class__.__name__, mid, msg))
     if print_stack:
         traceback.print_stack(file=self.diagnostics_file)
     self.diagnostics_file.flush()
Exemplo n.º 5
0
 def __del__(self ):
     from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper            
     DV3DPipelineHelper.clear_input_variables()
Exemplo n.º 6
0
 def initInput( self, inputVariable ):
     from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper 
     inputId = self.getNewInputId()
     DV3DPipelineHelper.add_input_variable( inputId, inputVariable )
     return inputVariable.id, inputId
Exemplo n.º 7
0
 def __del__(self):
     from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper
     DV3DPipelineHelper.clear_input_variables()
Exemplo n.º 8
0
 def initInput(self, inputVariable):
     from packages.vtDV3D.PlotPipelineHelper import DV3DPipelineHelper
     inputId = self.getNewInputId()
     DV3DPipelineHelper.add_input_variable(inputId, inputVariable)
     return inputVariable.id, inputId