Jump to main content

# 1.2.3.4.6 SRV_PSERIAL_ParseTxMessage Function

## C

    void SRV_PSERIAL_ParseTxMessage
    (
        DRV_PLC_PHY_TRANSMISSION_OBJ* pDataDst,
        uint8_t* pDataSrc
    );

## Summary

Extracts a PLC frame to be transmitted from SRV_PSERIAL_CMD_PHY_SEND_MSG Serial frame.

## Description

Takes a SendMsg Serial frame as parameter, extracts the PLC frame and its related transmission information and fills a DRV_PLC_PHY_TRANSMISSION_OBJ object, see G3 DRV_PLC_PHY_TRANSMISSION_OBJ Struct and PRIME DRV_PLC_PHY_TRANSMISSION_OBJ Struct.

## Precondition

None.

## Parameters

Param | Description
--- | ---
pDataDst | Pointer to a DRV_PLC_PHY_TRANSMISSION_OBJ object to fill.
pDataSrc | Pointer to buffer containing Serial frame.

## Returns

None.

## Example

    SRV_PSERIAL_COMMAND command;
    DRV_PLC_PHY_TRANSMISSION_OBJ plcTxObj;

    /* Process received message from USI */
    command = SRV_PSERIAL_GetCommand(pData);
    if (command == SRV_PSERIAL_CMD_PHY_SEND_MSG) {
        SRV_PSERIAL_ParseTxMessage(&plcTxObj, pData);
        /* Send Message through PLC */
        DRV_PLC_PHY_Send(appData.drvPl360Handle, &plcTxObj);
    }

## Remarks

None.

Rev: G