Esempio n. 1
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;
 }
Esempio n. 2
0
        CmdResult GetCmdResult(NakPackage pkg)
        {
            if (pkg.GetErrBit(TCDLE30.DLE_ERR_ADDR_ERR))
                return CmdResult.TC_DLE_30_ADDR_ERR;
            else if (pkg.GetErrBit(TCDLE30.DLE_ERR_FRAME))
                return CmdResult.Frame_ERR;
            else if (pkg.GetErrBit(TCDLE30.DLE_ERR_LCR))
                return CmdResult.LRC_ERR;
            else if (pkg.GetErrBit(TCDLE30.DLE_ERRR_LEN_ERR))
                return CmdResult.TC_DEL_30_LEN_ERR;

            else
                return CmdResult.Unknown;
        }