Go to the source code of this file.
◆ EPS_channel_management()
Monitor the power consumption of each channel and disable any channels that exceed a certain threshold.
- Parameters
-
[in] | EPS_pdu_housekeeping_data_eng | PDU housekeeping data with the current power consumption of each channel |
[in] | prev_EPS_pdu_housekeeping_data_eng | Previous PDU housekeeping data with the previous power consumption of each chan/// |
- Note
- This function will iterate over each channel and check if the power consumption has increased or decreased by more than a certain threshold. If the power consumption has increased or decreased by more than the threshold, the channel will be disabled. The function will log an error message if the channel is disabled due to a power issue.
◆ EPS_CMD_power_management_set_current_threshold()
void EPS_CMD_power_management_set_current_threshold |
( |
uint8_t | channel, |
|
|
uint16_t | threshold ) |
◆ EPS_log_pdu_json()
Logs the PDU housekeeping data in JSON format.
- Parameters
-
[in] | EPS_pdu_housekeeping_data_eng | PDU housekeeping data to be logged |
- Note
- This function will log the PDU housekeeping data in JSON format to the error log.
If the conversion to JSON fails, it will log an error with the error status.
Otherwise, it will log the JSON string to the error log.
◆ EPS_monitor_and_disable_overcurrent_channels()
uint8_t EPS_monitor_and_disable_overcurrent_channels |
( |
| ) |
|
Monitors the power consumption of each channel and logs the data in JSON format.
This function will obtain the PDU housekeeping data and log the data in JSON format. If this is the first time the function is called, it will save the data for future comparisons. It will then check if the power consumption has increased or decreased by more than a certain threshold. If it has, it will disable the channel and log an error message. The function will log an error message if the channel is disabled due to a power issue.
- Returns
- 0 if the function was successful, 1 if there was an error.
◆ EPS_current_mA_threshhold
uint16_t EPS_current_mA_threshhold[32] |
|
extern |