/// <summary> /// Start the self test task. /// </summary> /// <remarks>This request will start 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.StartSelfestTask() method is not /// CommunicationError.Success.</exception> public void StartSelfTestTask(out short result, out short reason) { Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.StartSelfTestTask() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.StartSelfTestTask(out result, out reason); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.StartSelfTestTask()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.StartSelfTestTask_t startSelfTestTask = new DebugMode.StartSelfTestTask_t(result, reason, errorCode); DebugMode.Write(startSelfTestTask.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.StartSelfTestTask()", errorCode); } }
/// <summary> /// Start the self test task. /// </summary> /// <remarks>This request will start 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.StartSelfestTask() method is not /// CommunicationError.Success.</exception> public void StartSelfTestTask(out short result, out short reason) { Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.StartSelfTestTask() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.StartSelfTestTask(out result, out reason); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.StartSelfTestTask()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.StartSelfTestTask_t startSelfTestTask = new DebugMode.StartSelfTestTask_t(result, reason, errorCode); DebugMode.Write(startSelfTestTask.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.StartSelfTestTask()", errorCode); } }