1.3.2.3.12 MAC_WRP_GetRequestSync Function
C
MAC_WRP_STATUS MAC_WRP_GetRequestSync ( MAC_WRP_HANDLE handle, MAC_WRP_PIB_ATTRIBUTE attribute, uint16_t index, MAC_WRP_PIB_VALUE *pibValue );
Summary
The MAC_WRP_GetRequestSync primitive gets the value of an attribute in the MAC layer Parameter Information Base (PIB).
Description
GetRequestSync primitive is used to get the value of a PIB. Sync suffix indicates that result is provided upon function call return, in the pibValue parameter.
Precondition
A valid handle has to be obtained before calling this function, by means of MAC_WRP_Open function.
Parameters
Param | Description |
---|---|
handle | A valid handle which identifies the Mac Wrapper instance |
attribute | Identifier of the Attribute to retrieve value. See MAC_WRP_PIB_ATTRIBUTE |
index | Index of element in case Attribute is a table. Otherwise index must be set to '0' |
pibValue | Pointer to MAC_WRP_PIB_VALUE object where value will be returned |
Returns
Result of get operation as a MAC_WRP_STATUS code.
Example
// ... MAC_WRP_HANDLE handle; handle = MAC_WRP_Open(G3_MAC_WRP_INDEX_0, MAC_WRP_BAND_CENELEC_A); // ... MAC_WRP_STATUS status; MAC_WRP_PIB_VALUE value; status = MAC_WRP_GetRequestSync(handle, MAC_WRP_PIB_MAX_FRAME_RETRIES, 0, &value); if (status == MAC_WRP_STATUS_SUCCESS) { // Get value from 'value' parameter }
Remarks
None.