Skip to content

DeviceWithChannelsConfiguration#

This is the configuration class for python devices with channels. This class inherits from DeviceConfiguration.


constructor DeviceWithChannelsConfiguration(device_class: str, caption: str, supported_communicators: CommunicatorType)#

Initializes a new instance of the DeviceWithChannelsConfiguration 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 channel_configurations#

Gets or sets the configured channels.

Returns#

Type Description
list The configured channels.

property default_channel_configurations#

Returns the list of channels for this device that should be used by default.

Returns#

Type Description
list The default channel configurations.

property is_number_of_channels_configurable#

Specifies whether the number of channels can be configured for the device. This is useful if a device configuration refers to a class of device types and their channel count depends on the type. This means that a separate configuration class does not have to be written for each model.

Returns#

Type Description
bool True if the number of channels is configurable otherwise False .

property number_of_channels_selection#

The selectable numbers of channels if the number of channels is configurable (see is_number_of_channels_configurable). Maps each selectable number of channels to the caption shown in the device configuration.

Returns#

Type Description
dict The selectable numbers of channels and their captions.

Example#

self.number_of_channels_selection = {1: "One channel", 2: "Two channels"}