hvl_ccb.dev.cube.picube

digraph inheritance8fa1ad81eb { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "BaseCube" [URL="../hvl_ccb.dev.cube.base.html#hvl_ccb.dev.cube.base.BaseCube",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for Cube variants."]; "SingleCommDevice" -> "BaseCube" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseCubeConfiguration" [URL="../hvl_ccb.dev.cube.base.html#hvl_ccb.dev.cube.base.BaseCubeConfiguration",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration dataclass for the BaseCube devices."]; "BaseCubeOpcUaCommunication" [URL="../hvl_ccb.dev.cube.base.html#hvl_ccb.dev.cube.base.BaseCubeOpcUaCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Communication protocol specification for BaseCube devices."]; "OpcUaCommunication" -> "BaseCubeOpcUaCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseCubeOpcUaCommunicationConfig" [URL="../hvl_ccb.dev.cube.base.html#hvl_ccb.dev.cube.base.BaseCubeOpcUaCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Communication protocol configuration for OPC UA, specifications for the BaseCube"]; "OpcUaCommunicationConfig" -> "BaseCubeOpcUaCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "CommunicationProtocol" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.CommunicationProtocol",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Communication protocol abstract base class."]; "ConfigurationMixin" -> "CommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "CommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ConfigurationMixin" [URL="../hvl_ccb.configuration.html#hvl_ccb.configuration.ConfigurationMixin",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin providing configuration to a class."]; "ABC" -> "ConfigurationMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Device" [URL="../hvl_ccb.dev.base.html#hvl_ccb.dev.base.Device",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for devices. Implement this class for a concrete device,"]; "ConfigurationMixin" -> "Device" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "Device" [arrowsize=0.5,style="setlinewidth(0.5)"]; "OpcUaCommunication" [URL="../hvl_ccb.comm.opc.html#hvl_ccb.comm.opc.OpcUaCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Communication protocol implementing an OPC UA connection."]; "CommunicationProtocol" -> "OpcUaCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "OpcUaCommunicationConfig" [URL="../hvl_ccb.comm.opc.html#hvl_ccb.comm.opc.OpcUaCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration dataclass for OPC UA Communciation."]; "PICube" [URL="../hvl_ccb.dev.cube.picube.html#hvl_ccb.dev.cube.picube.PICube",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Variant of the BaseCube with build in Power Inverter"]; "BaseCube" -> "PICube" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PICubeConfiguration" [URL="../hvl_ccb.dev.cube.picube.html#hvl_ccb.dev.cube.picube.PICubeConfiguration",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="PICubeConfiguration(namespace_index: int = 3, polling_delay_sec: Union[int, float] = 5.0, polling_interval_sec: Union[int, float] = 1.0, timeout_status_change: Union[int, float] = 6, timeout_interval: Union[int, float] = 0.1, noise_level_measurement_channel_1: Union[int, float] = 100, noise_level_measurement_channel_2: Union[int, float] = 100, noise_level_measurement_channel_3: Union[int, float] = 100, noise_level_measurement_channel_4: Union[int, float] = 100, timeout_test_parameters: 'Number' = 2.0)"]; "BaseCubeConfiguration" -> "PICubeConfiguration" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PICubeOpcUaCommunication" [URL="../hvl_ccb.dev.cube.picube.html#hvl_ccb.dev.cube.picube.PICubeOpcUaCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "BaseCubeOpcUaCommunication" -> "PICubeOpcUaCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PICubeOpcUaCommunicationConfig" [URL="../hvl_ccb.dev.cube.picube.html#hvl_ccb.dev.cube.picube.PICubeOpcUaCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="PICubeOpcUaCommunicationConfig(host: Union[str, ipaddress.IPv4Address, ipaddress.IPv6Address], endpoint_name: '_CubeOpcEndpoint' = <_CubeOpcEndpoint.PI_CUBE: 'PICube'>, port: int = 4840, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.cube.base._BaseCubeSubscriptionHandler object at 0x7fd8067f7b80>, update_parameter: asyncua.ua.uaprotocol_auto.CreateSubscriptionParameters = CreateSubscriptionParameters(RequestedPublishingInterval=1000, RequestedLifetimeCount=300, RequestedMaxKeepAliveCount=22, MaxNotificationsPerPublish=10000, PublishingEnabled=True, Priority=0), wait_timeout_retry_sec: Union[int, float] = 1, max_timeout_retry_nr: int = 5)"]; "BaseCubeOpcUaCommunicationConfig" -> "PICubeOpcUaCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SingleCommDevice" [URL="../hvl_ccb.dev.base.html#hvl_ccb.dev.base.SingleCommDevice",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for devices with a single communication protocol."]; "Device" -> "SingleCommDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "SingleCommDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

A PICube is a BaseCube with build in Power Inverter

class PICube(com, dev_config=None)[source]

Bases: BaseCube

Variant of the BaseCube with build in Power Inverter

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

property current_primary: float

Read the current primary current at the output of the frequency converter (before transformer).

Returns:

primary current in A

static default_com_cls()[source]

Get the class for the default communication protocol used with this device.

Returns:

the type of the standard communication protocol for this device

property frequency: float

Read the electrical frequency of the current PICube setup.

Returns:

the frequency in Hz

property operate: bool | None

Indicates if ‘operate’ is activated. ‘operate’ means locket safety circuit, red lamps, high voltage on and locked safety switches.

Returns:

True if operate is activated (RED_OPERATE), False if ready is deactivated (RED_READY), None otherwise

property polarity: Polarity | None

Polarity of a DC setup. :return: if a DC setup is programmed the polarity is returned, else None.

property power_setup: PowerSetup

Return the power setup selected in the PICube’s settings.

Returns:

the power setup

property voltage_actual: float

Reads the actual measured voltage and returns the value in V.

Returns:

the actual voltage of the setup in V.

property voltage_max: float

Reads the maximum voltage of the setup and returns in V.

Returns:

the maximum voltage of the setup in V.

property voltage_primary: float

Read the current primary voltage at the output of the frequency converter (before transformer).

Returns:

primary voltage in V

class PICubeConfiguration(namespace_index: int = 3, polling_delay_sec: int | float = 5.0, polling_interval_sec: int | float = 1.0, timeout_status_change: int | float = 6, timeout_interval: int | float = 0.1, noise_level_measurement_channel_1: int | float = 100, noise_level_measurement_channel_2: int | float = 100, noise_level_measurement_channel_3: int | float = 100, noise_level_measurement_channel_4: int | float = 100, timeout_test_parameters: 'Number' = 2.0)[source]

Bases: BaseCubeConfiguration

clean_values()[source]
force_value(fieldname, value)

Forces a value to a dataclass field despite the class being frozen.

NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.

Parameters:
  • fieldname – name of the field

  • value – value to assign

classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns:

a list of strings containing all keys.

classmethod optional_defaults() dict[str, object]

Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.

Returns:

a list of strings containing all optional keys.

classmethod required_keys() Sequence[str]

Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.

Returns:

a list of strings containing all required keys.

timeout_test_parameters: int | float = 2.0
class PICubeOpcUaCommunication(config)[source]

Bases: BaseCubeOpcUaCommunication

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

class PICubeOpcUaCommunicationConfig(host: Union[str, ipaddress.IPv4Address, ipaddress.IPv6Address], endpoint_name: '_CubeOpcEndpoint' = <_CubeOpcEndpoint.PI_CUBE: 'PICube'>, port: int = 4840, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.cube.base._BaseCubeSubscriptionHandler object at 0x7fd8067f7b80>, update_parameter: asyncua.ua.uaprotocol_auto.CreateSubscriptionParameters = CreateSubscriptionParameters(RequestedPublishingInterval=1000, RequestedLifetimeCount=300, RequestedMaxKeepAliveCount=22, MaxNotificationsPerPublish=10000, PublishingEnabled=True, Priority=0), wait_timeout_retry_sec: Union[int, float] = 1, max_timeout_retry_nr: int = 5)[source]

Bases: BaseCubeOpcUaCommunicationConfig

endpoint_name: _CubeOpcEndpoint = 'PICube'

Endpoint of the OPC server, this is a path like ‘OPCUA/SimulationServer’

force_value(fieldname, value)

Forces a value to a dataclass field despite the class being frozen.

NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.

Parameters:
  • fieldname – name of the field

  • value – value to assign

classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns:

a list of strings containing all keys.

classmethod optional_defaults() dict[str, object]

Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.

Returns:

a list of strings containing all optional keys.

classmethod required_keys() Sequence[str]

Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.

Returns:

a list of strings containing all required keys.