Home  Contents

v4kf:sensors

V4kf Core4 Lua Event System

SYNOPSIS

#include <v4kf.lh>
bits = rdrhandle:sensors()

DESCRIPTION

Returns the last polled state of the reader's sensors. The return value is a bit-field value. Meaning of bits depends on the specific reader hardware. For normal use, it is usually not necessary to make use of these status bits. In fact, using these status bits will break upgrade compatibility as more different reader types are added to the v4kf library.

Following is a table with bit definitions for the original Leadus V4KF. Note that other reader models will put different meanings on the sensor bits.

Bit V4KF V2BF V2XF Description
V4KF_SENSE_S0 * Front sensor
V4KF_SENSE_S1 * * * Card position sensor
V4KF_SENSE_S2 * * * Card position sensor
V4KF_SENSE_S3 * * Card position sensor
V4KF_SENSE_S4 * * Rear sensor
V4KF_SENSE_WID * Card width detection switch in shutter
V4KF_SENSE_SHD * Magstripe detection sensor in shutter
V4KF_SENSE_SHE * * Shutter open sensor
V4KF_SENSE_ICA * * * IC contact is active
V4KF_SENSE_CHE * * * IC contact press sensor
V4KF_SENSE_TAMPER * Tamper sensor
V4KF_SENSE_MOTOR0 * * Motor speed bit 0
V4KF_SENSE_MOTOR1 * * Motor speed bit 1

RETURN VALUE

Returns an integer value.

SEE ALSO