예제 #1
0
 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
예제 #2
0
 def create_attribute_models(self):
     for y in super(WebsocketClientComms, self).create_attribute_models():
         yield y
     # Create read-only attribute for the remotely reachable blocks
     meta = StringArrayMeta("Remotely reachable blocks",
                            tags=[widget("table")])
     self.remote_blocks = meta.create_attribute_model()
     yield "remoteBlocks", self.remote_blocks, None