1.3.2.3.73 MAC_WRP_SerialParseSetRequest Function
C
MAC_WRP_PIB_ATTRIBUTE MAC_WRP_SerialParseSetRequest ( uint8_t* pData, uint16_t* index, MAC_WRP_PIB_VALUE* pibValue );
Summary
Parse PIB set request serial message.
Description
This routine parses a PIB set request serial message. It gives the PIB attribute, index and value from the data contained in the serial message.
Precondition
None.
Parameters
Param | Description |
---|---|
pData | Pointer to serial message data |
index | Pointer to attribute index (output) |
pibValue | Pointer to PIB value structure (output) |
Returns
PIB attribute.
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.