/******************************************************************************************************** * @fn ZMacGetReq * * @brief Read a MAC PIB attribute. * * @param attr - PIB attribute to get * @param value - pointer to the buffer to store the attribute * * @return status ********************************************************************************************************/ uint8 ZMacGetReq( uint8 attr, uint8 *value ) { if ( attr == ZMacExtAddr ) { osal_cpyExtAddr( value, &aExtendedAddress ); return ZMacSuccess; } return (ZMacStatus_t) MAC_MlmeGetReq( attr, value ); }
/************************************************************************************************** * @fn macLowLevelDiags * * @brief Increments a specified diagnostic counter (stored in the PIB). * * @param pibAttribute - PIB attribute to be incremented. * * @return none ************************************************************************************************** */ MAC_INTERNAL_API void macLowLevelDiags( uint8 pibAttribute ) { #if defined ( FEATURE_SYSTEM_STATS ) if ( ( pibAttribute >= MAC_DIAGS_RX_CRC_PASS ) && ( pibAttribute <= MAC_DIAGS_TX_UCAST_FAIL ) ) { uint32 value; /* Update Diagnostics counter */ MAC_MlmeGetReq( pibAttribute, &value ); value++; MAC_MlmeSetReq( pibAttribute, &value ); } #endif }
/******************************************************************************************************** * @fn ZMacGetReq * * @brief Read a MAC PIB attribute. * * @param attr - PIB attribute to get * @param value - pointer to the buffer to store the attribute * * @return status ********************************************************************************************************/ uint8 ZMacGetReq( uint8 attr, uint8 *value ) { if ( attr == ZMacExtAddr ) { #ifdef FEATURE_DUAL_MAC /** * Provide the local copy if we have one, or let it read from * macPib. */ if ( SUCCESS == DMMGR_GetExtAddr(value) ) { return ZMacSuccess; } #else osal_cpyExtAddr( value, &aExtendedAddress ); return ZMacSuccess; #endif /* FEATURE_DUAL_MAC */ } return (ZMacStatus_t) MAC_MlmeGetReq( attr, value ); }