Skip to content

StatusParam

Bases: object

StatusParam class pairs a sub-device with a value.

This class represents a status parameter, associating a specific sub-device with a value.

__init__(*args)

Overload 1:

Copy constructor.

Creates a new StatusParam as a copy of an existing one.

Parameters:

Name Type Description Default
other StatusParam

The StatusParam to copy | Overload 2: Constructor from sub-device ID. Initializes a new StatusParam for a specific sub-device without a value.

required
subDeviceId SubDeviceId

The sub-device ID | Overload 3: Constructor from sub-device ID and string value.

required
value string

The associated string value | Overload 4: Constructor from sub-device ID and char value.

required

getSubDeviceId()

Get sub-device ID.

Retrieves the ID of the sub-device associated with this parameter.

Returns:

Type Description
SubDeviceId

The sub-device ID

setSubDeviceId(subDeviceId)

Set sub-device ID.

Sets the ID of the sub-device associated with this parameter.

Parameters:

Name Type Description Default
subDeviceId SubDeviceId

The sub-device ID

required

hasValue()

Check if the status parameter has a value.

Indicates whether a value has been assigned to this status parameter.

Returns:

Type Description
boolean

True if the status parameter has a value, false otherwise

getStringValue()

Get value as string.

Retrieves the status parameter value as a string.

Returns:

Type Description
str

The string value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

getCharValue()

Get value as char.

Retrieves the status parameter value as a char.

Returns:

Type Description
int

The char value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

getShortValue()

Get value as short.

Retrieves the status parameter value as a short.

Returns:

Type Description
int

The short value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

getIntValue()

Get value as int.

Retrieves the status parameter value as an int.

Returns:

Type Description
int

The int value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

getUnsignedLongValue()

Get value as unsigned long long.

Retrieves the status parameter value as an unsigned long long.

Returns:

Type Description
int

The unsigned long long value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

getLongValue()

Get value as long long.

Retrieves the status parameter value as a long long.

Returns:

Type Description
int

The long long value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

getFloatValue()

Get value as float.

Retrieves the status parameter value as a float.

Returns:

Type Description
float

The float value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

getDoubleValue()

Get value as double.

Retrieves the status parameter value as a double.

Returns:

Type Description
float

The double value

Raises:

Type Description
InscoperException

If error conversion or retrieval fails

setValue(*args)

Overload 1:

Set value from string.

Assigns a string value to the status parameter.

Parameters:

Name Type Description Default
value string

The string value | Overload 2: Set value from char. Assigns a char value to the status parameter.

required

addValue(*args)

Overload 1:

Add a string value for a specific parameter index.

Used for functions with multiple parameters. Adds a string value for a specific parameter index.

Parameters:

Name Type Description Default
tag int

The parameter index

required
value string

The string value | Overload 2: Add a tagged char value for a specific parameter index. Used for functions with multiple parameters. Adds a char value for a specific parameter index.

required
index int

The value index

required

getType()

Get type as string (deprecated).

Returns:

Type Description
str

The type string

getValueType()

Get value type.

Retrieves the type of the value stored in this parameter.

Returns:

Type Description
int

The parameter type

Raises:

Type Description
InscoperException

If error occurs

clone()

Clone object.

Creates a deep copy of this StatusParam.

Returns:

Type Description
StatusParam

The copy

equals(other)

Check equality.

Compares this status parameter with another for equality. Test if all parameters values are equal.

Parameters:

Name Type Description Default
other StatusParam

The status parameter to compare with

required

Returns:

Type Description
boolean

True if meaningful content is equal, false otherwise