Source code for qcodes_contrib_drivers.drivers.Horiba.private.fhr_client
from__future__importannotationsimportctypesimportosimportpathlibfrompathlibimportPathfromtypingimportAny,Tuplefromqcodes.utilsimportDelayedKeyboardInterrupttry:frommsl.loadlibimportClient64exceptImportError:raiseImportError('This driver requires the msl.loadlib package for ''communicating with a 32-bit dll. You can install it '"by running 'pip install msl.loadlib'")
[docs]defSpeCommand(self,h_spe:int,a_dsp:str,a_fun:str,aPar:ctypes._SimpleCData|None=None)->Tuple[int,int|None]:"""Send command (execute a function) named "a_fun" for the function dispatcher named "a_dsp" for the spectrometer handled "h_spe". "a_par" is a pointer to the function parameters."""returnself.request32('SpeCommand',h_spe,a_dsp,a_fun,aPar)
[docs]defSpeCommandSetup(self,h_spe:int,a_dsp:str,fields:Tuple[int,...])->Tuple[int,None]:"""Send command to set up a motor. Need to treat this separately since the SpeSetup structure must be defined in the 32-bit module. Otherwise, the 32-bit executable would need to know about qcodes_contrib_drivers. """returnself.request32('SpeCommandSetup',h_spe,a_dsp,fields)
[docs]defSpeCommandIniParams(self,h_spe:int,a_dsp:str,fields:Tuple[int,...])->Tuple[int,None]:"""Send command to initialize a grating motor. Need to treat this separately since the SpeIniParams structure must be defined in the 32-bit module. Otherwise, the 32-bit executable would need to know about qcodes_contrib_drivers. """returnself.request32('SpeCommandIniParams',h_spe,a_dsp,fields)