Example #1
0
 def __setitem__(self, item, value):
     if isinstance(item, slice):
         indices = item.indices(min(len(self), len(value)))
         for i in range(*indices):
             self[i] = value[i]
     else:
         item = slave.misc.index(item, len(self))
         unit, temp = value
         data_t = [Integer(min=1), Integer(min=1, max=200), Float, Float]
         cmd = Command(write=('CRVPT', data_t), connection=self.connection)
         # Since indices in LS304 start at 1, it must be added.
         cmd.write((self.idx, item + 1, unit, temp))
Example #2
0
    def pass_control_back(self, primary, secondary):
        """The address to which the controll is to be passed back.

        Tells a potential controller device the address to which the control is
        to be passed back.

        :param primary: An integer in the range 0 to 30 representing the
            primary address of the controller sending the command.
        :param secondary: An integer in the range of 0 to 30 representing the
            secondary address of the controller sending the command. If it is
            missing, it indicates that the controller sending this command does
            not have extended addressing.

        """
        if secondary is None:
            cmd = Command(write=('*PCB', Integer(min=0, max=30)),
                          connection=self.connection)
            cmd.write(primary)
        else:
            type_ = [Integer(min=0, max=30), Integer(min=0, max=30)]
            cmd = Command(write=('*PCB', type_), connection=self.connection)
            cmd.write((primary, secondary))
Example #3
0
    def pass_control_back(self, primary, secondary):
        """The address to which the controll is to be passed back.

        Tells a potential controller device the address to which the control is
        to be passed back.

        :param primary: An integer in the range 0 to 30 representing the
            primary address of the controller sending the command.
        :param secondary: An integer in the range of 0 to 30 representing the
            secondary address of the controller sending the command. If it is
            missing, it indicates that the controller sending this command does
            not have extended addressing.

        """
        if secondary is None:
            cmd = Command(write=('*PCB', Integer(min=0, max=30)),
                          connection=self.connection)
            cmd.write(primary)
        else:
            type_ = [Integer(min=0, max=30), Integer(min=0, max=30)]
            cmd = Command(write=('*PCB', type_),
                          connection=self.connection)
            cmd.write((primary, secondary))
Example #4
0
 def write_fn(self):
     cmd = Command(write='FN', connection=self.connection)
     cmd.write()
Example #5
0
 def write_fn(self):
     cmd = Command(write='FN', connection=self.connection)
     cmd.write()