/// <summary> /// Update the list of individually selected self tests that are to be executed. /// </summary> /// <remarks>This method will define the list of self-tests that are to be executed once the tester selects the execute command. The self tests /// are defined using the self test identifiers defined in the data dictionary.</remarks> /// <param name="testCount">The number of tests in the list.</param> /// <param name="tests">A list of the selfTestIdentifiers.</param> /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the m_SelfTestMarshal.UpdateSTTestList() method is not /// CommunicationError.Success.</exception> public void UpdateSTTestList(short testCount, short[] tests) { Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.UpdateSTTestList() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.UpdateSTTestList(testCount, tests); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.UpdateSTTestList()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.UpdateSTTestList_t updateSTTestList = new DebugMode.UpdateSTTestList_t(testCount, tests, errorCode); DebugMode.Write(updateSTTestList.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.UpdateSTTestList()", errorCode); } }
/// <summary> /// Update the list of individually selected self tests that are to be executed. /// </summary> /// <remarks>This method will define the list of self-tests that are to be executed once the tester selects the execute command. The self tests /// are defined using the self test identifiers defined in the data dictionary.</remarks> /// <param name="testCount">The number of tests in the list.</param> /// <param name="tests">A list of the selfTestIdentifiers.</param> /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the PTUDLL32.UpdateSTTestList() method is not /// CommunicationError.Success.</exception> public void UpdateSTTestList(short testCount, short[] tests) { Debug.Assert(m_MutexCommuncationInterface != null, "CommunicationSelfTest.UpdateSTTestList() - [m_MutexCommuncationInterface != null]"); CommunicationError errorCode = CommunicationError.UnknownError; try { m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false); errorCode = m_SelfTestMarshal.UpdateSTTestList(testCount, tests); } catch (Exception) { errorCode = CommunicationError.SystemException; throw new CommunicationException("CommunicationSelfTest.UpdateSTTestList()", errorCode); } finally { m_MutexCommuncationInterface.ReleaseMutex(); } if (DebugMode.Enabled == true) { DebugMode.UpdateSTTestList_t updateSTTestList = new DebugMode.UpdateSTTestList_t(testCount, tests, errorCode); DebugMode.Write(updateSTTestList.ToXML()); } if (errorCode != CommunicationError.Success) { throw new CommunicationException("CommunicationSelfTest.UpdateSTTestList()", errorCode); } }