Functions | |
| uint8_t | double_to_string (char *buffer, uint8_t buffer_len, double value, uint8_t resolution) |
| uint8_t | float_to_string (char *buffer, uint8_t buffer_len, float value, uint8_t resolution) |
| void | format_wep_keys (char *wep_key_output, const char *wep_key_data, uint8_t *wep_key_length, wep_key_format_t wep_key_format) |
| uint32_t | generic_string_to_unsigned (const char *str) |
| int | is_digit_str (const char *str) |
| uint8_t | match_string_with_wildcard_pattern (const char *string, uint32_t length, const char *pattern) |
| uint8_t | signed64_to_decimal_string (int64_t value, char *output, uint8_t min_length, uint8_t max_length) |
| uint8_t | signed_to_decimal_string (int32_t value, char *output, uint8_t min_length, uint8_t max_length) |
| uint8_t | string_to_signed (const char *string, uint16_t str_length, int32_t *value_out, uint8_t is_hex) |
| uint8_t | string_to_unsigned (const char *string, uint8_t str_length, uint32_t *value_out, uint8_t is_hex) |
| char * | strncasestr (const char *s, uint16_t s_len, const char *substr, uint16_t substr_len) |
| char * | strnstrn (const char *s, uint16_t s_len, const char *substr, uint16_t substr_len) |
| uint8_t | unsigned64_to_decimal_string (uint64_t value, char *output, uint8_t min_length, uint8_t max_length) |
| uint8_t | unsigned_to_decimal_string (uint32_t value, char *output, uint8_t min_length, uint8_t max_length) |
| uint8_t | unsigned_to_hex_string (uint32_t value, char *output, uint8_t min_length, uint8_t max_length) |
| char * | wiced_ether_ntoa (const uint8_t *ea, char *buf, uint8_t buf_len) |
This library implements helper functions for commonly used tasks.
| uint8_t double_to_string | ( | char * | buffer, |
| uint8_t | buffer_len, | ||
| double | value, | ||
| uint8_t | resolution ) |
Converts double precision floating point value to string
| buffer[in/out] | : Pointer to buffer where the output string to be stored. |
| buffer_len[in] | : Length of the buffer used for storing the output. |
| value[in] | : Double floating point value to be converted to a string. |
| resolution[in] | : Floating point resolution for the conversion. Supported max upto FLOAT_TO_STRING_MAX_FRACTION_SUPPORTED. |
| uint8_t float_to_string | ( | char * | buffer, |
| uint8_t | buffer_len, | ||
| float | value, | ||
| uint8_t | resolution ) |
Converts floating point value to string
| buffer[in/out] | : Pointer to buffer where the output string to be stored. |
| buffer_len[in] | : Length of the buffer used for storing the output. |
| value[in] | : Floating point value to be converted to a string. |
| resolution[in] | : Floating point resolution for the conversion. Supported max upto FLOAT_TO_STRING_MAX_FRACTION_SUPPORTED. |
| void format_wep_keys | ( | char * | wep_key_output, |
| const char * | wep_key_data, | ||
| uint8_t * | wep_key_length, | ||
| wep_key_format_t | wep_key_format ) |
Convert WEP security key to the format used by WICED
| [out] | wep_key_ouput | The converted key |
| [in] | wep_key_data | The WEP key to convert |
| [in,out] | wep_key_length | The length of the WEP key data. Upon return, the length of the converted WEP key |
| [in] | wep_key_format | The current format of the WEP key |
| uint32_t generic_string_to_unsigned | ( | const char * | str | ) |
Convert a decimal or hexidecimal string to an integer.
| [in] | str | The string containing the value. |
| int is_digit_str | ( | const char * | str | ) |
Verifies the provided string is a collection of digits.
| str[in] | : The string to verify |
| uint8_t match_string_with_wildcard_pattern | ( | const char * | string, |
| uint32_t | length, | ||
| const char * | pattern ) |
Compare a string to a pattern containing wildcard character(s).
| [in] | string | The target string to compare with with the pattern |
| [in] | length | The length of the target string |
| [in] | pattern | The NUL-terminated string pattern which contains wildcard character(s) |
| uint8_t signed64_to_decimal_string | ( | int64_t | value, |
| char * | output, | ||
| uint8_t | min_length, | ||
| uint8_t | max_length ) |
Converts a signed 64-bit integer (long long) to a decimal string
| value[in] | : The signed 64-bit integer (long long) to be converted. |
| output[out] | : The buffer which will receive the decimal string. A terminating 'null' is added. Ensure that there is space in the buffer for this. |
| min_length[in] | : The minimum number of characters to output (zero padding will apply if required). |
| max_length[in] | : The maximum number of characters to output. The max number of characters it can have is of the length of (ULLONG_MAX + 1). |
| uint8_t signed_to_decimal_string | ( | int32_t | value, |
| char * | output, | ||
| uint8_t | min_length, | ||
| uint8_t | max_length ) |
Converts a signed 32-bit long int to a decimal string
| value[in] | : The signed 32-bit long int to be converted |
| output[out] | : The buffer which will receive the decimal string. A terminating 'null' is added. Ensure that there is space in the buffer for this. |
| min_length[in] | : The minimum number of characters to output (zero padding will apply if required) |
| max_length[in] | : The maximum number of characters to output. The max number of characters it can have is of the length of (ULONG_MAX + 1). |
| uint8_t string_to_signed | ( | const char * | string, |
| uint16_t | str_length, | ||
| int32_t * | value_out, | ||
| uint8_t | is_hex ) |
Converts a decimal/hexidecimal string (with optional sign) to a signed long int Better than strtol or atol or atoi because the return value indicates if an error occurred
| string[in] | : The string buffer to be converted |
| str_length[in] | : The maximum number of characters to process in the string buffer |
| value_out[out] | : The unsigned in that will receive value of the the decimal string |
| is_hex[in] | : 0 = Decimal string, 1 = Hexidecimal string |
| uint8_t string_to_unsigned | ( | const char * | string, |
| uint8_t | str_length, | ||
| uint32_t * | value_out, | ||
| uint8_t | is_hex ) |
Converts a decimal/hexidecimal string to an unsigned long int Better than strtol or atol or atoi because the return value indicates if an error occurred
| string[in] | : The string buffer to be converted |
| str_length[in] | : The maximum number of characters to process in the string buffer |
| value_out[out] | : The unsigned in that will receive value of the the decimal string |
| is_hex[in] | : 0 = Decimal string, 1 = Hexidecimal string |
| char * strncasestr | ( | const char * | s, |
| uint16_t | s_len, | ||
| const char * | substr, | ||
| uint16_t | substr_len ) |
Length limited version of strcasestr. Ported from bcmutils.c
| s[in] | : The string to be searched. |
| s_len[in] | : The length of the string to be searched. |
| substr[in] | : The string to be found. |
| substr_len[in] | : The length of the string to be found. |
| char * strnstrn | ( | const char * | s, |
| uint16_t | s_len, | ||
| const char * | substr, | ||
| uint16_t | substr_len ) |
Length limited version of strstr. Ported from bcmutils.c
| s[in] | : The string to be searched. |
| s_len[in] | : The length of the string to be searched. |
| substr[in] | : The string to be found. |
| substr_len[in] | : The length of the string to be found. |
| uint8_t unsigned64_to_decimal_string | ( | uint64_t | value, |
| char * | output, | ||
| uint8_t | min_length, | ||
| uint8_t | max_length ) |
Converts a unsigned 64-bit integer (long long) to a decimal string
| value[in] | : The unsigned 64-bit integer (long long) to be converted. |
| output[out] | : The buffer which will receive the decimal string. A terminating 'null' is added. Ensure that there is space in the buffer for this. |
| min_length[in] | : The minimum number of characters to output (zero padding will apply if required). |
| max_length[in] | : The maximum number of characters to output. The max number of characters it can have is of the length of (ULLONG_MAX + 1). |
| uint8_t unsigned_to_decimal_string | ( | uint32_t | value, |
| char * | output, | ||
| uint8_t | min_length, | ||
| uint8_t | max_length ) |
Converts a unsigned 32-bit long int to a decimal string
| value[in] | : The unsigned long to be converted. |
| output[out] | : The buffer which will receive the decimal string. A terminating 'null' is added. Ensure that there is space in the buffer for this. |
| min_length[in] | : The minimum number of characters to output (zero padding will apply if required). |
| max_length[in] | : The maximum number of characters to output. The max number of characters it can have is of the length of (ULONG_MAX + 1). |
| uint8_t unsigned_to_hex_string | ( | uint32_t | value, |
| char * | output, | ||
| uint8_t | min_length, | ||
| uint8_t | max_length ) |
Converts a unsigned 32-bit long int to a hexidecimal string
| value[in] | : The unsigned 32-bit long int to be converted |
| output[out] | : The buffer which will receive the hexidecimal string. A terminating 'null' is added. Ensure that there is space in the buffer for this. |
| min_length[in] | : The minimum number of characters to output (zero padding will apply if required) |
| max_length[in] | : The maximum number of characters to output. The max number of characters it can have is of the length of (ULONG_MAX + 1). |
| char * wiced_ether_ntoa | ( | const uint8_t * | ea, |
| char * | buf, | ||
| uint8_t | buf_len ) |
Convert ether address to a printable string
| [in] | ea | Ethernet address to convert |
| [in] | buf | Buffer to write the ascii string into |
| [in] | buf_len | Length of the memory buf points to |