/// <summary> /// Асинхронно остановить устройство с подтверждением успеха. /// </summary> /// <param name="target">Адрес устройства.</param> /// <param name="options">Параметры NiBUS-операции.</param> /// <returns><see cref="Task"/> - асинхронная операция.</returns> public async Task ShutdownDeviceComfirmedAsync(Address target, NibusOptions options = null) { //Contract.Requires(!IsDisposed); //Contract.Requires(target != null); //Contract.Requires(target.Type == AddressType.Hardware || target.Type == AddressType.Net); var shutdown = new NmsShutdown(Address.Empty, target); await WaitForNmsResponseAsync(shutdown, options); }
/// <summary> /// Остановить устройство без подтверждения успеха. /// </summary> /// <param name="target">Адрес устройства.</param> public void ShutdownDevice(Address target) { Contract.Requires(!IsDisposed); Contract.Requires(target != null); Contract.Requires(target.Type != AddressType.Empty); var shutdown = new NmsShutdown(Address.Empty, target, false); OutgoingMessages.Post(shutdown); }