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." )
def set_pulsing_frequency(self, frequency): frequency_input = Input(frequency, Parameter.PulsingFrequency()) return self._protocol.execute(Command(93, [frequency_input], []))
def set_ramping_rise_time(self, time): time_input = Input(time, Parameter.RampTime()) return self._protocol.execute(Command(31, [time_input], []))
def set_remote_control(self, control_mode): control_input = Input(control_mode, Parameter.ControlOverride()) return self._protocol.execute(Command(29, [control_input], []))
def set_control_mode(self, control_mode): control_input = Input(control_mode, Parameter.ControlMode()) return self._protocol.execute(Command(14, [control_input], []))
def set_setpoint(self, power_or_voltage): power_input = Input(power_or_voltage, Parameter.Setpoint()) return self._protocol.execute(Command(8, [power_input], []))
def set_forward_power_limit(self, power_limit): power_input = Input(power_limit, Parameter.ForwardPower()) return self._protocol.execute(Command(4, [power_input], []))
def get_time_limit(self): return self._protocol.execute( Command(243, [], [Output(Parameter.OnTimeLimit())]))
def get_status(self): return self._protocol.execute( Command(162, [], [FlagOutput(Parameter.Status())]))
def get_control_mode(self): return self._protocol.execute( Command(155, [], [Output(Parameter.ControlMode())]))
def get_regulation_mode(self): return self._protocol.execute( Command(154, [], [Output(Parameter.Regulation())]))
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) ]))
def get_model_number(self): return self._protocol.execute( Command(129, [], [Output(Parameter.ModelNumber())]))
def get_power_supply_type(self): return self._protocol.execute( Command(128, [], [Output(Parameter.SupplyType())]))
def set_pulsing_duty_cycle(self, duty_cycle): cycle_input = Input(duty_cycle, Parameter.PulsingDutyCycle()) return self._protocol.execute(Command(96, [cycle_input], []))
def get_serial_address_and_baudrate(self): return self._protocol.execute( Command( 212, [], [Output(Parameter.BusAddress()), Output(Parameter.BaudRate())]))
def get_fault_register(self): return self._protocol.execute( Command(223, [], [FlagOutput(Parameter.FaultRegister())]))
def get_setpoint(self): return self._protocol.execute( Command( 164, [], [Output(Parameter.Setpoint(), Output(Parameter.Regulation())) ]))
def set_regulation_mode(self, mode): mode_input = Input(mode, Parameter.Regulation()) return self._protocol.execute(Command(3, [mode_input], []))
def get_delivered_power(self): return self._protocol.execute( Command(167, [], [Output(Parameter.ReflectedPower())]))
def set_reflected_power_limit(self, power_limit): power_input = Input(power_limit, Parameter.ReflectedPower()) return self._protocol.execute(Command(5, [power_input], []))
def get_forward_power_limit(self): return self._protocol.execute( Command(169, [], [Output(Parameter.ForwardPower())]))
def set_time_limit(self, time_limit): time_input = Input(time_limit, Parameter.OnTimeLimit()) return self._protocol.execute(Command(10, [time_input], []))
def get_reflected_power_limit(self): return self._protocol.execute( Command(170, [], [Output(Parameter.ReflectedPower())]))
def restore(self, preset_number): preset_input = Input(preset_number, Parameter.Preset()) return self._protocol.execute(Command(25, [preset_input], []))
def get_pulsing_frequency(self): return self._protocol.execute( Command(193, [], [Output(Parameter.PulsingFrequency())]))
def set_user_port_scaling(self, voltage_scaling): voltage_input = Input(voltage_scaling, Parameter.VoltageScaling()) return self._protocol.execute(Command(30, [voltage_input], []))
def get_pulsing_duty_cycle(self): return self._protocol.execute( Command(196, [], [Output(Parameter.PulsingDutyCycle())]))
def get_runtime(self): return self._protocol.execute( Command(205, [], [Output(Parameter.Runtime())]))
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], []))