public StatusManager(EposDevice device) { _stopRequestEvent = new ManualResetEvent(false); _running = new ManualResetEvent(false); _device = device; }
public CommunicationStatusManager(EposDevice device) { _device = device; if (_device != null) { LockingObjectName = $"Global\\VcsDevice{_device.Family}{_device.InterfaceName}{_device.PortName}"; } }
private async Task <bool> ConnectDevice(EposDevice device) { bool result = false; if (CloudAgent != null) { device.CloudAgent = CloudAgent; result = await device.Connect(); } else { MsgLogger.WriteError($"{GetType().Name} - ConnectDevice", $"connection to {device.Family} failed, agent not ready!"); } return(result); }
public static EposDeviceIdentification CreateIdentification(EposDevice device) { EposDeviceIdentification result = null; switch (device.Family) { case "EPOS2": result = new Epos2DeviceIdentification(device); break; case "EPOS4": result = new Epos4DeviceIdentification(device); break; } return(result); }
public static EposDevice CreateDevice(string deviceName, string interfaceName, string protocolStackName, string portName, uint updateInterval, uint timeout, int nodeId) { EposDevice result = null; string deviceDescriptionFile = GetDeviceDescriptionFile(deviceName, interfaceName, protocolStackName, portName); switch (deviceName) { case "EPOS2": result = new Epos2Device(deviceDescriptionFile, updateInterval, timeout, nodeId) { InterfaceName = interfaceName, ProtocolStackName = protocolStackName, PortName = portName }; break; case "EPOS4": result = new Epos4Device(deviceDescriptionFile, updateInterval, timeout, nodeId) { InterfaceName = interfaceName, ProtocolStackName = protocolStackName, PortName = portName }; break; } return(result); }
private void UnregisterDeviceEvents(EposDevice device) { device.StatusChanged -= OnDeviceStatusChanged; }
public EposDeviceIdentification(EposDevice device) { _device = device; }
public Epos4DeviceIdentification(EposDevice device) : base(device) { }
public EposDeviceVersion(EposDevice device) { _device = device; }
public Epos4DeviceCommunication(EposDevice device) : base(device) { _statusManager = new CommunicationStatusManager(device); }