SubDeviceDescription¶
Bases: object
SubDeviceDescription class provides sub-device information coming from drivers.
This class stores details about a specific functional unit within a device (sub-device), such as its name, type, tag, and associated control functions.
__init__()
¶
Default constructor.
Initializes a new instance of the SubDeviceDescription class.
getName()
¶
Get the name of the sub-device.
Retrieves the display name of the sub-device.
Returns:
| Type | Description |
|---|---|
str
|
The name of the sub-device |
setName(name)
¶
Set the name of the sub-device.
Sets the display name of the sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
string
|
The name of the sub-device |
required |
getFunctions()
¶
Get the function list of the sub-device.
Retrieves all functions associated with this sub-device.
Returns:
| Type | Description |
|---|---|
list[FunctionDescription]
|
The list of functions of the sub-device |
getFunction(type)
¶
Get the function corresponding to the given type.
Retrieves a specific function by its functional type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
int
|
The function's type |
required |
Returns:
| Type | Description |
|---|---|
FunctionDescription
|
The function if found, nullptr otherwise |
setFunction(type, function)
¶
Set the function of the given type.
Assigns a function to this sub-device for a specific functional type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
int
|
The function's type |
required |
function
|
FunctionDescription
|
The function to set |
required |
getTag()
¶
Get the tag of the sub-device.
Retrieves the unique tag of the sub-device.
Returns:
| Type | Description |
|---|---|
int
|
The tag of the sub-device |
setTag(tag)
¶
Set the tag of the sub-device.
Sets the unique tag of the sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
The tag of the sub-device |
required |
getType()
¶
Get the type of the sub-device.
Retrieves the functional category of the sub-device.
Returns:
| Type | Description |
|---|---|
int
|
The type of the sub-device |
setType(type)
¶
Set the type of the sub-device.
Sets the functional category of the sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
int
|
The type of the sub-device |
required |
getParams()
¶
Get the parameter tag list of the sub-device.
Retrieves the list of parameter tags required by the declared functions of this sub-device.
Returns:
| Type | Description |
|---|---|
list[unsigned short]
|
The list of associated parameter tags |