private async void _State_Elapsed(object sender, ElapsedEventArgs e) { if (false == _bConected) { return; } _StateChk.Stop(); var status = await _PwrBus.ReadItemsAll(); RoportUpdateData(status); _StateChk.Start(); }
private async void _State_Elapsed(object sender, ElapsedEventArgs e) { if (false == _bConected) { return; } _StateChk.Stop(); PWRSTATUS status = new PWRSTATUS(); if (false == bUseModbus) { RequestData(); } else { status = await _PwrBus.ReadItemsAll(); } RoportUpdateData(status); _StateChk.Start(); }