1.3.2.3.6 MAC_WRP_DataRequest Function

C

void MAC_WRP_DataRequest
(
    MAC_WRP_HANDLE handle,
    MAC_WRP_DATA_REQUEST_PARAMS *drParams
);

Summary

The MAC_WRP_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

A valid handle has to be obtained before calling this function, by means of MAC_WRP_Open function.

Parameters

ParamDescription
handleA valid handle which identifies the Mac Wrapper instance
drParamsPointer to structure containing required parameters for request. See MAC_WRP_DATA_REQUEST_PARAMS

Returns

None.

Example

// ...
MAC_WRP_HANDLE handle;
handle = MAC_WRP_Open(G3_MAC_WRP_INDEX_0, MAC_WRP_BAND_CENELEC_A);
// ...

MAC_WRP_DATA_REQUEST_PARAMS params = {
    .srcAddressMode = MAC_WRP_ADDRESS_MODE_SHORT,
    .destPanId = 0x1234,
    .destAddress = 0x0002,
    .msduLength = 20,
    .msdu = &txBuffer[0],
    .msduHandle = appHandle++,
    .txOptions = MAC_WRP_TX_OPTION_ACK,
    .securityLevel = MAC_WRP_SECURITY_LEVEL_ENC_MIC_32,
    .keyIndex = 0,
    .qualityOfService = MAC_WRP_QUALITY_OF_SERVICE_NORMAL_PRIORITY,
};

MAC_WRP_DataRequest(handle, &params);
// Wait for Data Confirm

Remarks

None.