Jump to main content

# 1.1.1.4.19 DRV_PLC_PHY_TX_CFM_CALLBACK Typedef

## C

    typedef void ( *DRV_PLC_PHY_TX_CFM_CALLBACK )( DRV_PLC_PHY_TRANSMISSION_CFM_OBJ *cfmObj, uintptr_t context );

## Summary

Pointer to a PLC Driver Transmission Confirm Event handler function.

## Description

This data type defines the required function signature for the PLC driver transmission confirm event handling callback function. A client must register a pointer using the callback register function whose function signature (parameter and return value types) match the types specified by this function pointer in order to receive transfer related event calls back from the driver.

## Parameters

Param | Description
--- | ---
cfmObj | Pointer to the object containing any data necessary to identify the result of the last transmission.
context | Value identifying the context of the application that registered the event handling function.

## Returns

None.

## Example

    void APP_MyTXCfmEventHandler( DRV_PLC_PHY_TRANSMISSION_CFM_OBJ *cfmObj, uintptr_t context )
    {
        MY_APP_DATA_STRUCT* pAppData = (MY_APP_DATA_STRUCT*) context;

        switch(cfmObj->result)
        {
            case DRV_PLC_PHY_TX_RESULT_PROCESS:
                // Transmission result: already in process
                break;
            case DRV_PLC_PHY_TX_RESULT_SUCCESS:
                // Transmission result: end successfully
                break;
            case DRV_PLC_PHY_TX_RESULT_INV_LENGTH:
                // Transmission result: invalid length error
                break;
            case DRV_PLC_PHY_TX_RESULT_BUSY_CH:
                // Transmission result: busy channel error
                break;
            case DRV_PLC_PHY_TX_RESULT_BUSY_TX:
                // Transmission result: busy in transmission error
                break;
            case DRV_PLC_PHY_TX_RESULT_BUSY_RX:
                // Transmission result: busy in reception error
                break;
            case DRV_PLC_PHY_TX_RESULT_INV_SCHEME:
                // Transmission result: invalid modulation scheme error
                break;
            case DRV_PLC_PHY_TX_RESULT_TIMEOUT:
                // Transmission result: timeout error
                break;
            case DRV_PLC_PHY_TX_RESULT_INV_TONEMAP:
                // Transmission result: invalid tone map error
                break;
            case DRV_PLC_PHY_TX_RESULT_INV_MODE:
                // Transmission result: invalid G3 Mode error
                break;
            case DRV_PLC_PHY_TX_RESULT_NO_TX:
                // Transmission result: No transmission ongoing
                break;
        }
    }

## Remarks

If the `result` field is `DRV_PLC_PHY_TX_RESULT_SUCCESS`, it means that the data was transmitted successfully. Otherwise, it contains the transmission failure code.

The context parameter contains a handle to the client context, provided at the time the event handling function was registered using the DRV_PLC_PHY_TxCfmCallbackRegister function. This context handle value is passed back to the client as the `context` parameter. It can be any value necessary to identify the client context or instance (such as a pointer to the client's data) of the client that made the transfer add request.

Rev: G