Skip to content

AbstractSubDevice

Bases: object

AbstractSubDevice class implements custom sub-devices.

Notes: This class is non-copyable and non-movable.

This abstract class establishes the contract for sub-devices, forcing the implementation of core accessors (get/set) and validation logic (check).

__init__(*args)

Overload 1:

Constructor.

Initializes a new instance of the AbstractSubDevice class with a specific sub-device ID.

Parameters:

Name Type Description Default
subDeviceId SubDeviceId

The unique identifier for the sub-device | Overload 2: Constructor with recipe ID. Initializes a new instance of the AbstractSubDevice class with a specific sub-device ID and an associated recipe ID.

required
recipeId string

The recipe identifier associated with this sub-device

required

setValue(data)

Set the value of the sub-device.

Sets the operational value or state of the sub-device. Must be overridden.

Parameters:

Name Type Description Default
data list[int]

The value to set, represented as a byte vector

required

getValue()

Get the current value of the sub-device.

Retrieves the current operational value or state of the sub-device. Must be overridden.

Returns:

Type Description
list[int]

The current value as a byte vector

checkValue()

Check if the sub-device value has been properly set.

Verifies if last set is effective. Must be overridden.

getSubDeviceId()

Get the sub-device ID.

Retrieves the unique identifier of this sub-device.

Returns:

Type Description
SubDeviceId

The sub-device ID

getRecipeId()

Get the recipe ID.

Retrieves the recipe identifier associated with this sub-device.

Returns:

Type Description
str

The recipe ID