Jump to main content

# 1.2.3.4.1 SRV_PSERIAL_GetCommand Function

## C

    SRV_PSERIAL_COMMAND SRV_PSERIAL_GetCommand
    (
        uint8_t* pData
    );

## Summary

Extracts Command field from Sniffer frame.

## Description

Takes Serial frame as parameter and extracts the Command field from the expected position in buffer.

## Precondition

None.

## Parameters

Param | Description
--- | ---
pData | Pointer to buffer containing Serial frame.

## Returns

Command in the form of SRV_PSERIAL_COMMAND Enum.

## Example

    SRV_PSERIAL_COMMAND command;

    /* Process received message from USI */
    command = SRV_PSERIAL_GetCommand(pData);

## Remarks

None.

Rev: G