public override void Execute()
        {
            if (srm == null)
            {
                srm = AutomationContext.Read(memoryServiceName, memoryItemName) as Device.SRM;
                if (srm == null)
                {
                    srm = new Device.SRM() { Name = "SRM02" };
                    srm.TaskFactories.Add(new DefaultTaskFactory());
                    AutomationContext.Write(memoryServiceName, memoryItemName, srm);
                }
            }

            if (srm != null)
            {
                srm.Scan();
                AutomationContext.Write(memoryServiceName, memoryItemName, srm);
            }
        }
        public override void Execute()
        {
            if (srm == null)
            {
                srm = AutomationContext.Read(memoryServiceName, memoryItemName) as Device.SRM;
                if (srm == null)
                {
                    srm = new Device.SRM()
                    {
                        Name = "SRM04"
                    };
                    srm.TaskFactories.Add(new DefaultTaskFactory());
                    AutomationContext.Write(memoryServiceName, memoryItemName, srm);
                }
            }

            if (srm != null)
            {
                srm.Scan();
                AutomationContext.Write(memoryServiceName, memoryItemName, srm);
            }
        }