/// <summary> /// Get the self test special message. /// </summary> /// <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.GetSelfTestSpecialMessage() /// method is not CommunicationError.Success.</exception> public void GetSelfTestSpecialMessage(out short result, out short reason) { // Check that the function delegate has been initialized. Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.GetSelfTestSpecialMessage() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.GetSelfTestSpecialMessage(out result, out reason); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.GetSelfTestSpecialMessage()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.GetSelfTestSpecialMessage_t getSelfTestSpecialMessage = new DebugMode.GetSelfTestSpecialMessage_t(result, reason, errorCode); DebugMode.Write(getSelfTestSpecialMessage.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.GetSelfTestSpecialMessage()", errorCode); } }
/// <summary> /// Get the self test special message. /// </summary> /// <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.GetSelfTestSpecialMessage() /// method is not CommunicationError.Success.</exception> public void GetSelfTestSpecialMessage(out short result, out short reason) { // Check that the function delegate has been initialized. Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.GetSelfTestSpecialMessage() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.GetSelfTestSpecialMessage(out result, out reason); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.GetSelfTestSpecialMessage()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.GetSelfTestSpecialMessage_t getSelfTestSpecialMessage = new DebugMode.GetSelfTestSpecialMessage_t(result, reason, errorCode); DebugMode.Write(getSelfTestSpecialMessage.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.GetSelfTestSpecialMessage()", errorCode); } }