CTS-SAT-1-OBC-Firmware
|
#include <stdint.h>
Go to the source code of this file.
Functions | |
uint8_t | TCMD_ascii_to_uint64 (const char *str, uint32_t str_len, uint64_t *result) |
Extracts a uint64, starting from the beginning of str , to a maximum length of str_len . | |
uint8_t | TCMD_extract_uint64_arg (const char *str, uint32_t str_len, uint8_t arg_index, uint64_t *result) |
Extracts the nth comma-separated argument from the input string, assuming it's a uint64. | |
uint8_t | TCMD_extract_string_arg (const char *str, uint8_t arg_index, char *result, uint16_t result_max_len) |
Extracts the nth comma-separated argument from the input string, assuming it's a string. | |
uint8_t | TCMD_extract_hex_array_arg (const char *args_str, uint8_t arg_index, uint8_t result_array[], uint16_t result_array_size, uint16_t *result_length) |
Extracts the nth comma-separated argument from the input string, assuming it's a hex string. | |
uint8_t | TCMD_ascii_to_double (const char *str, uint32_t str_len, double *result) |
Extracts the longest substring of double characters, starting from the beginning of the string, to a maximum length or until the first non-double character is found. | |
uint8_t | TCMD_extract_double_arg (const char *str, uint32_t str_len, uint8_t arg_index, double *result) |
Extracts the nth comma-separated argument from the input string, assuming it's a double. | |
uint8_t | TCMD_ascii_to_int64 (const char *str, uint32_t str_len, int64_t *result) |
Extracts an int64, starting from the beginning of str , to a maximum length of str_len . | |
uint8_t | TCMD_extract_int64_arg (const char *str, uint32_t str_len, uint8_t arg_index, int64_t *result) |
Extracts the nth comma-separated argument from the input string, assuming it's an int64. | |
uint8_t TCMD_ascii_to_double | ( | const char * | str, |
uint32_t | str_len, | ||
double * | result ) |
Extracts the longest substring of double characters, starting from the beginning of the string, to a maximum length or until the first non-double character is found.
str | Input string, starting with a double |
str_len | Max length of the input string |
result | Pointer to the result |
uint8_t TCMD_ascii_to_int64 | ( | const char * | str, |
uint32_t | str_len, | ||
int64_t * | result ) |
Extracts an int64, starting from the beginning of str
, to a maximum length of str_len
.
str | Input string, starting with an integer or negative sign. |
str_len | Length of the input string. The first str_len characters are considered. |
result | Pointer to the result |
uint8_t TCMD_ascii_to_uint64 | ( | const char * | str, |
uint32_t | str_len, | ||
uint64_t * | result ) |
Extracts a uint64, starting from the beginning of str
, to a maximum length of str_len
.
str | Input string, starting with an integer |
str_len | Length of the input string. The first str_len characters are considered. |
result | Pointer to the result |
uint8_t TCMD_extract_double_arg | ( | const char * | str, |
uint32_t | str_len, | ||
uint8_t | arg_index, | ||
double * | result ) |
Extracts the nth comma-separated argument from the input string, assuming it's a double.
str | Input string |
str_len | Length of the input string |
arg_index | Index of the argument to extract (0-based) |
result | Pointer to the result |
uint8_t TCMD_extract_hex_array_arg | ( | const char * | args_str, |
uint8_t | arg_index, | ||
uint8_t | result_array[], | ||
uint16_t | result_array_size, | ||
uint16_t * | result_length ) |
Extracts the nth comma-separated argument from the input string, assuming it's a hex string.
args_str | Input string containing comma-separated arguments (null-terminated) |
arg_index | Index of the argument to extract (0-based) |
result | Pointer to the result; a byte array containing the values of the hex string |
result_array_size | Size of the result array |
result_length | Pointer to variable that will contain the length of the result after converting |
uint8_t TCMD_extract_int64_arg | ( | const char * | str, |
uint32_t | str_len, | ||
uint8_t | arg_index, | ||
int64_t * | result ) |
Extracts the nth comma-separated argument from the input string, assuming it's an int64.
str | Input string |
str_len | Length of the input string |
arg_index | Index of the argument to extract (0-based) |
result | Pointer to the result |
uint8_t TCMD_extract_string_arg | ( | const char * | str, |
uint8_t | arg_index, | ||
char * | result, | ||
uint16_t | result_max_len ) |
Extracts the nth comma-separated argument from the input string, assuming it's a string.
str | Input string (null-terminated). |
arg_index | Index of the argument to extract (0-based). |
result | Pointer to the result, to be filled with the extracted string (null-terminated). |
result_max_len | Maximum length of the result, including the null-terminator. |
uint8_t TCMD_extract_uint64_arg | ( | const char * | str, |
uint32_t | str_len, | ||
uint8_t | arg_index, | ||
uint64_t * | result ) |
Extracts the nth comma-separated argument from the input string, assuming it's a uint64.
str | Input string |
str_len | Length of the input string |
arg_index | Index of the argument to extract (0-based) |
result | Pointer to the result |