Skip to content

DeviceConfiguration#

This is the base class for all python devices configurations. The reason this class is not abstract is that Pythonnet does not support abstract classes.


constructor DeviceConfiguration(device_class: str, caption: str, supported_communicators: PyCommunicatorType)#

Initializes a new instance of the DeviceConfiguration class.

Parameters#

Name Description
device_class The name of the device class.
caption The name of the device wihich is displayed in the Measmatic device manager.
supported_communicators The communicator types supported by the device.

property caption#

The designation of the device.

Returns#

Type Description
str The designation of the device.

property communicator_configuration#

The communicator configuration. Could be of type GpibCommunicatorConfiguration, Rs232CommunicatorConfiguration or TcpIpCommunicatorConfiguration depending on the communicator type.

Returns#

Type Description
dynamic The communicator configuration.

property default_gpib_communicator_configuration#

The default communicator configuration (GPIB).

Returns#

Type Description
GpibCommunicatorConfiguration The default communicator configuration (GPIB).

property default_rs232_communicator_configuration#

The default communicator configuration (RS232).

Returns#

Type Description
Rs232CommunicatorConfiguration The default communicator configuration (RS232).

property default_tcp_ip_communicator_configuration#

The default communicator configuration (TCP/IP).

Returns#

Type Description
TcpIpCommunicatorConfiguration The default communicator configuration (TCP/IP).

property device_class#

The class of the device.

Returns#

Type Description
str The class of the device.

property supported_communicators#

The type of the communicator.

Returns#

Type Description
CommunicatorType The type of the communicator.

method add_setting(setting: [Setting](setting.md))#

Adds a setting to the device configuration.

Parameters#

Name Description
setting The setting to add.

method get_setting(id: str)#

Gets a setting by its unique identifier.

Parameters#

Name Description
id The unique identifier of the setting.

Returns#

Type Description
SettingBase The setting with the specified unique identifier, or null if no such setting exists.

method register_settings()#

This method gets called automatically by Measmatic after the configuration has sucessfully been constructed. It could be overridden in order to add custom settings to the device configuration. Inside the overriden method the Setting method should be called for each setting that should be added,