Beispiel #1
0
        public static MasterThread Create(IReadOnlyCollection <NandakaDevice> slaveDevices, IProtocol protocol, IDeviceUpdatePolicy updatePolicy, ILog log)
        {
            var threadLog  = new PrefixLog(log, "[Master]");
            var dispatcher = MasterDeviceDispatcher.Create(slaveDevices, updatePolicy, threadLog);

            return(new MasterThread(dispatcher, protocol, threadLog));
        }
Beispiel #2
0
        public static SlaveThread Create(NandakaDevice device, IProtocol protocol, ILog log)
        {
            var threadLog = new PrefixLog(log, $"[{device.Name} Slave]");
            var session   = SlaveSession.Create(device, protocol, threadLog);

            return(new SlaveThread(session, threadLog));
        }
Beispiel #3
0
        public static MasterDeviceDispatcher Create(IReadOnlyCollection <NandakaDevice> slaveDevices, IDeviceUpdatePolicy updatePolicy, ILog log)
        {
            var updaterLog = new PrefixLog(log, "[Dispatcher]");

            return(new MasterDeviceDispatcher(slaveDevices, updatePolicy, updaterLog));
        }
Beispiel #4
0
        public static SlaveSession Create(NandakaDevice device, IProtocol protocol, ILog log)
        {
            var sessionLog = new PrefixLog(log, "[Session]");

            return(new SlaveSession(device, protocol, sessionLog));
        }