|
|
|
@ -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"
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
@ -17,7 +22,7 @@ AttributesSection
|
|
|
|
|
|
|
|
|
|
AttributesSectionSATA
|
|
|
|
|
= "=== 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
|
|
|
|
|
"ID#" _ "ATTRIBUTE_NAME" _ "FLAG" _ "VALUE" _ "WORST" _ "THRESH" _ "TYPE" _ "UPDATED" _ "WHEN_FAILED" _ "RAW_VALUE" Newline
|
|
|
|
|
attributes:AttributeFieldSATA+ {
|
|
|
|
@ -32,7 +37,7 @@ AttributesSectionNVMe
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AttributeFlags
|
|
|
|
|
= "0x" number:HexNumberValue {
|
|
|
|
|
= "0x" number:HexInteger {
|
|
|
|
|
return mapAttributeFlags(number);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -50,12 +55,12 @@ AttributeFieldType
|
|
|
|
|
/ "Old_age"
|
|
|
|
|
|
|
|
|
|
AttributeFieldSATA
|
|
|
|
|
= _ id:NumberValue
|
|
|
|
|
= _? id:Integer
|
|
|
|
|
_ attributeName:IdentifierValue
|
|
|
|
|
_ flags:AttributeFlags
|
|
|
|
|
_ value:NumberValue
|
|
|
|
|
_ worstValue:NumberValue
|
|
|
|
|
_ threshold:NumberValue
|
|
|
|
|
_ value:Integer
|
|
|
|
|
_ worstValue:Integer
|
|
|
|
|
_ threshold:Integer
|
|
|
|
|
_ type:AttributeFieldType
|
|
|
|
|
_ updatedWhen:AttributeUpdatedWhen
|
|
|
|
|
_ failedWhen:AttributeFailedWhen
|
|
|
|
|