Beispiel #1
0
/***************************************************************************************************
 * @fn          MT_SapiPermitJoin
 *
 * @brief       Process Permit Join Command
 *
 * @param       pBuf - pointer to received buffer
 *
 * @return      none
 ***************************************************************************************************/
void MT_SapiPermitJoin(uint8 *pBuf)
{
  uint8 retValue, cmdId;

  /* parse header */
  cmdId = pBuf[MT_RPC_POS_CMD1];
  pBuf += MT_RPC_FRAME_HDR_SZ;

  retValue = (zb_PermitJoiningRequest(BUILD_UINT16(pBuf[0], pBuf[1]), pBuf[2]));

  /* Build and send back the response */
  MT_BuildAndSendZToolResponse(((uint8)MT_RPC_CMD_SRSP | (uint8)MT_RPC_SYS_SAPI), cmdId, 1, &retValue );

}
Beispiel #2
0
/*
 * This function defines how the next higher layer of a coordinator device
 * to permit devices to join its network for a fixed period.
 */
ZStatus_t NLME_PermitJoiningRequest(uint8 PermitDuration)
{
    return zb_PermitJoiningRequest(znpAddr, PermitDuration);
}