Example #1
0
 public MasterSession(IProtocol protocol, NandakaDevice slaveDevice, MasterDeviceDispatcher dispatcher, ILog log)
 {
     _log                   = new PrefixLog(log, $"[{slaveDevice.Name} Session]");
     _protocol              = protocol;
     _slaveDevice           = slaveDevice;
     _registersUpdatePolicy = slaveDevice.UpdatePolicy;
     _dispatcher            = dispatcher;
 }
Example #2
0
 protected NandakaDevice(int address, DeviceState state, IRegistersUpdatePolicy updatePolicy, ISpecificMessageHandler specificMessageHandler)
 {
     Address                 = address;
     UpdatePolicy            = updatePolicy;
     _specificMessageHandler = specificMessageHandler;
     _specificMessages       = new ConcurrentQueue <ISpecificMessage>();
     ErrorCounter            = new Dictionary <DeviceError, int>();
     State = state;
 }
Example #3
0
 private TestDevice(int address, IRegistersUpdatePolicy updatePolicy, DeviceState state) : base(address, updatePolicy, state)
 {
 }
Example #4
0
 protected NandakaDevice(int address, IRegistersUpdatePolicy updatePolicy, DeviceState state)
     : this(address, state, updatePolicy, new NullSpecificMessageHandler())
 {
 }