Exemplo n.º 1
0
            public static async Task <DevInfo> CheckDevice2Async(ServiceAsync svc, int devId)
            {
                var lastKnownState = svc.GetKnownDevStateAsync(devId);

                DevAddr addr = await svc.GetDevAddrAsync(devId);

                DevReport devReport = await svc.GetCurrDevReportAsync(addr);

                return(new DevInfo(await lastKnownState, devReport));
            }
Exemplo n.º 2
0
            public static Task <DevInfo> CheckDeviceAsync(Service svc, int devId)
            {
                DevState lastKnownState = null;

                Task.Run(() => { lastKnownState = svc.GetKnownDevState(devId); });
                return(Task.Run(() => {
                    DevAddr addr = svc.GetDevAddr(devId);
                    DevReport devReport = svc.GetCurrDevReport(addr);
                    return new DevInfo(lastKnownState, devReport);
                }));
            }
Exemplo n.º 3
0
 public DevInfo(DevState state, DevReport report)
 {
 }