Skip to content

DeviceDescription

Bases: object

DeviceDescription class provides device information coming from drivers.

This class holds comprehensive information about a device as reported by its driver, including version, brand, model, author, change log, and associated sub-devices and parameters.

__init__()

Default constructor.

Initializes a new instance of the DeviceDescription class.

getDescription()

Get the description of the device.

Retrieves the textual description of the device.

Returns:

Type Description
str

The description of the device

setDescription(description)

Set the description of the device.

Sets the textual description of the device.

Parameters:

Name Type Description Default
description string

The description of the device

required

getVersion()

Get the version of the device driver.

Retrieves the version of the device driver.

Returns:

Type Description
str

The version of the device driver

setVersion(version)

Set the version of the device driver.

Sets the version of the device driver.

Parameters:

Name Type Description Default
version string

The version of the device driver

required

getBrand()

Get the brand of the device.

Retrieves the brand name of the device.

Returns:

Type Description
str

The brand of the device

setBrand(brand)

Set the brand of the device.

Sets the brand name of the device.

Parameters:

Name Type Description Default
brand string

The brand of the device

required

getModel()

Get the model of the device.

Retrieves the model name of the device.

Returns:

Type Description
str

The model of the device

setModel(model)

Set the model of the device.

Sets the model name of the device.

Parameters:

Name Type Description Default
model string

The model of the device

required

getReleaseDate()

Get the release date of the device driver.

Retrieves the release date of the device driver.

Returns:

Type Description
str

The release date of the device driver

setReleaseDate(releaseDate)

Set the release date of the device driver.

Sets the release date of the device driver.

Parameters:

Name Type Description Default
releaseDate string

The release date of the device driver

required

getAuthor()

Get the author of the device driver.

Retrieves the author of the device driver.

Returns:

Type Description
str

The author of the device driver

setAuthor(author)

Set the author of the device driver.

Sets the author of the device driver.

Parameters:

Name Type Description Default
author string

The author of the device driver

required

getChangeLog()

Get the change log of the device driver.

Retrieves the change log history of the device driver.

Returns:

Type Description
str

The change log of the device driver

setChangeLog(changeLog)

Set the change log of the device driver.

Sets the change log history of the device driver.

Parameters:

Name Type Description Default
changeLog string

The change log of the device driver

required

getDriverType()

Get the driver type of the device.

Retrieves the type of driver controlling this device.

Returns:

Type Description
int

The driver type of the device

setDriverType(driverType)

Set the driver type of the device.

Sets the type of driver controlling this device.

Parameters:

Name Type Description Default
driverType int

The driver type of the device

required

isInitialized()

Return whether the device is initialized or not.

Checks if the device has been successfully initialized.

Returns:

Type Description
boolean

True if the device is initialized, false otherwise

setInitialized(initialized)

Set the status of the initialization of the device.

Updates the initialization status of the device.

Parameters:

Name Type Description Default
initialized boolean

True if the device must be initialized

required

addSubDeviceDescription(subDeviceDescription)

Add a sub-device description to the device.

Appends a sub-device description to the device's list of sub-device descriptions.

Parameters:

Name Type Description Default
subDeviceDescription SubDeviceDescription

The sub-device description to add

required

getSubDeviceDescriptionList()

Get the sub-device description list.

Retrieves the list of sub-device descriptions associated with this device.

Returns:

Type Description
list[SubDeviceDescription]

The sub-device description list

setSubDeviceDescriptionList(subDeviceDescriptionList)

Set the sub-device description list.

Replaces the current list of sub-device descriptions with a new one.

Parameters:

Name Type Description Default
subDeviceDescriptionList list[SubDeviceDescription]

The new sub-device description list

required

getSubDeviceDescription(subDeviceTag)

Get sub-device description by tag.

Retrieves the sub-device description corresponding to the given tag.

Parameters:

Name Type Description Default
subDeviceTag int

The tag of the sub-device description

required

Returns:

Type Description
SubDeviceDescription

The sub-device description if found, nullptr otherwise

addParamsDescription(paramsDescription)

Add a parameter description to the device.

Appends a parameter description to the device's list of parameter descriptions.

Parameters:

Name Type Description Default
paramsDescription ParamDescription

The parameter description to add

required

getParamsDescription(paramTag)

Get the parameter description by tag.

Retrieves the parameter description corresponding to the given tag.

Parameters:

Name Type Description Default
paramTag int

The tag of the parameter description

required

Returns:

Type Description
ParamDescription

The parameter description if found, nullptr otherwise

getParamsDescriptionList()

Get the list of parameter descriptions.

Retrieves the list of parameter descriptions associated with this device.

Returns:

Type Description
list[ParamDescription]

The list of parameter descriptions

setParamDescriptionList(paramDescriptionList)

Set the list of parameter descriptions.

Replaces the current list of parameter descriptions with a new one.

Parameters:

Name Type Description Default
paramDescriptionList list[ParamDescription]

The new list of parameter descriptions

required

getDriverDescription()

Get the driver description.

Retrieves the description of the driver associated with this device.

Returns:

Type Description
DriverDescription

The driver description

setDriverDescription(driverDescription)

Set the driver description.

Sets the description of the driver associated with this device.

Parameters:

Name Type Description Default
driverDescription DriverDescription

The driver description

required