Skip to content

DiagResults

Bases: object

DiagResults class contains the results from a device diagnostic

Aggregates status information and constraints for sub-devices of a device and their functions, providing a comprehensive report of the system's state.

__init__()

Default constructor

Initializes a new instance of the DiagResults class.

setSubDeviceStatus(statusMap)

Set sub-device statuses

Populates the map of sub-device statuses.

Parameters:

Name Type Description Default
statusMap dict[unsigned short, ESubDeviceStatus]

A map associating sub-device tags with their status

required

getSubDeviceStatus(subDeviceTag)

Get sub-device status

Retrieves the status of a specific sub-device.

Parameters:

Name Type Description Default
subDeviceTag int

The tag of the sub-device

required

Returns:

Type Description
int

The status of the sub-device

getFunctionStatus(subDeviceTag, functionType)

Get function status

Retrieves the status of a specific function on a sub-device.

Parameters:

Name Type Description Default
subDeviceTag int

The tag of the sub-device

required
functionType int

The type of function to query

required

Returns:

Type Description
EFunctionStatus

The status of the function

getParamConstraint(paramTag)

Get parameter constraint

Retrieves the constraint object associated with a specific parameter.

Parameters:

Name Type Description Default
paramTag int

The tag of the parameter

required

Returns:

Type Description
Constraint

A shared pointer to the constraint object

getSubDeviceStatusMap()

Get all sub-device statuses

Retrieves the complete map of sub-device statuses.

Returns:

Type Description
dict[unsigned short, ESubDeviceStatus]

A map of sub-device tags to statuses

addParamConstraint(paramTag, constraint)

Add parameter constraint

Adds or updates a constraint for a specific parameter.

Parameters:

Name Type Description Default
paramTag int

The tag of the parameter

required
constraint Constraint

The constraint object to add

required

addFunctionStatus(subDeviceTag, functionType, functionStatus)

Add function status

Adds the status of a specific function on a sub-device.

Parameters:

Name Type Description Default
subDeviceTag int

The tag of the sub-device

required
functionType int

The type of function

required
functionStatus EFunctionStatus

The status to add

required

getName()

Get name

Retrieves the name associated with this diagnostic result.

Returns:

Type Description
str

The name

setName(name)

Set name

Sets the name associated with this diagnostic result.

Parameters:

Name Type Description Default
name string

The name

required

getDriverConfig()

Get driver configuration

Retrieves the driver configuration associated with the diagnostic.

Returns:

Type Description
DriverConfig

A shared pointer to the DriverConfig

setDriverConfig(driverConfig)

Set driver configuration

Sets the driver configuration associated with the diagnosis.

Parameters:

Name Type Description Default
driverConfig DriverConfig

The new DriverConfig pointer

required