getValueAsTimestampArray method

List<int> getValueAsTimestampArray()

Gets the the field value as an array of timestamp.

return The field value as an array of timestamp. throws BiosealException An error has occurred during Bioseal Library execution.

Implementation

List<int> getValueAsTimestampArray() {
  Pointer<LongLong> pValueAsTimestampArray = nullptr;
  Pointer<Int> pValueAsTimestampArraySize = calloc();
  pValueAsTimestampArraySize[0] = -1;
  try {
    var err = biosealSDK.id3BiosealField_GetValueAsTimestampArray(_pHandle.value, pValueAsTimestampArray, pValueAsTimestampArraySize);
    if (err == BiosealError.insufficientBuffer.value) {
      pValueAsTimestampArray = calloc.allocate(pValueAsTimestampArraySize.value);
      err = biosealSDK.id3BiosealField_GetValueAsTimestampArray(_pHandle.value, pValueAsTimestampArray, pValueAsTimestampArraySize);
    }
    if (err != BiosealError.success.value) {
      throw BiosealException(err);
    }
    final vValueAsTimestampArray = Int64List.fromList(pValueAsTimestampArray.cast<Int64>().asTypedList(pValueAsTimestampArraySize.value));
    return vValueAsTimestampArray;
  } finally {
    calloc.free(pValueAsTimestampArray);
    calloc.free(pValueAsTimestampArraySize);
  }
}