SubDeviceConfig¶
Bases: object
SubDeviceConfig class provides required information for sub-device configuration.
This class manages the configuration settings for a sub-device, including its ID, tag, associated parameters, and initialization status.
__init__()
¶
Default constructor.
Initializes a new instance of the SubDeviceConfig class.
fromXML(subDeviceNode)
¶
Provide sub-device information from the XML node.
Populates the sub-device configuration from the provided XML node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subDeviceNode
|
XMLNode
|
The XML node containing sub-device information |
required |
Raises:
| Type | Description |
|---|---|
InscoperException
|
if an error occurred |
toXML(xmlParent)
¶
Export sub-device information in an XML node attached to the parent XML node.
Serializes the sub-device configuration to the specified parent XML node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xmlParent
|
XMLNode
|
The parent XML node |
required |
Raises:
| Type | Description |
|---|---|
InscoperException
|
if an error occurred |
getId()
¶
Get the ID of the sub-device.
Retrieves the unique identifier of the sub-device.
Returns:
| Type | Description |
|---|---|
str
|
The ID of the sub-device |
setId(id)
¶
Set the ID of the sub-device.
Assigns a unique identifier to the sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
string
|
The ID of the sub-device |
required |
getTag()
¶
Get the sub-device tag.
Retrieves the tag associated with this sub-device.
Returns:
| Type | Description |
|---|---|
int
|
The sub-device tag |
setTag(tag)
¶
Set the sub-device tag.
Assigns a tag to this sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
The sub-device tag |
required |
isPostInit()
¶
Check if post-initialization is required.
Determines whether this sub-device requires a post-initialization step.
Returns:
| Type | Description |
|---|---|
boolean
|
True if post-initialization is required, false otherwise |
setPostInit(postInit)
¶
Set post-initialization status.
Specifies whether this sub-device requires a post-initialization step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
postInit
|
boolean
|
True to enable post-initialization |
required |
getRecipeId()
¶
Get the recipe ID of the sub-device.
Retrieves the recipe ID associated with this sub-device.
Returns:
| Type | Description |
|---|---|
str
|
The recipe ID of the sub-device |
setRecipeId(recipeId)
¶
Set the recipe ID of the sub-device.
Assigns a recipe ID to this sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipeId
|
string
|
The recipe ID of the sub-device |
required |
getParams()
¶
Get the parameter configuration list of the sub-device.
Retrieves the list of parameter configurations associated with this sub-device.
Returns:
| Type | Description |
|---|---|
list[ParamConfig]
|
The list of parameter configurations of the sub-device |
getParam(tag)
¶
Get the parameter configuration corresponding to the given tag.
Retrieves the parameter configuration for the specified tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
The parameter tag |
required |
Returns:
| Type | Description |
|---|---|
ParamConfig
|
The parameter configuration |
setParams(params)
¶
Set the parameter configuration list of the sub-device.
Replaces the list of parameter configurations for this sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
list[ParamConfig]
|
The list of parameter configurations of the sub-device |
required |
addParam(param)
¶
Add a parameter configuration to the list.
Appends a new parameter configuration to the sub-device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param
|
ParamConfig
|
The parameter configuration to add |
required |