|
|
@ -1,4 +1,9 @@
|
|
|
|
import { _, RestOfLine, Newline, NumberValue, HexNumberValue, IdentifierValue } from "../primitives"
|
|
|
|
import { Integer } from "../../../peg-number"
|
|
|
|
|
|
|
|
import { HexInteger } from "../../../peg-hex-number"
|
|
|
|
|
|
|
|
import { Newline } from "../../../peg-newline"
|
|
|
|
|
|
|
|
import { SameLine as _ } from "../../../peg-whitespace"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { RestOfLine, IdentifierValue } from "../primitives"
|
|
|
|
import { Header } from "../shared"
|
|
|
|
import { Header } from "../shared"
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -17,7 +22,7 @@ AttributesSection
|
|
|
|
|
|
|
|
|
|
|
|
AttributesSectionSATA
|
|
|
|
AttributesSectionSATA
|
|
|
|
= "=== START OF READ SMART DATA SECTION ===" Newline
|
|
|
|
= "=== START OF READ SMART DATA SECTION ===" Newline
|
|
|
|
"SMART Attributes Data Structure revision number:" _ NumberValue Newline
|
|
|
|
"SMART Attributes Data Structure revision number:" _ Integer Newline
|
|
|
|
"Vendor Specific SMART Attributes with Thresholds:" Newline
|
|
|
|
"Vendor Specific SMART Attributes with Thresholds:" Newline
|
|
|
|
"ID#" _ "ATTRIBUTE_NAME" _ "FLAG" _ "VALUE" _ "WORST" _ "THRESH" _ "TYPE" _ "UPDATED" _ "WHEN_FAILED" _ "RAW_VALUE" Newline
|
|
|
|
"ID#" _ "ATTRIBUTE_NAME" _ "FLAG" _ "VALUE" _ "WORST" _ "THRESH" _ "TYPE" _ "UPDATED" _ "WHEN_FAILED" _ "RAW_VALUE" Newline
|
|
|
|
attributes:AttributeFieldSATA+ {
|
|
|
|
attributes:AttributeFieldSATA+ {
|
|
|
@ -32,7 +37,7 @@ AttributesSectionNVMe
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AttributeFlags
|
|
|
|
AttributeFlags
|
|
|
|
= "0x" number:HexNumberValue {
|
|
|
|
= "0x" number:HexInteger {
|
|
|
|
return mapAttributeFlags(number);
|
|
|
|
return mapAttributeFlags(number);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -50,12 +55,12 @@ AttributeFieldType
|
|
|
|
/ "Old_age"
|
|
|
|
/ "Old_age"
|
|
|
|
|
|
|
|
|
|
|
|
AttributeFieldSATA
|
|
|
|
AttributeFieldSATA
|
|
|
|
= _ id:NumberValue
|
|
|
|
= _? id:Integer
|
|
|
|
_ attributeName:IdentifierValue
|
|
|
|
_ attributeName:IdentifierValue
|
|
|
|
_ flags:AttributeFlags
|
|
|
|
_ flags:AttributeFlags
|
|
|
|
_ value:NumberValue
|
|
|
|
_ value:Integer
|
|
|
|
_ worstValue:NumberValue
|
|
|
|
_ worstValue:Integer
|
|
|
|
_ threshold:NumberValue
|
|
|
|
_ threshold:Integer
|
|
|
|
_ type:AttributeFieldType
|
|
|
|
_ type:AttributeFieldType
|
|
|
|
_ updatedWhen:AttributeUpdatedWhen
|
|
|
|
_ updatedWhen:AttributeUpdatedWhen
|
|
|
|
_ failedWhen:AttributeFailedWhen
|
|
|
|
_ failedWhen:AttributeFailedWhen
|
|
|
|