public float ConvertValue(DriveAttributeValue value, 
   IReadOnlyArray<IParameter> parameters) 
 {
   if (rawValueConversion == null) {
     return value.AttrValue;
   } else {
     return rawValueConversion(value.RawValue, value.AttrValue, parameters);
   }
 }
Esempio n. 2
0
   protected static float RawToInt(byte[] raw, byte value,
 IReadOnlyArray<IParameter> parameters)
   {
       return (raw[3] << 24) | (raw[2] << 16) | (raw[1] << 8) | raw[0];
   }
Esempio n. 3
0
 private static float RawToGb(byte[] rawvalue, byte value,
   IReadOnlyArray<IParameter> parameters) 
 {
   return RawToInt(rawvalue, value, parameters) / 32;
 }