1.2.8.4.8 SRV_RSERIAL_SerialRxMessage Function

C

uint8_t* SRV_RSERIAL_SerialRxMessage (
    DRV_RF215_RX_INDICATION_OBJ* pIndObj,
    DRV_RF215_TRX_ID trxId,
    size_t* pMsgLen
);

Summary

Serializes a received RF frame and its related information.

Description

Takes a DRV_RF215_RX_INDICATION_OBJ object as parameter and builds a serialized frame containing the RF frame and its related reception parameters.

Precondition

None.

Parameters

ParamDescription
pIndObjPointer to RF Reception object containing the frame and parameters
trxIdTRX identifier (Sub-1GHz, 2.4GHz)
pMsgLenPointer to sniffer message length in bytes (output)

Returns

Pointer to sniffer message to be sent through serial interface.

Example

DRV_HANDLE rf215Handle; // Returned from DRV_RF215_Open
SRV_USI_HANDLE srvUSIHandle; // returned from SRV_USI_Open

void _APP_RF_RxIndCb(DRV_RF215_RX_INDICATION_OBJ* indObj, uintptr_t ctxt)
{
    uint8_t* pSerialData;
    size_t length;

    // Serialize received message and send through USI
    pSerialData = SRV_RSERIAL_SerialRxMessage(indObj, RF215_TRX_ID_RF09,
            &length);
    SRV_USI_Send_Message(srvUSIHandle, SRV_USI_PROT_ID_PHY_RF215,
            pSerialData, length);
}

Remarks

None.