1.3.5.1.5 MAC_RF_DataRequest Function

C

void MAC_RF_DataRequest
(
    MAC_DATA_REQUEST_PARAMS *drParams
);

Summary

The MAC_RF_DataRequest primitive requests the transfer of a PDU to another device or multiple devices.

Description

DataRequest primitive is used to transfer data to other nodes in the G3 Network. Result is provided in the corresponding Confirm callback.

Precondition

MAC_RF_Init routine must have been called before.

Parameters

ParamDescription
drParamsPointer to structure containing required parameters for request. See MAC_DATA_REQUEST_PARAMS

Returns

None.

Example

uint8_t txBuffer[MAC_PDU_SIZE];

// Fill txBuffer
// ...

MAC_DATA_REQUEST_PARAMS params = {
    .srcAddressMode = MAC_ADDRESS_MODE_SHORT,
    .destPanId = 0x1234,
    .destAddress = 0x0002,
    .msduLength = 20,
    .msdu = &txBuffer[0],
    .msduHandle = appHandle++,
    .txOptions = MAC_TX_OPTION_ACK,
    .securityLevel = MAC_SECURITY_LEVEL_ENC_MIC_32,
    .keyIndex = 0,
    .qualityOfService = MAC_QUALITY_OF_SERVICE_NORMAL_PRIORITY,
};

MAC_RF_DataRequest(&params);
// Wait for Data Confirm

Remarks

None.