Class encapsulating fingerprint reader user message data.
This structure is used by FingerprintListener to deliver messages from the fingerprint reader to the user.
Thread safety:
Classes | |
enum | UserMessageID |
Enumeration of user messages which may be generated during fingerprint reader operations. More... | |
Public Member Functions | |
FingerprintUserMessage () | |
Default constructor - null (empty) user message. | |
FingerprintUserMessage (@NonNull UserMessageID initID, short initCount, short initTotal, @NonNull FingerprintUserRecord initUser) | |
Construct a user message with given values. More... | |
FingerprintUserMessage (@NonNull UserMessageID initID) | |
Construct a user message, setting the ID to a given value and using default values for the other fields. More... | |
short | count () |
Query the message's count field. More... | |
UserMessageID | ID () |
Query the message's type ID. More... | |
String | message () |
void | setCount (short newCount) |
Set the message's count field. More... | |
void | setID (@NonNull UserMessageID newID) |
Set the message's type ID. More... | |
void | setTotal (short newTotal) |
Set the message's total field. More... | |
void | setUser (@NonNull FingerprintUserRecord newUser) |
Set the message's user field. More... | |
short | total () |
Query the message's total field. More... | |
FingerprintUserRecord | user () |
Query the user field for this message. More... | |
Static Public Member Functions | |
static String | message (@NonNull UserMessageID messageID) |
FingerprintUserMessage | ( | @NonNull UserMessageID | initID, |
short | initCount, | ||
short | initTotal, | ||
@NonNull FingerprintUserRecord | initUser | ||
) |
Construct a user message with given values.
initID | Initial message ID |
initCount | Initial count for message types which require one; valid range 0-255, and should be zero for message types which do not require an associated count (see count() for more details) |
initTotal | Initial total for message types which require one; valid range 0-255, and should be zero for message types which do not require an associated total (see total() for more details) |
initUser | Initial user record for message types which require one; should be set to a default-constructed user record otherwise (see user() for more details) |
IllegalArgumentException | if the supplied count or total are out of range |
FingerprintUserMessage | ( | @NonNull UserMessageID | initID | ) |
Construct a user message, setting the ID to a given value and using default values for the other fields.
The count and total fields will default to zero, and the user record to an empty record.
This form of the constructor should not be used when the supplied ID indicates a message type which has an associated count, total or user record (see count(), total() and user() for more details). However, for all other message types it is appropriate.
initID | Initial message ID |
short count | ( | ) |
Query the message's count field.
This field represents the scan count for capture/enrolment/identification/verification, code quality for images, or progress percentage for image transfer. It is only applicable to the following message types: IMAGE_CODE_QUALITY, IMAGE_PROGRESS, PLACE_FINGER_FOR_ACQUISITION, PLACE_FIRST_FINGER_FOR_ACQUISITION, PLACE_SECOND_FINGER_FOR_ACQUISITION.
UserMessageID ID | ( | ) |
Query the message's type ID.
String message | ( | ) |
Obtain the user message associated with the current ID
|
static |
Obtain the user message associated with a given ID
messageID | Unique identifier for the message in question |
void setCount | ( | short | newCount | ) |
Set the message's count field.
This field represents the scan count for capture/enrolment/identification/verification, code quality for images, or progress percentage for image transfer. It is only applicable to the following message types: IMAGE_CODE_QUALITY, IMAGE_PROGRESS, PLACE_FINGER_FOR_ACQUISITION, PLACE_FIRST_FINGER_FOR_ACQUISITION, PLACE_SECOND_FINGER_FOR_ACQUISITION.
For all other message types it should be set to zero.
newCount | New value of the count field, valid range 0-255 |
IllegalArgumentException | if the supplied count is outside the valid range |
void setID | ( | @NonNull UserMessageID | newID | ) |
Set the message's type ID.
newID | New message type ID (see UserMessageID for details) |
void setTotal | ( | short | newTotal | ) |
Set the message's total field.
This field holds the total number of scans which will occur for capture/enrolment/identification/verification. It is only applicable to the following message types: PLACE_FINGER_FOR_ACQUISITION, PLACE_FIRST_FINGER_FOR_ACQUISITION, PLACE_SECOND_FINGER_FOR_ACQUISITION.
For all other message types it should be set to zero.
newTotal | New value of the total field, valid range 0-255 |
IllegalArgumentException | if the supplied total is outside the valid range |
void setUser | ( | @NonNull FingerprintUserRecord | newUser | ) |
Set the message's user field.
This field is only applicable to the MATCH_SUCCESSFUL message type, and only for identify operations. It contains the record associated with the user whose identity was matched.
For all other message types it should be set to a default-constructed user record.
newUser | New value of the user field |
short total | ( | ) |
Query the message's total field.
This field holds the total number of scans which will occur for capture/enrolment/identification/verification. It is only applicable to the following message types: PLACE_FINGER_FOR_ACQUISITION, PLACE_FIRST_FINGER_FOR_ACQUISITION, PLACE_SECOND_FINGER_FOR_ACQUISITION.
FingerprintUserRecord user | ( | ) |
Query the user field for this message.
This field is only applicable to the MATCH_SUCCESSFUL message type, and only for identify operations. It contains the record associated with the user whose identity was matched.