/*
 * exo_ahw_vdp_linux_thruster.h
 *
 * @brief This file contains vendor driver porting function prototype of hot swap controller
 *
 * @copyright Copyright 2024 Antaris, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef DRIVERS_EXO_HAL_DRIVER_FW_EXO_AHW_AL_DRIVER_API_EXO_AHW_AL_WRAPPER_EXO_TAIL_INC_EXO_AHW_VDP_EXO_TRAIL_THRUSTER_H_
#define DRIVERS_EXO_HAL_DRIVER_FW_EXO_AHW_AL_DRIVER_API_EXO_AHW_AL_WRAPPER_EXO_TAIL_INC_EXO_AHW_VDP_EXO_TRAIL_THRUSTER_H_

#include <stdlib.h>
#include "exo_hal_common.h"
#include "exo_ahw_al_thruster_common.h"

hal_ret_sts ahw_vdp_linux_thruster_init();

/**
 * @brief API to get thruster mode
 * @param[in] thruster_id       : ID for thruster instance.
 * @param[in] get_mde           : thruster get mode parameter.
 * @retval hal_ret_sts          : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_operating_mode(uint8_t thruster_id, uint8_t* get_mde);

/**
 * @brief API to set thruster mode
 * @param[in] thruster_id       : ID for thruster instance.
 * @param[in] set_mde           : thruster set mode parameter.
 * @retval hal_ret_sts          : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_set_operating_mode(uint8_t thruster_id, uint8_t set_mde);

/**
 * @brief API to set thruster firing duration
 * @param[in] thruster_id       : ID for thruster instance.
 * @param[in] thr_st_firng_dur  : thruster set firing duration.
 * @retval hal_ret_sts          : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_set_firing_duration(uint8_t thruster_id, uint32_t thr_st_firng_dur);

/**
 * @brief API to get thruster firing duration
 * @param[in] thruster_id       : ID for thruster instance.
 * @param[in] thr_gt_firng_dur  : thruster get firing duration.
 * @retval hal_ret_sts          : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_firing_duration(uint8_t thruster_id, uint32_t* thr_gt_firng_dur);
/**
 * @brief API to get thruster onboard temperature
 * @param[in] thruster_id       : ID for thruster instance.
 * @param[in] get_onbrd_temp    : thruster get onboard temperature.
 * @retval hal_ret_sts          : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_on_board_temperature(uint8_t thruster_id, float* get_onbrd_temp);
/**
 * @brief API to set thruster radiator high temp threshold
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] thr_set_rad_lw_temp: thruster set radiator high temp threshold.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_set_radiator_low_temp_threshold(uint8_t thruster_id, float thr_set_rad_lw_temp);
/**
 * @brief API to get thruster radiator low temp threshold
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] thr_get_rad_lw_temp: thruster get radiator low temp threshold.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_radiator_low_temp_threshold(uint8_t thruster_id, float* thr_get_rad_lw_temp);
/**
 * @brief API to set thruster radiator high temp threshold
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] thr_set_rad_lw_temp: thruster set radiator high temp threshold.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_set_radiator_high_temp_threshold(uint8_t thruster_id, float thr_set_rad_hg_temp);
/**
 * @brief API to set thruster radiator high temp threshold
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] thr_set_rad_lw_temp: thruster set radiator high temp threshold.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_radiator_high_temp_threshold(uint8_t thruster_id, float* thr_get_rad_hg_temp);
/**
 * @brief API to get thruster remaining propellent level
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] get_rmg_prplnt_lvl : thruster get remaining propellent level.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_remaining_propellant_level(uint8_t thruster_id, float* get_rmg_prplnt_lvl);
/**
 * @brief API to get thruster input power voltage consmp
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] thr_voltage        : get thruster input power voltage consmp.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_input_power_voltage_consmp(uint8_t thruster_id, float* get_voltage);
/**
 * @brief API to get thruster input power current consmp
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] thr_current        : get thruster input power current consmp.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_input_power_current_consmp(uint8_t thruster_id, float* get_current);
/**
 * @brief API to set minimum tank pressure limit
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] set_min_tnk_prs    : set thruster min tank pressure limit.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_set_min_tank_pressure_limit(uint8_t thruster_id, float set_min_tnk_prs);
/**
 * @brief API to get minimum tank pressure limit
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] get_min_tnk_prs    : get thruster min tank pressure limit.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_min_tank_pressure_limit(uint8_t thruster_id, float* get_min_tnk_prs);
/**
 * @brief API to set maximum tank pressure limit
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] set_max_tnk_prs    : set thruster max tank pressure limit.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_set_max_tank_pressure_limit(uint8_t thruster_id, float set_max_tnk_prs);
/**
 * @brief API to get maximum tank pressure limit
 * @param[in] thruster_id        : ID for thruster instance.
 * @param[in] set_min_tnk_prs    : get thruster max tank pressure limit.
 * @retval hal_ret_sts           : returns the success or error code
 */
hal_ret_sts ahw_vdp_linux_thruster_get_max_tank_pressure_limit(uint8_t thruster_id, float* get_max_tnk_prs);

//hal_ret_sts ahw_vdp_thruster_get_active_status(uint8_t thruster_id, uint8_t* get_act_sts);

/* API MAPPING */
#define ahw_al_thruster_common_init                                      ahw_vdp_linux_thruster_init
#define ahw_al_thruster_common_get_operating_mode                        ahw_vdp_linux_thruster_get_operating_mode
#define ahw_al_thruster_common_set_operating_mode                        ahw_vdp_linux_thruster_set_operating_mode
#define ahw_al_thruster_common_set_firing_duration                       ahw_vdp_linux_thruster_set_firing_duration
#define ahw_al_thruster_common_get_firing_duration                       ahw_vdp_linux_thruster_get_firing_duration
#define ahw_al_thruster_common_get_on_board_temperature                  ahw_vdp_linux_thruster_get_on_board_temperature
#define ahw_al_thruster_common_set_radiator_low_temp_threshold           ahw_vdp_linux_thruster_set_radiator_low_temp_threshold
#define ahw_al_thruster_common_set_radiator_high_temp_threshold          ahw_vdp_linux_thruster_set_radiator_high_temp_threshold
#define ahw_al_thruster_common_get_radiator_low_temp_threshold           ahw_vdp_linux_thruster_get_radiator_low_temp_threshold
#define ahw_al_thruster_common_get_radiator_high_temp_threshold          ahw_vdp_linux_thruster_get_radiator_high_temp_threshold
#define ahw_al_thruster_common_get_remaining_propellant_level            ahw_vdp_linux_thruster_get_remaining_propellant_level
#define ahw_al_thruster_common_get_input_power_voltage_consmp            ahw_vdp_linux_thruster_get_input_power_voltage_consmp
#define ahw_al_thruster_common_get_input_power_current_consmp            ahw_vdp_linux_thruster_get_input_power_current_consmp
#define ahw_al_thruster_common_set_min_tank_pressure_limit               ahw_vdp_linux_thruster_set_min_tank_pressure_limit
#define ahw_al_thruster_common_set_max_tank_pressure_limit               ahw_vdp_linux_thruster_set_max_tank_pressure_limit
#define ahw_al_thruster_common_get_min_tank_pressure_limit               ahw_vdp_linux_thruster_get_min_tank_pressure_limit
#define ahw_al_thruster_common_get_max_tank_pressure_limit               ahw_vdp_linux_thruster_get_max_tank_pressure_limit


#endif /* DRIVERS_EXO_HAL_DRIVER_FW_EXO_AHW_AL_DRIVER_API_EXO_AHW_AL_WRAPPER_EXO_TAIL_INC_EXO_AHW_VDP_EXO_TRAIL_THRUSTER_H_ */
































