private void PullTrigger() { var emessage = SsiMessages.PrepareMessage("EnableTrigger"); SendMessage(emessage); Thread.Sleep(500); var message = SsiMessages.PrepareMessage("TriggerOn"); SendMessage(message); }
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); } }
private void TriggerDown() { var message = SsiMessages.PrepareMessage("TriggerOff"); SendMessage(message); }