예제 #1
0
        /// <summary>
        /// Update the self test mode.
        /// </summary>
        /// <remarks>This call is used to check whether communication with the VCU has been lost.</remarks>
        /// <param name="selfTestMode">The required self test mode.</param>
        /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the m_SelfTestMarshal.UpdateSTMode() method is not
        /// CommunicationError.Success.</exception>
        public void UpdateSTMode(SelfTestMode selfTestMode)
        {
            Debug.Assert(m_MutexCommuncationInterface != null,
                         "CommunicationSelfTest.UpdateSTMode() - [m_MutexCommuncationInterface != null]");

            CommunicationError errorCode = CommunicationError.UnknownError;

            try
            {
                m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false);
                errorCode = m_SelfTestMarshal.UpdateSTMode((Int16)selfTestMode);
            }
            catch (Exception)
            {
                errorCode = CommunicationError.SystemException;
                throw new CommunicationException("CommunicationSelfTest.UpdateSTMode()", errorCode);
            }
            finally
            {
                m_MutexCommuncationInterface.ReleaseMutex();
            }

            if (DebugMode.Enabled == true)
            {
                DebugMode.UpdateSTMode_t updateSTMode = new DebugMode.UpdateSTMode_t(selfTestMode, errorCode);
                DebugMode.Write(updateSTMode.ToXML());
            }

            if (errorCode != CommunicationError.Success)
            {
                throw new CommunicationException("CommunicationSelfTest.UpdateSTMode()", errorCode);
            }
        }
예제 #2
0
        public static ushort StartStatusSelfTest(ConversionMode conversionMode, SelfTestMode selfTestMode)
        {
            Contract.Requires(conversionMode, "conversionMode").ToBeDefinedEnumValue();
            Contract.Requires(selfTestMode, "selfTestMode").ToBeDefinedEnumValue();

            var commandId = 0x040F;

            commandId |= (int)conversionMode << 7;
            commandId |= (int)selfTestMode << 5;

            return((ushort)commandId);
        }
 public static extern unsafe short UpdateSTMode(SelfTestMode selfTestMode);
 public static unsafe extern short UpdateSTMode(SelfTestMode selfTestMode);
예제 #5
0
        /// <summary>
        /// Update the self test mode.
        /// </summary>
        /// <remarks>This call is used to check whether communication with the VCU has been lost.</remarks>
        /// <param name="selfTestMode">The required self test mode.</param>
        /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the PTUDLL32.UpdateSTMode() method is not 
        /// CommunicationError.Success.</exception>
        public void UpdateSTMode(SelfTestMode selfTestMode)
        {
            Debug.Assert(m_MutexCommuncationInterface != null,
                         "CommunicationSelfTest.UpdateSTMode() - [m_MutexCommuncationInterface != null]");

            CommunicationError errorCode = CommunicationError.UnknownError;
            try
            {
                m_MutexCommuncationInterface.WaitOne(DefaultMutexWaitDurationMs, false);
                errorCode = m_SelfTestMarshal.UpdateSTMode((Int16)selfTestMode);
            }
            catch (Exception)
            {
                errorCode = CommunicationError.SystemException;
                throw new CommunicationException("CommunicationSelfTest.UpdateSTMode()", errorCode);
            }
            finally
            {
                m_MutexCommuncationInterface.ReleaseMutex();
            }

            if (DebugMode.Enabled == true)
            {
                DebugMode.UpdateSTMode_t updateSTMode = new DebugMode.UpdateSTMode_t(selfTestMode, errorCode);
                DebugMode.Write(updateSTMode.ToXML());
            }

            if (errorCode != CommunicationError.Success)
            {
                throw new CommunicationException("CommunicationSelfTest.UpdateSTMode()", errorCode);
            }
        }
 /// <summary>
 /// Update the self test mode.
 /// </summary>
 /// <remarks>This call is used to check whether communication with the VCU has been lost.</remarks>
 /// <param name="selfTestMode">The required self test mode.</param>
 /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the UpdateSTMode() method is not
 /// CommunicationError.Success.</exception>
 public void UpdateSTMode(SelfTestMode selfTestMode)
 {
 }
 /// <summary>
 /// Update the self test mode.
 /// </summary>
 /// <remarks>This call is used to check whether communication with the VCU has been lost.</remarks>
 /// <param name="selfTestMode">The required self test mode.</param>
 /// <exception cref="CommunicationException">Thrown if the error code returned from the call to the PTUDLL32.UpdateSTMode() method is not 
 /// CommunicationError.Success.</exception>
 public void UpdateSTMode(SelfTestMode selfTestMode)
 {
 }