Functions | |
| int32_t | NvOsSnprintfS32 (char *dst, size_t max_count, NvS32 val) |
| This function generates a formatted string with a signed integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfU32 (char *dst, size_t max_count, NvU32 val) |
| This function generates a formatted string with a unsigned integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfU64 (char *dst, size_t max_count, NvU64 val) |
| This function generates a formatted string with an unsigned 64-bit integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStr (char *dst, size_t max_count, const char *src) |
| This function generates a formatted string with a string and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrS32 (char *dst, size_t max_count, const char *src, NvS32 val) |
| This function generates a formatted string with a string and a signed integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrU32 (char *dst, size_t max_count, const char *src, NvU32 val) |
| This function generates a formatted string with a string and unsigned integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrU64 (char *dst, size_t max_count, const char *src, NvU64 val) |
| This function generates a formatted string with a string and unsigned 64-bit integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrFloat (char *dst, size_t max_count, const char *src, NvF32 val) |
| This function generates a formatted string with a string and a float and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrPtr (char *dst, size_t max_count, const char *src, const void *ptr) |
| This function generates a formatted string with a string and a pointer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrHexU32 (char *dst, size_t max_count, const char *src, NvU32 val) |
| This function generates a formatted string with a string and an unsigned integer(in hex format) and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrHexRawBytes (char *dst, size_t max_count, const char *src, NvU32 val) |
| This function generates a formatted string with a string and an unsigned integer(in hex format) and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrHexU64 (char *dst, size_t max_count, const char *src, NvU64 val) |
| This function generates a formatted string with a string and an unsigned 64bit integer(in hex format) and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrWith2S32 (char *dst, size_t max_count, const char *src, NvS32 val0, NvS32 val1) |
| This function generates a formatted string with a string and two signed integers and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| int32_t | NvOsSnprintfStrWith2U32 (char *dst, size_t max_count, const char *src, NvU32 val0, NvU32 val1) |
| This function generates a formatted string with a string and two unsigned integers and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written. More... | |
| long int | NvUStrtol (const char *s, char **endptr, int base) |
| This function converts a string to integer. More... | |
| uint32_t | NvUStrtoui (const char *s, char **endptr, int32_t base) |
| This function convert to unsigned int from string pointer. More... | |
| unsigned long int | NvUStrtoul (const char *s, char **endptr, int base) |
| This function convert to unsigned long int from string pointer. More... | |
| unsigned long long int | NvUStrtoull (const char *s, char **endptr, int base) |
| This function convert to unsigned long long int from string pointer. More... | |
| size_t | NvOsStrnlen (const char *s, size_t size) |
| This function counts the length of given string, and its length is counted up to given size parameter. More... | |
| void | NvOsStrncpy (char *dest, const char *src, size_t size) |
| This function copy to dest string parameter from src string parameter, And the maximum copying length is limited by size parameter. More... | |
| NvError | NvOsStrncpySafe (char *dest, size_t destsz, const char *src, size_t count) |
| This function copies the source string to the destination string up to the maximum length specified by count, ensuring the resulting string is NULL-terminated. It also checks for overlapping between the two buffers, source and destination. More... | |
| NvError | NvOsStrncatSafe (char *dest, size_t destsz, const char *src, size_t count) |
| This function appends the source string to the destination string up to the maximum length specified by count, ensuring the resulting string is NULL-terminated. It also checks for overlapping between the two buffers, source and destination. More... | |
| NvError | NvOsStrErrorSafe (int errnum, char *buf, size_t buflen) |
| The function converts an error number to an error string and stores the string inside the buffer specified buf, using strerror_r(). More... | |
| int32_t NvOsSnprintfS32 | ( | char * | dst, |
| size_t | max_count, | ||
| NvS32 | val | ||
| ) |
This function generates a formatted string with a signed integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | val | A value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfStr | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src | ||
| ) |
This function generates a formatted string with a string and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
Usage considerations
| int32_t NvOsSnprintfStrFloat | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvF32 | val | ||
| ) |
This function generates a formatted string with a string and a float and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src><val>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val | A value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfStrHexRawBytes | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvU32 | val | ||
| ) |
This function generates a formatted string with a string and an unsigned integer(in hex format) and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src><val>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val | A value to be stored into the output array in hex format. |
Usage considerations
| int32_t NvOsSnprintfStrHexU32 | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvU32 | val | ||
| ) |
This function generates a formatted string with a string and an unsigned integer(in hex format) and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src>0x<val>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val | A value to be stored into the output array in hex format. |
Usage considerations
| int32_t NvOsSnprintfStrHexU64 | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvU64 | val | ||
| ) |
This function generates a formatted string with a string and an unsigned 64bit integer(in hex format) and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src>0x<val>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val | A value to be stored into the output array in hex format. |
Usage considerations
| int32_t NvOsSnprintfStrPtr | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| const void * | ptr | ||
| ) |
This function generates a formatted string with a string and a pointer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src><ptr>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | ptr | A pointer value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfStrS32 | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvS32 | val | ||
| ) |
This function generates a formatted string with a string and a signed integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src><val>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val | A value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfStrU32 | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvU32 | val | ||
| ) |
This function generates a formatted string with a string and unsigned integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src><val>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val | A value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfStrU64 | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvU64 | val | ||
| ) |
This function generates a formatted string with a string and unsigned 64-bit integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src><val>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val | A value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfStrWith2S32 | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvS32 | val0, | ||
| NvS32 | val1 | ||
| ) |
This function generates a formatted string with a string and two signed integers and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src> <val0> <val1>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val0 | The 1st value to be stored into the output array as string. |
| [in] | val1 | The 2nd value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfStrWith2U32 | ( | char * | dst, |
| size_t | max_count, | ||
| const char * | src, | ||
| NvU32 | val0, | ||
| NvU32 | val1 | ||
| ) |
This function generates a formatted string with a string and two unsigned integers and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
The format of the generated string: "<src> <val0> <val1>"
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | src | A string to be stored into the output array. It should be NULL terminated. |
| [in] | val0 | The 1st value to be stored into the output array as string. |
| [in] | val1 | The 2nd value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfU32 | ( | char * | dst, |
| size_t | max_count, | ||
| NvU32 | val | ||
| ) |
This function generates a formatted string with a unsigned integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | val | A value to be stored into the output array as string. |
Usage considerations
| int32_t NvOsSnprintfU64 | ( | char * | dst, |
| size_t | max_count, | ||
| NvU64 | val | ||
| ) |
This function generates a formatted string with an unsigned 64-bit integer and copy it into the output array, dst, up to a given maximum number of characters specified by max_count. If max_count is not 0, this function copies the formatted string generated at most (max_count - 1) characters (the remaining characters are discarded) into the output array and then appends a terminating null character. If count is zero, nothing is written.
| [out] | dst | A pointer to the array to store the formatted string. This buffer should have room for at least max_count characters. |
| [in] | max_count | The maximum number of characters to store in the output array, including a terminating null character. |
| [in] | val | A value to be stored into the output array as string. |
Usage considerations
| NvError NvOsStrErrorSafe | ( | int | errnum, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
The function converts an error number to an error string and stores the string inside the buffer specified buf, using strerror_r().
| [in] | errnum | error code |
| [out] | buf | Destination buffer pointer |
| [in] | buf_len | Destination buffer size |
Usage considerations
| NvError NvOsStrncatSafe | ( | char * | dest, |
| size_t | destsz, | ||
| const char * | src, | ||
| size_t | count | ||
| ) |
This function appends the source string to the destination string up to the maximum length specified by count, ensuring the resulting string is NULL-terminated. It also checks for overlapping between the two buffers, source and destination.
| [out] | dest | Destination buffer pointer |
| [in] | destsz | Destination buffer size |
| [in] | src | Source buffer pointer |
| [in] | count | The maximum number of characters to be appended |
Usage considerations
| void NvOsStrncpy | ( | char * | dest, |
| const char * | src, | ||
| size_t | size | ||
| ) |
This function copy to dest string parameter from src string parameter, And the maximum copying length is limited by size parameter.
| [out] | dest | Destination string pointer, passed to dst parameter to strncpy() in QNX libc |
| [in] | src | Source string pointer, passed to src parameter to strncpy() in QNX libc |
| [in] | size | Maximum copying length as bytes, passed to n parameter to strncpy() in QNX libc |
Usage considerations
| NvError NvOsStrncpySafe | ( | char * | dest, |
| size_t | destsz, | ||
| const char * | src, | ||
| size_t | count | ||
| ) |
This function copies the source string to the destination string up to the maximum length specified by count, ensuring the resulting string is NULL-terminated. It also checks for overlapping between the two buffers, source and destination.
| [out] | dest | Destination buffer pointer |
| [in] | destsz | Destination buffer size |
| [in] | src | Source buffer pointer |
| [in] | count | The maximum number of characters to be copied |
Usage considerations
| size_t NvOsStrnlen | ( | const char * | s, |
| size_t | size | ||
| ) |
This function counts the length of given string, and its length is counted up to given size parameter.
| [in] | s | String pointer, to count length, passed to s parameter to strnlen() in QNX libc |
| [in] | size | Maximum count length as bytes, passed to n parameter to strnlen() in QNX libc |
Usage considerations
| long int NvUStrtol | ( | const char * | s, |
| char ** | endptr, | ||
| int | base | ||
| ) |
This function converts a string to integer.
| [in] | s | String to parse as integer, passed to ptr parameter of strtol() in QNX libc |
| [out] | endptr | NULL, or string pointer which wasn't parsed as integer in s parameter, passed to endptr parameter of strtol() in QNX libc |
| [out] | base | The base of the number being parsed. Valid range = [0,2-36] |
Usage considerations
| uint32_t NvUStrtoui | ( | const char * | s, |
| char ** | endptr, | ||
| int32_t | base | ||
| ) |
This function convert to unsigned int from string pointer.
| [in] | s | String pointer to convert unsigned int, passed to s parameter of strtoul() in QNX libc |
| [out] | endptr | followed to/passed to endptr parameter of strtoul() in QNX libc |
| [in] | base | followed to/passed to base parameter of strtoul() in QNX libc |
Usage considerations
| unsigned long int NvUStrtoul | ( | const char * | s, |
| char ** | endptr, | ||
| int | base | ||
| ) |
This function convert to unsigned long int from string pointer.
| [in] | s | String pointer to convert unsigned long int, passed to s parameter of strtoul() in QNX libc |
| [out] | endptr | followed to/passed to endptr parameter of strtoul() in QNX libc |
| [in] | base | followed to/passed to base parameter of strtoul() in QNX libc |
Usage considerations
| unsigned long long int NvUStrtoull | ( | const char * | s, |
| char ** | endptr, | ||
| int | base | ||
| ) |
This function convert to unsigned long long int from string pointer.
| [in] | s | String pointer to convert unsigned long long int, passed to s parameter of strtoull() in QNX libc |
| [out] | endptr | followed to/passed to endptr parameter of strtoull() in QNX libc |
| [in] | base | followed to/passed to base parameter of strtoull() in QNX libc |
Usage considerations