コード例 #1
0
        private void PullTrigger()
        {
            var emessage = SsiMessages.PrepareMessage("EnableTrigger");

            SendMessage(emessage);

            Thread.Sleep(500);

            var message = SsiMessages.PrepareMessage("TriggerOn");

            SendMessage(message);
        }
コード例 #2
0
        private void InterpreteFrame(byte[] bytes, int length)
        {
            var mLength = bytes[0];

            if (length == mLength) //Configuration frame
            {
                if (bytes[1] == SsiMessages.GetCheckSumErrorVal())
                {
                    ScannerErrorEvent?.Invoke(this, new ScannerErrorEventArgs(ErrorCodeDictionary.DataReadErrors.CheckSumError, "Błąd sumy kontrolnej w komunikacji SSI"));
                }
            }
            else // Barcode
            {
                var codeBytes = new byte[length];
                Array.Copy(bytes, 0, codeBytes, 0, length);
                var barcode = Encoding.ASCII.GetString(codeBytes);
                _dtimer.Stop();
                CloseConnection();
                CompareCode(barcode);
            }
        }
コード例 #3
0
        private void TriggerDown()
        {
            var message = SsiMessages.PrepareMessage("TriggerOff");

            SendMessage(message);
        }