def __init__(self, outputs: List[Output]):
        self._params = outputs
        self._is_csr = False
        self._csr = Output(Parameter.CSRCode())

        for config in self._params:
            if config.is_type(Parameter.CSRCode):
                raise RuntimeError(
                    "CSRCode is always implicitly set, do not use this in data_config."
                )
Exemple #2
0
 def set_pulsing_frequency(self, frequency):
     frequency_input = Input(frequency, Parameter.PulsingFrequency())
     return self._protocol.execute(Command(93, [frequency_input], []))
Exemple #3
0
 def set_ramping_rise_time(self, time):
     time_input = Input(time, Parameter.RampTime())
     return self._protocol.execute(Command(31, [time_input], []))
Exemple #4
0
 def set_remote_control(self, control_mode):
     control_input = Input(control_mode, Parameter.ControlOverride())
     return self._protocol.execute(Command(29, [control_input], []))
Exemple #5
0
 def set_control_mode(self, control_mode):
     control_input = Input(control_mode, Parameter.ControlMode())
     return self._protocol.execute(Command(14, [control_input], []))
Exemple #6
0
 def set_setpoint(self, power_or_voltage):
     power_input = Input(power_or_voltage, Parameter.Setpoint())
     return self._protocol.execute(Command(8, [power_input], []))
Exemple #7
0
 def set_forward_power_limit(self, power_limit):
     power_input = Input(power_limit, Parameter.ForwardPower())
     return self._protocol.execute(Command(4, [power_input], []))
Exemple #8
0
 def get_time_limit(self):
     return self._protocol.execute(
         Command(243, [], [Output(Parameter.OnTimeLimit())]))
Exemple #9
0
 def get_status(self):
     return self._protocol.execute(
         Command(162, [], [FlagOutput(Parameter.Status())]))
Exemple #10
0
 def get_control_mode(self):
     return self._protocol.execute(
         Command(155, [], [Output(Parameter.ControlMode())]))
Exemple #11
0
 def get_regulation_mode(self):
     return self._protocol.execute(
         Command(154, [], [Output(Parameter.Regulation())]))
Exemple #12
0
 def get_ramping_time(self):
     return self._protocol.execute(
         Command(151, [], [
             Output(Parameter.RampTime(), Parameter.RampTime.KEY_RAMP_UP),
             Output(Parameter.RampTime(), Parameter.RampTime.KEY_RAMP_DOWN)
         ]))
Exemple #13
0
 def get_model_number(self):
     return self._protocol.execute(
         Command(129, [], [Output(Parameter.ModelNumber())]))
Exemple #14
0
 def get_power_supply_type(self):
     return self._protocol.execute(
         Command(128, [], [Output(Parameter.SupplyType())]))
Exemple #15
0
 def set_pulsing_duty_cycle(self, duty_cycle):
     cycle_input = Input(duty_cycle, Parameter.PulsingDutyCycle())
     return self._protocol.execute(Command(96, [cycle_input], []))
Exemple #16
0
 def get_serial_address_and_baudrate(self):
     return self._protocol.execute(
         Command(
             212, [],
             [Output(Parameter.BusAddress()),
              Output(Parameter.BaudRate())]))
Exemple #17
0
 def get_fault_register(self):
     return self._protocol.execute(
         Command(223, [], [FlagOutput(Parameter.FaultRegister())]))
Exemple #18
0
 def get_setpoint(self):
     return self._protocol.execute(
         Command(
             164, [],
             [Output(Parameter.Setpoint(), Output(Parameter.Regulation()))
              ]))
Exemple #19
0
 def set_regulation_mode(self, mode):
     mode_input = Input(mode, Parameter.Regulation())
     return self._protocol.execute(Command(3, [mode_input], []))
Exemple #20
0
 def get_delivered_power(self):
     return self._protocol.execute(
         Command(167, [], [Output(Parameter.ReflectedPower())]))
Exemple #21
0
 def set_reflected_power_limit(self, power_limit):
     power_input = Input(power_limit, Parameter.ReflectedPower())
     return self._protocol.execute(Command(5, [power_input], []))
Exemple #22
0
 def get_forward_power_limit(self):
     return self._protocol.execute(
         Command(169, [], [Output(Parameter.ForwardPower())]))
Exemple #23
0
 def set_time_limit(self, time_limit):
     time_input = Input(time_limit, Parameter.OnTimeLimit())
     return self._protocol.execute(Command(10, [time_input], []))
Exemple #24
0
 def get_reflected_power_limit(self):
     return self._protocol.execute(
         Command(170, [], [Output(Parameter.ReflectedPower())]))
Exemple #25
0
 def restore(self, preset_number):
     preset_input = Input(preset_number, Parameter.Preset())
     return self._protocol.execute(Command(25, [preset_input], []))
Exemple #26
0
 def get_pulsing_frequency(self):
     return self._protocol.execute(
         Command(193, [], [Output(Parameter.PulsingFrequency())]))
Exemple #27
0
 def set_user_port_scaling(self, voltage_scaling):
     voltage_input = Input(voltage_scaling, Parameter.VoltageScaling())
     return self._protocol.execute(Command(30, [voltage_input], []))
Exemple #28
0
 def get_pulsing_duty_cycle(self):
     return self._protocol.execute(
         Command(196, [], [Output(Parameter.PulsingDutyCycle())]))
Exemple #29
0
 def get_runtime(self):
     return self._protocol.execute(
         Command(205, [], [Output(Parameter.Runtime())]))
Exemple #30
0
 def set_serial_baud_rate(self, baudrate):
     baudrate_input = Input(baudrate, Parameter.BaudRate())
     return self._protocol.execute(
         Command(69, [Input(0, Parameter.IgnoredByte()), baudrate_input],
                 []))