/// <summary> /// Exit the self test task. /// </summary> /// <remarks>This request will end the self test process on the VCU.</remarks> /// <param name="result">The result of the call. A value of: (1) 1 represents success; (2) indicates that the error message defined by the /// <paramref name="reason"/> parameter applies and (3) represents an unknown error.</param> /// <param name="reason">A value of 1 represents success; otherwise, the value is mapped to the <c>ERRID</c> field of the /// <c>SELFTESTERRMESS</c> table /// of the data dictionary in order to determine the error message returned from the VCU.</param> /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the m_SelfTestMarshal.ExitSelfestTask() method is not /// CommunicationError.Success.</exception> public void ExitSelfTestTask(out short result, out short reason) { Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.ExitSelfTestTask() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.ExitSelfTestTask(out result, out reason); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.ExitSelfTestTask()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.ExitSelfTestTask_t exitSelfTestTask = new DebugMode.ExitSelfTestTask_t(result, reason, errorCode); DebugMode.Write(exitSelfTestTask.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.ExitSelfestTask()", errorCode); } }
/// <summary> /// Exit the self test task. /// </summary> /// <remarks>This request will end the self test process on the VCU.</remarks> /// <param name="result">The result of the call. A value of: (1) 1 represents success; (2) indicates that the error message defined by the /// <paramref name="reason"/> parameter applies and (3) represents an unknown error.</param> /// <param name="reason">A value of 1 represents success; otherwise, the value is mapped to the <c>ERRID</c> field of the /// <c>SELFTESTERRMESS</c> table /// of the data dictionary in order to determine the error message returned from the VCU.</param> /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the PTUDLL32.ExitSelfestTask() method is not /// CommunicationError.Success.</exception> public void ExitSelfTestTask(out short result, out short reason) { Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.ExitSelfTestTask() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.ExitSelfTestTask(out result, out reason); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.ExitSelfTestTask()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.ExitSelfTestTask_t exitSelfTestTask = new DebugMode.ExitSelfTestTask_t(result, reason, errorCode); DebugMode.Write(exitSelfTestTask.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.ExitSelfestTask()", errorCode); } }