Mark3 Realtime Kernel
|
String and Memory manipu32ation class. More...
#include <memutil.h>
Static Public Member Functions | |
static void | DecimalToString (uint8_t u8Data_, char *szText_) |
DecimalToString. More... | |
static void | DecimalToString (uint16_t u16Data_, char *szText_) |
static void | DecimalToString (uint32_t u32Data_, char *szText_) |
static void | DecimalToString (uint64_t u64Data_, char *szText_) |
static uint8_t | Checksum8 (const void *pvSrc_, uint16_t u16Len_) |
Checksum8. More... | |
static uint16_t | Checksum16 (const void *pvSrc_, uint16_t u16Len_) |
Checksum16. More... | |
static uint16_t | StringLength (const char *szStr_) |
StringLength. More... | |
static bool | CompareStrings (const char *szStr1_, const char *szStr2_) |
CompareStrings. More... | |
static bool | CompareStrings (const char *szStr1_, const char *szStr2_, uint16_t u16Length_) |
static void | CopyMemory (void *pvDst_, const void *pvSrc_, uint16_t u16Len_) |
CopyMemory. More... | |
static void | CopyString (char *szDst_, const char *szSrc_) |
CopyString. More... | |
static int16_t | StringSearch (const char *szBuffer_, const char *szPattern_) |
StringSearch. More... | |
static bool | CompareMemory (const void *pvMem1_, const void *pvMem2_, uint16_t u16Len_) |
CompareMemory. More... | |
static void | SetMemory (void *pvDst_, uint8_t u8Val_, uint16_t u16Len_) |
SetMemory. More... | |
static uint8_t | Tokenize (const char *szBuffer_, Token_t *pastTokens_, uint8_t u8MaxTokens_) |
Tokenize Function to tokenize a string based on a space delimeter. This is a non-destructive function, which popu32ates a Token_t descriptor array. More... | |
String and Memory manipu32ation class.
Utility method class implementing common memory and string manipu32ation functions, without relying on an external standard library implementation which might not be available on some toolchains, may be closed source, or may not be thread-safe.
|
static |
Checksum16.
Compute the 16-bit addative checksum of a memory buffer.
pvSrc_ | Memory buffer to compute a 16-bit checksum of. |
u16Len_ | Length of the buffer in bytes. |
Definition at line 131 of file memutil.cpp.
|
static |
Checksum8.
Compute the 8-bit addative checksum of a memory buffer.
pvSrc_ | Memory buffer to compute a 8-bit checksum of. |
u16Len_ | Length of the buffer in bytes. |
Definition at line 118 of file memutil.cpp.
|
static |
CompareMemory.
Compare the contents of two memory buffers to eachother
pvMem1_ | First buffer to compare |
pvMem2_ | Second buffer to compare |
u16Len_ | Length of buffer (in bytes) to compare |
Definition at line 252 of file memutil.cpp.
|
static |
CompareStrings.
Compare the contents of two zero-terminated string buffers to eachother.
szStr1_ | First string to compare |
szStr2_ | Second string to compare |
Definition at line 157 of file memutil.cpp.
|
static |
Definition at line 176 of file memutil.cpp.
|
static |
CopyMemory.
Copy one buffer in memory into another.
pvDst_ | Pointer to the destination buffer |
pvSrc_ | Pointer to the source buffer |
u16Len_ | Number of bytes to copy from source to destination |
Definition at line 193 of file memutil.cpp.
|
static |
CopyString.
Copy a string from one buffer into another.
szDst_ | Pointer to the buffer to copy into |
szSrc_ | Pointer to the buffer to copy data from |
Definition at line 207 of file memutil.cpp.
|
static |
DecimalToString.
Convert an 8-bit unsigned binary value as a decimal string.
u8Data_ | Value to convert into a string |
szText_ | Destination string buffer (4 bytes minimum) |
Definition at line 30 of file memutil.cpp.
|
static |
Definition at line 54 of file memutil.cpp.
|
static |
Definition at line 75 of file memutil.cpp.
|
static |
Definition at line 96 of file memutil.cpp.
|
static |
SetMemory.
Initialize a buffer of memory to a specified 8-bit pattern
pvDst_ | Destination buffer to set |
u8Val_ | 8-bit pattern to initialize each byte of destination with |
u16Len_ | Length of the buffer (in bytes) to initialize |
Definition at line 271 of file memutil.cpp.
|
static |
StringLength.
Compute the length of a string in bytes.
szStr_ | Pointer to the zero-terminated string to calculate the length of |
Definition at line 145 of file memutil.cpp.
|
static |
StringSearch.
Search for the presence of one string as a substring within another.
szBuffer_ | Buffer to search for pattern within |
szPattern_ | Pattern to search for in the buffer |
Definition at line 221 of file memutil.cpp.
|
static |
Tokenize Function to tokenize a string based on a space delimeter. This is a non-destructive function, which popu32ates a Token_t descriptor array.
szBuffer_ | String to tokenize |
pastTokens_ | Pointer to the array of token descriptors |
u8MaxTokens_ | Maximum number of tokens to parse (i.e. size of pastTokens_) |
Definition at line 281 of file memutil.cpp.