1.2.2.4.3 SRV_PSNIFFER_SerialCfmMessage Function

C

size_t SRV_PSNIFFER_SerialCfmMessage
(
    uint8_t* pDataDst,
    DRV_PLC_PHY_TRANSMISSION_CFM_OBJ* pCfmObj
);

Summary

Serializes a transmitted PLC frame along with its parameters.

Description

This function takes a previously stored PLC transmitted frame and its related parameters and serializes it in a buffer for further transmission.

Returns

Number of bytes for serialized output.

Example

static void APP_PLCDataCfmCb(DRV_PLC_PHY_TRANSMISSION_CFM_OBJ *pCfmObj)
{
    /* Report TX Symbols */
    appData.plcPIB.id = PLC_ID_TX_PAY_SYMBOLS;
    appData.plcPIB.length = 2;
    DRV_PLC_PHY_PIBGet(appData.drvPl360Handle, &appData.plcPIB);

    SRV_PSNIFFER_SetTxPayloadSymbols(*(uint16_t *)appData.plcPIB.pData);

    /* Serialize transmitted message */
    length = SRV_PSNIFFER_SerialCfmMessage(appData.pSerialData, pCfmObj);
    /* Send through USI */
    SRV_USI_Send_Message(appData.srvUSIHandle, SRV_USI_PROT_ID_SNIFF_G3,
            appData.pSerialData, length);
}

Remarks

None.