function TATABufferInterpreter.BufferToSMARTValueList( const Buffer: TSmallBuffer): TSMARTValueList; const SMARTStartPadding = 2; SMARTValueLength = 12; function CalculateRow(const CurrentRow: Integer): Integer; begin result := (CurrentRow * SMARTValueLength) + SMARTStartPadding; end; var CurrentRow: Integer; MaxRow: Integer; begin SMARTValueList := TSMARTValueList.Create; BufferInterpreting := Buffer; MaxRow := (Length(BufferInterpreting) - SMARTStartPadding) div SMARTValueLength; for CurrentRow := 0 to MaxRow do if not IfValidSMARTAddToList(CalculateRow(CurrentRow)) then break; result := SMARTValueList; end; function TATABufferInterpreter.BufferToSMARTThresholdValueList( const Buffer: TSmallBuffer): TSMARTValueList; const SMARTStartPadding = 2; SMARTValueLength = 12; var CurrentRow: Integer; begin SMARTValueList := TSMARTValueList.Create; BufferInterpreting := Buffer; for CurrentRow := 0 to (Length(BufferInterpreting) - SMARTStartPadding) div SMARTValueLength do IfValidSMARTThresholdAddToList( (CurrentRow * SMARTValueLength) + SMARTStartPadding); result := SMARTValueList; end;