1.3.4.1.6 MAC_PLC_GetRequestSync Function

C

MAC_STATUS MAC_PLC_GetRequestSync
(
    MAC_PLC_PIB_ATTRIBUTE attribute,
    uint16_t index,
    MAC_PIB_VALUE *pibValue
);

Summary

The MAC_PLC_GetRequestSync primitive gets the value of an attribute in the MAC PLC 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

MAC_PLC_Init routine must have been called before.

Parameters

ParamDescription
attributeIdentifier of the Attribute to retrieve value. See MAC_PLC_PIB_ATTRIBUTE
indexIndex of element in case Attribute is a table. Otherwise index must be set to '0'
pibValuePointer to MAC_PIB_VALUE object where value will be returned

Returns

Result of get operation as a MAC_STATUS code.

Example

MAC_STATUS status;
MAC_PIB_VALUE value;
status = MAC_PLC_GetRequestSync(MAC_PIB_MAX_FRAME_RETRIES, 0, &value);
if (status == MAC_STATUS_SUCCESS)
{
    // Get value from 'value' parameter
}

Remarks

None.