12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using Edge.Core.Processor;
- using Edge.Core.IndustryStandardInterface.Pump;
- using Edge.Core.IndustryStandardInterface.ATG;
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading.Tasks;
- namespace Application.ATG_Classic_App_Test
- {
- internal class MockProbeHandler : IAppProcessor, IProbeHandler
- {
- private Probe probe;
- private Func<IProbeHandler, ProbeReading> readingValueProducer;
- public Probe Probe => this.probe;
- public string MetaConfigName { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
- public string SerialNumber { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
- public Task<ProbeReading> GetProbeReadingAsync()
- {
- return Task.FromResult(this.readingValueProducer(this));
- }
- public MockProbeHandler(int id, double probeLength)
- {
- this.probe = new Probe()
- {
- HardwareIdentity = "MAC_abedefg_" + id,
- ProbeLength = probeLength,
- DeviceId = id
- };
- }
- public void Mock_SetProbeReadingValueProducer(Func<IProbeHandler, ProbeReading> producer)
- {
- this.readingValueProducer = producer;
- }
- public void Init(IEnumerable<IProcessor> processors)
- {
- throw new NotImplementedException();
- }
- public Task<bool> Start()
- {
- throw new NotImplementedException();
- }
- public Task<bool> Stop()
- {
- throw new NotImplementedException();
- }
- }
- }
|