CTS-SAT-1-OBC-Firmware
|
#include "eps_drivers/eps_commands.h"
#include "eps_drivers/eps_types.h"
#include "eps_drivers/eps_types_to_json.h"
#include "eps_drivers/eps_channel_control.h"
#include "eps_drivers/eps_time.h"
#include "eps_drivers/eps_calculations.h"
#include "eps_drivers/eps_power_management.h"
#include "telecommands/eps_telecommands.h"
#include "telecommand_exec/telecommand_args_helpers.h"
#include "log/log.h"
#include "obc_systems/adc_vbat_monitor.h"
#include <stdio.h>
#include <string.h>
Functions | |
uint8_t | TCMDEXEC_eps_watchdog (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Triggers/services the EPS watchdog. No args. | |
uint8_t | TCMDEXEC_eps_system_reset (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Resets the EPS system. | |
uint8_t | TCMDEXEC_eps_no_operation (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Calls the EPS no-op (no operation) command. Likely not useful. | |
uint8_t | TCMDEXEC_eps_cancel_operation (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Calls the EPS cancel operation command. Likely not useful. | |
uint8_t | TCMDEXEC_eps_switch_to_mode (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Switches the EPS to "nominal" or "safety" mode. | |
uint8_t | TCMDEXEC_eps_set_channel_enabled (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Sets the EPS channel to be enabled (on) or disabled (off). | |
uint8_t | TCMDEXEC_eps_get_system_status_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS system status, and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pdu_overcurrent_fault_state_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PDU (Power Distribution Unit) overcurrent fault status, and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pbu_abf_placed_state_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PBU (Power Battery Unit) ABF placed status, and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pdu_housekeeping_data_eng_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PDU (Power Distribution Unit) housekeeping data, and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pdu_data_for_channel_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Gets the Voltage, Current, and Power for a single channel on the EPS. | |
uint8_t | TCMDEXEC_eps_get_pdu_housekeeping_data_run_avg_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PDU (Power Distribution Unit) housekeeping data (running average), and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pbu_housekeeping_data_eng_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PBU (Power Battery Unit) housekeeping data, and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pbu_housekeeping_data_run_avg_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PBU (Power Battery Unit) housekeeping data (running average), and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pcu_housekeeping_data_eng_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PCU (Power Conditioning Unit, solar panel MPPT) housekeeping data, and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_pcu_housekeeping_data_run_avg_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PCU (Power Conditioning Unit, solar panel MPPT) housekeeping data (running average), and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_piu_housekeeping_data_eng_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Gets the EPS PIU (Power Integrated Unit, info about all systems) housekeeping data, and returns it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_piu_housekeeping_data_run_avg_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get the EPS PIU (Power Integrated Unit, info about all systems) housekeeping data (running average), and display it as a JSON string. | |
uint8_t | TCMDEXEC_eps_get_current_battery_percent (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Get current battery voltage percent from PBU. | |
uint8_t | TCMDEXEC_eps_get_enabled_channels_json (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
uint8_t | TCMDEXEC_eps_power_management_set_current_threshold (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
Sets the EPS power managements max sustained current for the specified channel. | |
uint8_t TCMDEXEC_eps_cancel_operation | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Calls the EPS cancel operation command. Likely not useful.
args_str | No arguments. |
uint8_t TCMDEXEC_eps_get_current_battery_percent | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get current battery voltage percent from PBU.
uint8_t TCMDEXEC_eps_get_enabled_channels_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
uint8_t TCMDEXEC_eps_get_pbu_abf_placed_state_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PBU (Power Battery Unit) ABF placed status, and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_pbu_housekeeping_data_eng_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PBU (Power Battery Unit) housekeeping data, and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_pbu_housekeeping_data_run_avg_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PBU (Power Battery Unit) housekeeping data (running average), and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_pcu_housekeeping_data_eng_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PCU (Power Conditioning Unit, solar panel MPPT) housekeeping data, and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_pcu_housekeeping_data_run_avg_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PCU (Power Conditioning Unit, solar panel MPPT) housekeeping data (running average), and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_pdu_data_for_channel_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Gets the Voltage, Current, and Power for a single channel on the EPS.
args_str |
|
uint8_t TCMDEXEC_eps_get_pdu_housekeeping_data_eng_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PDU (Power Distribution Unit) housekeeping data, and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_pdu_housekeeping_data_run_avg_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PDU (Power Distribution Unit) housekeeping data (running average), and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_pdu_overcurrent_fault_state_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PDU (Power Distribution Unit) overcurrent fault status, and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_piu_housekeeping_data_eng_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Gets the EPS PIU (Power Integrated Unit, info about all systems) housekeeping data, and returns it as a JSON string.
uint8_t TCMDEXEC_eps_get_piu_housekeeping_data_run_avg_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS PIU (Power Integrated Unit, info about all systems) housekeeping data (running average), and display it as a JSON string.
uint8_t TCMDEXEC_eps_get_system_status_json | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Get the EPS system status, and display it as a JSON string.
uint8_t TCMDEXEC_eps_no_operation | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Calls the EPS no-op (no operation) command. Likely not useful.
args_str | No arguments. |
uint8_t TCMDEXEC_eps_power_management_set_current_threshold | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Sets the EPS power managements max sustained current for the specified channel.
args_str |
|
uint8_t TCMDEXEC_eps_set_channel_enabled | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Sets the EPS channel to be enabled (on) or disabled (off).
args_str |
|
uint8_t TCMDEXEC_eps_switch_to_mode | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Switches the EPS to "nominal" or "safety" mode.
args_str |
|
uint8_t TCMDEXEC_eps_system_reset | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Resets the EPS system.
args_str | No arguments. |
uint8_t TCMDEXEC_eps_watchdog | ( | const char * | args_str, |
char * | response_output_buf, | ||
uint16_t | response_output_buf_len ) |
Triggers/services the EPS watchdog. No args.
args_str | No arguments. |