Exemplo n.º 1
0
        internal SynelClient(IConnection connection, int terminalId)
        {
            if (terminalId > 31)
                throw new ArgumentOutOfRangeException("terminalId", terminalId,
                    "The terminal ID must be between 0 and 31.");

            _terminalId = terminalId;
            _connection = connection;
            _terminal = new TerminalOperations(this);
        }
Exemplo n.º 2
0
        internal SynelClient(IConnection connection, int terminalId)
        {
            if (terminalId > 31)
            {
                throw new ArgumentOutOfRangeException("terminalId", terminalId,
                                                      "The terminal ID must be between 0 and 31.");
            }

            _terminalId = terminalId;
            _connection = connection;
            _terminal   = new TerminalOperations(this);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns an awaitable task that deletes a specific fingerprint template (all indexes) from the terminal.
        /// </summary>
        /// <param name="templateId">The id associated with the template.</param>
        public async Task DeleteTemplateAsync(long templateId)
        {
            if (templateId < 1 || templateId > 9999999999)
            {
                throw new ArgumentOutOfRangeException("templateId", templateId, "The template id must be between 1 and 9999999999");
            }

            var data     = string.Format("G-{0:D10}", templateId);
            var response = await _client.SendAndReceiveAsync(RequestCommand.Fingerprint, data, ACK);

            TerminalOperations.ValidateAcknowledgment(response);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Deletes a specific fingerprint template and index from the terminal.
        /// </summary>
        /// <param name="templateId">The id associated with the template.</param>
        /// <param name="fingerIndex">The finger index to delete.</param>
        public void DeleteTemplate(long templateId, int fingerIndex)
        {
            if (templateId < 1 || templateId > 9999999999)
            {
                throw new ArgumentOutOfRangeException("templateId", templateId, "The template id must be between 1 and 9999999999");
            }

            if (fingerIndex < 0 || fingerIndex > 9)
            {
                throw new ArgumentOutOfRangeException("fingerIndex", fingerIndex, "The finger index must be between 0 and 9");
            }

            var data     = string.Format("G{0}{1:D10}", fingerIndex, templateId);
            var response = _client.SendAndReceive(RequestCommand.Fingerprint, data, ACK);

            TerminalOperations.ValidateAcknowledgment(response);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Returns an awaitable task that deletes all fingerprint templates from the terminal.
        /// </summary>
        public async Task DeleteAllTemplatesAsync()
        {
            var response = await _client.SendAndReceiveAsync(RequestCommand.Fingerprint, "G@@@@@@@@@@@", 3, ACK);

            TerminalOperations.ValidateAcknowledgment(response);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Deletes all fingerprint templates from the terminal.
        /// </summary>
        public void DeleteAllTemplates()
        {
            var response = _client.SendAndReceive(RequestCommand.Fingerprint, "G@@@@@@@@@@@", 3, ACK);

            TerminalOperations.ValidateAcknowledgment(response);
        }