enrollX method

List<int> enrollX()

Implementation

List<int> enrollX() {
  int enrollDataSize = sizeOf<FTR_ENROLL_DATA>();
  _ftrEnrollDataBuffer.ref.dwSize = enrollDataSize;
  int enrollResult =
      _enrollX(nullptr, 3, _ftrDataBuffer, _ftrEnrollDataBuffer);

  if (enrollResult != 0) {
    String errorMessage = FutronicUtils.getErrorMessage(enrollResult);

    throw FutronicError(errorMessage);
  }
  List<int> template = _ftrDataBuffer.ref.pData
      .asTypedList(_ftrDataBuffer.ref.dwSize)
      .toList();
  sendPort
      ?.send(FutronicStatus.fromQuality(_ftrEnrollDataBuffer.ref.dwQuality));
  sendPort?.send(template);
  return template;
}