public void Configure(BarcodeConfig config) { var command = new BarcodeCommand(); config.Configure(command); _commander.Execute(command); }
public ReaderService( IReaderConnectionManager readerConnectionManager, IAsciiSerialTransportConsumer consumer, TslReaderInfo readerInfo, SwitchAsynchronousResponder switchResponder, SwitchConfig switchConfig, ITagMonitor tagMonitor, BarcodeConfig barcodeConfig, IBarcodeMonitor barcodeMonitor, InventoryConfig config) { _consumer = consumer; _commander = consumer as IAsciiCommander; _connection = readerConnectionManager; _info = readerInfo; _tagMonitor = tagMonitor; _barcodeMonitor = barcodeMonitor; SwitchConfig = switchConfig; InventoryConfig = config; BarcodeConfig = barcodeConfig; _connection.ConnectionStateChanged += ConnectionStateChanged; switchResponder.SwitchStateChanged += (sender, e) => switchConfig.SwitchStateChanged?.Invoke(this, e); }
public void GetBarcode(BarcodeConfig config) { var command = new BarcodeCommand(); config.Configure(command); command.TakeNoAction = false; _barcodeMonitor.OnBarcodeReceived(command); _commander.Execute(command); }