def create_attribute_models(self): for data in super(RunnableController, self).create_attribute_models(): yield data # Create sometimes writeable attribute for the current completed scan # step completed_steps_meta = NumberMeta( "int32", "Readback of number of scan steps", tags=[widget("textinput")]) completed_steps_meta.set_writeable_in(ss.PAUSED, ss.ARMED) self.completed_steps = completed_steps_meta.create_attribute_model(0) yield "completedSteps", self.completed_steps, self.set_completed_steps # Create read-only attribute for the number of configured scan steps configured_steps_meta = NumberMeta( "int32", "Number of steps currently configured", tags=[widget("textupdate")]) self.configured_steps = configured_steps_meta.create_attribute_model(0) yield "configuredSteps", self.configured_steps, None # Create read-only attribute for the total number scan steps total_steps_meta = NumberMeta( "int32", "Readback of number of scan steps", tags=[widget("textupdate")]) self.total_steps = total_steps_meta.create_attribute_model(0) yield "totalSteps", self.total_steps, None # Create sometimes writeable attribute for the default axis names axes_to_move_meta = StringArrayMeta( "Default axis names to scan for configure()", tags=[widget("table"), config()]) axes_to_move_meta.set_writeable_in(ss.READY) self.axes_to_move = axes_to_move_meta.create_attribute_model( self.params.axesToMove) yield "axesToMove", self.axes_to_move, self.set_axes_to_move
def create_attribute_models(self): for data in super(ExposureDetectorDriverPart, self).create_attribute_models(): yield data # Create writeable attribute for how long we should allow for detector # read out meta = NumberMeta("float64", "Time taken to readout detector", tags=[widget("textinput"), config()]) self.readout_time = meta.create_attribute_model( self.params.readoutTime) yield "readoutTime", self.readout_time, self.readout_time.set_value
def create_attribute_models(self): for data in super(PmacTrajectoryPart, self).create_attribute_models(): yield data # Create writeable attribute for the minimum time to leave when there # is a gap between frames meta = NumberMeta("float64", "Min time for any gaps between frames", tags=[widget("textinput"), config()]) self.min_turnaround = meta.create_attribute_model( self.params.minTurnaround) yield "minTurnaround", self.min_turnaround, \ self.min_turnaround.set_value
def create_attribute_models(self): # Create writeable attribute for current counter value meta = NumberMeta("float64", "A counter", tags=[config()]) self.counter = meta.create_attribute_model() yield "counter", self.counter, self.counter.set_value