TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

String routines helper module

String routines helper module

This module implements some string and buffer-related helper routines. More...

Functions

int HttpString_strcmp (struct HttpBlob first, struct HttpBlob second)
 Perform string comparison between two strings.
UINT8 * HttpString_nextToken (char *pToken, UINT16 uTokenLength, struct HttpBlob blob)
 return pointer to the next token
UINT32 HttpString_atou (struct HttpBlob string)
 Parse a string representation of an unsigned decimal number Stops at any non-digit character.
void HttpString_utoa (UINT32 uNum, struct HttpBlob *pString)
 Format an unsigned decimal number as a string.
void HttpString_htoa (UINT32 uNum, struct HttpBlob *pString, UINT8 bPadZero)
 Format an unsigned decimal number as an hexdecimal string.

Detailed Description

This module implements some string and buffer-related helper routines.


Function Documentation

UINT32 HttpString_atou ( struct HttpBlob  string )

Parse a string representation of an unsigned decimal number Stops at any non-digit character.

Parameters:
stringThe string to parse
Returns:
The parsed value

Definition at line 128 of file HttpString.cpp.

void HttpString_htoa ( UINT32  uNum,
struct HttpBlob *  pString,
UINT8  bPadZero 
)

Format an unsigned decimal number as an hexdecimal string.

Parameters:
uNumThe number to format
bPadZerononzero to pad with zeros up to the string length, or zero to use minimal length required to represent the number
[in,out]pStringA string buffer which returns the formatted string. On entry, uLength is the maximum length of the buffer, upon return uLength is the actual length of the formatted string

Definition at line 165 of file HttpString.cpp.

UINT8 * HttpString_nextToken ( char *  pToken,
UINT16  uTokenLength,
struct HttpBlob  blob 
)

return pointer to the next token

Parameters:
tokenPointer to data of the first token
blobPointer to data of the search string/blob
Returns:
pointer if found, otherwize NULL

Definition at line 60 of file HttpString.cpp.

int HttpString_strcmp ( struct HttpBlob  first,
struct HttpBlob  second 
)

Perform string comparison between two strings.

Parameters:
firstPointer to data about the first blob or string
secondPointer to data about the second blob or string
Returns:
zero if equal, positive if first is later in order, negative if second is later in order

Definition at line 28 of file HttpString.cpp.

void HttpString_utoa ( UINT32  uNum,
struct HttpBlob *  pString 
)

Format an unsigned decimal number as a string.

Parameters:
uNumThe number to format
[in,out]pStringA string buffer which returns the formatted string. On entry, uLength is the maximum length of the buffer, upon return uLength is the actual length of the formatted string

Definition at line 133 of file HttpString.cpp.