Esempio n. 1
0
        /// <summary>
        /// Send a command to the module
        /// </summary>
        /// <param name="cmd"></param>
        /// <param name="data"></param>
        private void SendCommand(FingerprintCommand cmd, byte[] data)
        {
            Console.WriteLine($"Command {cmd.ToString()}");
            FingerPrintProtocol fp = new FingerPrintProtocol(cmd, data);

            _newPacket = false;
            _wiating   = true;
            _inBuff.Clear();
            _sps.Write(fp.GetStructuredPacket());
        }
Esempio n. 2
0
        }                                //< The raw buffer for packet payload

        /// <summary>
        /// Constructor for Command packet
        /// </summary>
        /// <param name="data"></param>
        public FingerPrintProtocol(FingerprintCommand cmd, byte[] data) :
            this(PacketIdentifier.COMMANDPACKET, (byte)cmd, data)
        {
        }