Skip to content

DeviceChannel#

This is the base class for all Python device channels.


constructor DeviceChannel(name: str, channel_number: int, guid: Guid, device: PyDeviceWithChannels)#

Initializes a new instance of the DeviceChannel class.

Parameters#

Name Description
name The name of the channel.
channel_number The number of the channel.
guid The unique identifier of the configuration with which this channel was parameterized.
device The device with channels this channel belongs to.

property channel_number#

The number of the channel.

Returns#

Type Description
int The number of the channel.

property communicator#

The communicator for the device.

Returns#

Type Description
Communicator The communicator for the device.

property device#

The device with channels.

Returns#

Type Description
DeviceWithChannels The device with channels.

property guid#

Returns the universally unique identifier of the configuration with which this channel was parameterized.

Returns#

Type Description
Guid The guid.

property name#

The name of the channel.

Returns#

Type Description
str The name of the channel.

method query(str: str, timeout_in_milliseconds: int = -1)#

Sends a character string to the device and then waits for the response.

Parameters#

Name Description
str The string to send.
timeout_in_milliseconds The maximum timeout that is waited to lock the device and send the Default: -1

Returns#

Type Description
The response from the device.

method receive_line(timeout_in_milliseconds: int = -1)#

Receives a line from the device.

Parameters#

Name Description
timeout_in_milliseconds The maximum timeout that is waited to lock the device and receive Default: -1

Returns#

Type Description
The response from the device.

method send_line(str: str, timeout_in_milliseconds: int = -1)#

Sends a line to the device.

Parameters#

Name Description
str The string to send.
timeout_in_milliseconds The maximum timeout that is waited to lock the device and receive Default: -1