Beispiel #1
0
 void m_device_OnNak(object sender, NakPackage AckObj)
 {
     //throw new Exception("The method or operation is not implemented.");
       try
       {
       this.notifier.NotifyAll(new NotifyEventObject(EventEnumType.MFCC_Comm_Moniter_Event, ((Comm.I_DLE)sender).getDeviceName(),
          "\t" + DateTime.Now.ToLongTimeString()+","+ AckObj.ToString() + "<=="));
       }
       catch { ;}
 }
Beispiel #2
0
 CmdResult GetCmdResult(NakPackage pkg)
 {
     if (pkg.GetErrBit(V2DLE.DLE_ERR_LCR))
         return CmdResult.LRC_ERR;
     else if (pkg.GetErrBit(V2DLE.DLE_ERR_FRAME))
         return CmdResult.Frame_ERR;
     else if (pkg.GetErrBit(V2DLE.DLE_ERR_CMD_ERR))
         return CmdResult.Cmd_Invalid;
     else if (pkg.GetErrBit(V2DLE.DLE_ERR_CMD_PARAM_OVERRANGE))
         return CmdResult.Param_OverRange;
     else if (pkg.GetErrBit(V2DLE.DLE_ERR_CMD_FAIL))
         return CmdResult.Cmd_Fail;
     else
         return CmdResult.Unknown;
 }