1.3.3.7 PAL_TxRequest Function

C

void PAL_TxRequest (
        uint8_t *pData,
        uint16_t length,
        uint8_t nbFrame
    )

Summary

Allows a user to transmit data through PLC device.

Description

This routine sends a new data message through PLC using the PAL module.

Parameters

ParamDescription
pDataPointer to the data to transmit
lengthLength of the data to transmit in bytes
nbFrameFrame related ZeroCross information (managed by DLL)

Returns

None.

Example

    MAC_HEADER macHeader;
    uint16_t totalLength;
    uint16_t headerLength;
    uint16_t payloadLength = 100;
    uint8_t txData[MAC_DATA_MAX_SIZE];
    uint8_t payloadData[MAC_MAX_PAYLOAD_SIZE];

    headerLength = _buildMacHeader(txData, &macHeader);

    memcpy(&txData[headerLength], payloadData, payloadLength);
    totalLength = headerLength + payloadLength;

    PAL_TxRequest(txData, totalLength, 0);

Remarks

None.