2.3.5 PHY_PibGet Function

C

PHY_Retval_t PHY_PibGet(uint8_t attribute, uint8_t *value)

Summary

Gets a PHY PIB attribute

Description

This function is called to retrieve the transceiver information base attributes. The list of PHY PIB attributes, its default values and range are described in the above table. For more information refer ieee_phy_const.h file

Precondition

PHY_init() should have been called before calling this function.

Parameters

ParamDescription
attributePHY infobase attribute ID
valuePointer to the PHY infobase attribute value

Returns

PHY_UNSUPPORTED_ATTRIBUTE - If the PHY infobase attribute is not found

PHY_SUCCESS - otherwise

Example

PHY_Retval_t retVal = PHY_FAILURE;
uint8_t phyChannel;
uint8_t shortAddr;

// Getting Current channel
retVal = PHY_PibGet(phyCurrentChannel, &phyChannel);
if(PHY_SUCCESS == retVal)
{
    printf("\r\n PHY Current Channel - %d",phyChannel );
}

//Getting short Address
retVal = PHY_PibGet(macShortAddr, &shortAddr);
if(PHY_SUCCESS == retVal)
{
    printf("\r\n Device short addr - 0x%x",shortAddr );
}

Remarks

None