testframework.clients.brain.tester.solar module

A sub object of the client for Solar Simulation

class testframework.clients.brain.tester.solar.SolarConnection(contactor_client: TestClient)

Bases: object

Provides methods for interacting with the Solar Simulation which is DC Suitcase or DC source It’s possible to turn on and off constant pv input from DC Suitcase as well as dynamic input from DC Source.

When using dynimic input DC loadpath is automatically switched to testbench connected to client and connection between DC source API and physical DC source is created.

Usage:

test_client.solar

These can be accessed given an instance of TestClient with .solar for example:

Example

>>> def test_solar(self, testbench: TestBench):
>>>    test_client = TestClient(testbench, default_timeout=30)
>>>    test_client.solar.switch_constant_input_on()
>>>    test_client.solar.switch_pvinput_off()
disable_dynamic_setpoint() None

reset DC Source Parameters and deactivate output

This will fail with “Base DC URL is not set, method not available” when testbench testclient is connected to has no DC source Connection

enable_dynamic_setpoint(current_mppt: int | float, voltage_mppt: int) None

Calculate current/voltage paremeters based on arguments current/voltage_mppt Send these parameters to DC Source and activate output for this setpoint.

To validate PV input request from DC Source test_client.get_voltage(DcSourceParam.MEASURED) and test_client.get_current(DcSourceParam.MEASURED)

or from IoT ops_client.get_global_sensor_name(sensor_name=GlobalSensorName.POWER_DC_TOTAL)

This will fail with “Base DC URL is not set, method not available” when testbench testclient is connected to has no DC source Connection

enable_dynamic_setpoint_preconfigured(power_setpoint: PowerSetpoints) None

Chose predefined Power Setpoint from Enum of available Power Setpoints as Argument. This Function applies voltage/current-(mppt) setting to output this power setpoint as close as possible.

To validate PV input request from DC Source test_client.get_voltage(DcSourceParam.MEASURED) and test_client.get_current(DcSourceParam.MEASURED)

or from IoT ops_client.get_global_sensor_name(sensor_name=GlobalSensorName.POWER_DC_TOTAL)

This will fail with “Base DC URL is not set, method not available” when testbench testclient is connected to has no DC source Connection :param power_setpoint: _description_ :type power_setpoint: PowerSetpoints

Raises:

ValueError – _description_

switch_constant_input_off() None

turns off DC Suitcase simuating static Solar/PV Input

switch_constant_input_on() None

turns on DC Suitcase simuating static Solar/PV Input

switch_dynamic_pvinput_off() None

Turns off dynamic pv input, so DC Source connected to this bench

This will fail with “Base DC URL is not set, method not available” when testbench testclient is connected to has no DC source Connection

switch_dynamic_pvinput_on() None

turns on Solar/PV Input, so the DC Source connected to this bench and creates a connection awaiting setpoints

This will fail with “Base DC URL is not set, method not available” when testbench testclient is connected to has no DC source Connection

switch_pvinput_off() None

turns off Solar/PV Input so DC Suitcase(static) and DC Source(dynamic)