Exemplo n.º 1
0
        connect(string host,
                int port)
        {
            UF_RET_CODE result = deviceAgent.connect(host,
                                                     port);

            return(result);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            SFM_SDK_NET SFM    = new SFM_SDK_NET();
            UF_RET_CODE result = new UF_RET_CODE();

            result = SFM.UF_InitCommPort("COM3", 19200, false);
            Console.WriteLine(result.ToString());
        }
Exemplo n.º 3
0
        connect(string ip,
                int port)
        {
            UF_RET_CODE result = supremaEngine.UF_InitSocket(ip,
                                                             port,
                                                             false);

            return(result);
        }
Exemplo n.º 4
0
        connect(string commPort,
                int baudRate,
                bool asciiMode = false)
        {
            UF_RET_CODE result = supremaEngine.UF_InitCommPort(commPort,
                                                               baudRate,
                                                               asciiMode);

            return(result);
        }
Exemplo n.º 5
0
        connect(string serial,
                int baudRate,
                bool asciiMode = false)
        {
            UF_RET_CODE code = deviceAgent.connect(serial,
                                                   baudRate,
                                                   asciiMode);

            return(code);
        }
Exemplo n.º 6
0
        identify(Action <uint, byte> callback)
        {
            uint userId = 0;

            byte subId = 0;

            UF_RET_CODE result = deviceAgent.identify(ref userId,
                                                      ref subId);


            callback?.Invoke(userId,
                             subId);


            return(result);
        }
Exemplo n.º 7
0
        enroll(uint userId,
               object options,
               Action <uint, uint> callback)
        {
            uint regUserId    = 0;
            uint imageQuality = 0;

            UF_RET_CODE result = deviceAgent.enroll(userId,
                                                    (UF_ENROLL_OPTION)options,
                                                    ref regUserId,
                                                    ref imageQuality);

            callback?.Invoke(regUserId,
                             imageQuality);

            return(result);
        }
Exemplo n.º 8
0
        identifyByTemplate(uint templateSize,
                           byte[] templateData,
                           Action <uint, byte> callback)
        {
            uint userId = 0;

            byte subId = 0;

            UF_RET_CODE result = deviceAgent.identify(templateSize,
                                                      templateData,
                                                      ref userId,
                                                      ref subId);

            callback?.Invoke(userId,
                             subId);

            return(result);
        }
Exemplo n.º 9
0
        prepareAgents()
        {
            List <Model.FingerPrintDevice> fingerPrintDevices = Model.FingerPrintDevice.all();


            foreach (Model.FingerPrintDevice fingerPrint
                     in fingerPrintDevices)
            {
                FingerPrintAgent agent = new FingerPrintAgent(fingerPrint);


                UF_RET_CODE result = agent.connect(agent.deviceModel.ip,
                                                   agent.deviceModel.port);


                // Add to agents
                agents.Add(agent);
            }
        }
Exemplo n.º 10
0
        readTemplate(uint userId,
                     Action <uint, byte[]> callback)
        {
            uint tSize = deviceAgent.getTemplateSize();

            uint numOfTemplate = 0;

            byte[] data = new byte[tSize];


            UF_RET_CODE result = deviceAgent.readTemplate(userId,
                                                          ref numOfTemplate,
                                                          data);

            callback?.Invoke(numOfTemplate,
                             data);

            return(result);
        }
Exemplo n.º 11
0
        enrollByTemplate(uint userId,
                         object option,
                         uint templateSize,
                         byte[] templateData,
                         Action <uint> callback)
        {
            uint enrolledUserId = 0;

            UF_ENROLL_OPTION options = (UF_ENROLL_OPTION)option;


            UF_RET_CODE result = deviceAgent.enroll(userId,
                                                    options,
                                                    templateSize,
                                                    templateData,
                                                    ref enrolledUserId);

            callback?.Invoke(enrolledUserId);

            return(result);
        }
Exemplo n.º 12
0
        disconnect()
        {
            UF_RET_CODE result = deviceAgent.close();

            return(result);
        }