FunctionDescription¶
Bases: object
FunctionDescription class provides function information coming from drivers.
This class describes a single function of a sub-device, including its type, name, associated input/output parameters, and connections.
__init__()
¶
Default constructor.
Initializes a new instance of the FunctionDescription class.
getType()
¶
Get the type of the function.
Retrieves the functional category of this function.
Returns:
| Type | Description |
|---|---|
int
|
The type of the function |
setType(type)
¶
Set the type of the function.
Sets the functional category of this function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
int
|
The type of the function |
required |
getName()
¶
Get the name of the function.
Retrieves the display name of the function.
Returns:
| Type | Description |
|---|---|
str
|
The name of the function |
setName(name)
¶
Set the name of the function.
Sets the display name of the function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
string
|
The name of the function |
required |
addInputParam(pos, tag)
¶
Add an input parameter to the function.
Sets an input parameter to this function at a specific position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pos
|
int
|
The position index of the parameter |
required |
tag
|
int
|
The unique tag of the parameter |
required |
getInputParams()
¶
Get input parameters.
Retrieves the map of input parameters added to this function.
Returns:
| Type | Description |
|---|---|
dict[unsigned short, int]
|
A map pairing parameter tags with position indices |
addOutputParam(pos, tag)
¶
Add an output parameter to the function.
Sets an output parameter to this function at a specific position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pos
|
int
|
The position index of the parameter |
required |
tag
|
int
|
The unique tag of the parameter |
required |
getOutputParams()
¶
Get output parameters.
Retrieves the map of output parameters added to this function.
Returns:
| Type | Description |
|---|---|
dict[unsigned short, int]
|
A map pairing parameter tags with position indices |
addConnection(tag)
¶
Add a connection to the function.
Sets a connection tag to this function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
The connection's tag |
required |
getConnections()
¶
Get the connection list.
Retrieves the list of connection tags added to this function.
Returns:
| Type | Description |
|---|---|
list[unsigned short]
|
The connection list |