CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
configuration.h File Reference
#include <stdint.h>
Include dependency graph for configuration.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CONFIG_integer_config_entry_t
 
struct  CONFIG_string_config_entry_t
 

Functions

int16_t CONFIG_get_int_var_index (const char *search_name)
 Finds an int config variable in CONFIG_int_config_variables and returns its index.
 
int16_t CONFIG_get_str_var_index (const char *search_name)
 Finds a string config variable in CONFIG_str_config_variables and returns its index.
 
uint8_t CONFIG_set_int_variable (const char *var_name, const uint64_t new_value)
 Assigns a new value to an integer configuration variable.
 
uint8_t CONFIG_set_str_variable (const char *var_name, const char *new_value)
 Assigns a new value to a string configuration variable.
 
uint16_t CONFIG_int_var_to_json (const char *config_var, char *json_str, const uint16_t json_str_max_len)
 Converts an integer configuration variable to a JSON string.
 
uint16_t CONFIG_str_var_to_json (const char *var_name, char *json_str, const uint16_t json_str_max_len)
 Converts a string configuration variable to a JSON string.
 

Variables

static const uint8_t CONFIG_MAX_VARIABLE_NAME_LENGTH = 200
 
static const uint8_t CONFIG_MAX_JSON_STRING_LENGTH = UINT8_MAX
 
uint32_t EPS_monitor_interval_ms
 
uint32_t STM32_system_reset_interval_ms
 
const uint32_t CONFIG_freertos_min_remaining_stack_percent
 The percentage of the stack space that should remain free. If the free space falls below this percentage, a warning will be logged.
 
CONFIG_integer_config_entry_t CONFIG_int_config_variables []
 
const uint8_t CONFIG_int_config_variables_count
 
CONFIG_string_config_entry_t CONFIG_str_config_variables []
 
const uint8_t CONFIG_str_config_variables_count
 
uint32_t TCMD_require_unique_tssent
 

Function Documentation

◆ CONFIG_get_int_var_index()

int16_t CONFIG_get_int_var_index ( const char * search_name)

Finds an int config variable in CONFIG_int_config_variables and returns its index.

Parameters
nameName of the variable being searched, as registered in CONFIG_int_config_variables
Returns
-1 if not found, otherwise the index of the variable in CONFIG_int_config_variables
Here is the caller graph for this function:

◆ CONFIG_get_str_var_index()

int16_t CONFIG_get_str_var_index ( const char * search_name)

Finds a string config variable in CONFIG_str_config_variables and returns its index.

Parameters
nameName of the variable being searched, as registered in CONFIG_str_config_variables
Returns
-1 if not found, otherwise the index of the variable in CONFIG_str_config_variables
Here is the caller graph for this function:

◆ CONFIG_int_var_to_json()

uint16_t CONFIG_int_var_to_json ( const char * var_name,
char * json_str,
const uint16_t json_str_max_len )

Converts an integer configuration variable to a JSON string.

Parameters
var_nameName of the variable
json_strBuffer to write the JSON string to
json_str_max_lenMax length of the buffer
Returns
Length of the JSON string
Note
The JSON string is in the format: {"name":"var_name","value":value}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CONFIG_set_int_variable()

uint8_t CONFIG_set_int_variable ( const char * var_name,
const uint64_t new_value )

Assigns a new value to an integer configuration variable.

Parameters
var_nameName of the variable
new_valueNew value
Returns
0 if success, > 0 if failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CONFIG_set_str_variable()

uint8_t CONFIG_set_str_variable ( const char * var_name,
const char * new_value )

Assigns a new value to a string configuration variable.

Parameters
config_varPointer to the configuration variable
new_valueNew value
Returns
0 if success, > 0 if failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CONFIG_str_var_to_json()

uint16_t CONFIG_str_var_to_json ( const char * var_name,
char * json_str,
const uint16_t json_str_max_len )

Converts a string configuration variable to a JSON string.

Parameters
var_nameName of the variable
json_strBuffer to write the JSON string to
json_str_max_lenMax length of the buffer
Returns
If successful, Length of the JSON string (>1), otherwise 1
Note
The JSON string is in the format: {"name":"var_name","value":"value"}
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ CONFIG_freertos_min_remaining_stack_percent

const uint32_t CONFIG_freertos_min_remaining_stack_percent
extern

The percentage of the stack space that should remain free. If the free space falls below this percentage, a warning will be logged.

◆ CONFIG_int_config_variables

CONFIG_integer_config_entry_t CONFIG_int_config_variables[]
extern

◆ CONFIG_int_config_variables_count

const uint8_t CONFIG_int_config_variables_count
extern

◆ CONFIG_MAX_JSON_STRING_LENGTH

const uint8_t CONFIG_MAX_JSON_STRING_LENGTH = UINT8_MAX
static

◆ CONFIG_MAX_VARIABLE_NAME_LENGTH

const uint8_t CONFIG_MAX_VARIABLE_NAME_LENGTH = 200
static

◆ CONFIG_str_config_variables

CONFIG_string_config_entry_t CONFIG_str_config_variables[]
extern

◆ CONFIG_str_config_variables_count

const uint8_t CONFIG_str_config_variables_count
extern

◆ EPS_monitor_interval_ms

uint32_t EPS_monitor_interval_ms
extern

◆ STM32_system_reset_interval_ms

uint32_t STM32_system_reset_interval_ms
extern

◆ TCMD_require_unique_tssent

uint32_t TCMD_require_unique_tssent
extern