|
CTS-SAT-1-OBC-Firmware
|
#include "main.h"#include "log/log.h"#include "log/lazy_file_log_sink.h"#include "eps_drivers/eps_types.h"#include "eps_drivers/eps_calculations.h"#include "timekeeping/timekeeping.h"#include "stm32/stm32_reboot_reason.h"#include "eps_drivers/eps_commands.h"#include "littlefs/littlefs_helper.h"#include "transforms/arrays.h"#include "self_checks/complete_self_check.h"#include "obc_systems/external_led_and_rbf.h"#include "obc_systems/obc_temperature_sensor.h"#include "system/system_temperature.h"#include "mpi/mpi_command_handling.h"#include "mpi/mpi_types.h"#include "uart_handler/uart_handler.h"#include "rtos_tasks/rtos_bootup_operation_fsm_task.h"#include "gnss_receiver/gnss_internal_drivers.h"#include "telecommands/system_telecommand_defs.h"#include "telecommand_exec/telecommand_definitions.h"#include "telecommand_exec/telecommand_executor.h"#include "telecommand_exec/telecommand_args_helpers.h"#include <stdio.h>#include <string.h>
Typedefs | |
| typedef uint8_t(* | blob_entry_t) (const char *args_str, char *response_buf, uint16_t response_buf_len) |
Functions | |
| uint8_t | TCMDEXEC_hello_world (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| A simple telecommand that responds with "Hello, world!" (log message and TCMD response). | |
| uint8_t | TCMDEXEC_obc_firmware_version (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| Get the currently-running OBC Firmware Version (build date/time, comment). | |
| uint8_t | TCMDEXEC_core_system_stats (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| Get many essential system stats as a JSON dict. | |
| uint8_t | TCMDEXEC_available_telecommands (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| uint8_t | TCMDEXEC_reboot (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| Reboot the OBC. Unmounts the filesystem first for safety. | |
| uint8_t | TCMDEXEC_system_self_check_failures_as_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| System self-check of all peripherals and systems. | |
| uint8_t | TCMDEXEC_system_self_check_as_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| System self-check of all peripherals and systems. | |
| uint8_t | TCMDEXEC_obc_get_rbf_state (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| uint8_t | TCMDEXEC_get_all_system_thermal_info (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| Get a variety of system thermal info as JSON. | |
| uint8_t | TCMDEXEC_exec_blob_from_fs (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| Executes an arbitrary blob/program from the filesystem. | |
Variables | |
| uint32_t | COMMS_total_beacon_count_since_boot |
| MPI_transceiver_state_enum_t | MPI_current_transceiver_state |
| MPI_reason_for_stopping_active_mode | MPI_last_reason_for_stopping_active_mode |
| typedef uint8_t(* blob_entry_t) (const char *args_str, char *response_buf, uint16_t response_buf_len) |
| uint8_t TCMDEXEC_available_telecommands | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
| uint8_t TCMDEXEC_core_system_stats | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
Get many essential system stats as a JSON dict.
| args_str | No arguments. |

| uint8_t TCMDEXEC_exec_blob_from_fs | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
Executes an arbitrary blob/program from the filesystem.
| args_str |
|
| response_output_buf | The blob optionally writes its intermediate workings and results to this buffer. |
Refer to misc_tools/exec_blob/README.md for more information on how to use this complex telecommand.

| uint8_t TCMDEXEC_get_all_system_thermal_info | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
Get a variety of system thermal info as JSON.
| args_str | No arguments. |

| uint8_t TCMDEXEC_hello_world | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
A simple telecommand that responds with "Hello, world!" (log message and TCMD response).
| args_str | No arguments expected |
| response_output_buf | The buffer to write the response to |
| response_output_buf_len | The maximum length of the response_output_buf (its size) |

| uint8_t TCMDEXEC_obc_firmware_version | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
Get the currently-running OBC Firmware Version (build date/time, comment).
| args_str | No arguments. |
| uint8_t TCMDEXEC_obc_get_rbf_state | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |

| uint8_t TCMDEXEC_reboot | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
Reboot the OBC. Unmounts the filesystem first for safety.
| args_str | |
| response_output_buf | |
| response_output_buf_len |

| uint8_t TCMDEXEC_system_self_check_as_json | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
System self-check of all peripherals and systems.
| args_str | No arguments expected |
| response_output_buf | Buffer is filled with a JSON list of strings of the FAILING checks |

| uint8_t TCMDEXEC_system_self_check_failures_as_json | ( | const char * | args_str, |
| char * | response_output_buf, | ||
| uint16_t | response_output_buf_len ) |
System self-check of all peripherals and systems.
| args_str | No arguments expected |
| response_output_buf | Buffer is filled with a JSON list of strings of the FAILING checks |

|
extern |
|
extern |
|
extern |