1.2.8.4.2 SRV_RSERIAL_ParsePIB Function

C

uint8_t* SRV_RSERIAL_ParsePIB (
    uint8_t* pDataSrc,
    DRV_RF215_TRX_ID* pTrxId,
    DRV_RF215_PIB_ATTRIBUTE* pPibAttr,
    uint8_t* pPibSize
);

Summary

Extracts PIB information from get/set PIB serial frame.

Description

Takes a SRV_RSERIAL_CMD_PHY_GET_CFG or SRV_RSERIAL_CMD_PHY_SET_CFG serial frame as parameter and extracts the PIB information from the expected position in buffer.

Precondition

None.

Parameters

ParamDescription
pDataPointer to buffer containing serial frame
pTrxIdPointer to TRX identifier (output)
pPibAttrPointer to PIB attribute (output)
pPibSizePointer to PIB size in bytes (output)

Returns

Pointer to PIB data value to set (only for set PIB serial frame).

Example

SRV_RSERIAL_COMMAND command;
DRV_RF215_TRX_ID trxId;
DRV_RF215_PIB_ATTRIBUTE pibAttr;
uint8_t pibSize;

// Process received message from USI
command = SRV_RSERIAL_GetCommand(pData);

if (command == SRV_RSERIAL_CMD_PHY_GET_CFG)
{
    SRV_RSERIAL_ParsePIB(pData, &trxId, &pibAttr, &pibSize);
    // Get PIB from RF215 Driver
}

Remarks

None.