1.1.2.4.30 DRV_G3_MACRT_TX_CFM_CALLBACK Typedef

C

typedef void ( *DRV_G3_MACRT_TX_CFM_CALLBACK )( MAC_RT_TX_CFM_OBJ *cfmObj );

Summary

Pointer to a G3 MAC RT Driver Transmission Confirm Event handler function.

Description

This data type defines the required function signature for the G3 MAC RT 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

ParamDescription
cfmObjPointer to the object containing any data necessary to identify the result of the last transmission

Returns

None.

Example

void APP_MyTXCfmEventHandler( MAC_RT_TX_CFM_OBJ *cfmObj )
{
    switch(cfmObj->status)
    {
        case MAC_RT_STATUS_SUCCESS:
            // Transmission result: already in process
            break;   
        case MAC_RT_STATUS_CHANNEL_ACCESS_FAILURE:
            // Transmission result: CSMA failure
            break;   
        case MAC_RT_STATUS_NO_ACK:
            // Transmission result: ACK failure
            break;
    }
}

Remarks

If the status field is MAC_RT_STATUS_SUCCESS, data was transmitted successfully.Otherwise, it contains the transmssion failure code.