예제 #1
0
 public virtual bool S1F1SendAreYouThere()
 {
     try
     {
         S1F1 s1f1 = new S1F1()
         {
             SECSAgentName = scApp.EAPSecsAgentName
         };
         S1F2   s1f2      = null;
         string rtnMsg    = string.Empty;
         SXFY   abortSecs = null;
         //SCUtility.secsActionRecordMsg(scApp, false, s1f1);
         TrxSECS.ReturnCode rtnCode = ISECSControl.sendRecv <S1F2>(bcfApp, s1f1, out s1f2, out abortSecs, out rtnMsg, null);
         SCUtility.actionRecordMsg(scApp, s1f1.StreamFunction, line.Real_ID,
                                   "Send Are You There To MES.", rtnCode.ToString());
         if (rtnCode == TrxSECS.ReturnCode.Normal)
         {
             //SCUtility.secsActionRecordMsg(scApp, false, s1f2);
             return(true);
         }
         else if (rtnCode == TrxSECS.ReturnCode.Abort)
         {
             SCUtility.secsActionRecordMsg(scApp, false, abortSecs);
         }
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exection:");
     }
     return(false);
 }
예제 #2
0
 protected virtual void S1F1ReceiveAreYouThere(object sender, SECSEventArgs e)
 {
     try
     {
         S1F1 s1f1 = ((S1F1)e.secsHandler.Parse <S1F1>(e));
         SCUtility.secsActionRecordMsg(scApp, true, s1f1);
         SCUtility.actionRecordMsg(scApp, s1f1.StreamFunction, line.Real_ID,
                                   "Receive Are You There From MES.", "");
         if (!isProcess(s1f1))
         {
             return;
         }
         S1F2 s1f2 = new S1F2()
         {
             SECSAgentName = scApp.EAPSecsAgentName,
             SystemByte    = s1f1.SystemByte,
             MDLN          = bcfApp.BC_ID,
             SOFTREV       = SCApplication.getMessageString("SYSTEM_VERSION")
         };
         SCUtility.secsActionRecordMsg(scApp, false, s1f2);
         TrxSECS.ReturnCode rtnCode = ISECSControl.replySECS(bcfApp, s1f2);
         SCUtility.actionRecordMsg(scApp, s1f1.StreamFunction, line.Real_ID,
                                   "Reply Are You There To MES.", rtnCode.ToString());
         if (rtnCode != TrxSECS.ReturnCode.Normal)
         {
             logger.Warn("Reply EAP S1F2 Error:{0}", rtnCode);
         }
     }
     catch (Exception ex)
     {
         logger.Error("MESDefaultMapAction has Error[Line Name:{0}],[Error method:{1}],[Error Message:{2}",
                      line.LINE_ID, "S1F1_Receive_AreYouThere", ex.ToString());
     }
 }