Exemple #1
0
        private void Comm_OnReadMtu(object sender, MTUComm.ReadMtuArgs e)
        {
            currentMtu = e.MtuType;

            ActionResult result = CreateActionResultUsingInterface(e.MemoryMap, e.MtuType);

            logger.logReadResult(this, result, e.MtuType);
            ActionFinishArgs args = new ActionFinishArgs(result);

            OnFinish(this, args);
        }
Exemple #2
0
        private async Task Comm_OnReadMtu(object sender, MTUComm.ReadMtuArgs args)
        {
            try
            {
                ActionResult resultAllInterfaces = await CreateActionResultUsingInterface(args.MemoryMap, args.Mtu);

                this.lastLogCreated = logger.ReadMTU(this, resultAllInterfaces, args.Mtu);
                ActionFinishArgs finalArgs = new ActionFinishArgs(resultAllInterfaces);
                finalArgs.Mtu = args.Mtu;

                this.Finish(finalArgs);
            }
            catch (Exception e)
            {
                Errors.LogErrorNowAndContinue(new PuckCantCommWithMtuException());
                this.OnError();
            }
        }