ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • SECS Error Handling Method Examples
    IT Story/C# & WPF 2022. 7. 3. 17:32
    반응형
    /// <summary>
            /// Occurred when a primary SECS message is aborted by the equipment and there is no corresponding about SECS message defined.
            /// </summary>
            /// <param name="theCommonInfo">The reference to the object of SEComPlugIn.</param>
            /// <param name="theHeader">The header object of received SECSMessage.</param>
            /// <param name="theRelatedHeader">The Header object of SECSMessage that has been aborted.</param>
            /// <param name="theRelatedDataBlock">The DataBlock object of SECSMessage that has been aborted.
            ///                      If related SECSMessage has header only, it returns Nothing.</param>
            private void PSecsDrv_SECSAbortedMessage(ref SEComPlugInLib.CCommonInfo theCommonInfo, ref SEComPlugInLib.CHeader theHeader,
                                                        ref SEComPlugInLib.CHeader theRelatedHeader, ref SEComPlugInLib.CDataBlock theRelatedDataBlock)
            {
                try
                {
                    s_ReplyTrue();     //Reply가 들어왔음을 저장
                }
                catch (Exception ex)
                {
                    this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
                }
            }
    
    
            /// <summary>
            /// 특별히 할 작업이 없음
            /// </summary>
            /// <param name="theErrorCode"></param>
            /// <param name="theErrorMsg"></param>
            /// <remarks>2006/11/01                   [Ver 00] </remarks>
            void PSecsDrv_SEComDrvError(short theErrorCode, string theErrorMsg)
            {
                try
                {
                    this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", "PSecsDrv_SEComDrvError(), The method or operation is not implemented.");
                }
                catch (Exception ex)
                {
                    this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
                }
            }
    
            void PSecsDrv_SEComDrvShutdown(short theErrorCode, string theErrorMsg)
            {
                try
                {
                    this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", "PSecsDrv_SEComDrvShutdown()");
                }
                catch (Exception ex)
                {
                    this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
                }
            }
    
    
            /// <summary>
            /// Occurred when the SEComDriver receives the SECS message whose 
            ///                  sucture is not defined in the Message Definitions.
            /// </summary>
            /// <param name="theCommonInfo">theCommonInfo => CommonInfo object. It contains common 
            ///                      informations such as ErrorCode, ErrorMsg, etc.
            /// </param>
            /// <param name="theHeader">
            /// theHeader => The reference to the object of CHeader for the 
            ///                      SECS message that has been received.
            /// </param>
            /// <param name="theDataBlock">
            ///  theDataBlock => The reference to the object of CDataBlock for 
            ///                      the SECS message that has been received. 
            ///                  If the received message has header only, this DataBlock object is Nothing.
            /// </param>
            /// <remarks>
            ///  2006/11/01                   [Ver 00] 
            ///  2007/03/21                   [Ver 01] Host로 부터 등록되지 않은 Stream, Function이 내려오면
            ///                                             S9F3(UnrecognizedStreamType) 혹은 S9F5(UnrecognizedFunctionType)를
            ///                                             먼저 Secom Driver단에서 보내고 여기서는 SxF0을 보낸다.
            /// </remarks>
            private void PSecsDrv_SECSUnknownMessage(ref SEComPlugInLib.CCommonInfo theCommonInfo, ref SEComPlugInLib.CHeader theHeader,
                                                        ref SEComPlugInLib.CDataBlock theDataBlock)
            {
                try
                {
                    s_ReplyTrue();     //Reply가 들어왔음을 저장
                }
                catch (Exception ex)
                {
                    this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
                }
    
            }
    반응형

    댓글

Designed by Tistory.