/*
 * @file exo_ahw_al_multifeep_thruster_wrapper.c
 *
 * @brief This file has mapping functions which resolves the
 * instance Id and invokes the vendor driver API for thruster based on the partnumber
 *
 * @copyright Copyright 2023 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.
 */

#include "exo_ahw_vdp_multifeep_thruster.h"
#include "exo_ahw_al_multifeep_thruster_wrapper.h"


/*!
 *  @brief Mapping API to initializes the control block memory and do the basic configurations
 *
 */
hal_ret_sts ahw_al_common_thruster_init(ahw_al_thruster_hdle *al_thruster)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_init(al_thruster);
		break;

	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

#ifndef LINUX_TEMP_PORT
/*!
 *  @brief Mapping API is used to set the force in (micro Newton)
 */
hal_ret_sts ahw_al_common_thruster_unit_set_frc(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,float force)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_unit_set_frc(al_thruster,system_id,force);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to reset the system
 */
hal_ret_sts ahw_al_common_thruster_reset(ahw_al_thruster_hdle *al_thruster)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_reset(al_thruster);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to boot to boot the system
 */
hal_ret_sts ahw_al_common_thruster_boot(ahw_al_thruster_hdle *al_thruster)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_boot(al_thruster);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to set to on or off state
 */
hal_ret_sts ahw_al_common_thruster_unit_set_pwr_on_off(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t on_off)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_unit_set_pwr_on_off(al_thruster,system_id,on_off);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to set the mode of thruster
 */
hal_ret_sts ahw_al_common_thruster_unit_set_mode(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t mode)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_unit_set_mode(al_thruster,system_id,mode);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to set the mode of system
 */
hal_ret_sts ahw_al_common_thruster_set_mode(ahw_al_thruster_hdle *al_thruster,uint8_t system_id)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_set_mode(al_thruster,system_id);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the mode of the system
 */
hal_ret_sts ahw_al_common_thruster_get_mode(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *mode)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_mode(al_thruster,system_id,mode);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the mode of thruster
 */
hal_ret_sts ahw_al_common_thruster_unit_get_mode(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *mode)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_unit_get_mode(al_thruster,system_id,mode);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the status of the system
 */
hal_ret_sts ahw_al_common_thruster_get_sys_sts(ahw_al_thruster_hdle *al_thruster, uint8_t system_id,al_thruster_sts *info)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_sys_sts(al_thruster,system_id,info);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the serial number of the system
 */
hal_ret_sts ahw_al_common_thruster_get_sys_srl_num(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *srl_num)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_sys_srl_num(al_thruster,system_id,srl_num);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the housekeeping1 data
 */
hal_ret_sts ahw_al_common_thruster_get_housekeeping1_data(ahw_al_thruster_hdle *al_thruster,al_thruster_housekeeping1 *info)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_housekeeping1_data(al_thruster,info);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the housekeeping2 data
 */
hal_ret_sts ahw_al_common_thruster_get_housekeeping2_data(ahw_al_thruster_hdle *al_thruster,al_thruster_housekeeping2 *info,uint8_t system_id)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_housekeeping2_data(al_thruster,info,system_id);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the housekeeping3 data
 */
hal_ret_sts ahw_al_common_thruster_get_housekeeping3_data(ahw_al_thruster_hdle *al_thruster,uint8_t *housekeeping3)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_housekeeping3_data(al_thruster,housekeeping3);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the power status of the system
 */
hal_ret_sts ahw_al_common_thruster_unit_get_pwr_on_off(ahw_al_thruster_hdle *al_thruster,uint8_t *on_off,uint8_t system_id)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_unit_get_pwr_on_off(al_thruster,on_off,system_id);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the force in (micro Newton)
 */
hal_ret_sts ahw_al_common_thruster_unit_get_frc(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *frc)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_unit_get_frc(al_thruster,system_id,frc);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the master time from housekeeping1 data
 */
hal_ret_sts ahw_al_common_thruster_get_mst_time(ahw_al_thruster_hdle *al_thruster,uint32_t *mst_tm)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_mst_time(al_thruster,mst_tm);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the backplane temperature
 */
hal_ret_sts ahw_al_common_thruster_get_bckplane_temp(ahw_al_thruster_hdle *al_thruster,uint8_t* bckpln_temp)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_bckplane_temp(al_thruster,bckpln_temp);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the total force of thruster
 */
hal_ret_sts ahw_al_common_thruster_get_bckplane_tot_frc(ahw_al_thruster_hdle *al_thruster,uint16_t* bckpln_frc)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_bckplane_tot_frc(al_thruster,bckpln_frc);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the total azimuthal angle
 */
hal_ret_sts ahw_al_common_thruster_get_tot_azimth_ang(ahw_al_thruster_hdle *al_thruster,uint16_t* tot_azmth)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_tot_azimth_ang(al_thruster,tot_azmth);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the total polar angle
 */
hal_ret_sts ahw_al_common_thruster_get_tot_polar_ang(ahw_al_thruster_hdle *al_thruster,uint8_t *tot_plr)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_tot_polar_ang(al_thruster,tot_plr);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the total power consumption
 */
hal_ret_sts ahw_al_common_thruster_get_tot_pwr_cnsp(ahw_al_thruster_hdle *al_thruster,uint16_t *pwr_cnsp)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_tot_pwr_cnsp(al_thruster,pwr_cnsp);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get unregulated voltage
 */
hal_ret_sts ahw_al_common_thruster_get_unreg_vol(ahw_al_thruster_hdle *al_thruster,uint8_t *unreg_vol)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_unreg_vol(al_thruster,unreg_vol);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the remaining propellant
 */
hal_ret_sts ahw_al_common_thruster_get_remn_prplt(ahw_al_thruster_hdle *al_thruster,uint16_t *prplt)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_remn_prplt(al_thruster,prplt);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the polar angle of the system
 */
hal_ret_sts ahw_al_common_thruster_get_unit_polar_ang(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *polar)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_unit_polar_ang(al_thruster,system_id,polar);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the azimuthal angle of the system
 */
hal_ret_sts ahw_al_common_thruster_get_unit_azimth_ang(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *azimuthal)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_unit_azimth_ang(al_thruster,system_id,azimuthal);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the power-consumption of the system
 */
hal_ret_sts ahw_al_common_thruster_get_unit_pwr(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *power)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_unit_pwr(al_thruster,system_id,power);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the reset status
 */
hal_ret_sts ahw_al_common_thruster_get_rst_sts(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *rst_sts)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_rst_sts(al_thruster,system_id,rst_sts);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the total power
 */
hal_ret_sts ahw_al_common_thruster_get_tot_pwr(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *pwr)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_tot_pwr(al_thruster,system_id,pwr);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the unregulated Voltage
 */
hal_ret_sts ahw_al_common_thruster_get_unreg_volt(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *unreg_vol)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_unreg_volt(al_thruster,system_id,unreg_vol);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the ON status of the device
 */
hal_ret_sts ahw_al_common_thruster_get_dev_on_sts(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *dev_sts)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_dev_on_sts(al_thruster,system_id,dev_sts);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the reset status
 */
hal_ret_sts ahw_al_common_thruster_get_unit_rst_sts(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *rst_sts)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_unit_rst_sts(al_thruster,system_id,rst_sts);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the board temperature
 */
hal_ret_sts ahw_al_common_thruster_get_brd_temp(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *temp)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_brd_temp(al_thruster,system_id,temp);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the remaining propellant
 */
hal_ret_sts ahw_al_common_thruster_get_unit_prplt(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *prplt)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_unit_prplt(al_thruster,system_id,prplt);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the unregulated voltage
 */
hal_ret_sts ahw_al_common_thruster_get_ureg_volt(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *unreg_vol)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_ureg_volt(al_thruster,system_id,unreg_vol);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the calibration values
 */
hal_ret_sts ahw_al_common_thruster_get_calib(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint32_t *calib)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_calib(al_thruster,system_id,calib);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the heater error code
 */
hal_ret_sts ahw_al_common_thruster_get_heat_err_code(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *err_cde)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_heat_err_code(al_thruster,system_id,err_cde);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the duty cycle of the heater
 */
hal_ret_sts ahw_al_common_thruster_get_heat_duty_cycle(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *duty_cycle)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_heat_duty_cycle(al_thruster,system_id,duty_cycle);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the temperature of heater
 */
hal_ret_sts ahw_al_common_thruster_get_heat_temp(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,int8_t *temp)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_heat_temp(al_thruster,system_id,temp);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the target temperature of heater
 */
hal_ret_sts ahw_al_common_thuster_get_heat_trgt_temp(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,int8_t *trgt_temp)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_heat_trgt_temp(al_thruster,system_id,trgt_temp);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the emitter voltage
 */
hal_ret_sts ahw_al_common_thruster_get_emit_volt(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *emt_vol)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_emit_volt(al_thruster,system_id,emt_vol);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the emitter current
 */
hal_ret_sts ahw_al_common_thruster_get_emit_cur(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *emt_cur)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_emit_cur(al_thruster,system_id,emt_cur);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the emitter input current
 */
hal_ret_sts ahw_al_common_thruster_get_emit_inp_cur(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *emt_ip_cur)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_emit_inp_cur(al_thruster,system_id,emt_ip_cur);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the extractor voltage
 */
hal_ret_sts ahw_al_common_thruster_get_ext_volt(ahw_al_thruster_hdle *al_thruster,uint8_t ext_id,uint8_t system_id,uint16_t *ext_vol)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_ext_volt(al_thruster,ext_id,system_id,ext_vol);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the extractor current
 */
hal_ret_sts ahw_al_common_thruster_get_ext_cur(ahw_al_thruster_hdle *al_thruster,uint8_t ext_id,uint8_t system_id,uint16_t *ext_cur)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_ext_cur(al_thruster,ext_id,system_id,ext_cur);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the extractor input current
 */
hal_ret_sts ahw_al_common_thruster_get_ext_inp_cur(ahw_al_thruster_hdle *al_thruster,uint8_t ext_id,uint8_t system_id,uint16_t *ext_ip_cur)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_ext_inp_cur(al_thruster,ext_id,system_id,ext_ip_cur);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the  neutralizer voltage
 */
hal_ret_sts ahw_al_common_thruster_get_neutlr_volt(ahw_al_thruster_hdle *al_thruster,uint8_t neut_id,uint8_t system_id,uint16_t *neut_vol)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_neutlr_volt(al_thruster,neut_id,system_id,neut_vol);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the neutralizer current
 */
hal_ret_sts ahw_al_common_thruster_get_neutlr_cur(ahw_al_thruster_hdle *al_thruster,uint8_t neut_id,uint8_t system_id,uint16_t *neut_cur)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_neutlr_cur(al_thruster,neut_id,system_id,neut_cur);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the neutralizer input current
 */
hal_ret_sts ahw_al_common_thruster_get_neutlr_inp_cur(ahw_al_thruster_hdle *al_thruster,uint8_t neut_id,uint8_t system_id,uint16_t *neut_ip_cur)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_neutlr_inp_cur(al_thruster,neut_id,system_id,neut_ip_cur);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the neutralizer return current
 */
hal_ret_sts ahw_al_common_thruster_get_neutlr_retn_cur(ahw_al_thruster_hdle *al_thruster,uint8_t neut_id,uint8_t system_id,uint16_t *neut_ret_cur)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_neutlr_retn_cur(al_thruster,neut_id,system_id,neut_ret_cur);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the major version number
 */
hal_ret_sts ahw_al_common_thruster_get_mjr_vers_no(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *mjr_vers_no)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_mjr_vers_no(al_thruster,system_id,mjr_vers_no);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the minor version number
 */
hal_ret_sts ahw_al_common_thruster_get_mnr_vers_no(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *mnr_vers_no)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_mnr_vers_no(al_thruster,system_id,mnr_vers_no);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the patch version number
 */
hal_ret_sts ahw_al_common_thruster_get_patch_vers_no(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint16_t *ptch_vers_no)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_patch_vers_no(al_thruster,system_id,ptch_vers_no);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the board error code
 */
hal_ret_sts ahw_al_common_thruster_get_brd_err_cde(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *err_cde)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_brd_err_cde(al_thruster,system_id,err_cde);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the error counter
 */
hal_ret_sts ahw_al_common_thruster_get_err_count(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint8_t *err_count)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_err_count(al_thruster,system_id,err_count);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}

/*!
 *  @brief Mapping API is used to get the start time
 */
hal_ret_sts ahw_al_common_thruster_get_strt_time(ahw_al_thruster_hdle *al_thruster,uint8_t system_id,uint32_t *strt_time)
{
	hal_ret_sts sts;
	switch(al_thruster->ahw_gen_info.ahw_inst_id)
	{
	case THRUSTER_MORPHEUS_OBC:
		sts = ahw_vdp_thruster_get_strt_time(al_thruster,system_id,strt_time);
		break;
	default:
		sts = HAL_AH_INVLD_INST_ID;
	}
	return sts;
}
#endif
