/// <summary> /// Sets the debugging setting for the specified number of minutes /// </summary> /// <param name="setting"></param> /// <param name="minutes"></param> public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes) { if (setting == eStreamDebuggingSetting.Off) { DisableDebugging(); return; } _DebugTimeoutInMs = minutes * 60000; if (DebugExpiryPeriod != null) { DisableDebugging(); } DebugExpiryPeriod = new CTimer((o) => DisableDebugging(), _DebugTimeoutInMs); if ((setting & eStreamDebuggingSetting.Rx) == eStreamDebuggingSetting.Rx) { RxStreamDebuggingIsEnabled = true; } if ((setting & eStreamDebuggingSetting.Tx) == eStreamDebuggingSetting.Tx) { TxStreamDebuggingIsEnabled = true; } Debug.SetDeviceDebugSettings(ParentDeviceKey, setting); }
/// <summary> /// Sets the debugging setting and if not setting to off, assumes the default of 30 mintues /// </summary> /// <param name="setting"></param> public void SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting setting) { if (setting == eStreamDebuggingSetting.Off) { DisableDebugging(); return; } SetDebuggingWithSpecificTimeout(setting, _DefaultDebugTimeoutMin); }