en-us/about_DiskSmartInfo_attributes.help.txt

ABOUT DISKSMARTINFO ATTRIBUTES
 
SHORT DESCRIPTION
 
Describes SMART attribute definitions used by commands of DiskSmartInfo module.
 
LONG DESCRIPTION
 
SMART attributes are defined in three files, located in the attributes folder:
    default.ps1
    proprietary.ps1
    descriptions.ps1
 
 
DEFAULT ATTRIBUTES
 
default.ps1 contains attribute definitions, that are used in all cases,
when they are not redefined by proprietary attributes.
 
The structure of default attribute definition is as follows:
    AttributeID
    AttributeName
    DataType
    IsCritical
    ConvertScriptBlock
 
AttributeID is a numerical value, that defines attribute number.
 
AttributeName is a string value, that specifies the name of an attribute.
 
DataType is an enum type value, that defines attribute data structure.
 
IsCritical is a boolean, specifying whether an attribute is critical.
 
ConvertScriptBlock is a ScriptBlock type value, that defines conversion process,
that is used by the the Get-DiskSmartInfo command with the -Convert parameter.
 
 
PROPRIETARY ATTRIBUTES
 
proprietary.ps1 contains data structure, that consists of different device families.
 
Each device family object has three properties:
    Family
    ModelPatterns
    Attributes
 
Family property is a string, used as a custom name for the device family.
This property is not used by the commands.
 
ModelPatterns is an array of strings. Each of them represents regular expression,
used by the Get-DiskSmartInfo command to compare with the model of the processed
disks. When there is a match, attributes from that family are added to actual
attribute set.
 
If selected family contains an attribute with id, that is already defined
in default attributes, proprietary attribute replaces default one.
 
Attributes property is an array of attribute definitions. The structure of the
proprietary attribute definition corresponds to the structure of default
attribute definition:
    AttributeID
    AttributeName
    DataType
    IsCritical
    ConvertScriptBlock
 
However for proprietary attribute definitions IsCritical and ConvertScriptBlock
properties are not mandatory.
 
If these two properties are defined, matched set proprietary attribute definition
is fully replaces default one.
 
If any of these properties (or both of them) is not specified in the proprietary
attribute definition, then resulting attribute definition will retain original
(default) value of this property.
 
For example, if there is a default attribute with the following definition:
 
    AttributeID = n
    AttributeName = 'Attribute Name'
    DataType = [DataType]::bits24
    IsCritical = $true
    ConvertScriptBlock = {$args[0] * 1000}
 
and proprietary attribute with the following definition:
 
    AttributeID = n
    AttributeName = 'New Attribute Name'
    DataType = [DataType]::bits48
 
then resulting attribute definition will be:
 
    AttributeID = n
    AttributeName = 'New Attribute Name'
    DataType = [DataType]::bits48
    IsCritical = $true
    ConvertScriptBlock = {$args[0] * 1000}
 
 
New disk models and proprietary definitions should be added to this file.
 
 
DESCRIPTIONS
 
descriptions.ps1 contains descriptions of the default attributes, that are used
by the Get-DiskSmartAttributeDescription command.
 
 
SEE ALSO
 
about_DiskSmartInfo_config