CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
system_telecommand_defs.c File Reference
Include dependency graph for system_telecommand_defs.c:

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 Documentation

◆ blob_entry_t

typedef uint8_t(* blob_entry_t) (const char *args_str, char *response_buf, uint16_t response_buf_len)

Function Documentation

◆ TCMDEXEC_available_telecommands()

uint8_t TCMDEXEC_available_telecommands ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

◆ TCMDEXEC_core_system_stats()

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.

Parameters
args_strNo arguments.
Returns
0 on success. Cannot fail.
Here is the call graph for this function:

◆ TCMDEXEC_exec_blob_from_fs()

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.

Parameters
args_str
  • Arg 0: File name of the blob
  • Arg 1: Where to load blob (0=malloc, 1=mpi_buffer_one, 2=mpi_buffer_two)
  • Arg 2: Argument to pass to the blob function (e.g., another filename)
response_output_bufThe blob optionally writes its intermediate workings and results to this buffer.
Returns
99 on pre-blob execution error. Otherwise, blob return value (presumably 0 on success).

Refer to misc_tools/exec_blob/README.md for more information on how to use this complex telecommand.

Here is the call graph for this function:

◆ TCMDEXEC_get_all_system_thermal_info()

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.

Parameters
args_strNo arguments.
Returns
0 on success.
Note
Fields include OBC temp, antenna temps, solar panel generation, battery info.
The EPS_CHANNEL_3V3_UHF_ANTENNA_DEPLOY channel is powered off after, even if it was powered on previously. Totally safe, but just an FYI.
Here is the call graph for this function:

◆ TCMDEXEC_hello_world()

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).

Parameters
args_strNo arguments expected
response_output_bufThe buffer to write the response to
response_output_buf_lenThe maximum length of the response_output_buf (its size)
Returns
0 if successful, >0 if an error occurred (but hello_world can't return an error)
Here is the call graph for this function:

◆ TCMDEXEC_obc_firmware_version()

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).

Parameters
args_strNo arguments.
Returns
0 on success (cannot fail).

◆ TCMDEXEC_obc_get_rbf_state()

uint8_t TCMDEXEC_obc_get_rbf_state ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )
Here is the call graph for this function:

◆ TCMDEXEC_reboot()

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.

Parameters
args_str
response_output_buf
response_output_buf_len
Returns
Here is the call graph for this function:

◆ TCMDEXEC_system_self_check_as_json()

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.

Parameters
args_strNo arguments expected
response_output_bufBuffer is filled with a JSON list of strings of the FAILING checks
Returns
0 regardless; see the response_output_buf for the results of the self-check.
Note
Output is a JSON list of the failing checks (as strings). Returns 0 regardless.
Here is the call graph for this function:

◆ TCMDEXEC_system_self_check_failures_as_json()

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.

Parameters
args_strNo arguments expected
response_output_bufBuffer is filled with a JSON list of strings of the FAILING checks
Returns
0 regardless; see the response_output_buf for the results of the self-check.
Note
Output is a JSON list of the failing checks (as strings). Returns 0 regardless.
Here is the call graph for this function:

Variable Documentation

◆ COMMS_total_beacon_count_since_boot

uint32_t COMMS_total_beacon_count_since_boot
extern

◆ MPI_current_transceiver_state

MPI_transceiver_state_enum_t MPI_current_transceiver_state
extern

◆ MPI_last_reason_for_stopping_active_mode

MPI_reason_for_stopping_active_mode MPI_last_reason_for_stopping_active_mode
extern