PFN_DECODE (Windows Embedded CE 6.0)

1/5/2010

This function is called to decode a frame received from KITLTRANSPORT and return a pointer to the data portion of the frame.

Syntax

LPBYTE TransportDecode(
  LPBYTE pbFrame,
  PUSHORT pcbData
);

Parameters

  • pbFrame
    [in] Pointer to the complete frame.
  • pcbData
    [in, out] Pointer to a variable that stores the length of the data only inside the frame. On entry, this contains the size of the whole frame.

Return Value

If the frame can be decoded, a pointer to the start of the data is returned; otherwise, NULL is returned.

Remarks

The decode function should check if the frame is valid and put the length of the data in pcbData and return the pointer to data.

The function returns NULL if it is not a valid frame.

You implement a function of this type and assign it to the pfnDecode member of KITLTRANSPORT during your Board Support Package (BSP) KITL initialization. For an example of the implementation of this function, see the KitlEthDecode function in %_WINCEROOT%\Platform\Common\Src\Common\Kitl\Kitleth.c. If you are using the common KITL library in conjunction with Ethernet or serial transport, this function is already implemented for you.

Requirements

Header kitl.h
Library Kitl.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Required KITL Functions
KITLTRANSPORT