Skip to content

SubDeviceId

Bases: object

SubDeviceId class uniquely identifies a sub-device

This class encapsulates the identity of a sub-device, consisting of a parent device identifier and a specific sub-device identifier.

__init__(*args)

Overload 1:

Default constructor

Initializes a new instance of the SubDeviceId class.

|

Overload 2:

Constructor

Initializes a new instance of the SubDeviceId class with specified device and sub-device IDs.

Parameters:

Name Type Description Default
deviceId string

The device ID

required
subDeviceId string

The sub-device ID

required

getDeviceId()

Get the device ID

Retrieves the identifier of the parent device.

Returns:

Type Description
str

The device ID

setDeviceId(deviceId)

Set the device ID

Sets the identifier of the parent device.

Parameters:

Name Type Description Default
deviceId string

The device ID

required

getSubDeviceId()

Get the sub-device ID

Retrieves the identifier of the sub-device.

Returns:

Type Description
str

The sub-device ID

setSubDeviceId(subDeviceId)

Set the sub-device ID

Sets the identifier of the sub-device.

Parameters:

Name Type Description Default
subDeviceId string

The sub-device ID

required

getName()

Get the full unique name

Retrieves a concatenation of the device ID and sub-device ID in the format 'deviceId-subDeviceId'.

Returns:

Type Description
str

The full unique name

equals(other)

Check equality

Compares this SubDeviceId with another for equality.

Parameters:

Name Type Description Default
other SubDeviceId

The other SubDeviceId to compare

required

Returns:

Type Description
boolean

True if both IDs match, false otherwise