Exemple #1
0
/***************************************************************************************************
 * @fn      MT_afCommandProcessing
 *
 * @brief   Process all the AF commands that are issued by test tool
 *
 * @param   pBuf - pointer to the received buffer
 *
 * @return  status
 ***************************************************************************************************/
uint8 MT_AfCommandProcessing(uint8 *pBuf)
{
  uint8 status = MT_RPC_SUCCESS;

  switch (pBuf[MT_RPC_POS_CMD1])
  {
    case MT_AF_REGISTER:
      MT_AfRegister(pBuf);
      break;

    case MT_AF_DATA_REQUEST:
    case MT_AF_DATA_REQUEST_EXT:
      MT_AfDataRequest(pBuf);
      break;
      
#if defined ( ZIGBEE_SOURCE_ROUTING )
    case MT_AF_DATA_REQUEST_SRCRTG:
      MT_AfDataRequestSrcRtg(pBuf);
      break;
#endif
      
#if defined INTER_PAN
    case MT_AF_INTER_PAN_CTL:
      MT_AfInterPanCtl(pBuf);
      break; 
#endif
      
    default:
      status = MT_RPC_ERR_COMMAND_ID;
      break;
  }

  return status;
}
Exemple #2
0
/***************************************************************************************************
 * @fn      MT_AfCommandProcessing
 *
 * @brief   Process all the AF commands that are issued by test tool
 *
 * @param   pBuf - pointer to the received buffer
 *
 * @return  status
 ***************************************************************************************************/
uint8 MT_AfCommandProcessing(uint8 *pBuf)
{
  uint8 status = MT_RPC_SUCCESS;

  switch (pBuf[MT_RPC_POS_CMD1])
  {
    case MT_AF_REGISTER:
      MT_AfRegister(pBuf);
      break;
      
    case MT_AF_DELETE:
      MT_AfDelete( pBuf );
      break;

    case MT_AF_DATA_REQUEST:
    case MT_AF_DATA_REQUEST_EXT:
      MT_AfDataRequest(pBuf);
      break;

#if defined ( ZIGBEE_SOURCE_ROUTING )
    case MT_AF_DATA_REQUEST_SRCRTG:
      MT_AfDataRequestSrcRtg(pBuf);
      break;
#endif

#if defined INTER_PAN
    case MT_AF_INTER_PAN_CTL:
      MT_AfInterPanCtl(pBuf);
      break;
#endif

    case MT_AF_DATA_RETRIEVE:
      MT_AfDataRetrieve(pBuf);
      break;

    case MT_AF_DATA_STORE:
      MT_AfDataStore(pBuf);
      break;

    case MT_AF_APSF_CONFIG_SET:
      MT_AfAPSF_ConfigSet(pBuf);
      break;

    case MT_AF_APSF_CONFIG_GET:
      MT_AfAPSF_ConfigGet(pBuf);
      break;

    default:
      status = MT_RPC_ERR_COMMAND_ID;
      break;
  }

  return status;
}