예제 #1
0
        public static void GetStatus(object obj)
        {
            bool result = true;

            GroupOPThread.GroupOPContext groupOPContext = (GroupOPThread.GroupOPContext)obj;
            DevSnmpConfig devsnmpcfg   = groupOPContext.devsnmpcfg;
            DevAccessAPI  devAccessAPI = new DevAccessAPI(devsnmpcfg);

            devAccessAPI.GetDeviceOutletsStatus();
            if (groupOPContext.opCallback != null)
            {
                groupOPContext.opCallback(result, devsnmpcfg);
            }
        }
예제 #2
0
        public static void Reboot(object obj)
        {
            bool result = true;

            GroupOPThread.GroupOPContext groupOPContext = (GroupOPThread.GroupOPContext)obj;
            DevSnmpConfig devsnmpcfg   = groupOPContext.devsnmpcfg;
            DevAccessAPI  devAccessAPI = new DevAccessAPI(devsnmpcfg);

            if (!devAccessAPI.RebootGroupOutlets(devsnmpcfg.groupOutlets))
            {
                result = false;
            }
            if (groupOPContext.opCallback != null)
            {
                groupOPContext.opCallback(result, devsnmpcfg);
            }
        }