def __init__(self, PORT, SERVER, BUFFERS=0, MEMORY=0, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT, HOST, P, R, MAXBUF=1000, MAXMEM=0, **args): # create asyn ports for PandA self.control_port = AsynIP('%s:8888' % HOST, '%s_CTRL' % PORT) self.data_port = AsynIP('%s:8889' % HOST, '%s_DATA' % PORT) # Call init on Device superclass self.__super.__init__(PORT) # Store arguments away to use later self.PORT = PORT self.HOST = HOST self.P = P self.R = R self.MAXBUF = MAXBUF self.MAXMEM = MAXMEM self.NELM = 100000 # Perform template subsitutions to create our DB file makeTemplateInstance(_MainDbFile, locals(), args) locals().update(args) # Create the templates for the position bus entries for i in range(self.N_POSBUS): makeTemplateInstance(_PosBusTemplate, locals(), {'POSBUS_IND': ("%d" % i)})
def __init__(self, classname, PORT, NDARRAY_PORT, QUEUE=5, BLOCK=0, NDARRAY_ADDR=0, BUFFERS=50, MEMORY=0, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args) # Init the python classname specific class class _tmp(AutoSubstitution): ModuleName = adPythonPlugin.ModuleName TrueName = "_adPython%s" % classname TemplateFile = "adPython%s.template" % classname _tmpargs = copy.deepcopy(args) _tmpargs['PORT'] = PORT _tmp(**filter_dict(_tmpargs, _tmp.ArgInfo.Names())) # Store the args self.filename = "$(ADPYTHON)/adPythonApp/scripts/adPython%s.py" % classname self.Configure = 'adPythonPluginConfigure'
def __init__(self, PORT, NDARRAY_PORT, QUEUE = 2, HTTP_PORT = 8080, BLOCK = 0, NDARRAY_ADDR = 0, MEMORY = 0, ENABLED = 1, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT, NDARRAY_PORT, QUEUE = 2, BLOCK = 0, NDARRAY_ADDR = 0, BUFFERS = 0, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT, WIDTH, HEIGHT, DATATYPE = 1, BUFFERS = 50, MEMORY = 0, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT, SES_BASE_DIR, SES_INSTRUMENT_FILE, BUFFERS = 50, MEMORY = -1, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args) iocwriter.AddDbMakefileHook(self.DbMakefileHook)
def __init__(self, DATA_IP, CONTROL_IP, MODULE_TYPE, NCHANNELS=4, NSAMPLES=1000000, BUFFERS=50, MEMORY=0, **args): self.controlPort = AsynIP(CONTROL_IP, name = args["PORT"] + ".control") # Init the superclass (_ADBase) self.__super.__init__(args["PORT"]) # Store the args self.__dict__.update(locals()) makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, classname, PORT, NDARRAY_PORT, QUEUE = 5, BLOCK = 0, ENABLED=0, NDARRAY_ADDR = 0, BUFFERS = 50, MEMORY = 0, CUSTOM_CLASS="", CUSTOM_FILE="", CUSTOM_NINT=0, CUSTOM_NDOUBLE=0, CUSTOM_NINTARR=0, CUSTOM_NDOUBLEARR=0, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args) # Arguments used for the class associated template/s _tmpargs = copy.deepcopy(args) _tmpargs['PORT'] = PORT # Init the python classname specific class if classname == "Custom": #_tmpargs2 = copy.deepcopy(_tmpargs) #del _tmpargs2["TIMEOUT"] #del _tmpargs2["ADDR"] _customPluginGui(**_tmpargs) class _tmpint(AutoSubstitution): ModuleName = adPythonPlugin.ModuleName TemplateFile = "adPythonCustomInt.template" for index in range(1, CUSTOM_NINT+1): _tmpint(N=index, **_tmpargs) class _tmpdouble(AutoSubstitution): ModuleName = adPythonPlugin.ModuleName TemplateFile = "adPythonCustomDouble.template" for index in range(1, CUSTOM_NDOUBLE+1): _tmpdouble(N=index, **_tmpargs) class _tmpintarray(AutoSubstitution): ModuleName = adPythonPlugin.ModuleName TemplateFile = "adPythonCustomIntArray.template" for index in range(1, CUSTOM_NINTARR+1): _tmpintarray(N=index, **_tmpargs) class _tmpdoublearray(AutoSubstitution): ModuleName = adPythonPlugin.ModuleName TemplateFile = "adPythonCustomDoubleArray.template" for index in range(1, CUSTOM_NDOUBLEARR+1): _tmpdoublearray(N=index, **_tmpargs) self.filename = CUSTOM_FILE self.classname = CUSTOM_CLASS else: class _tmp(AutoSubstitution): ModuleName = adPythonPlugin.ModuleName TrueName = "_adPython%s" % classname TemplateFile = "adPython%s.template" % classname _tmp(**filter_dict(_tmpargs, _tmp.ArgInfo.Names())) self.filename = "$(ADPYTHON)/adPythonApp/scripts/adPython%s.py" % classname self.Configure = 'adPythonPluginConfigure'
def __init__(self, PORT, SES_BASE_DIR, SES_INSTRUMENT_FILE, BUFFERS = 50, MEMORY = -1, debug = False, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args) iocwriter.AddDbMakefileHook(self.DbMakefileHook) if debug: self.MakefileStringList.append("USR_CFLAGS_WIN32 += -DDEBUG /Zi /Od") self.MakefileStringList.append("USR_CPPFLAGS_WIN32 += -DDEBUG /Zi /Od") self.MakefileStringList.append("USR_LDFLAGS_WIN32 += /INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF")
def __init__(self, PORT, serialPort, NELM=100000, MAXBUF=5, MAXMEM=0, **args): # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template R = args["Q"] + ":" makeTemplateInstance(_zebraTemplate, locals(), args)
def __init__(self, PORT, SHAMROCKID=0, BUFFERS = 50, MEMORY = 0, INSTALLPATH = "", PRIORITY = 0, STACKSIZE = 100000, **args): print "*****************************************************" print "WARNING - your builder generated andor IOC may not work!" print " Currently it is necessary to modify the generated iocs src/makefile to ensure the following link order:" print " BLxxI-EA-IOC-01_LIBS += ADBase, BLxxI-EA-IOC-01_LIBS += andor, BLxxI-EA-IOC-01_LIBS += GraphicsMagick" print " If you are using a plugin that requires GraphicsMagick (eg URLDriver or NDFileMagick) then it may not work." print " There is a conflict with a SetImage() function exisiting in both the andor and GraphicsMagick libraries" print " See note in areaDetector/etc/builder.py regarding linking the andor library for more info." print "*****************************************************" # Init the superclass (AsynPort) self.__super.__init__(PORT) # Update the attributes of self from the commandline args self.__dict__.update(locals()) # Make an instance of our template makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT = "pilatus1.CAM", CAMSERVER = "localhost:41234", XSIZE = 1024, YSIZE = 768, BUFFERS = 50, MEMORY = 0, PRIORITY = 0, STACK_SIZE = 0, CBF_TRANSFER = 0, CAMSERVER_HOST = "10.10.10.100", CBF_TEMPLATE_LOCATION = "/tmp/cbf_templates", **args): # # Make an asyn IP port to talk to pilatus on CAMSERVER_PORT = PORT + "ip" self.ip = AsynIP(CAMSERVER, name = PORT + "ip", input_eos = "\030", output_eos = "\n") # Init the superclass self.__super.__init__(PORT) # # Init the file writing class # self.file = NDFileTemplate(**filter_dict(args, NDFileTemplate.ArgInfo.Names())) # # Store the args # self.__dict__.update(self.file.args) self.__dict__.update(locals()) makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT, IDType, IDValue = "", BUFFERS = 50, MEMORY = 0, **args): # Init the superclass self.__super.__init__(PORT) self.__dict__.update(locals()) makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT, IDType, IDValue="", BUFFERS=50, MEMORY=0, **args): # Init the superclass self.__super.__init__(PORT) self.__dict__.update(locals()) makeTemplateInstance(self._SpecificTemplate, locals(), args)
def __init__(self, PORT, IP_PORT, BUFFERS=50, MEMORY=0, **args): self.ip_port = AsynIP(IP_PORT, name=PORT + ".ip") self.__super.__init__(PORT) self.__dict__.update(locals()) makeTemplateInstance(self._SpecificTemplate, locals(), args)