Port of TI's CC3100 Websock camera demo. Using FreeRTOS, mbedTLS, also parts of Arducam for cams ov5642 and 0v2640. Can also use MT9D111. Work in progress. Be warned some parts maybe a bit flacky. This is for Seeed Arch max only, for an M3, see the demo for CM3 using the 0v5642 aducam mini.

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.