Newer
Older
IRIS_COLLECT / IOM_cs / Constants.cs
yangqianqian on 29 Dec 2020 11 KB first
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IAiCamIrisLib;

namespace IOM_cs   
{
    public class Constants
    {
        //SDK errors
        public const int IC_SDKERR_FAKE_EYE = -2080374768;
        public const int IC_SDKERR_TIMEOUT = -2080374775;
        public const int IC_SDKERR_LICENSE = -2080374776;
        public const int IC_SDKERR_IMPVERSION = -2080374777;
        public const int IC_SDKERR_PARAMETER = -2080374778;
        public const int IC_SDKERR_FAILURE = -2080374779;
        public const int IC_SDKERR_AUTH = -2080374780;
        public const int IC_SDKERR_SOCKET = -2080374781;
        public const int IC_SDKERR_CLOSE = -2080374782;
        public const int IC_SDKERR_OPEN = -2080374783;
        public const int IC_ERROR_ICAM_RETURN = -1000007;
        public const int IC_SDKERR_NONE = 0;
        public const int IC_IRIS_BAD_IMAGE = -2147418109;
        public const int IAIRIS_ERROR_NONE = 0;
        public const int IAIRIS_ERROR_OPEN = -2147418111;
        public const int IAIRIS_ERROR_PARAMETER = -2147418110;
        public const int IAIRIS_ERROR_BAD_IMAGE = -2147418109;
        public const int IAIRIS_ERROR_LICENSE = -2147418108;
        public const int IC_ERROR_WIEGAND_OUT_DISABLED = -2080374767;
        public const int IC_ERROR_RELAY_ALREADY_TURNED_ON = -2080374766;
        public const int IS_ERROR_LOW_ICAM_VERSION = -2080374764;
        public const int IS_ERROR_UPGRADE_FAILED = -2080374763;

        public const int IS_ERROR_UPGRADE_NOT_REQUIRED = -2080374760;
        public const int IS_ERROR_OBSOLETE_DAT_FILES = -2080374761;
        public const int IS_ERROR_ALREADY_OPEN = -2080374762;

        //EYE

        public const int EYE_RIGHT = 1;
        public const int EYE_LEFT = 2;
        public const int EYE_BOTH = 3;
        public const int EYE_EITHER = 4;


        // Iris Selection

        public const int IS_IRIS_RIGHT = 1;
        public const int IS_IRIS_LEFT = 2;
        public const int IS_IRIS_BOTH = 3;
        public const int IS_IRIS_EITHER = 4;

        // Illuminator
        public const int IS_ILLUM_RIGHT = 1;
        public const int IS_ILLUM_LEFT = 2;
        public const int IS_ILLUM_BOTH = 3;
        public const int IS_ILLUM_FUSION = 4;

        // Range

        public const int IS_RNG_NEAR_RANGE = 1;
        public const int IS_RNG_OPERATING_RANGE = 2;
        public const int IS_RNG_FAR_RANGE = 3;
        public const int IS_RNG_OUT_OF_RANGE = 4;

        // Get Iris Image Purpose

        public const int IS_ENROLLMENT = 1;
        public const int IS_RECOGNITION = 2;

        // Face Image Type

        public const int IS_FI_480X640 = 1;
        public const int IS_FI_240X320 = 2;
        public const int IS_FI_120X160 = 3;

        // External Interface

        public const int IS_EIF_SMART_CARD = 1;
        public const int IS_EIF_WIEGNAD_IN = 2;
        public const int IS_EIF_WIEGAND_OUT = 3;
        public const int IS_EIF_SERIAL_INTF = 4;
        public const int IS_EIF_GPI1 = 5;
        public const int IS_EIF_GPI2 = 6;
        public const int IS_EIF_GPO1 = 7;
        public const int IS_EIF_GPO2 = 8;

        // Sound Message

        public const int IS_SND_NONE = 0;
        public const int IS_SND_CAMERA_SHUTTER = 1;
        public const int IS_SND_MOVE_FORWARD = 2;
        public const int IS_SND_MOVE_BACKWARD = 3;
        public const int IS_SND_CENTER_EYES_IN_MIRROR = 4;
        public const int IS_SND_IDENTIFIED = 5;
        public const int IS_SND_NOT_IDENTIFY = 6;
        public const int IS_SND_VERIFIED = 7;
        public const int IS_SND_NOT_VERIFY = 8;
        public const int IS_SND_PRESENT_CARD = 9;
        public const int IS_SND_FINISH_IRIS_CAPTURE = 10;
        public const int IS_SND_OPERATION_BEEP = 11;
        public const int IS_SND_OPERATION_SMART_BEEP = 12;

        // VFD Messages

        public const int IS_VFD_NONE = 0;
        public const int IS_VFD_INITIALIZING = 1;
        public const int IS_VFD_CONNECTING = 2;
        public const int IS_VFD_CONNEDTED = 3;
        public const int IS_VFD_LOOK_INTO_CAMERA = 4;
        public const int IS_VFD_IN_OPERATING_RANGE = 5;
        public const int IS_VFD_MOVE_CLOSER = 6;
        public const int IS_VFD_MOVE_BACK = 7;
        public const int IS_VFD_OUT_OF_RANGE = 8;
        public const int IS_VFD_TIMEOUT = 9;
        public const int IS_VFD_IDENTIFIED = 10;
        public const int IS_VFD_NOT_IDENTIFIED = 11;
        public const int IS_VFD_VERIFYED = 12;
        public const int IS_VFD_NOT_VERIFYED = 13;
        public const int IS_VFD_ACCESS_DENIED = 14;
        public const int IS_VFD_THANK_YOU = 15;
        public const int IS_VFD_ENTER_PIN = 16;
        public const int IS_VFD_PRESENT_CARD = 17;

        // Indicator Type

        public const int IS_IND_NONE = 0;
        public const int IS_IND_SUCCESS = 1;
        public const int IS_IND_FAILURE = 2;
        public const int IS_IND_BUSY = 3;
        public const int IS_IND_ERROR = 4;
        public const int IS_IND_TURN_ON = 5;
        public const int IS_IND_TURN_OFF = 6;

        // iCAM Status

        public const int IS_STAT_DISCONNECT_NETWORK = 1;
        public const int IS_STAT_COVER_CLOSED = 2;
        public const int IS_STAT_COVER_OPEN = 3;
        public const int IS_STAT_RANGE_INFORMATION = 4;
        public const int IS_STAT_ICUPGRADE_STATUS = 6;

        // Iris Status

        public const int IS_IRIS_STAT_NONE = 0;
        public const int IS_IRIS_STAT_FAKE = 1;
        public const int IS_IRIS_STAT_FAIL = 2;

        // Audit Face Image

        public const int IS_FACE_AUDIT_OFF = 0;
        public const int IS_FACE_AUDIT_ON = 1;

        //SmartCard status Event

        public const int ISC_DETECTCARD_SUCCESS = 1;
        public const int ISC_DETECTCARD_TIMEOUT = 0;
        public const int ISC_STAT_DISCONNECT = 2;


        //Size of IrisCode.
        public const int IRISCODE_SIZE = 512;
        //Apllication Title.
        public const string TITLE = "CSharp_Sample";

        //SmartCard's Data Formats

        public const int SC_TEMPLETE_RAW = 1;
        public const int SC_TEMPLETE_GSCIS = 2;

        //SmartCard Type

        public const int SC_ICLASS_LIB_ID = 1;
        public const int SC_SMART_ID_LIB_ID = 2;
        public const int SC_MIFARE_LIB_ID = 3;

        public const int SC_MIFARE_OPTION = 80;
        //SmartCard wait - Time interval
        public const int SC_WAIT_INTERVAL = 10000;
        //smartcard(HID) default option
        public const int SC_HID_OPTION = 13;
        //smartcard(SmartID) default option
        public const int SC_SMARD_ID_OPTION = 11;

        //smartcard UI states

        public const int SC_STATE_IDLE = 0;
        public const int SC_STATE_WRITE = 1;
        public const int SC_STATE_READ = 2;
        public const int SC_STATE_OPEN = 3;
        public const int SC_STATE_VERIFY = 4;
        public const int SC_STATE_WAITFORCARD = 5;

        public static uint IAIRISTEMPLATE_ERROR_NONE = 0x00000000;
        public static uint IAIRISTEMPLATE_ERROR_PARAMETER = 0x80020001;

        //iDataSmartCardSDK Error Codes 
        public static uint IASMARTCARD_ERROR_NONE = 0x00000000;
        public static uint IASMARTCARD_ERROR_PARAMETER = 0x80100001;
        public static uint IASMARTCARD_ERROR_KEYS = 0x80100002;
        public static uint IASMARTCARD_ERROR_COM = 0x80100003;
        public static uint IASMARTCARD_ERROR_OPEN = 0x80100004;
        public static uint IASMARTCARD_ERROR_CLOSE = 0x80100005;
        public static uint IASMARTCARD_ERROR_UNKNOWN = 0x80100006;
        public static uint IASMARTCARD_ERROR_LOAD_PROC = 0x80100007;
        public static uint IASMARTCARD_ERROR_LOAD_LIBRARY = 0x80100008;
        public static uint IASMARTCARD_ERROR_WRONG_DATA = 0x80100009;
        public static uint IASMARTCARD_ERROR_MEMORY = 0x80100010;
        public static uint IASMARTCARD_ERROR_ENCRYPT = 0x80100011;
        public static uint IASMARTCARD_ERROR_DECRYPT = 0x80100012;

        public static uint IASMARTCARD_ERROR_PORT_OPEN = 0x80100013;
        public static uint IASMARTCARD_ERROR_PORT_CLOSE = 0x80100014;
        public static uint IASMARTCARD_ERROR_PORT_CLEAR = 0x80100015;
        public static uint IASMARTCARD_ERROR_TIMEOUT = 0x80100016;
        public static uint IASMARTCARD_ERROR_READ_DATA = 0x80100017;
        public static uint IASMARTCARD_ERROR_WRITE_DATA = 0x80100018;
        public static uint IASMARTCARD_ERROR_CLEAR_DATA = 0x80100019;
        public static uint IASMARTCARD_ERROR_CARD_NOT_EXIST = 0x80100020;
        public static uint IASMARTCARD_ERROR_CARD_ACCESS = 0x80100021;
        public static uint IASMARTCARD_ERROR_RESPONSE = 0x80100022;
        public static uint IASMARTCARD_ERROR_INVALID_CARD = 0x80100023;
        public static uint IASMARTCARD_ERROR_OFFSET = 0x80100024;
        public static uint IASMARTCARD_ERROR_WRONG_KEY = 0x80100025;


        public static uint GSC_IRIS_TAG = 0x60;
        public static uint GSC_TYPE_IRIS = 0x03;
        public static uint GSC_ALGORITHM_IRIDIAN = 0x04;
        public static uint GSC_CARD_ID_TAG = 0x23;
        public static uint GSC_EYE_RIGHT = 0x03;
        public static uint GSC_EYE_LEFT = 0x04;
        public static uint GSC_IRISCODE_HEADER_SIZE = 7;
        public static uint CARD_ID_SIZE = 20;
        public static uint GSC_CARD_ID_CONTAINER_SIZE = (2 + CARD_ID_SIZE);
        public static uint MAX_HID_DATA_SIZE = 1880;

        // Data Format
        public static int FORMAT_IA_EAC = 0x0;
        public static int FORMAT_GSC_IS_NO_CRYPTO = 0x01;
        public static int FORMAT_GSC_IS_AES = 0x02;
        public static int FORMAT_GSC_IS_DES = 0x03;
        public static int FORMAT_GSC_IS_DES3 = 0x04;

        public const int RECOGNITION_HD = 200;

        //Smart Card types
        public const int ISC_CARDTYPE_HID_16K_2 = 1;
        public const int ISC_CARDTYPE_HID_16K_16 = 2;
        public const int ISC_CARDTYPE_DESFIRE = 3;
        public const int ISC_CARDTYPE_MIFARE_1K = 4;
        public const int ISC_CARDTYPE_MIFARE_4K = 5;

        //Iris Images Modes
        public const int DEFAULT_IRIS_MODE = 0;
        public const int RIGHT_IRIS_MODE = 1;
        public const int LEFT_IRIS_MODE = 2;
        public const int BOTH_EYE_MODE = 3;
        public const int EITHER_EYE_MODE = 4;
        public const int RL_EYE_MODE = 5;
        public const int LR_EYE_MODE = 6;
        public const int EYE_EITHER_MODE = 7;

        //Live Image modes
        public const int LIVE_IMAGE_ON_MODE = 1;
        public const int LIVE_IMAGE_OFF_MODE = 0;

        //DB File not Found
        public const int DB_FILE_NOT_FOUND = -2;

        //Iris Image Status
        public const int BAD_IRIS = 1;
        public const int FAKE_IRIS = 2;
        public const int GOOD_IRIS = 3;

    }


    //Application States
    public enum AppState
    {
        Idle,
        Enroll,
        Identify,
        Verify,
        VerifySmartcard,
        Error
    }



}