1.3.2.3.74 MAC_WRP_SerialStringifySetConfirm Function

C

uint8_t MAC_WRP_SerialStringifySetConfirm (
    uint8_t *serialData,
    MAC_WRP_STATUS setStatus,
    MAC_WRP_PIB_ATTRIBUTE attribute,
    uint16_t index
);

Summary

Serialize MAC PIB set confirm.

Description

This routine serializes a MAC PIB set confirm message.

Precondition

MAC PIB should have been set through MAC_WRP_SetRequestSync.

Parameters

ParamDescription
serialDataPointer to serial message data
setStatusResult of setting the PIB
attributePIB attribute
indexAttribute index

Returns

Serial message length.

Example

// macWrpHandle returned from MAC_WRP_Open
// usiHandle returned from SRV_USI_Open
uint16_t index;
MAC_WRP_PIB_VALUE pibValue;
MAC_WRP_PIB_ATTRIBUTE attribute;
MAC_WRP_STATUS setStatus;
uint8_t serialRspBuffer[512];
uint8_t serialRspLen = 0;

// Set MAC PIB
attribute = MAC_WRP_SerialParseSetRequest(pData, &index, &pibValue);
setStatus = MAC_WRP_SetRequestSync(macWrpHandle, attribute, index, &pibValue);

// Fill serial response buffer
serialRspBuffer[serialRspLen++] = MAC_WRP_SERIAL_MSG_MAC_SET_CONFIRM;
serialRspLen += MAC_WRP_SerialStringifySetConfirm(&serialRspBuffer[serialRspLen],
        setStatus, attribute, index);

// Send through USI
SRV_USI_Send_Message(usiHandle, SRV_USI_PROT_ID_MAC_G3, serialRspBuffer, serialRspLen);

Remarks

This function is only available if MAC layer Serialization is enabled.