/**
 * @file adcs_vapi.h
 *
 * @brief This file contains vendor abstraction functions, structures, enum
 *
 * @copyright Copyright 2023 Antaris, Inc.
 */

#ifndef ADCS_VAPI_H_
#define ADCS_VAPI_H_

#include "exo_types.h"
#include "stdint.h"
#include "adcs_va.h"

#ifdef __cplusplus
extern "C" {
#endif

/// Rest Cause enumeration
typedef enum
{
    ADCS_RESET_CAUSE_POR = 0,       ///< Power on reset
    ADCS_RESET_CAUSE_BOR = 1,       ///< Brownout reset
    ADCS_RESET_CAUSE_WDG = 2        ///< Watchdog reset
}e_adcs_reset_cause;

/// Boot cause enumeration
typedef enum
{
    ADCS_BOOTCAUSE_UNEXPECTED = 0,  ///< Unexpected
    ADCS_BOOTCAUSE_NORMAL = 1,      ///< Normal
    ADCS_BOOTCAUSE_ERROR = 2        ///< Error
}e_adcs_boot_cause;

/// Magnetometer mode value enumeration
typedef enum
{
    ADCS_MAGMTR_MODE_1 = 0,         ///< Magnetometer mode 1
    ADCS_MAGMTR_MODE_2 = 1,         ///< Magnetometer mode 2
    ADCS_MAGMTR_MODE_3 = 2          ///< Magnetometer mode 3
}e_adcs_magmtr_mode_val;

/// GPS type enumeration
typedef enum
{
    ADCS_GPS_SELECT_NONE = 0        ///< GPS type none
}e_adcs_gps_type;

/// Star Tracker mode enumeration
typedef enum 
{
    ADCS_STAR_MODE_TRACKING = 0,    ///< Tracking Mode
    ADCS_STAR_MODE_LOST = 1         ///< Lost
}e_adcs_star_mode;

/// Capture result enumeration
typedef enum
{
    ADCS_CAPTURE_STARTUP = 0,       ///< Capture Startup
    ADCS_CAPTURE_PENDING = 1,       ///< Capture Pending
    ADCS_CAPTURE_SUCCESS = 2,       ///< Capture Success
    ADCS_CAPTURE_SUCCESS_HIFT = 3,  ///< Capture Success HIFT
    ADCS_CAPTURE_TIMEOUT = 4,       ///< Capture Time out
    ADCS_CAPTURE_SRAM_ERR = 5       ///< Capture SRAM error
}e_adcs_capture_result;

/// Detect result enumeration
typedef enum
{
    ADCS_DETECT_STRATUP = 0,        ///< Detect Startup
    ADCS_DETECT_NO_DETECT = 1,      ///< No Detect
    ADCS_DETECT_PENDING = 2,        ///< Detect Pending
    ADCS_DETECT_TOO_MANY_EDGES = 3, ///< Detect too many edges
    ADCS_DETECT_TOO_FEW_EDGES = 4,  ///< Detect too few edges
    ADCS_DETECT_BAD_FIT = 5,        ///< Detect bad fit
    ADCS_DETECT_SUN_NOT_FOUND = 6,  ///< Detect sun not found
    ADCS_DETECT_SUCCESS = 7         ///< Detect success
}e_adcs_detect_result;

/// GPS solution status enumeration
typedef enum
{
    ADCS_GPS_SOL_COMPUTED = 0,          ///< GPS solution computed
    ADCS_GPS_SOL_INSUFFICIENT_OBS = 1,  ///< GPS solution insufficient
    ADCS_GPS_SOL_NO_CONVERGENCE = 2,    ///< GPS solution no convergence
    ADCS_GPS_SOL_SINGULARITY = 3,       ///< GPS solution singularity
    ADCS_GPS_SOL_COVTRACE = 4,          ///< GPS solution covtrace
    ADCS_GPS_SOL_COLD_START = 5,        ///< GPS solution cold start
    ADCS_GPS_SOL_VH_LIMIT = 6,          ///< GPS solution VH limit
    ADCS_GPS_SOL_VARIANCE = 7,          ///< GPS solution variance
    ADCS_GPS_SOL_INTEGRITY_WARNING = 8, ///< GPS solution integrity warning
    ADCS_GPS_SOL_PENDING = 9,           ///< GPS solution pending
    ADCS_GPS_SOL_INVALID_FIX = 10,      ///< GPS solution invalid fix
    ADCS_GPS_SOL_UNAUTHORIZED = 11      ///< GPS solution unauthorized
}e_adcs_gps_sol_sts;

/// AxisSelect enumeration
typedef enum
{
    ADCS_AXIS_SELECT_POSX = 0,          ///< Positive X
    ADCS_AXIS_SELECT_NEGX = 1,          ///< Negative X
    ADCS_AXIS_SELECT_POSY = 2,          ///< Positive Y
    ADCS_AXIS_SELECT_NEGY = 3,          ///< Negative Y
    ADCS_AXIS_SELECT_POSZ = 4,          ///< Positive Z
    ADCS_AXIS_SELECT_NEGZ = 5,          ///< Negative Z
    ADCS_AXIS_SELECT_NOTUSED = 6,       ///< Not Used
    ADCS_AXIS_SELECT_POSXPOSY45DEG = 7  ///< Positive X/Y 45 degree
}e_adcs_axis_select;

/// Estimation mode enumeration
typedef enum
{
    ADCS_EST_NONE = 0,                  ///< Estimation mode none
    ADCS_EST_MEMS_RATE = 1,             ///< Estimation mode MEMS rate
    ADCS_EST_GYRO_EKF = 2               ///< Estimation mode Gyro EKF
}e_adcs_est_mode;

/// ADCS State
typedef enum
{
    ADCS_STATE_NONE = 0                 ///< ADCS none state
}e_adcs_state;

/// Attitude control mode enumeration
typedef enum
{
    ADCS_CTRL_MODE_NONE = 0,                    ///< No control mode
    ADCS_CTRL_MODE_DETUMBLING = 1,              ///< Detumbling control mode
    ADCS_CTRL_MODE_Y_SPIN_STABILIZATION = 2,    ///< Y Spin Stabilization
    ADCS_CTRL_MODE_Z_SPIN_STABILIZATION = 3,    ///< Z Spin Stabilization
    ADCS_CTRL_MODE_THREE_AXIS = 4,              ///< 3axis stabilization
    ADCS_CTRL_MODE_SUN_POINTING = 5,            ///< Sun pointing
    ADCS_CTRL_MODE_NADIR_POINTING = 6,          ///< Nadir pointing
    ADCS_CTRL_MODE_TARGET_TRACKING = 7,         ///< Target tracking
    ADCS_CTRL_MODE_CUSTOM = 8                   ///< Custom control mode
}e_adcs_att_ctrl_mode;

/// ResetCause enumeration
typedef enum
{
    ADCS_RST_PWR_ON_RST = 0,    ///< Power On Reset
    ADCS_BRWNOUT_RST,           ///< Brown-Out Reset
    ADCS_EXT_RST,               ///< External Reset
    ADCS_WDG_RST,               ///< Watchdog Reset
    ADCS_SYS_REQ_RST,           ///< System Request Reset
    ADCS_RST_UNKNOWN            ///< Reset Cause unknown
}e_adcs_rest_cause;

/// Boot Programs List enumeration
typedef enum
{
    ADCS_PRG_LIST_RUN_INTRNL_FLASH_PRGRM = 1,///< Internal Flash Program
    ADCS_PRG_LIST_RUN_BOOTLOADER             ///< Bootloader
}e_adcs_boot_prg_lst;

/// Boot Status enumeration
typedef enum
{
    ADCS_BOOT_STS_NEW = 0,      ///< New Selection
    ADCS_BOOT_STS_SCS,          ///< Boot Success
    ADCS_BOOT_STS_TRY_1,        ///< Boot 1st attempt failed
    ADCS_BOOT_STS_TRY_2,        ///< Boot 2nd attempt failed
    ADCS_BOOT_STS_TRY_3         ///< Boot 3rd attempt failed
}e_adcs_boot_sts;

/// Tc Error Reason enumeration
typedef enum
{
    ADCS_NO_ERROR = 0,          ///< No error
    ADCS_INVLD_TC_ID_ERR,       ///< Invalid telecommand ID
    ADCS_INCRT_LEN_ERR,         ///< Incorrect TC parameter length
    ADCS_INCRT_PARAMS,          ///< Incorrect TC parameter value
    ADCS_CRC_ERR                ///< CRC check failed
}e_adcs_tc_error_reason;

/// Jpg Convert Result enumeration
typedef enum
{
    ADCS_JPG_NO_CONEVRSION = 0,     ///< Nothing Converted Yet
    ADCS_JPG_CONVERT_OK,            ///< Success
    ADCS_JPG_FILE_LOAD_ERR,         ///< File Load Error
    ADCS_JPG_BUSY_CONVERTING        ///< Busy
}e_adcs_jpg_cnvrt_rslt;

/// Execution Way points enumeration
typedef enum
{
    ADCS_EXC_POINT_INIT = 0,        ///< Busy with initialization
    ADCS_EXC_POINT_IDLE,            ///< Idle
    ADCS_EXC_POINT_SENSOR_ACTUATOR_COMMS,  ///< Sensor/Actuator Communications
    ADCS_EXC_POINT_UPDATE,          ///< ADCS Estimation & Control Update
    ADCS_EXC_POINT_PWR_SET,         ///< Perhipheral Power commands (over I2C)
    ADCS_EXC_POINT_CPU_TEMP,        ///< CPU Temperature Sampling
    ADCS_EXC_POINT_IMG_DOWNLOAD,    ///< Image Download
    ADCS_EXC_POINT_IMG_CMPRSSION,   ///< Image Compression
    ADCS_EXC_POINT_IMG_SAVE_SD,     ///< Saving Image to SD Card
    ADCS_EXC_POINT_LOG,             ///< Logging
    ADCS_EXC_POINT_LOG_CMPRSSION,   ///< Log File Compression
    ADCS_EXC_POINT_LOG_SAVE_SD,     ///< Saving Log to SD Card
    ADCS_EXC_POINT_WRITE_FLASH      ///< Writing to flash memory
}e_adcs_exc_point;

/// Image Save Status enumeration
typedef enum
{
    ADCS_IMG_SAVE_STS_NO_ERR = 0,   ///< No Error
    ADCS_IMG_SAVE_STS_CAM_TIMEOUT,  ///< Timeout waiting for sensor to become
                                    ///< available
    ADCS_IMG_SAVE_STS_DWNLD_TIMEOUT,///< Timeout waiting for next frame to
                                    ///< become ready
    ADCS_IMG_SAVE_STS_DWNLD_CRC,    ///< Checksum mismatch between downloaded
                                    ///< frame and unit frame
    ADCS_IMG_SAVE_STS_SD_CARD_ERR   ///< Error writing to SD card
}e_adcs_img_save_sts;

/// SdLogSelect enumeration
typedef enum
{
    ADCS_SEL_SD_LOG_PRI = 0, ///< Use Primary (on-board) SD card for log file
    ADCS_SEL_SD_LOG_SEC = 1, ///< Use Secondary SD card for log file
}e_adcs_sdlog_sel;

/// Boot ProgramsList enumeration
typedef enum
{
    ADCS_RUN_INTL_FLASH_PROGRAM = 1   ///< Run internal flash program
}e_adcs_bootind;


/// ProgramsList enumeration
typedef enum
{
    ADCS_PROG_LIST_BTLR = 0,     ///< Bootloader
    ADCS_PROG_LIST_INTL_FLASH = 1, ///< Internal Flash Program
    ADCS_PROG_LIST_EEPROM = 2, ///< EEPROM
    ADCS_PROG_LIST_EXTFLASH1 = 3, ///< External Flash Program 1
    ADCS_PROG_LIST_EXTFLASH2 = 4, ///< External Flash Program 2
    ADCS_PROG_LIST_EXTFLASH3 = 5, ///< External Flash Program 3
    ADCS_PROG_LIST_EXTFLASH4 = 6, ///< External Flash Program 4
    ADCS_PROG_LIST_EXTFLASH5 = 7, ///< External Flash Program 5
    ADCS_PROG_LIST_EXTFLASH6 = 8, ///< External Flash Program 6
    ADCS_PROG_LIST_EXTFLASH7 = 9, ///< External Flash Program 7
    ADCS_PROG_LIST_SDUSER1 = 10, ///< SD User file 1
    ADCS_PROG_LIST_SDUSER2 = 11, ///< SD User file 2
    ADCS_PROG_LIST_SDUSER3 = 12, ///< SD User file 3
    ADCS_PROG_LIST_SDUSER4 = 13, ///< SD User file 4
    ADCS_PROG_LIST_SDUSER5 = 14, ///< SD User file 5
    ADCS_PROG_LIST_SDUSER6 = 15, ///< SD User file 6
    ADCS_PROG_LIST_SDUSER7 = 16, ///< SD User file 7
    ADCS_PROG_LIST_SDUSER8 = 17 ///< SD User file 8
}e_adcs_progindex;

/// File Type Enumeration
typedef enum
{
    ADCS_TELEMETRY_LOG = 2,   ///< Telemetry Log File
    ADCS_JPG_IMAGE = 3,       ///< JPG Image File
    ADCS_BMP_IMAGE = 4,       ///< BMP Image File
    ADCS_INDEX = 15           ///< Index File
}e_adcs_filetype;

/// File Upload Destination enumeration
typedef enum
{
    ADCS_FILE_UPLD_DEST_ULEEPROM = 2,   ///< EEPROM
    ADCS_FILE_UPLD_DEST_ULFLASH1 = 3,   ///< Flash program 1
    ADCS_FILE_UPLD_DEST_ULFLASH2 = 4,   ///< Flash program 2
    ADCS_FILE_UPLD_DEST_ULFLASH3 = 5,   ///< Flash program 3
    ADCS_FILE_UPLD_DEST_ULFLASH4 = 6,   ///< Flash program 4
    ADCS_FILE_UPLD_DEST_ULFLASH5 = 7,   ///< Flash program 5
    ADCS_FILE_UPLD_DEST_ULFLASH6 = 8,   ///< Flash program 6
    ADCS_FILE_UPLD_DEST_ULFLASH7 = 9,   ///< Flash program 7
    ADCS_FILE_UPLD_DEST_ULSDUSER1 = 10, ///< SD User file 1
    ADCS_FILE_UPLD_DEST_ULSDUSER2 = 11, ///< SD User file 2
    ADCS_FILE_UPLD_DEST_ULSDUSER3 = 12, ///< SD User file 3
    ADCS_FILE_UPLD_DEST_ULSDUSER4 = 13, ///< SD User file 4
    ADCS_FILE_UPLD_DEST_ULSDUSER5 = 14, ///< SD User file 5
    ADCS_FILE_UPLD_DEST_ULSDUSER6 = 15, ///< SD User file 6
    ADCS_FILE_UPLD_DEST_ULSDUSER7 = 16, ///< SD User file 7
    ADCS_FILE_UPLD_DEST_ULSDUSER8 = 17  ///< SD User file 8
}e_adcs_file_upload_dest;

/// AdcsRunMode enumeration
typedef enum
{
    ADCS_RUN_M_OFF = 0,     ///< ADCS loop is inactive
    ADCS_RUN_M_ENABLED = 1, ///< ADCS 1Hz loop is active
    ADCS_RUN_M_TRIG = 2,    ///< ADCS will execute control
                            ///< loop only when triggered
    ADCS_RUN_M_SIMU = 3     ///< ADCS is in simulation mode
}e_adcs_run_mode;

/// ASGP4 Run mode enumeration
typedef enum
{
    ADCS_ASGP4_RUN_M_OFF = 0,      ///< ASGP4 is inactive
    ADCS_ASGP4_RUN_M_TRIG = 1,     ///< ASGP4 is active but waiting for
                                   ///< trigger TC
    ADCS_ASGP4_RUN_M_BACK_GRD = 2, ///< ASGP4 runs asynchronously with GPS data
    ///< received TLEs updated internal to asgp4 module but not used
    ADCS_ASGP4_RUN_M_AUGMENT = 3   ///< ASGP4 runs in background but when
    ///< processing of data is complete, TLEs used by orbit model
    ///< is updated with asgp4 estimated TLEs
}e_adcs_asgp4_run_mode;

/// cam select enumeration
typedef enum
{
    ADCS_CAM1 = 0,    ///< cam1 camera
    ADCS_CAM2 = 1,    ///< cam2 camera
    ADCS_STAR = 2     ///< star camera
}e_adcs_cam_sel;

/// Asgp4Error enumeration
typedef enum
{
    ADCS_ASGP4_NONE = 0,          ///< No error
    ADCS_ASGP4_UTC = 1,           ///< Error due to time
    ADCS_ASGP4_LARGE_POS_ERR = 2, ///< Error due to position error
                                  ///<  exceeding threshold
    ADCS_ASGP4_OVER_FLOW = 3      ///< Error overflow
}e_adcs_asgp4_error;

/// AsgpFilter enumeration
typedef enum
{
    ADCS_ASGP_FLTR_LPF = 0,     ///< Use LPF
    ADCS_ASGP_FLTR_AVRGE = 1,   ///< Use averaging filter
}e_adcs_asgpfilter;

/// Image size enumeration
typedef enum
{
    ADCS_SIZE0 = 0,    ///< 1024 x 1024 pixels
    ADCS_SIZE1 = 1,    ///< 512 x 512 pixels
    ADCS_SIZE2 = 2,    ///< 256 x 256 pixels
    ADCS_SIZE3 = 3,    ///< 128 x 128 pixels
    ADCS_SIZE4 = 4     ///< 64 x 64 pixels
}e_adcs_image_size;

/**
 * @brief Boot Program index structure
 */
typedef struct
{
    uint8_t boot_index; /*!< Boot Program List Ref:e_adcs_boot_prg_lst */
}s_adcs_boot_index;

/**
 * @brief This structure represent the ADCS context
 * will be updated in future
 */
typedef struct
{
    uint32_t magic;  /*!< Always equals to 0XAE */
}__attribute__ ((__packed__))s_adcs_ctx;

/**
 * @brief Power command structure power sorce can either be sensor or actuator.
 *        Supports upto 32 Power Sources. Each source will be internally mapped
 *        inside the Basilisk Tool
 */
typedef struct
{
    uint32_t pwr_source;            /*!< 1 - Power On/ 0 - Power Off Each Bit
                                        can be mapped to each source*/
}__attribute__ ((__packed__))s_adcs_pwr_cmd;

/**
 * @brief Reset command structure
 */
typedef struct
{
    uint8_t magic;           /*!< Identification byte which always 
                                equals to 0x5A */
}__attribute__ ((__packed__))s_adcs_reset;

/**
 * @brief Identification command
 */
typedef struct
{
    uint32_t id;             /*!< Identification element */
}__attribute__ ((__packed__))s_adcs_id;

/**
 * @brief TLE configuration structure
 */
typedef struct
{
    double inclination;        /*!< Inclination */
    double eccentricity;       /*!< Eccenticity */
    double raan;               /*!< Right-ascension of the Ascending Node */
    double arg_perigee;        /*!< Argument of Perigee */
    double b_star;             /*!< B-Star drag term */
    double mean_motion;        /*!< Mean Motion */
    double mean_anomaly;       /*!< Mean Anomaly */
    double epoch;              /*!< Epoch Time */
}__attribute__ ((__packed__))s_adcs_tle;

/**
 * @brief Moment of inertia matrix
 */
typedef struct
{
    float mom_iner_xx;        /*!< Moment Of Inertia - Ixx. (Unit [kg.m^2] 
                            valid range is between 0 kg.m^2 and 10 kg.m^2 */
    float mom_iner_yy;        /*!< Moment Of Inertia - Iyy. (Unit [kg.m^2] 
                            valid range is between 0 kg.m^2 and 10 kg.m^2 */
    float mom_iner_zz;        /*!< Moment Of Inertia - Izz. (Unit [kg.m^2] 
                            valid range is between 0 kg.m^2 and 10 kg.m^2 */
    float prod_iner_xy;       /*!< Product Of Inertia - Ixy. (Unit [kg.m^2] 
                            valid range is between -10 kg.m^2 and 10 kg.m^2) */
    float prod_iner_xz;       /*!< Product Of Inertia - Ixz. (Unit [kg.m^2]) 
                            valid range is between -10 kg.m^2 and 10 kg.m^2) */
    float prod_iner_yz;       /*!< Product Of Inertia - Iyz. (Unit [kg.m^2]) 
                            valid range is between -10 kg.m^2 and 10 kg.m^2) */
}__attribute__ ((__packed__))s_adcs_moi;

/**
 * @brief Current Unix Time
 */
typedef struct
{
    uint32_t utc_time;           /*!< Time in s since 01/01/1970,00:00.
                                    (Unit [s]) */
    uint16_t milli_sec;          /*!< Current millisecond count. (Unit [ms]) */
}__attribute__ ((__packed__))s_adcs_time;

/**
 * @brief Magnetometer configuration
 */
typedef struct
{
    double angle_1;            /*!< Magnetometer Mounting Transform Alpha Angle
                                (Uint [deg]) */
    double angle_2;            /*!< Magnetometer Mounting Transform Beta Angle
                                (Uint [deg]) */
    double angle_3;            /*!< Magnetometer Mounting Transform Gamma Angle
                                (Uint [deg]) */
    double offset_1;           /*!< Magnetometer Channel 1 Offset */
    double offset_2;           /*!< Magnetometer Channel 2 Offset */
    double offset_3;           /*!< Magnetometer Channel 3 Offset */
    double sens_11;            /*!< Magnetometer Sensitivity Matrix S11 */
    double sens_12;            /*!< Magnetometer Sensitivity Matrix S12 */
    double sens_13;            /*!< Magnetometer Sensitivity Matrix S13 */
    double sens_21;            /*!< Magnetometer Sensitivity Matrix S21 */
    double sens_22;            /*!< Magnetometer Sensitivity Matrix S22 */
    double sens_23;            /*!< Magnetometer Sensitivity Matrix S23 */
    double sens_31;            /*!< Magnetometer Sensitivity Matrix S31 */
    double sens_32;            /*!< Magnetometer Sensitivity Matrix S32 */
    double sens_33;            /*!< Magnetometer Sensitivity Matrix S33 */
}__attribute__ ((__packed__))s_adcs_mgmtr_cfg;

/**
 * @brief Raw Magnetometer
 */
typedef struct
{
    int16_t mag_raw_x;          /*!< Raw magnetometer X measurement */
    int16_t mag_raw_y;          /*!< Raw magnetometer Y measurement */
    int16_t mag_raw_z;          /*!< Raw magnetometer Z measurement */
}__attribute__ ((__packed__))s_adcs_raw_mgmtr;

/**
 * @brief Deploy magnetometer boom
 */
typedef struct
{
    uint8_t time_out;   /*!< Deployment actuation timeout value.(Unit [s]) */
}__attribute__ ((__packed__))s_adcs_mgmtr_boom;

/**
 * @brief CSS pointing direction and scale factor
 */
typedef struct
{
    uint8_t css_conf;                   /*!< CSS Axis configuration */
    double css_scale;                   /*!< CSS Relative Scaling Factor */
    uint8_t css_min;                    /*!< CSS Minimum Threshold */
}__attribute__ ((__packed__))s_adcs_css_cfg;

/**
 * @brief FSS configuration structure
 */
typedef struct
{
    double angle_1;                 /*!< FSS Sensor Mounting Transform Alpha
                                         Angle  (measurment unit is [deg]) */
    double angle_2;                 /*!< FSS Sensor Mounting Transform Beta
                                         Angle  (measurment unit is [deg]) */
    double angle_3;                 /*!< FSS Sensor Mounting Transform Gamma
                                         Angle  (measurment unit is [deg]) */
    uint8_t threshold;              /*!< FSS detection threshold  */
    uint8_t auto_adj;               /*!< 0 = disabled and 1 = enabled */
    uint16_t exposure;              /*!< exposure time register value */
    double bore_x;                  /*!< X Pixel location of FSS boresight
                                         (measurment unit is [pixels]) */
    double bore_y;                  /*!< Y Pixel location of FSS boresight
                                         (measurment unit is [pixels]) */
    uint16_t mask_area_1_x_min;     /*!< FSS Minimum X of Area 1 */
    uint16_t mask_area_1_x_max;     /*!< FSS Maximum X of Area 1 */
    uint16_t mask_area_1_y_min;     /*!< FSS Minimum Y of Area 1 */
    uint16_t mask_area_1_y_max;     /*!< FSS Maximum Y of Area 1 */
    uint16_t mask_area_2_x_min;     /*!< FSS Minimum X of Area 2 */
    uint16_t mask_area_2_x_max;     /*!< FSS Maximum X of Area 2 */
    uint16_t mask_area_2_y_min;     /*!< FSS Minimum Y of Area 2 */
    uint16_t mask_area_2_y_max;     /*!< FSS Maximum Y of Area 2 */
    uint16_t mask_area_3_x_min;     /*!< FSS Minimum X of Area 3 */
    uint16_t mask_area_3_x_max;     /*!< FSS Maximum X of Area 3 */
    uint16_t mask_area_3_y_min;     /*!< FSS Minimum Y of Area 3 */
    uint16_t mask_area_3_y_max;     /*!< FSS Maximum Y of Area 3 */
    uint16_t mask_area_4_x_min;     /*!< FSS Minimum X of Area 4 */
    uint16_t mask_area_4_x_max;     /*!< FSS Maximum X of Area 4 */
    uint16_t mask_area_4_y_min;     /*!< FSS Minimum Y of Area 4 */
    uint16_t mask_area_4_y_max;     /*!< FSS Maximum Y of Area 4 */
    uint16_t mask_area_5_x_min;     /*!< FSS Minimum X of Area 5 */
    uint16_t mask_area_5_x_max;     /*!< FSS Maximum X of Area 5 */
    uint16_t mask_area_5_y_min;     /*!< FSS Minimum Y of Area 5 */
    uint16_t mask_area_5_y_max;     /*!< FSS Maximum Y of Area 5 */
}__attribute__ ((__packed__))s_adcs_fss_cfg;

/**
 * @brief Nadir sensor configuration
 */
typedef struct
{
    double angle_1;                 /*!< Nadir Sensor Mounting Transform Alpha
                                         Angle  (measurment unit is [deg]) */
    double angle_2;                 /*!< Nadir Sensor Mounting Transform Beta
                                         Angle  (measurment unit is [deg]) */
    double angle_3;                 /*!< Nadir Sensor Mounting Transform Gamma
                                         Angle  (measurment unit is [deg]) */
    uint8_t threshold;              /*!< Nadir detection threshold  */
    uint8_t auto_adj;               /*!< 0 = disabled and 1 = enabled */
    uint16_t exposure;              /*!< exposure time register value */
    double bore_x;                  /*!< X Pixel location of Nadir boresight
                                         (measurment unit is [pixels]) */
    double bore_y;                  /*!< Y Pixel location of Nadir boresight
                                         (measurment unit is [pixels]) */
    uint16_t mask_area_1_x_min;     /*!< Nadir Minimum X of Area 1 */
    uint16_t mask_area_1_x_max;     /*!< Nadir Maximum X of Area 1 */
    uint16_t mask_area_1_y_min;     /*!< Nadir Minimum Y of Area 1 */
    uint16_t mask_area_1_y_max;     /*!< Nadir Maximum Y of Area 1 */
    uint16_t mask_area_2_x_min;     /*!< Nadir Minimum X of Area 2 */
    uint16_t mask_area_2_x_max;     /*!< Nadir Maximum X of Area 2 */
    uint16_t mask_area_2_y_min;     /*!< Nadir Minimum Y of Area 2 */
    uint16_t mask_area_2_y_max;     /*!< Nadir Maximum Y of Area 2 */
    uint16_t mask_area_3_x_min;     /*!< Nadir Minimum X of Area 3 */
    uint16_t mask_area_3_x_max;     /*!< Nadir Maximum X of Area 3 */
    uint16_t mask_area_3_y_min;     /*!< Nadir Minimum Y of Area 3 */
    uint16_t mask_area_3_y_max;     /*!< Nadir Maximum Y of Area 3 */
    uint16_t mask_area_4_x_min;     /*!< Nadir Minimum X of Area 4 */
    uint16_t mask_area_4_x_max;     /*!< Nadir Maximum X of Area 4 */
    uint16_t mask_area_4_y_min;     /*!< Nadir Minimum Y of Area 4 */
    uint16_t mask_area_4_y_max;     /*!< Nadir Maximum Y of Area 4 */
    uint16_t mask_area_5_x_min;     /*!< Nadir Minimum X of Area 5 */
    uint16_t mask_area_5_x_max;     /*!< Nadir Maximum X of Area 5 */
    uint16_t mask_area_5_y_min;     /*!< Nadir Minimum Y of Area 5 */
    uint16_t mask_area_5_y_max;     /*!< Nadir Maximum Y of Area 5 */
    uint8_t max_deviation_pct;          /*!< Nadir Max Deviation Percentage */
    uint8_t max_bad_edges;              /*!< Nadir Max Bad Edges (>50 to 
                                        disable)*/
    uint8_t max_radius;                 /*!< Maximum Radius. (Unit [�]) */
    uint8_t min_radius;                 /*!< Minimum Radius. (Unit [�]) */
}__attribute__ ((__packed__))s_adcs_nadir_cfg;

/**
 * @brief Nadir sensor measurement
 */
typedef struct
{
    int16_t nadir_raw_x;                /*!< Nadir sensor raw X angle */
    int16_t nadir_raw_y;                /*!< Nadir sensor raw Y angle */
    uint8_t nadir_busy;                 /*!< Nadir sensor capture status */
    uint8_t nadir_result;               /*!< Nadir sensor detection result */
}__attribute__ ((__packed__))s_adcs_nadir_sens;

/**
 * @brief FSS measurement
 */
typedef struct
{
    int16_t fss_raw_x;                  /*!< FSS raw X angle */
    int16_t fss_raw_y;                  /*!< FSS raw Y angle */
    uint8_t fss_busy;                   /*!< FSS capture status */
    uint8_t fss_result;                 /*!< FSS detection result */
}__attribute__ ((__packed__))s_adcs_fss_sens;

/**
 * @brief Gyro configuration
 */
typedef struct
{
    uint8_t gyro_conf_1;                /*!< Gyro 1 axis configuration */
    uint8_t gyro_conf_2;                /*!< Gyro 2 axis configuration */
    uint8_t gyro_conf_3;                /*!< Gyro 3 axis configuration */
    double x_rate_offset;               /*!< X-Rate Sensor Offset */
    double y_rate_offset;               /*!< Y-Rate Sensor Offse */
    double z_rate_offset;               /*!< Z-Rate Sensor Offse */
    uint8_t rate_sensor_mult;           /*!< Multiplier of rate sensor 
                                            measurement */
}__attribute__ ((__packed__))s_adcs_gyro_cfg;

/**
 * @brief Star Tracker configuration
 */
typedef struct
{
    double angle_1;                     /*!< StarTracker Mounting Transform 
                                      Alpha Angle (measurment unit is [deg])*/
    double angle_2;                     /*!< StarTracker Mounting Transform 
                                      Beta Angle  (measurment unit is [deg])*/
    double angle_3;                     /*!< StarTracker Mounting Transform 
                                      Gamma Angle  (measurment unit is [deg])*/
    uint16_t exposure;                  /*!< StarTracker exposure time */
    uint16_t gain;                      /*!< StarTracker analog gain */
    uint8_t detection_threshold;        /*!< StarTracker detection threshold */
    uint8_t threshold;                  /*!< StarTracker star threshold */
    uint8_t max_star_matched;           /*!< Maximum Star Matched */
    uint16_t timeout_time;              /*!< Detection Timeout duration */
    uint8_t max_star_pixel;             /*!< Maximum Star Pixel */
    uint8_t min_star_pixel;             /*!< Minimum Star Pixel */
    double error_margin;                /*!< Star Tracker Error Margin 
                                            (measurment unit is [%])*/
    uint16_t delay_time;                /*!< Star Tracker Delay Time */
    float cent_x;                       /*!< Star Tracker Centroid X 
                                (valid range is between -5000  and 5000 )*/
    float cent_y;                       /*!< Star Tracker Centroid Y 
                                (valid range is between -5000  and 5000 )*/
    float focal;                        /*!< Star Tracker Focal Length 
                                (measurment unit is [mm]. valid range is 
                                between 5 mm and 7 mm)*/
    float lens_k1;                      /*!< K1 radial distortion coefficient 
                                (measurment unit is [gain]. valid range is 
                                between -1 gain and 1 gain)*/
    float lens_k2;                      /*!< K2 radial distortion coefficient 
                                (measurment unit is [gain]. valid range is 
                                between -1 gain and 1 gain)*/
    float lens_p1;                      /*!< P1 tangential distortion 
                                coefficient (measurment unit is [gain].
                                valid range is between -1 gain and 1 gain)*/
    float lens_p2;                      /*!< P2 tangential distortion 
                                coefficient (measurment unit is [gain].
                                valid range is between -1 gain and 1 gain)*/
    uint8_t window_width;               /*!< Star tracking window width */
    double tracking_margin;             /*!< Star Tracking Margin */
    double validation_margin;           /*!< Star Validation Margin */
    uint8_t module_enable;              /*!< Star Tracking Module Enable */
    uint8_t location_prediction_enable; /*!< Star Tracking Location Prediction 
                                        Enable */
    double search_width;                /*!< Star Tracking Search Width */
}__attribute__ ((__packed__))s_adcs_star_trkr_cfg;

/**
 * @brief Star Tracker magnitude of identified
 */
typedef struct
{
    uint16_t mag_star_1;             /*!< Instrument magnitude of star 1 */
    uint16_t mag_star_2;             /*!< Instrument magnitude of star 2 */
    uint16_t mag_star_3;             /*!< Instrument magnitude of star 3 */
}__attribute__ ((__packed__))s_adcs_star_trkr_mag;

/**
 * @brief Star Tracker performance
 */
typedef struct
{
    uint8_t num_stars_detected;          /*!< Number of stars detected */
    uint8_t star_image_noise;            /*!< Star image noise */
    uint8_t invalid_stars;               /*!< Invalid Star */
    uint8_t num_stars_id;                /*!< Number of star identified */
    uint8_t id_mode;                     /*!< Identification mode */
    uint8_t image_dark_value;            /*!< Image dark value  The average 
                                            value of center line in image */
}__attribute__ ((__packed__))s_adcs_star_trkr_perform;

/**
 * @brief Timing information of star measurement
 */
typedef struct
{
    uint16_t capture;            /*!< Capture */
    uint16_t detection;          /*!< Detection */
    uint16_t id;                 /*!< Identification */
}__attribute__ ((__packed__))s_adcs_star_trkr_timing;

/**
 * @brief Star Tracker raw measurement
 */
typedef struct
{
    uint8_t num_stars_detected;         /*!< Number of stars detected 
                                        (measurment unit is [stars]) */
    uint8_t star_image_noise;           /*!< Star image noise 
                                        (measurment unit is [noise]) */
    uint8_t invalid_stars;              /*!< Invalid Star */
    uint8_t num_stars_id;               /*!< Number of star identified */
    uint8_t id_mode;                    /*!< Identification mode */
    uint8_t image_dark_value;           /*!< Image dark value  The average 
                                           value of center line in image */
    uint8_t image_capture_success;      /*!< Image Capture Success */
    uint8_t detection_success;          /*!< Detection Success */
    uint8_t id_success;                 /*!< Identification Success*/
    uint8_t attitude_success;           /*!< Attitude Success */
    uint8_t processing_time_error;      /*!< Processing Time Error */
    uint8_t tracking_module_enabled;    /*!< Tracking module enabled */
    uint8_t prediction_enabled;         /*!< Prediction enabled */
    uint8_t comms_error;                /*!< Comms error */
    uint8_t s1_conf;                    /*!< Star 1 confidence.
                                            (Unit[percentage]) */
    uint8_t s2_conf;                    /*!< Star 2 confidence.
                                            (Unit[percentage]) */
    uint8_t s3_conf;                    /*!< Star 3 confidence.
                                            (Unit[percentage]) */
    uint16_t mag_star_1;                /*!< Instrument magnitude of star 1 */
    uint16_t mag_star_2;                /*!< Instrument magnitude of star 2 */
    uint16_t mag_star_3;                /*!< Instrument magnitude of star 3 */
    uint16_t capture;                   /*!< Capture */
    uint16_t detection;                 /*!< Detection */
    uint16_t id;                        /*!< Identification */
    double rate_x;                      /*!< Estimated Rate X-axis */
    double rate_y;                      /*!< Estimated Rate Y-axis */
    double rate_z;                      /*!< Estimated Rate Z-axis */
    double est_attitude_q1;             /*!< Estimated attitude Q1 */
    double est_attitude_q2;             /*!< Estimated attitude Q2 */
    double est_attitude_q3;             /*!< Estimated attitude Q3 */
    uint16_t cat_star;                  /*!< Catalogue number of star */
    int16_t cent_star_x;                /*!< X centroid of star */
    int16_t cent_star_y;                /*!< Y centroid of star */
    uint16_t samlpe_period;             /*!< Sample Period  */
}__attribute__ ((__packed__))s_adcs_raw_star_trkr;

/**
 * @brief Star Tracker raw data
 */
typedef struct
{
    uint16_t cat_star;                  /*!< Catalogue number of star */
    int16_t cent_star_x;                /*!< X centroid of star */
    int16_t cent_star_y;                /*!< Y centroid of star */
}__attribute__ ((__packed__))s_adcs_raw_star_trkr_data;

/**
 * @brief Star Tracker body vector for xyz axis
 */
typedef struct
{
    int16_t star_b_x;               /*!< Star body X-vector */
    int16_t star_b_y;               /*!< Star body Y-vector */
    int16_t star_b_z;               /*!< Star body Z-vector */
}__attribute__ ((__packed__))s_adcs_star_trkr_body;

/**
 * @brief Star Tracker Orbit vector for xyz axis
 */
typedef struct
{
    int16_t star_o_x;               /*!< Star orbit X-vector */
    int16_t star_o_y;               /*!< Star orbit Y-vector */
    int16_t star_o_z;               /*!< Star orbit Z-vector */
}__attribute__ ((__packed__))s_adcs_star_trkr_orbit;

/**
 *@brief generic sensor configuration union.
 */
typedef union
{
    s_adcs_mgmtr_cfg magetometer_config;        /*!< Magnetometer config  */
    s_adcs_mgmtr_cfg red_magetometer_config;    /*!< Retudent Magnetometer 
                                                    config */
    s_adcs_css_cfg corase_config;               /*!< Coarse configuration */
    s_adcs_fss_cfg fss_config;                  /*!< Fss configuration */
    s_adcs_nadir_cfg nadir_config;              /*!< Nadir configuration */
    s_adcs_star_trkr_cfg star_trkr_config;      /*!< Star tracker 
                                                    configuration */
}u_adcs_sensor_config;

/**
 *@brief generic sensor configuration parameter.
 */
typedef struct
{
    uint8_t sensor_type;                        /*!< Sesnor type */
    uint8_t sensor_id;                          /*!< Sensor Id */
    u_adcs_sensor_config sensor_cfg;            /*!< Sensor Configuration 
                                                    parameters */
}__attribute__ ((__packed__))s_adcs_sensor_cfg;

/**
 * @brief Tracking Controller Gain Parameters
 */
typedef struct
{
    float prop_gain;                        /*!< Tracking Proportional Gain */
    float derv_gain;                        /*!< Tracking Derivative Gain */
    float integ_gain;                       /*!< Tracking Integral Gain */
    uint8_t target_Track_Facet;             /*!< Target-tracking Facet */
}__attribute__ ((__packed__))s_adcs_trck_ctrl_gain;

/**
 * @brief Magnetorquer configuration
 */
typedef struct
{
    uint8_t mgntrqr_axis;           /*!< Magnetorquer axis configuration */
}__attribute__ ((__packed__))s_adcs_mgntrqr_cfg;

/*
 * @brief Magnetorquer output
 */
typedef struct
{
    int16_t torquer_cmd_x;          /*!< Commanded X Magnetorquer duty cycle */
    int16_t torquer_cmd_y;          /*!< Commanded y Magnetorquer duty cycle */
    int16_t torquer_cmd_z;          /*!< Commanded Z Magnetorquer duty cycle */
}__attribute__ ((__packed__))s_adcs_mgntrqr_out;

/**
 * @brief Reaction Wheel configuration
 */
typedef struct
{
    uint8_t rw_conf;       /*!< Reaction wheel axis configuration */
}__attribute__ ((__packed__))s_adcs_rw_cfg;

/**
 * @brief Reaction Wheel Speed
 */
typedef struct
{
    int16_t rw_speed;     /*!< Command wheel speed */
}__attribute__ ((__packed__))s_adcs_rw_speed;

/**
 *@brief generic Actuator configuration Union.
 */
typedef union
{
    s_adcs_rw_cfg rwheel_config;           /*!< Reactionwheel config */
    s_adcs_mgntrqr_cfg magnotorque_config; /*!< Magnetorquer config  */
}u_adcs_acutator_config;

/**
 *@brief generic Actuator configruation parameter.
 */
typedef struct
{
    uint8_t actuator_type;                  /*!< Actuator type */
    uint8_t actuator_id;                    /*!< Actuator Id */
    u_adcs_acutator_config actuator_cfg;    /*!< Actuator configuration 
                                                parameters */
}__attribute__ ((__packed__))s_adcs_actuators_cfg;

/**
 * @brief Y-Wheel Control Parameters
 */
typedef struct
{
    float ctrl_gain;              /*!< Y-Momentum Control Gain */
    float nutation_damp_gain;     /*!< Y-momentum Nutation Damping Gain */
    float prop_gain;              /*!< Y-momentum Proportional Gain */
    float derv_gain;              /*!< Y-momentum Derivative Gain */
    float ref_rw_mom;             /*!< Reference Wheel Momentum */
}__attribute__ ((__packed__))s_adcs_y_rw_ctrl;

/**
 * @brief Z-Wheel Control Parameters
 */
typedef struct
{
    float ctrl_gain;              /*!< Z-Momentum Control Gain */
    float nutation_damp_gain;     /*!< Z-momentum Nutation Damping Gain */
    float prop_gain;              /*!< Z-momentum Proportional Gain */
    float derv_gain;              /*!< Z-momentum Derivative Gain */
    float ref_rw_mom;             /*!< Reference Wheel Momentum */
}__attribute__ ((__packed__))s_adcs_z_rw_ctrl;

/**
 * @brief Reaction wheel Control Parameters
 */
typedef struct
{
    float rw_prop_gain;               /*!< RWheel Proportional Gain */
    float rw_derv_gain;               /*!< RWheel Derivative Gain */
    float y_rw_bias;                  /*!< Y-Wheel Bias Momentum */
    uint8_t sun_point_facet;          /*!< Sun-pointing Facet */
    uint8_t rw_error_handling;        /*!< Automatic Control Transition
                                          due to Wheel Errors */
}__attribute__ ((__packed__))s_adcs_rw_ctrl;

/**
 * @brief Reaction wheel Current parameter
 */
typedef struct
{
    double rw_current;        /*!< Reaction wheel current*/
}__attribute__ ((__packed__))s_adcs_rw_cur;

/**
 * @brief Raw sensor measurement
 */
typedef struct
{
    int16_t nadir_raw_x;                /*!< Nadir sensor raw X angle */
    int16_t nadir_raw_y;                /*!< Nadir sensor raw Y angle */
    uint8_t nadir_busy;                 /*!< Nadir sensor capture status */
    uint8_t nadir_result;               /*!< Nadir sensor detection result */
    int16_t fss_raw_x;                  /*!< FSS raw X angle */
    int16_t fss_raw_y;                  /*!< FSS raw Y angle */
    uint8_t fss_busy;                   /*!< FSS capture status */
    uint8_t fss_result;                 /*!< FSS detection result */
    uint8_t css_raw;                    /*!< CSS Raw measurement */
    int16_t mag_raw_x;                  /*!< Raw magnetometer X measurement */
    int16_t mag_raw_y;                  /*!< Raw magnetometer Y measurement */
    int16_t mag_raw_z;                  /*!< Raw magnetometer Z measurement */
    int16_t raw_rate_x;                 /*!< Raw Angular rate X axis */
    int16_t raw_rate_y;                 /*!< Raw Angular rate Y axis */
    int16_t raw_rate_z;                 /*!< Raw Angular rate Z axis */
}__attribute__ ((__packed__))s_adcs_raw_sensor;

/**
 * @brief Control mode configuration
 */
typedef struct
{
    uint8_t ctrl_mode;                  /*!< Control mode */
    uint16_t time_out;                  /*!< Timeout value for assigned 
                                            control mode */
}__attribute__ ((__packed__))s_adcs_ctrl_mode;

/**
 * @brief Detumble Control
 */
typedef struct
{
    float spin_gain;            /*!< Detumbling spin gain */
    float damping_gain;         /*!< Detumbling Damping Gain */
    double rw_ref_spin_rate;    /*!< Reference spin rate */
    float f_bdot_gain;          /*!< Fast BDot Detumbling Gain */
}__attribute__ ((__packed__))s_adcs_detumble_ctrl;

/**
 * @brief Rate sensor xyz axis measurement
 */
typedef struct
{
    double rate_x;         /*!< X axis rate sensor measurement value */
    double rate_y;         /*!< Y axis rate sensor measurement value */
    double rate_z;         /*!< Z axis rate sensor measurement value */
}__attribute__ ((__packed__))s_adcs_rate_sens;

/**
 * @brief Rate sensor raw measurement
 */
typedef struct
{
    int16_t raw_rate_x;     /*!< X axis raw rate sensor measurement */
    int16_t raw_rate_y;     /*!< Y axis raw rate sensor measurement */
    int16_t raw_rate_z;     /*!< Z axis raw rate sensor measurement */
}__attribute__ ((__packed__))s_adcs_raw_rate_sens;

/**
 * @brief Attitude Angle
 */
typedef struct
{
    double roll;           /*!< Command Roll Angle */
    double pitch;          /*!< Command Pitch Angle */
    double yaw;            /*!< Command Yaw Angle */
}__attribute__ ((__packed__))s_adcs_attitude_angl;

/**
 * @brief Target tarcking parameter
 */
typedef struct
{
    float long_ref;       /*!< Geocentric longitude of target */
    float lat_ref;        /*!< Geocentric latitude of target */
    float alt_ref;        /*!< Geocentric altitude of target */
}__attribute__ ((__packed__))s_adcs_trck_target;

/**
 * @brief Inertial Pointing Reference Vector
 */
typedef struct
{
    int16_t iner_ref_x;     /*!< Inertial Reference X */
    int16_t iner_ref_y;     /*!< Inertial Reference Y */
    int16_t iner_ref_z;     /*!< Inertial Reference Z */
}__attribute__ ((__packed__))s_adcs_inrt_ref;

/**
 * @brief generic control mode configuration parameter.
 */
typedef union
{
    s_adcs_attitude_angl attitude_ctrl;     /*!< Attitude control parameters */
    s_adcs_trck_target target_track_ctrl;   /*!< Traget tracking parameters */
    uint32_t nadir_point_mode;              /*!< Nadir pointing mode */
}__attribute__ ((__packed__))u_control_mode_param;

/**
 * @brief Estimated star tracker rates
 */
typedef struct
{
    int16_t x_axis_rate;    /*!< Estimated X axis rate measurement */
    int16_t y_axis_rate;    /*!< Estimated Y axis rate measurement */
    int16_t z_axis_rate;    /*!< Estimated Z axis rate measurement */
}__attribute__ ((__packed__))s_adcs_star_est_rate;

/**
 * @brief GPS and Sattelite tracker structure
 */
typedef struct
{
    uint8_t gps_sol_sts;            /*!< Gps Solution Status */
    uint8_t gps_num_sats_tracked;   /*!< Number of tracked GPS satellites */
    uint8_t gps_num_sats_sol;       /*!< Number of GPS satellites used 
                                        in solution */
    uint8_t gps_xyz_log_ctr;        /*!< Counter for XYZ Lof from GPS */
    uint8_t gps_range_log_ctr;      /*!< Counter for RANGE log from GPS */
    uint8_t gps_response;           /*!< Response Message for GPS log setup */
}__attribute__ ((__packed__))s_adcs_gps_s;

/**
 * @brief GPS time format
 */
typedef struct
{
    uint16_t gps_week;               /*!< GPS Reference Week */
    uint32_t gps_time_ms;            /*!< GPS Time Milliseconds */
}__attribute__ ((__packed__))s_adcs_gps_time;

/**
 * @brief Position and velocity in ECEF format for X axis
 */
typedef struct
{
    int32_t ecef_pos_x;             /*!< ECEF Position X */
    int16_t ecef_vel_x;             /*!< ECEF Velocity X */
}__attribute__ ((__packed__))s_adcs_gps_x;

/**
 * @brief Position and velocity in ECEF format for Y axis
 */
typedef struct
{
    int32_t ecef_pos_y;             /*!< ECEF Position Y */
    int16_t ecef_vel_y;             /*!< ECEF Velocity Y */
}__attribute__ ((__packed__))s_adcs_gps_y;

/**
 * @brief Position and velocity in ECEF format for Z axis
 */
typedef struct
{
    int32_t ecef_pos_z;             /*!< ECEF Position Z */
    int16_t ecef_vel_z;             /*!< ECEF Velocity Z */
}__attribute__ ((__packed__))s_adcs_gps_z;

/**
 * @brief Raw GPS measurement
 */
typedef struct
{
    uint8_t gps_sol_sts;            /*!< Gps Solution Status */
    uint8_t gps_num_sats_tracked;   /*!< Number of tracked GPS satellites */
    uint8_t gps_num_sats_sol;       /*!< Number of GPS satellites used 
                                        in solution */
    uint8_t gps_xyz_log_ctr;        /*!< Counter for XYZ Lof from GPS */
    uint8_t gps_range_log_ctr;      /*!< Counter for RANGE log from GPS */
    uint8_t gps_response;           /*!< Response Message for GPS log setup */
    uint16_t gps_week;              /*!< GPS Reference Week */
    uint32_t gps_time_ms;           /*!< GPS Time Milliseconds */
    int32_t ecef_pos_x;             /*!< ECEF Position X */
    int16_t ecef_vel_x;             /*!< ECEF Velocity X */
    int32_t ecef_pos_y;             /*!< ECEF Position Y */
    int16_t ecef_vel_y;             /*!< ECEF Velocity Y */
    int32_t ecef_pos_z;             /*!< ECEF Position Z */
    int16_t ecef_vel_z;             /*!< ECEF Velocity Z */
    double std_dev_pos_x;           /*!< X-pos Standard Deviation */
    double std_dev_pos_y;           /*!< Y-pos Standard Deviation */
    double std_dev_pos_z;           /*!< Z-pos Standard Deviation */
    uint8_t std_dev_vel_x;          /*!< X-vel Standard Deviation */
    uint8_t std_dev_vel_y;          /*!< Y-vel Standard Deviation */
    uint8_t std_dev_vel_z;          /*!< Z-vel Standard Deviation */
}__attribute__ ((__packed__))s_adcs_raw_gps;

/**
 * @brief Estimation mode configuration
 */
typedef struct
{
    uint8_t est_mode;               /*!< Estimation mode */
}__attribute__ ((__packed__))s_adcs_est_mode;

/**
 * @brief Estimation parameter
 */
typedef struct
{
    float mag_rate_noise;               /*!< Magnetometer Rate Filter System 
                                            Noise */
    float ekf_sys_noise;                /*!< EKF System Noise */
    float css_noise;                    /*!< CSS Measurement Noise */
    float sun_noise;                    /*!< Sun Sensor Measurement Noise */
    float nadir_noise;                  /*!< Nadir Sensor Measurement Noise */
    float mag_noise;                    /*!< Magnetometer Measurement Noise */
    float star_noise;                   /*!< Star Tracker Measurement Noise */
    uint8_t use_sun_est;                /*!< Use Sun Sensor in EKF */
    uint8_t use_nadir_est;              /*!< Use Nadir Sensor in EKF */
    uint8_t use_css_est;                /*!< Use CSS measurement in EKF */
    uint8_t use_star_est;               /*!< Use Star Tracker measurement in 
                                            EKF */
    uint8_t nadir_terminator_check;     /*!< Nadir sensor terminator test */
    uint8_t mag_mode;                   /*!< Magnetometer Mode */
    uint8_t mag_raw_tlm_2_Sel;          /*!<Magnetometer selection for rawtlm*/
    uint8_t auto_recover_mtm;           /*!< Automatic magnetometer recovery */
    uint8_t rate_sens_err_hndl;         /*!< Automatic estimation transition
                                            due to rate sensor error */
    uint8_t rw_pwr_on_30s_delay;        /*!< Reaction wheel communication after
                                             30s from power on */
    uint8_t fss_period;                 /*!< FSS sampling period */
    uint8_t nadir_period;               /*!< Nadir sampling period */
}__attribute__ ((__packed__))s_adcs_est_param;

/**
 * @brief ECI position of the sattlite
 */
typedef struct
{
    int16_t position_x;         /*!< ECI referenced X coordinate */
    int16_t position_y;         /*!< ECI referenced Y coordinate */
    int16_t position_z;         /*!< ECI referenced Z coordinate */
}__attribute__ ((__packed__))s_adcs_eci_position;

/**
 * @brief ECI velocity of the Sattelite
 */
typedef struct
{
    int16_t velocity_x;             /*!< ECI referenced X velocity */
    int16_t velocity_y;             /*!< ECI referenced Y velocity */
    int16_t velocity_z;             /*!< ECI referenced Z velocity */
}__attribute__ ((__packed__))s_adcs_eci_velocity;

/**
 * @brief Estimated angular rates
 */
typedef struct
{
    int16_t est_x_angular_rate;     /*!< Estimated X Angular Rate */
    int16_t est_y_angular_rate;     /*!< Estimated Y Angular Rate */
    int16_t est_z_angular_rate;     /*!< Estimated Z Angular Rate */
}__attribute__ ((__packed__))s_adcs_est_rate;

/**
 * @brief Estimated quaternion
 */
typedef struct
{
    int16_t est_qutrn_1;            /*!< Star tracker estimated attitude Q1 */
    int16_t est_qutrn_2;            /*!< Star tracker estimated attitude Q2 */
    int16_t est_qutrn_3;            /*!< Star tracker estimated attitude Q3 */
}__attribute__ ((__packed__))s_adcs_est_qutrn;

/**
 * @brief Estimation innovation vector
 */
typedef struct
{
    int16_t innovn_vec_x;       /*!< Innovation Vector X */
    int16_t innovn_vec_y;       /*!< Innovation Vector Y */
    int16_t innovn_vec_z;       /*!< Innovation Vector Z */
}__attribute__ ((__packed__))s_adcs_est_innovn;

/**
 * @brief Estimation gyro measurement
 */
typedef struct
{
    int16_t est_gyro_x;         /*!< Estimated X-gyro Bias */
    int16_t est_gyro_y;         /*!< Estimated Y-gyro Bias */
    int16_t est_gyro_z;         /*!< Estimated Z-gyro Bias */
}__attribute__ ((__packed__))s_adcs_est_gyro;

/**
 * @brief Quaternion error vector
 */
typedef struct
{
    int16_t qutr_error_q1;      /*!< Quaternion Error -Q1 */
    int16_t qutr_error_q2;      /*!< Quaternion Error -Q2 */
    int16_t qutr_error_q3;      /*!< Quaternion Error -Q3 */
}__attribute__ ((__packed__))s_adcs_qutr_error;

/**
 * @brief Quaternion covariance
 */
typedef struct
{
    int16_t qutr_covr_q1;      /*!< Quaternion Covariance - Q1 RMS */
    int16_t qutr_covr_q2;      /*!< Quaternion Covariance - Q2 RMS */
    int16_t qutr_covr_q3;      /*!< Quaternion Covariance - Q3 RMS */
}__attribute__ ((__packed__))s_adcs_qutr_covr;

/**
 * @brief Angular rate covariance
 */
typedef struct
{
    int16_t covr_ang_rate_x;    /*!< X Angular Rate Covariance */
    int16_t covr_ang_rate_y;    /*!< Y Angular Rate Covariance */
    int16_t covr_ang_rate_z;    /*!< Z Angular Rate Covariance */
}__attribute__ ((__packed__))s_adcs_angl_rate_covr;

/**
 * @brief Magnetic filed vector measurement
 */
typedef struct
{
    int16_t mag_filed_x;        /*!< X axis magnetic field vector */
    int16_t mag_filed_y;        /*!< Y axis magnetic field vector */
    int16_t mag_filed_z;        /*!< Z axis magnetic field vector */
}__attribute__ ((__packed__))s_adcs_mag_vector;

/**
 * @brief Sun Vector measurement
 */
typedef struct
{
    int16_t sun_x;              /*!< X axis Sun vector */
    int16_t sun_y;              /*!< Y axis Sun vector */
    int16_t sun_z;              /*!< Z axis Sun vector */
}__attribute__ ((__packed__))s_adcs_sun_vector;

/**
 * @brief Nadir Vector measurement
 */
typedef struct
{
    int16_t nadir_x;              /*!< X axis Nadir vector */
    int16_t nadir_y;              /*!< Y axis Nadir vector */
    int16_t nadir_z;              /*!< Z axis Nadir vector */
}__attribute__ ((__packed__))s_adcs_nadir_vector;

/**
 * @brief Current measurement
 */
typedef struct
{
    double current_3v3;        /*!< Current value measured in 3.3V */
    double current_5v;         /*!< Current value measured in 5V */
    double current_vbat;       /*!< Vbat current value */
}__attribute__ ((__packed__))s_adcs_current;

/**
 * @brief Temperature measurement
 */
typedef struct
{
    int16_t mcu_temperature;            /*!< MCU temperature value */
    double mgmtr_temperature;           /*!< Magnetometer temperature value */
    double red_magmtr_temperature;      /*!< Redundant Mag temperature value */
}__attribute__ ((__packed__))s_adcs_temperature;

/**
 * @brief Rate sensor temeprature measurement
 */
typedef struct
{
    int16_t x_rate_temp;        /*!< X axis Rate sensor temeprature value */
    int16_t y_rate_temp;        /*!< Y axis Rate sensor temeprature value */
    int16_t z_rate_temp;        /*!< Z axis Rate sensor temeprature value */
}__attribute__ ((__packed__))s_adcs_rate_temperature;

/**
 * @brief Sensors Current measurement
 */
typedef struct
{
    double nadir_3v3_current;   /*!< Nadir Sensor 3V3 current measurement */
    double fss_3v3_current;     /*!< FSS 3V3 current measurement */
    double nadir_sram_current;  /*!< Nadir Sensor SRAM current measurement */
    double fss_sram_current;    /*!< FSS SRAM current measurement */
}__attribute__ ((__packed__))s_adcs_sens_cur;

/**
 * @brief ADCS Current and Temperature
 */
typedef struct
{
    s_adcs_current adcs_current;    /*!< ADCS Current */
    s_adcs_sens_cur sensor_current; /*!< Sensor currents */
    s_adcs_rw_cur rw_current;       /*!< Reaction wheel current */
    s_adcs_temperature adcs_temp;   /*!< ADCS Temperature */
    s_adcs_rate_temperature rate_sensor_temp;  /*!< Rate senssor temperature */
    double star_trkr_current;       /*!< Star Tracker current */
    double magtrqr_current;         /*!< Magnetorquer current */
    double star_trkr_mcu_temp;      /*!< Star Tracker MCU Temperature */
}__attribute__ ((__packed__))s_adcs_cur_temp;

/**
 * @brief Thruster command configuration
 */
typedef struct
{
    uint8_t thruster_state; /*!< Thruster ON - 1 / OFF - 0 */
    uint16_t time_out;      /*!< Thruster ON duration
                            (Unit of measure is [s]) */
}__attribute__ ((__packed__))s_adcs_thruster_cmd;
/**
 * @brief ADCS boot and running program status structure
 */
typedef struct
{
    uint8 mcu_reset_cause;          /*!< last MCU Reset Cause
                                    Ref:- e_adcs_rest_cause */
    uint8 boot_cause;               /*!< last reboot Cause
                                    Ref:- e_adcs_boot_cause*/
    uint16 boot_counter;            /*!< number of times ADCS booted */
    uint8 boot_program_index;       /*!< current running program index */
    uint8 fw_major_version;         /*!< Firmware major version */
    uint8 fw_minor_version;         /*!< Firmware minor version */
}__attribute__ ((__packed__))s_adcs_b_run_prog_sts;

/**
 * @brief ADCS boot index and status structure
 */
typedef struct
{
    uint8  boot_program_index;      /*!< current running program index
                                    Ref:- e_adcs_boot_prg_lst*/
    uint8 boot_status;              /*!< last boot status
                                    Ref:- e_adcs_boot_sts*/
}__attribute__ ((__packed__))s_adcs_b_index_sts;

/**
 * @brief ADCS Last logged event telemetry structure
 */
typedef struct
{
    uint32 event_time;              /*!< Epoch time of event */
    uint8 evnt_id;                  /*!< Event Id */
    uint8 event_param;              /*!< Event Parameter */
}__attribute__ ((__packed__))s_adcs_last_log_evnt;

/**
 * @brief SRAM1 latchups counters telemetry structure
 */
typedef struct
{
    uint16 sram1_latchups;          /*!< Number of SRAM1 latchups deteceted */
    uint16 sram2_latchups;          /*!< Number of SRAM2 latchups deteceted */
}__attribute__ ((__packed__))s_adcs_latchup_cntr;

/**
 * @brief EDAC Error Counters telemetry structure
 */
typedef struct
{
    uint16 single_sram_upset;   /*!< Number of single SRAM upsets deteceted */
    uint16 double_sram_upset;   /*!< Number of double SRAM upsets deteceted */
    uint16 multiple_sram_upset; /*!< Number of multiple SRAM upsets deteceted*/
}__attribute__ ((__packed__))s_adcs_edac_err_cntr;

/**
 * @brief ADCS communication status telemetry structure
 */
typedef struct
{
    uint16 tc_counter;              /*!< Number of TC received */
    uint16 tlm_counter;             /*!< Number of TLM requested */
    uint8 tc_buffer_overrun;        /*!< TC buffer overrun while
                                        receiving a telecommand */
    uint8 uart_protocol_error;      /*!< UART Protocol error occurred */
    uint8 uart_incomplete_message;  /*!< UART SOF received received
                                        without a preceding EOF */
    uint8 i2c_tlm_error;            /*!< Number of data clocked out was
                                        more than telemetry package */
    uint8 i2c_tc_buffer_error;      /*!< TC sent exceeds buffer size */
    uint8 can_tc_buffer_error;      /*!< TC sent exceeds buffer size */
}__attribute__ ((__packed__))s_adcs_comm_sts;

/**
 * @brief SD card format or erase progress telemetry structure
 */
typedef struct
{
    uint8 format_busy;      /*!< Busy formating SD card */
    uint8 erase_all_busy;   /*!< Busy formating erasing all SD card files */
}__attribute__ ((__packed__))s_adcs_erase_prgrs;

/**
 * @brief Telecommand Acknowledge telemetry structure
 */
typedef struct
{
    uint8 last_tc_id;               /*!< last received TC Id */
    uint8 processed_flag;           /*!< Flag to indicate if the last
                                    TC has been processed */
    uint8 tc_error_status;          /*!< Status of last processed telecommand
                                    Ref:- e_adcs_tc_error_reason */
    uint8 tc_parameter_error_index; /*!<  Index of incorrect TC parameter */
}__attribute__ ((__packed__))s_adcs_tc_ack;

/**
 * @brief File Download Buffer with File Contents telemetry structure
 */
typedef struct
{
    uint16 packet_counter;      /*!< Packet counter of the downloaded file */
    uint8 file_buffer[20];      /*!< File 20-byte packet */
}__attribute__ ((__packed__))s_adcs_file_dwnld_buffer;

/**
 * @brief Download block ready telemetry structure
 */
typedef struct
{
    uint8 ready;                    /*!< Ready */
    uint8 parameter_error;          /*!< Parameter error */
    uint16 block_crc;               /*!< Block checksum */
    uint16 block_len;               /*!< block length */
}__attribute__ ((__packed__))s_adcs_dwnld_blck_ready;

/**
 * @brief File information telemetry structure
 */
typedef struct
{
    uint8 file_type;                /*!< File Type Ref:- e_adcs_filetype*/
    uint8 busy_updating;            /*!< file busy updating */
    uint8 file_counter;             /*!< file counter */
    uint32 file_size;               /*!< file size */
    uint32 file_data_time;          /*!< file data and time */
    uint16 file_crc;                /*!< file checksum */
}__attribute__ ((__packed__))s_adcs_file_info;

/**
 * @brief Initialize Upload Complete telemetry structure
 */
typedef struct
{
    uint8 busy;                     /*!< Busy with flash erase */
}__attribute__ ((__packed__))s_adcs_init_upld;

/**
 * @brief Upload Block Complete telemetry structure
 */
typedef struct
{
    uint8 busy;                     /*!< Busy with block finalization */
    uint8 error;                    /*!< Error with block finalization */
}__attribute__ ((__packed__))s_adcs_upld_blck_cmplt;

/**
 * @brief Block Checksum telemetry structure
 */
typedef struct
{
    uint16 crc;                     /*!< Checksum */
}__attribute__ ((__packed__))s_adcs_blck_crc;

/**
 * @brief bootloader state telemetry structure
 */
typedef struct
{
    uint16 runtime;               /*!< Uptime */
    uint8 sram1_enabled;          /*!< SRAM1 is enabled  */
    uint8 sram2_enabled;          /*!< SRAM2 is enabled  */
    uint8 sram_latchup;           /*!< SRAM Latch-up Error occurred and
                                  could not be recovered  */
    uint8 sram_latchup_recovered; /*!< SRAM Latch-up Occurred but recovered
                                  after power cycle  */
    uint8 sd_init_err;            /*!< SD card initialization error flag */
    uint8 sd_r_err;               /*!< SD card read error flag */
    uint8 sd_w_err;               /*!< SD card write error flag */
    uint8 ext_flash_err;          /*!< External Flash Erase/write error falg */
    uint8 int_flash_err;          /*!< Internal Flash Erase/write error flag */
    uint8 eeprom_err;             /*!< EEPROM Write error occurred  */
    uint8 boot_reg_corrupt;       /*!< Boot Register contained invalid data */
    uint8 radio_comms_error;      /*!< Communications Error with Radio  */
}__attribute__ ((__packed__))s_adcs_btlr_state;

/**
 * @brief Program Information telemetry structure
 */
typedef struct
{
    uint8 programIndex;     /*!< Program Index Ref:- e_adcs_progindex */
    uint8 busy;             /*!< Busy reading  */
    uint32 fileSize;        /*!< File Size (bytes)  */
    uint16 crc16;           /*!< CRC16 Checksum  */
}__attribute__ ((__packed__))s_adcs_prgm_info;

/**
 * @brief Copy To Internal Flash Progress telemetry structure
 */
typedef struct  {
    uint8 busy;                     /*!< Busy  */
    uint8 error;                    /*!< Error  */
}__attribute__ ((__packed__))s_adcs_cpy_intrnl_flsh_prgrs;

/**
 * @brief JPG Conversion Progress telemetry structure
 */
typedef struct
{
    uint8 progress;                 /*!< Progress %  */
    uint8 conversion_result;        /*!< JPG Conversion Result
                                    Ref:- e_adcs_jpg_cnvrt_rslt */
    uint8 out_file_counter;         /*!< Output File Counter  */
}__attribute__ ((__packed__))s_adcs_jpg_cnvrsn_prgrs;

/**
 * @brief ACP Execution Times telemetry structure
 */
typedef struct
{
    uint16 time_adcs_update;            /*!< Time to perform ADCS Update */
    uint16 time_sensor_actuator_comms;  /*!< Time to perform Sensor/actuator
                                        communications */
    uint16 time_sgp4;                   /*!< Time to execute SGP4 propagator */
    uint16 time_igrf;                   /*!< Time to execute IGRF computation */
}__attribute__ ((__packed__))s_adcs_exec_time;

/**
 * @brief ACP Execution state telemetry structure
 */
typedef struct
{
    uint16 time_since_loop_start;     /*!< Time since the start of the current
                                      loop iteration */
    uint8 current_execution_point;    /*!< Indicates which part of the loop is
                                 currently executing Ref:- e_adcs_exc_point*/
}__attribute__ ((__packed__))s_adcs_exec_state;

/**
 * @brief Image Capture status telemetry structure
 */
typedef struct  {
    uint8 percentage_complete;  /*!< Current progress of operation */
    uint8 status;               /*!< Current status of operation
                                Ref:- e_adcs_img_save_sts */
}__attribute__ ((__packed__))s_adcs_img_sv_sts;

/**
 * @brief Actuator commands telemetry structure
 */
typedef struct
{
    s_adcs_mgntrqr_out trqr_cmd;    /*!< Magnetorquer command structure */
    s_adcs_rw_speed rw_cmd;         /*!< Reaction wheel command structure */
}__attribute__ ((__packed__))s_adcs_actuator_cmd;

/**
 * @brief Estimation data telemetry structure
 */
typedef struct
{
    s_adcs_mag_vector mod_mag_filed;      /*!< IGRF Modelled Magnetic Field*/
    s_adcs_sun_vector mod_sun_vector;     /*!< Modelled Sun Vector */
    s_adcs_est_gyro est_gyro_bais;        /*!< Estimated gyro Bias */
    s_adcs_est_innovn innovn_vector;      /*!< Innovation Vector */
    s_adcs_qutr_error qutr_error;         /*!< Quaternion Error */
    s_adcs_qutr_covr qutr_covr;           /*!< Quaternion Covariance – RMS */
    s_adcs_angl_rate_covr angl_rate_covr; /*!< Angular Rate Covariance */
}__attribute__ ((__packed__))s_adcs_estmiation_data;

/**
 * @brief Star Tracker Estimated Attitude Quaternion
 */
typedef struct
{
    int16_t qutr_est_att_q1;        /*!< star tracker estimated attitude Q1 */
    int16_t qutr_est_att_q2;        /*!< star tracker estimated attitude Q2 */
    int16_t qutr_est_att_q3;        /*!< star tracker estimated attitude Q3 */
}__attribute__ ((__packed__))s_adcs_qutr_attitude;

/**
 * @brief Star Tracker Estimated Rates
 */
typedef struct
{
    int16_t star_est_rate_x;        /*!< star tracker estimated rate x axis */
    int16_t star_est_rate_y;        /*!< star tracker estimated rate y axis */
    int16_t star_est_rate_z;        /*!< star tracker estimated rate z axis */
}__attribute__ ((__packed__))s_adcs_star_trckr_est_rates;

/**
 * @brief ADCS measurement telemetry structure
 */
typedef struct
{
    int16_t mag_field_x;            /*!< Magnetic Field X Axis */
    int16_t mag_field_y;            /*!< Magnetic Field Y Axis */
    int16_t mag_field_z;            /*!< Magnetic Field Z Axis */
    int16_t coarse_sun_x;           /*!< Coarse Sun X Axis */
    int16_t coarse_sun_y;           /*!< Coarse Sun Y Axis */
    int16_t coarse_sun_z;           /*!< Coarse Sun Z Axis */
    int16_t sun_x;                  /*!< Sun X Axis */
    int16_t sun_y;                  /*!< Sun Y Axis */
    int16_t sun_z;                  /*!< Sun Z Axis */
    int16_t nadir_x;                /*!< Nadir X Axis */
    int16_t nadir_y;                /*!< Nadir Y Axis */
    int16_t nadir_z;                /*!< Nadir Z Axis */
    int16_t anglr_rate_x;           /*!< X Axis Angular rate */
    int16_t anglr_rate_y;           /*!< Y Axis Angular rate */
    int16_t anglr_rate_z;           /*!< Z Axis Angular rate */
    int16_t rw_speed_x;             /*!< X Axis Reaction wheel speed */
    int16_t rw_speed_y;             /*!< Y Axis Reaction wheel speed */
    int16_t rw_speed_z;             /*!< Z Axis Reaction wheel speed */
    int16_t star_body_x;            /*!< Star body vector X axis */
    int16_t star_body_y;            /*!< Star body vector Y axis */
    int16_t star_body_z;            /*!< Star body vector Z axis */
    int16_t star_orbit_x;           /*!< Star orbit vector X axis */
    int16_t star_orbit_y;           /*!< Star orbit vector Y axis */
    int16_t star_orbit_z;           /*!< Star orbit vector Z axis */
}__attribute__ ((__packed__))s_adcs_measurement;

/**
 * @brief Read program information
 */
typedef struct
{
    uint8_t prog_list;   /*!< ProgramsList enumeration Ref-> e_adcs_progindex*/
}s_adcs_read_prog;
/**
 *@brief structure for copy program to internal flash
 */
typedef struct
{
    uint8_t prog_list;  /*!< program list Ref:- e_adcs_progindex*/
    uint8  btlder_overw_flag;     /*!< Booloader overwrite  flag*/
}__attribute__ ((__packed__))s_adcs_copy_p_to_interflash;

/**
 * @brief Erase File message structure
 * @details Erase File
 */
typedef struct
{
    uint8 filetype;    /*!< File Type Ref:- e_adcs_filetype */
    uint8 file_ctr;              /*!< File Counter  */
    uint8 eraseall;            /*!< Erase All  (uint8)*/
}__attribute__ ((__packed__))s_adcs_erasefile;

/**
 * @brief strcuture for sd card format
 */
typedef struct
{
    uint8 magic;   /*!< Magic Number */
}__attribute__ ((__packed__))s_adcs_frmt_sd;

/**
 * @brief Load File Download Block message structure
 */
typedef struct
{
   uint8 filetype;  /*!< File Type Ref:- e_adcs_filetype*/
   uint8 ctr;                 /*!< Counter */
   uint32 offset;             /*!< Offset */
   uint16 len;                /*!< Length */
}__attribute__ ((__packed__))s_adcs_load_dwnld_blk;

/**
 * @brief Initiate File Upload message structure
 */
typedef struct
{
    uint8_t upld_prtl; /*!< File Upload Protocol 1 - FTM / 0 - Direct */
    uint8_t dest;  /*!< File upload destination Ref:- e_adcs_file_upload_dest*/
    uint8 blk_size;                /*!< Block Size */
}__attribute__ ((__packed__))s_adcs_init_file_upld;

/**
 *@brief Final Upload packet structure
 */
typedef struct
{
    uint16 pkt_no;     /*!< Packet Number */
    uint8 filebytes[20];    /*!< File Bytes */
}__attribute__ ((__packed__))s_adcs_final_upld_pkt;

/**
 * @brief Finalize upload block structure
 */
typedef struct
{
    uint8_t dest;  /*!< File upload destination Ref:- e_adcs_file_upload_dest*/
    uint32 offset; /*!< Offset */
    uint16 blk_len;/*!< Block Length */
}__attribute__ ((__packed__))s_adcs_flze_upld_blk;

/**
 * @brief Initiate download burst structure
 */
typedef struct
{
    uint8 msg_len;         /*!< Message Length */
    uint8 ignore_holemap;  /*!< Egnore Hole map */
}__attribute__ ((__packed__))s_adcs_init_dwnld_burst;

/**
 * @brief Trigger ADCS Loop with Simulated Sensor Data message structure
 */
typedef struct
{
    uint32  unix_time;        /*!< Unix time for iteration [s] */
    uint16  css_raw1;         /*!< CSS1 raw measurement  */
    uint16  css_raw2;         /*!< CSS2 raw measurement  */
    uint16  css_raw3;         /*!< CSS3 raw measurement  */
    uint16  css_raw4;         /*!< CSS4 raw measurement  */
    uint16  css_raw5;         /*!< CSS5 raw measurement  */
    uint16  css_raw6;         /*!< CSS6 raw measurement  */
    uint16  css_raw7;         /*!< CSS7 raw measurement  */
    uint16  css_raw8;         /*!< CSS8 raw measurement  */
    uint16  css_raw9;         /*!< CSS9 raw measurement  */
    uint16  css_raw10;        /*!< CSS10 raw measurement  */
    int16   cam1_rawx;        /*!< Cam1 sensor raw X angle  */
    int16   cam1_rawy;        /*!< Cam1 sensor raw Y angle  */
    uint8   cam1_busy;        /*!< Cam1 sensor capture status  */
    uint8   cam1_result;      /*!< Cam1 sensor detection result  */
    int16   cam2_rawx;        /*!< Cam2 sensor raw X angle  */
    int16   cam2_rawy;        /*!< Cam2 sensor raw Y angle  */
    uint8   cam2_busy;        /*!< Cam2 sensor capture status  */
    uint8   cam2_result;      /*!< Cam2 sensor detection result  */
    int16   mag_rawx;         /*!< Raw magnetometer X measurement  */
    int16   mag_rawy;         /*!< Raw magnetometer Y measurement  */
    int16   mag_rawz;         /*!< Raw magnetometer Z measurement  */
    int32   rate_rawx;        /*!< Raw X rate sensor measurement  */
    int32   rate_rawy;        /*!< Raw Y rate sensor measurement  */
    int32   rate_rawz;        /*!< Raw Z rate sensor measurement  */
    int16   wheel_raw_x;      /*!< Raw X wheel speed measurement [rpm] */
    int16   wheel_raw_y;      /*!< Raw Y wheel speed measurement [rpm] */
    int16   wheel_raw_z;      /*!< Raw Z wheel speed measurement [rpm] */
    int16   star1_camx;       /*!< Star1 camera X-vector  */
    int16   star1_camy;       /*!< Star1 camera Y-vector  */
    int16   star1_camz;       /*!< Star1 camera Z-vector  */
    int16   star1_initialx;   /*!< Star1 inertial X-vector  */
    int16   star1_initialy;   /*!< Star1 inertial Y-vector  */
    int16   star1_initialz;   /*!< Star1 inertial Z-vector  */
    int16   star2_camx;       /*!< Star2 camera X-vector  */
    int16   star2_camy;       /*!< Star2 camera Y-vector  */
    int16   star2_camz;       /*!< Star2 camera Z-vector  */
    int16   star2_initialx;   /*!< Star2 inertial X-vector  */
    int16   star2_initialy;   /*!< Star2 inertial Y-vector  */
    int16   star2_initialz;   /*!< Star2 inertial Z-vector  */
    int16   star3_camx;       /*!< Star3 camera X-vector  */
    int16   star3_camy;       /*!< Star3 camera Y-vector  */
    int16   star3_camz;       /*!< Star3 camera Z-vector  */
    int16   star3_initialx;   /*!< Star3 inertial X-vector  */
    int16   star3_initialy;   /*!< Star3 inertial Y-vector  */
    int16   star3_initialz;   /*!< Star3 inertial Z-vector  */
    uint8   gps_sol_sts; /*!< GPS Solution Status Ref:- e_adcs_gps_sol_sts */
    uint16  gps_ref_week;  /*!< GPS Reference Week  */
    uint32  gps_time_ms;   /*!< GPS Time Milliseconds  ([ms]) */
    int32   ecef_posx;     /*!< ECEF Position X  ([m]) */
    int16   ecef_velx;     /*!< ECEF Velocity X  ([m/s]) */
    int32   ecef_posy;     /*!< ECEF Position Y  ([m]) */
    int16   ecef_vely;     /*!< ECEF Velocity Y  ([m/s]) */
    int32   ecef_posz;     /*!< ECEF Position Z  ([m]) */
    int16   ecef_velz;     /*!< ECEF Velocity Z  ([m/s]) */
    double  x_pos_std_dev; /*!< X-pos Standard Deviation  ([m]) */
    double  y_pos_std_dev; /*!< Y-pos Standard Deviation  ([m]) */
    double  z_pos_std_dev; /*!< Z-pos Standard Deviation  ([m]) */
    uint8   x_vel_std_dev; /*!< X-vel Standard Deviation  ([m/s]) */
    uint8   y_vel_std_dev; /*!< Y-vel Standard Deviation  ([m/s]) */
    uint8   z_vel_std_dev; /*!< Z-vel Standard Deviation  ([m/s]) */
}__attribute__ ((__packed__))s_adcs_simu_sns_data;

/**
 * @brief convert to JPG file format structure
 */
typedef struct
{
    uint8   srs_file_str; /*!< Source File Counter  */
    uint8   qlty_fac;     /*!< Quality Factor  */
    uint8   white_bal;    /*!< White Balance  */
}__attribute__ ((__packed__))s_adcs_con_to_jpg;

/**
 * @brief save image command structure
 */
typedef struct
{
    uint8 cam_sel; /*!< Camera Selection ([s]) Ref:- e_adcs_cam_sel*/
    uint8 imsize;  /*!< Image size selection ([s]) Ref:- e_adcs_image_size */
}__attribute__ ((__packed__))s_adcs_save_img;

/**
 * @brief ADCS Cache command structure
 */
typedef struct
{
    uint8_t enabled;  /*!< Enable Cache state */
}__attribute__ ((__packed__))s_adcs_cache_cmd;

/**
 * @brief SRAM Scrub Parameters strcuture
 */
typedef struct
{
    uint16_t scrub_size;  /*!< SRAM Scrub Size*/
}__attribute__ ((__packed__))s_adcs_sram_scrub;

/**
 * @brief  Unix Time Save to Flash message structure
 */
typedef struct
{
    uint8_t save_now;      /*!< Save current Unix time to flash memory */
    uint8_t save_on_upt;   /*!< Save Unix time to flash memory whenever
                            there is a command to update the Unix time */
    uint8_t save_periodic; /*!< Save Unix time to flash memory periodically */
    uint8_t period;        /*!< Interval at which to save Unix time to
                            flash memory  (measurment unit is [s]) */
}__attribute__ ((__packed__))s_adcs_utc_flash;

/**
 * @brief ASGP4 Parameters structure
 */
typedef struct
{
    double ainclcoeff;            /*!< Inclination filter coefficient  */
    double araancoeff;            /*!< RAAN filter coefficient  */
    double aecccoeff;             /*!< Eccentricity filter coefficient  */
    double aargpercoeff;          /*!< Argument of perigee filter coefficient*/
    double atimecoeff;            /*!< Time filter coefficient  */
    double aposcoeff;             /*!< Position filter coefficient  */
    double asgp4maxposerror;      /*!< Maximum position error for
                                    asgp4 to continue working  */
    uint8_t asgp4filter;          /*!< The type of filter asgp4 is using
                                    Ref:- e_adcs_asgpfilter */
    double asgp4xp;               /*!< Polar coefficient xp  */
    double asgp4yp;               /*!< Polar coefficient yp  */
    uint8_t asgp4gpsrollover;     /*!< GPS roll over number  */
    double asgp4possdth;          /*!< Maximum position standard deviation
                                        for asgp4 to operate  */
    double asgp4velsdth;          /*!< Maximum velocity standard deviation
                                        for asgp4 to operate  */
    uint8_t asgp4minsat;          /*!<Minimum satellites for asgp4 to operate*/
    double asgp4timegain;         /*!< Time offset compensation gain  */
    double asgp4maxlag;           /*!< Maximum lagged timestamp measurements to
                                        incorporate  */
    uint8_t asgp4minsamples;      /*!< Minimum samples to use for
                                    asgp4 process*/
}__attribute__ ((__packed__))s_adcs_asgp4_param;

/**
 * @brief  ADCS User Controller estimation settings
 */
typedef struct
{
    uint8_t user_ctrlr_sett[48]; /*!< Settings for user coded control mode(s)*/
    uint8_t user_est_sett[48];   /*!< Settings for user coded
                                    estimation mode(s)  */
}__attribute__ ((__packed__))s_adcs_user_ctrlr_est_sett;

/**
 * @brief SD Log1 Configuration message structure
 */
typedef struct
{
    uint8_t log_sel[10];   /*!< Log Selection - up to 80 flags indicating
                                which telemetry frames should be logged  */
    uint16_t period;       /*!< Log period. Set to 0 to disable logging  */
    uint8_t dest;          /*!< Which SD card to use to store log file
                                            Ref:- e_adcs_sdlog_sel */
}__attribute__ ((__packed__))s_adcs_sdlog_cfg;

/**
 * @brief UART Log Configuration message structure
 */
typedef struct
{
    uint8_t selection[10]; /*!< Log Selection - up to 80 flags indicating which
                            telemetry frames should be logged  */
    uint16_t period;       /*!< Log period. Set to 0 to disable logging  */
}__attribute__ ((__packed__))s_adcs_uart_log_cfg;

/**
 * @brief Holemap structure
 */
typedef struct
{
    uint8_t holemap[16];  /*!< 16 Byte Hole map */
}__attribute__ ((__packed__))s_adcs_holemap;

/**
 * @brief ADCS Misc measurements structure
 */
typedef struct
{
    double cube_star_cur;  /*!< CubeStar Current(unit is [mA]) */
    double magtorq_cur;    /*!< Magnetorquer Current(unit is [mA]) */
    double cube_star_temp; /*!< CubeStar MCU temperature(unit is [C]) */
}__attribute__ ((__packed__))s_adcs_misc_cur;

/**
 * @brief ASGP4 TLEs message structure
 */
typedef struct
{
    uint8_t asgp4_cmplt;         /*!< Is ASGP4 process complete  */
    uint8_t asgp_err;            /*!< The error state that the asgp4 module
                                    Ref:- e_adcs_asgp4_error*/
    float asgp4_epoch;           /*!< Epoch from asgp4  */
    float asgp4_incli;           /*!< Inclination from asgp4  */
    float asgp4_raan;            /*!< RAAN from asgp4  */
    float asgp4_ecc;             /*!< Eccentricity from asgp4  */
    float asgp4_aop;             /*!< AOP from asgp4  */
    float asgp4_ma;              /*!< MA from asgp4  */
    float asgp4_mm;              /*!< MM from asgp4  */
    float asgp4_bstar;           /*!< BStar from asgp4  */
}__attribute__ ((__packed__))s_adcs_asgp4_tle;


/**
 * @brief Star Performance2 telemetry struture
 */
typedef struct
{
    uint8_t img_cptr_success;    /*!< Image Capture Success  (unit is [flag])*/
    uint8_t detect_success;      /*!< Detection Success  (unit is [flag]) */
    uint8_t ident_success;       /*!< Identification Success  (unit is [flag])*/
    uint8_t att_success;         /*!< Attitude Success  (unit is [flag]) */
    uint8_t processing_time_err; /*!< Processing time Error  (unit is [flag])*/
    uint8_t trck_module_enabled; /*!< Tracking Module Enabled(unit is [flag])*/
    uint8_t prediction_enabled;  /*!< Prediction Enabled  (unit is [flag])*/
    uint8_t comms_err;           /*!< Comms error  (unit is [flag]) */
    uint16_t deltat;             /*!< Sample Period  */
    uint8_t s1conf;              /*!< Star 1 confidence(unit is [percentage])*/
    uint8_t s2conf;              /*!< Star 2 confidence(unit is [percentage])*/
    uint8_t s3conf;              /*!< Star 3 confidence(unit is [percentage])*/
}__attribute__ ((__packed__))s_adcs_star_perform2;

/**
 * @brief Current ADCS State
 */
typedef struct
{
    uint8_t att_est_mode;           /*!< Attitude Estimation Mode */
    uint8_t ctrl_mode;              /*!< Control Mode */
    uint8_t run_mode : 2;           /*!< ADCS Run mode */
    uint8_t asgp4_mode : 2;         /*!< ASGP4 Mode */
    uint8_t ctrl_sig_en :1;         /*!< Cube Control Signal Enabled */
    uint8_t ctrl_motor_en : 1;      /*!< Cube Control Motor Enabled */
    uint8_t cubesense1_en : 1;      /*!< Cubesense1 Enabled */
    uint8_t cubesense2_en : 1;      /*!< Cubesense2 Enabled */
    uint8_t rw1_en : 1;             /*!< Cube Wheel 1 Enabled */
    uint8_t rw2_en : 1;             /*!< Cube Wheel 2 Enabled */
    uint8_t rw3_en : 1;             /*!< Cube Wheel 3 Enabled */
    uint8_t star_en : 1;            /*!< Cube Star Enabled */
    uint8_t gps_recv_en : 1;        /*!< GPS Receiver Enabled */
    uint8_t gps_lna_pwr_en : 1;     /*!< GPS LNA Power Enabled */
    uint8_t motor_driver_en : 1;    /*!< Motor Driver Enabled */
    uint8_t sun_above_horizon : 1;  /*!< Sun is Above Local Horizon */
    uint8_t cubesens1_comm_err : 1; /*!< Cubesense1 Communications Error */
    uint8_t cubesens2_comm_err : 1; /*!< Cubesense2 Communications Error */
    uint8_t ctrl_sig_comm_err : 1;  /*!< CubeControl Signal Communications
                                       Error */
    uint8_t ctrl_motor_comm_err : 1; /*!< CubeControl Motor Communications
                                       Error */
    uint8_t rw1_comm_err : 1;        /*!< Cube Wheel1 Communications Error */
    uint8_t rw2_comm_err : 1;         /*!< Cube Wheel2 Communications Error */
    uint8_t rw3_comm_err : 1;        /*!< Cube Wheel3 Communications Error */
    uint8_t star_comm_err : 1;       /*!< Cube Star Communications Error */
    uint8_t mgntr_range_err : 1;     /*!< Magnetometer Range Error */
    uint8_t cam1_sram_ocur : 1;      /*!< Cam1 SRAM Overcurrent Detected */
    uint8_t cam1_3v3_ocur : 1;        /*!< Cam1 3v3 Overcurrent Detected */
    uint8_t cam1_sns_busy_err : 1;   /*!< Cam1 Sensor Busy Error */
    uint8_t cam1_sns_err : 1;        /*!< Cam1 Sensor Detection Error */
    uint8_t sun_sns_range_err : 1;   /*!< Sun Sensor Range Error */
    uint8_t cam2_sram_ocur : 1;      /*!< Cam2 SRAM Overcurrent Detected */
    uint8_t cam2_3v3_ocur : 1;       /*!< Cam2 3v3 Overcurrent Detected */
    uint8_t cam2_sns_busy_err : 1;   /*!< Cam2 Sensor Busy Error */
    uint8_t cam2_sns_err : 1;        /*!< Cam2 Sensor Detection Error */
    uint8_t nadir_sns_range_err : 1; /*!< Nadir Sensor Range Error */
    uint8_t rate_sns_range_err : 1;  /*!< Rate Sensor Range Error */
    uint8_t rw_spd_range_err : 1;    /*!< Wheel Speed Range Error */
    uint8_t css_err : 1;             /*!< Coarse Sun Sensor Error */
    uint8_t star_trckr_match_err : 1;/*!< Star Tracker Match Error */
    uint8_t star_trckr_ocur : 1;     /*!< Star Tracker Overcurrent Detected */
    uint8_t orbit_param_invalid : 1;   /*!< Orbit Parameters are Invalid */
    uint8_t cfg_invalid : 1;           /*!< Configuration is Invalid */
    uint8_t ctrl_mode_chg_not_alwd : 1;/*!< Control Mode Change is
                                          not allowed */
    uint8_t est_chg_not_alwd : 1;      /*!< Estimator Change is not allowed */
    uint8_t cur_mgntr_mode : 2;        /*!<Current Magnetometer Sampling Mode*/
    uint8_t magfield_model_err : 1;    /*!< Modelled and measured magnetic
                                         field differs in size */
    uint8_t node_reco_err : 1;         /*!< Node Recovery Error */
    uint8_t cubesense1_runt_err : 1;   /*!< CubeSense1 Runtime Error */
    uint8_t cubesense2_runt_err : 1;   /*!< CubeSense2 Runtime Error */
    uint8_t cubectrl_sig_runt_err : 1; /*!< CubeControl Signal Runtime Error */
    uint8_t cubectrl_m_runt_err : 1;   /*!< CubeControl Motor Runtime Error */
    uint8_t rw1_runt_err : 1;          /*!< CubeWheel1 Runtime Error */
    uint8_t rw2_runt_err : 1;          /*!< CubeWheel2 Runtime Error */
    uint8_t rw3_runt_err : 1;          /*!< CubeWheel3 Runtime Error */
    uint8_t star_runt_err : 1;         /*!< CubeStar Runtime Error */
    uint8_t mgntr_err : 1;             /*!< Magnetometer Error */
    uint8_t rate_sns_fail : 1;         /*!< Rate Sensor Failure */

}__attribute__ ((__packed__))s_adcs_state;


/***************************Health Metrics Structures**********************/

// Health Metrics Id Enumeration
typedef enum
{
    ADCS_HM_SESNOR_CURRENT,         ///< Sensor Current Consumption
    ADCS_HM_CONS_CURRENT,           ///< Controller Current Consumption
    ADCS_HM_RW_CURRENT,             ///< Reaction Wheel Current Measure
    ADCS_HM_CSS_VECTOR,             ///< Coarse Sun Sensor Vector
    ADCS_HM_EST_ATTITUDE_ANGLE,     ///< Estimated Attitude Angle
    ADCS_HM_RAW_MAG_MEASURE,        ///< Raw Magnetometer Measurement
    ADCS_HM_RAW_RATE_SENSOR_MEASURE,///< Raw Rate Sensor Sensor Measurement
    ADCS_HM_RATE_SENSOR_MEASURE,    ///< Rate Sensor Measurement
    ADCS_HM_FSS_VECTOR,             ///< Fine Sun Sensor Vector
    ADCS_HM_EST_RATES,              ///< Estimated Angular rates
    ADCS_HM_MISC_CURRENT,           ///< ADCS Misc Current Measurement
    ADCS_HM_TEMPERATURE,            ///< ADCS Temperature
    ADCS_HM_RATE_SENSOR_TEMPERATURE,///< Rate Sensor Temperature
    ADCS_HM_CURRENT_STATE,          ///< Current ADCS State
    ADCS_HM_MAX                     ///< Health metrics Maximum
}e_adcs_health_metrics_id;

/**
 * @brief Health Metrics Structure - Sensors Current measurement
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    double nadir_3v3_current;   /*!< Nadir Sensor 3V3 current measurement */
    double fss_3v3_current;     /*!< FSS 3V3 current measurement */
    double nadir_sram_current;  /*!< Nadir Sensor SRAM current measurement */
    double fss_sram_current;    /*!< FSS SRAM current measurement */
}__attribute__ ((__packed__))s_adcs_hm_sen_cur;

/**
 * @brief Health Metrics Structure - Consumed Current measurement
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    double current_3v3;         /*!< Current value measured in 3.3V */
    double current_5v;          /*!< Current value measured in 5V */
    double current_vbat;        /*!< Vbat current value */
}__attribute__ ((__packed__))s_adcs_hm_cons_cur;

/**
 * @brief Health Metrics Structure - Reaction wheel Current measurement
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    double rw1_current;         /*!< Reaction wheel current 1 */
    double rw2_current;         /*!< Reaction wheel current 2 */
    double rw3_current;         /*!< Reaction wheel current 3 */
}__attribute__ ((__packed__))s_adcs_hm_rw_cur;

/**
 * @brief Health Metrics Structure - CSS Vector
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    int16_t coarse_sun_x;       /*!< X axis Coarse Sun vector */
    int16_t coarse_sun_y;       /*!< Y axis Coarse Sun vector */
    int16_t coarse_sun_z;       /*!< Z axis Coarse Sun vector */
}__attribute__ ((__packed__))s_adcs_hm_css_vector;

/**
 * @brief Health Metrics Structure - Estimated Attitude Angles
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    double roll;                /*!< Estimated Roll Angle */
    double pitch;               /*!< Estimated Pitch Angle */
    double yaw;                 /*!< Estimated Yaw Angle */
}__attribute__ ((__packed__))s_adcs_hm_est_att_angl;

/**
 * @brief Health Metrics Structure - Raw Magnetometer Measurement
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    int16_t mag_raw_x;          /*!< Raw magnetometer X measurement */
    int16_t mag_raw_y;          /*!< Raw magnetometer Y measurement */
    int16_t mag_raw_z;          /*!< Raw magnetometer Z measurement */
}__attribute__ ((__packed__))s_adcs_hm_raw_mag_measure;

/**
 * @brief Health Metrics Structure - Raw Rate Sensor Measurement
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    int16_t raw_rate_x;         /*!< X axis raw rate sensor measurement */
    int16_t raw_rate_y;         /*!< Y axis raw rate sensor measurement */
    int16_t raw_rate_z;         /*!< Z axis raw rate sensor measurement */
}__attribute__ ((__packed__))s_adcs_hm_raw_rates;

/**
 * @brief Health Metrics Structure - Measured Angular Rates
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    double rate_x;              /*!< Measured X axis Rates */
    double rate_y;              /*!< Measured Y axis Rates */
    double rate_z;              /*!< Measured Z axis Rates */
}__attribute__ ((__packed__))s_adcs_hm_meas_rates;

/**
 * @brief Health Metrics Structure - Measured Fine Sun Sensor Vector
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    int16_t sun_x;              /*!< X-Axis Sun Vector */
    int16_t sun_y;              /*!< Y-Axis Sun Vector */
    int16_t sun_z;              /*!< Z-Axis Sun Vector */
}__attribute__ ((__packed__))s_adcs_hm_fss_vec;

/**
 * @brief Health Metrics Structure - Estimated Angular Rates
 */
typedef struct
{
    uint8_t status;             /*!< Operation Status */
    uint64_t time;              /*!< Epoch Time */
    int16_t est_rate_x;         /*!< Estimated X Angular Rate */
    int16_t est_rate_y;         /*!< Estimated Y Angular Rate */
    int16_t est_rate_z;         /*!< Estimated Z Angular Rate */
}__attribute__ ((__packed__))s_adcs_hm_est_rates_sns;

/**
 * @brief Health Metrics Structure - ADCS Misc Current Measurement
 */
typedef struct
{
    uint8_t status;           /*!< Operation Status */
    uint64_t time;            /*!< Epoch Time */
    double cubestar_cur;      /*!< CubeStar Current Measurement */
    double mgntqr_cur;        /*!< Magnetorquer Current Measurement */
    double cubestar_mcu_temp; /*!< CubeStar MCU Temperature */
}__attribute__ ((__packed__))s_adcs_hm_misc_cur;

/**
 * @brief Health Metrics Structure - ADCS Temperature
 */
typedef struct
{
    uint8_t status;         /*!< Operation Status */
    uint64_t time;          /*!< Epoch Time */
    int16_t mcu_temp;       /*!< MCU Temperature */
    double mgntr_temp;      /*!< Magnetometer Temperature */
    double re_mgntr_temp;   /*!< Redundant Magnetometer Temperature */
}__attribute__ ((__packed__))s_adcs_hm_temp;

/**
 * @brief Health Metrics Structure - Estimated Rate Sensor Temperature
 */
typedef struct
{
    uint8_t status;         /*!< Operation Status */
    uint64_t time;          /*!< Epoch Time */
    int16_t x_rate_sns;     /*!< X Rate Sensor Temperature */
    int16_t y_rate_sns;     /*!< Y Rate Sensor Temperature */
    int16_t z_rate_sns;     /*!< Z Rate Sensor Temperature */
}__attribute__ ((__packed__))s_adcs_hm_est_rate_sns_temp;


/**
 * @brief Health Metrics Structure - Current ADCS State
 */
typedef struct
{
    uint8_t status;                 /*!< Operation Status */
    uint64_t time;                  /*!< Epoch Time */
    uint8_t att_est_mode;           /*!< Attitude Estimation Mode */
    uint8_t ctrl_mode;              /*!< Control Mode */
    uint8_t run_mode : 2;           /*!< ADCS Run mode */
    uint8_t asgp4_mode : 2;         /*!< ASGP4 Mode */
    uint8_t ctrl_sig_en :1;         /*!< Cube Control Signal Enabled */
    uint8_t ctrl_motor_en : 1;      /*!< Cube Control Motor Enabled */
    uint8_t cubesense1_en : 1;      /*!< Cubesense1 Enabled */
    uint8_t cubesense2_en : 1;      /*!< Cubesense2 Enabled */
    uint8_t rw1_en : 1;             /*!< Cube Wheel 1 Enabled */
    uint8_t rw2_en : 1;             /*!< Cube Wheel 2 Enabled */
    uint8_t rw3_en : 1;             /*!< Cube Wheel 3 Enabled */
    uint8_t star_en : 1;            /*!< Cube Star Enabled */
    uint8_t gps_recv_en : 1;        /*!< GPS Receiver Enabled */
    uint8_t gps_lna_pwr_en : 1;     /*!< GPS LNA Power Enabled */
    uint8_t motor_driver_en : 1;    /*!< Motor Driver Enabled */
    uint8_t sun_above_horizon : 1;  /*!< Sun is Above Local Horizon */
    uint8_t cubesens1_comm_err : 1; /*!< Cubesense1 Communications Error */
    uint8_t cubesens2_comm_err : 1; /*!< Cubesense2 Communications Error */
    uint8_t ctrl_sig_comm_err : 1;  /*!< CubeControl Signal Communications
                                       Error */
    uint8_t ctrl_motor_comm_err : 1; /*!< CubeControl Motor Communications
                                       Error */
    uint8_t rw1_comm_err : 1;        /*!< Cube Wheel1 Communications Error */
    uint8_t rw2_comm_err : 1;         /*!< Cube Wheel2 Communications Error */
    uint8_t rw3_comm_err : 1;        /*!< Cube Wheel3 Communications Error */
    uint8_t star_comm_err : 1;       /*!< Cube Star Communications Error */
    uint8_t mgntr_range_err : 1;     /*!< Magnetometer Range Error */
    uint8_t cam1_sram_ocur : 1;      /*!< Cam1 SRAM Overcurrent Detected */
    uint8_t cam1_3v3_ocur : 1;        /*!< Cam1 3v3 Overcurrent Detected */
    uint8_t cam1_sns_busy_err : 1;   /*!< Cam1 Sensor Busy Error */
    uint8_t cam1_sns_err : 1;        /*!< Cam1 Sensor Detection Error */
    uint8_t sun_sns_range_err : 1;   /*!< Sun Sensor Range Error */
    uint8_t cam2_sram_ocur : 1;      /*!< Cam2 SRAM Overcurrent Detected */
    uint8_t cam2_3v3_ocur : 1;       /*!< Cam2 3v3 Overcurrent Detected */
    uint8_t cam2_sns_busy_err : 1;   /*!< Cam2 Sensor Busy Error */
    uint8_t cam2_sns_err : 1;        /*!< Cam2 Sensor Detection Error */
    uint8_t nadir_sns_range_err : 1; /*!< Nadir Sensor Range Error */
    uint8_t rate_sns_range_err : 1;  /*!< Rate Sensor Range Error */
    uint8_t rw_spd_range_err : 1;    /*!< Wheel Speed Range Error */
    uint8_t css_err : 1;             /*!< Coarse Sun Sensor Error */
    uint8_t star_trckr_match_err : 1;/*!< Star Tracker Match Error */
    uint8_t star_trckr_ocur : 1;     /*!< Star Tracker Overcurrent Detected*/
    uint8_t orbit_param_invalid : 1;   /*!< Orbit Parameters are Invalid */
    uint8_t cfg_invalid : 1;           /*!< Configuration is Invalid */
    uint8_t ctrl_mode_chg_not_alwd : 1;/*!< Control Mode Change is not
                                            allowed */
    uint8_t est_chg_not_alwd : 1;      /*!< Estimator Change is not allowed */
    uint8_t cur_mgntr_mode : 2;        /*!<Current Magnetometer Sampling Mode*/
    uint8_t magfield_model_err : 1;    /*!< Modelled and measured magnetic
                                          field differs in size */
    uint8_t node_reco_err : 1;         /*!< Node Recovery Error */
    uint8_t cubesense1_runt_err : 1;   /*!< CubeSense1 Runtime Error */
    uint8_t cubesense2_runt_err : 1;   /*!< CubeSense2 Runtime Error */
    uint8_t cubectrl_sig_runt_err : 1; /*!< CubeControl Signal Runtime Error */
    uint8_t cubectrl_m_runt_err : 1;   /*!< CubeControl Motor Runtime Error */
    uint8_t rw1_runt_err : 1;          /*!< CubeWheel1 Runtime Error */
    uint8_t rw2_runt_err : 1;          /*!< CubeWheel2 Runtime Error */
    uint8_t rw3_runt_err : 1;          /*!< CubeWheel3 Runtime Error */
    uint8_t star_runt_err : 1;         /*!< CubeStar Runtime Error */
    uint8_t mgntr_err : 1;             /*!< Magnetometer Error */
    uint8_t rate_sns_fail : 1;         /*!< Rate Sensor Failure */

}__attribute__ ((__packed__))s_adcs_hm_crnt_state;

/**
 * @brief ADCS Raw CSS measurement
 */
typedef struct
{
    uint8_t sample_ad;  /*!< Sampled A/D value corresponding to sun angle */
}__attribute__ ((__packed__))s_adcs_raw_css;

/***************************API Reference**********************************/

/**
 * @brief Function to send telecommand to BSK through socket interface
 *
 * @param[in] tc_id : Telecommand ID
 * @param[in] tc_buffer : pointer to telecommand buffer
 * @param[in] tx_size : size of transmit
 *
 * @return status of socket send
 */
int8 adcs_sendtc_bsk(uint8 tc_id, uint8 *tx_buffer, uint16 tx_size);

/**
 * @brief Function to Request telemetry to BSK through socket interface
 *
 * @param[in] tlmId : Telecommand ID
 * @param[out] msgBuffer : pointer to telecommand buffer
 * @param[in] len : size of transmit
 *
 * @return status of socket receive
 */
int8 adcs_requesttlm_bsk(uint8 tlmId, uint8* msgBuffer, uint16 len);

/**
 * @brief Function to handle basilisk bypass command
 *
 * @param[in] tx_data    : pointer to the data to be transmitted to adcs.
 * @param[out] rx_data   : pointer to the data received from adcs.
 * @param[in] tx_size    : pointer to size of transmitted data.
 * @param[out] rx_size   : pointer to size of received data.
 *
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_basilisk_bypass_mode(uint8 *tx_data, uint8 *rx_data,
        uint16 tx_size, uint16 *rx_size);

/**
 * @brief Function to config power status of sensors & actuators
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] pwr_on_off_req: structure pointer to s_adcs_pwr_cmd
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_power_on(s_adcs_ctx *adcs_ctx,
        s_adcs_pwr_cmd *pwr_on_off_req);

/**
 * @brief Function to set tle parameter
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] tle_params    : structure pointer to s_tle_config
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_tle_params(s_adcs_ctx *adcs_ctx,\
        s_adcs_tle *tle_params);

/**
 * @brief Function to set current time to ADCS
 * @param[in] adcs_ctx    : Pointer to ADCS context
 * @param[in] utc_time    : structure pointer to s_adcs_time
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_utc_time(s_adcs_ctx *adcs_ctx,\
        s_adcs_time *utc_time);

/**
 * @brief Function to set adcs sensors
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] sensor_type   : Enum to sensor types
 * @param[in] sensor_id     : Specified sensor on same type
 * @param[in] sensor_cfg    : Union pointer to u_adcs_sensor_config
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_sensor_params(s_adcs_ctx *adcs_ctx,\
        e_adcs_sensor_type sensor_type,uint8_t sensor_id,\
        u_adcs_sensor_config *sensor_cfg);

/**
 * @brief Function to set adcs acutator
 * @param[in] adcs_ctx        : Pointer to ADCS context
 * @param[in] actuator_type   : Enum to autator types
 * @param[in] actuator_id     : Specified acutator on same type
 * @param[in] actuator_cfg    : Union pointer to u_adcs_acutator_config
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_actuator_params(s_adcs_ctx *adcs_ctx,\
        e_adcs_actuator_type actuator_type,uint8_t actuator_id,\
        u_adcs_acutator_config *actuator_cfg);

/**
 * @brief Function to set control mode parameters
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] ctrl_mode_param   : structure to control mode configuration
 * @param[in] ctrl_cfg_parm     : Union pointer to u_control_mode_param
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_ctrl_mode(s_adcs_ctx *adcs_ctx,
        s_adcs_ctrl_mode *ctrl_mode_param,\
        u_control_mode_param *ctrl_cfg_parm);

/**
 * @brief Function to Reset ADCS
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] reset_params  : Structure pointer to s_adcs_reset
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_reset(s_adcs_ctx *adcs_ctx,\
        s_adcs_reset *reset_params);

/**
 * @brief Function to set moment of inertia
 * @param[in] adcs_ctx    : Pointer to ADCS context
 * @param[in] moi_params  : Structure pointer to s_adcs_moi
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_mom_interia(s_adcs_ctx *adcs_ctx,\
        s_adcs_moi *moi_params);
/**
 * @brief Abstracted function for clear error command
 * @param[in] adcs_ctx    : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_clear_error(s_adcs_ctx *adcs_ctx);

/**
 * @brief Abstracted function to save orbit parameters
 * @param[in] adcs_ctx    : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_save_orbit(s_adcs_ctx *adcs_ctx);

/**
 * @brief Function to set Magnetometer mode
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] magmtr_mode   : Structure pointer to e_adcs_magmtr_mode_val
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_magnetometer_mode(s_adcs_ctx *adcs_ctx,\
        uint8_t magmtr_mode);

/**
 * @brief Function to set Gyro configuration
 * @param[in] adcs_ctx     : Pointer to ADCS context
 * @param[in] gyro_param   : Structure pointer to s_adcs_gyro_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_gyro_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_gyro_cfg *gyro_param);

/**
 * @brief Function to set CSS configuration
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] css_param     : Structure pointer to s_adcs_css_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_css_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_css_cfg *css_param);

/**
 * @brief Function to set Star Tracker configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] star_trkr_param   : Structure pointer to s_adcs_star_trkr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_star_trkr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_trkr_cfg *star_trkr_param);

/**
 * @brief Function to set Magnetometer configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] mgmtr_cfg_param   : Structure pointer to s_adcs_mgmtr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_mgmtr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgmtr_cfg *mgmtr_cfg_param);

/**
 * @brief Function to set Redundant Magnetometer configuration
 * @param[in] adcs_ctx              : Pointer to ADCS context
 * @param[in] red_mgmtr_cfg_param   : Structure pointer to s_adcs_mgmtr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_red_mgmtr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgmtr_cfg *red_mgmtr_cfg_param);

/**
 * @brief Function to set Magnetometer boom
 * @param[in] adcs_ctx           : Pointer to ADCS context
 * @param[in] mgmtr_boom_param   : Structure pointer to s_adcs_mgmtr_boom
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_mgmtr_boom(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgmtr_boom *mgmtr_boom_param);

/**
 * @brief Function to set Magnetorquer output
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] mgntrqr_out_param : Structure pointer to mgntrqr_out_param
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_mgntrqr_out(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgntrqr_out *mgntrqr_out_param);

/**
 * @brief Function to set Reaction wheel speed
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] rw_speed      : Structure pointer to s_adcs_rw_speed
 * @param[in] rw_id         : Reaction wheel instance id
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_rw_speed(s_adcs_ctx *adcs_ctx,\
        uint8 rw_id, s_adcs_rw_speed *rw_speed);

/**
 * @brief Function to set Magnetorquer configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] mgntrqr_cfg_param : Structure pointer to s_adcs_mgntrqr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_mgntrqr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgntrqr_cfg *mgntrqr_cfg_param);

/**
 * @brief Function to set Reaction wheel configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] rw_cfg_param      : Structure pointer to s_adcs_rw_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_rw_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_rw_cfg *rw_cfg_param);

/**
 * @brief Function to set Detumble control parameters
 * @param[in] adcs_ctx              : Pointer to ADCS context
 * @param[in] detumble_param        : Structure pointer to s_adcs_detumble_ctrl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_detumble_ctrl(s_adcs_ctx *adcs_ctx,\
        s_adcs_detumble_ctrl *detumble_param);

/**
 * @brief Function to set Y axis Reaction wheel control
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] y_rw_ctrl         : Structure pointer to s_adcs_y_rw_ctrl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_y_rw_ctrl(s_adcs_ctx *adcs_ctx,\
        s_adcs_y_rw_ctrl *y_rw_ctrl);

/**
 * @brief Function to set Z axis Reaction wheel control
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] z_rw_ctrl         : Structure pointer to s_adcs_z_rw_ctrl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_z_rw_ctrl(s_adcs_ctx *adcs_ctx,\
        s_adcs_z_rw_ctrl *z_rw_ctrl);

/**
 * @brief Function to set Reaction wheel control
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] rw_ctrl           : Structure pointer to s_adcs_rw_ctrl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_rw_ctrl(s_adcs_ctx *adcs_ctx,\
        s_adcs_rw_ctrl *rw_ctrl);

/**
 * @brief Function to set tracking control gain
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] trck_ctrl_gain    : Structure pointer to s_adcs_trck_ctrl_gain
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_trck_ctrl_gain(s_adcs_ctx *adcs_ctx,\
        s_adcs_trck_ctrl_gain *trck_ctrl_gain);

/**
 * @brief Function to set attitude angle parameters
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] att_angle         : Structure pointer to s_adcs_attitude_angl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_attitude_angle(s_adcs_ctx *adcs_ctx,\
        s_adcs_attitude_angl *att_angle);

/**
 * @brief Function to set target tracking parameters
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] trck_trgt_param   : Structure pointer to s_adcs_trck_target
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_trgt_trck(s_adcs_ctx *adcs_ctx,\
        s_adcs_trck_target *trck_trgt_param);

/**
 * @brief Function to set inertial reference
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] inrt_ref_param    : Structure pointer to s_adcs_inrt_ref
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_inrt_ref(s_adcs_ctx *adcs_ctx,\
        s_adcs_inrt_ref *inrt_ref_param);

/**
 * @brief Function to set estimation mode
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] est_mode          : Structure pointer to s_adcs_est_mode
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_est_mode(s_adcs_ctx *adcs_ctx,\
        s_adcs_est_mode *est_mode);

/**
 * @brief Function to set estimation parameters
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] est_param         : Structure pointer to s_adcs_est_param
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_est_param(s_adcs_ctx *adcs_ctx,\
        s_adcs_est_param *est_param);

/**
 * @brief Function to set Fine sun sensor configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] fss_cfg           : Structure pointer to s_adcs_fss_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_fss_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_fss_cfg *fss_cfg);

/**
 * @brief Function to set Nadir configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] nadir_cfg         : Structure pointer to s_adcs_nadir_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_nadir_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_nadir_cfg *nadir_cfg);

/**
 * @brief Function to config Thruster command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] thruster_cmd      : Structure pointer to s_adcs_thruster_cmd
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_thruster_cmd(s_adcs_ctx *adcs_ctx,
        s_adcs_thruster_cmd *thruster_cmd);

/**
 * @brief Function to get Identification
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] id_param         : Structure pointer to s_adcs_id
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_id(s_adcs_ctx *adcs_ctx,\
        s_adcs_id *id_param);

/**
 * @brief Function to get State
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] state_param      : Structure pointer to s_adcs_state
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_state(s_adcs_ctx *adcs_ctx,\
        s_adcs_state *crnt_state);

/**
 * @brief Function to get TLE Configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] tle_param        : Structure pointer to s_adcs_tle
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_tle(s_adcs_ctx *adcs_ctx,\
        s_adcs_tle *tle_param);

/**
 * @brief Function to get Moment of inertia Matrix
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] moi_param        : Structure pointer to s_adcs_moi
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_moi(s_adcs_ctx *adcs_ctx,\
        s_adcs_moi *moi_param);

/**
 * @brief Function to get power configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] pwr_cmd          : Structure pointer to s_adcs_pwr_cmd
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_power(s_adcs_ctx *adcs_ctx,\
        s_adcs_pwr_cmd *pwr_cmd);

/**
 * @brief Function to get magnetic field vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] mag_vector       : Structure pointer to s_adcs_mag_vector
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_mag_vector(s_adcs_ctx *adcs_ctx,\
        s_adcs_mag_vector *mag_vector);

/**
 * @brief Function to get CSS vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] css_sun          : Structure pointer to s_adcs_sun_vector
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_css_sun_vector(s_adcs_ctx *adcs_ctx,\
        s_adcs_sun_vector *css_sun);

/**
 * @brief Function to get FSS vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] fss_sun          : Structure pointer to s_adcs_sun_vector
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_fss_sun_vector(s_adcs_ctx *adcs_ctx,\
        s_adcs_sun_vector *fss_sun);

/**
 * @brief Function to get Nadir vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] nadir_vec        : Structure pointer to s_adcs_nadir_vector
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_nadir_vector(s_adcs_ctx *adcs_ctx,\
        s_adcs_nadir_vector *nadir_vec);

/**
 * @brief Function to get Sensor rate
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] sens_rate        : Structure pointer to s_adcs_rate_sens
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sensor_rate(s_adcs_ctx *adcs_ctx,\
        s_adcs_rate_sens *sens_rate);

/**
 * @brief Function to get star tracker body vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] star_body        : Structure pointer to s_adcs_star_trkr_body
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_body(s_adcs_ctx *adcs_ctx, uint8_t star_id,\
        s_adcs_star_trkr_body *star_body);

/**
 * @brief Function to get star trackere orbit vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] star_orbit       : Structure pointer to s_adcs_star_trkr_orbit
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_orbit(s_adcs_ctx *adcs_ctx, uint8_t star_id,\
        s_adcs_star_trkr_orbit *star_orbit);

/**
 * @brief Function to get raw nadir sensor meaurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_nadir        : Structure pointer to s_adcs_nadir_sens
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_nadir(s_adcs_ctx *adcs_ctx,\
        s_adcs_nadir_sens *raw_nadir);

/**
 * @brief Function to get raw fine sun sensor measurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_fss          : Structure pointer to s_adcs_fss_sens
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_fss(s_adcs_ctx *adcs_ctx,\
        s_adcs_fss_sens *raw_fss);

/**
 * @brief Function to get raw magnetometer measurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_mgmtr        : Structure pointer to s_adcs_raw_mgmtr
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_magmtr(s_adcs_ctx *adcs_ctx,\
        s_adcs_raw_mgmtr *raw_mgmtr);

/**
 * @brief Function to get raw GPS staus
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_gps        : Structure pointer to s_adcs_gps_s
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_gps_status(s_adcs_ctx *adcs_ctx,\
        s_adcs_gps_s *raw_gps);

/**
 * @brief Function to get raw GPS time
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_gps_time     : Structure pointer to s_adcs_gps_time
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_gps_time(s_adcs_ctx *adcs_ctx,\
        s_adcs_gps_time *raw_gps_time);

/**
 * @brief Function to get raw GPS X axis
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_gps_x        : Structure pointer to s_adcs_gps_x
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_gps_x(s_adcs_ctx *adcs_ctx,\
        s_adcs_gps_x *raw_gps_x);

/**
 * @brief Function to get raw GPS Y axis
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_gps_y        : Structure pointer to s_adcs_gps_y
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_gps_y(s_adcs_ctx *adcs_ctx,\
        s_adcs_gps_y *raw_gps_y);

/**
 * @brief Function to get raw GPS Z axis
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_gps_z        : Structure pointer to s_adcs_gps_z
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_gps_z(s_adcs_ctx *adcs_ctx,\
        s_adcs_gps_z *raw_gps_z);

/**
 * @brief Function to get star magnitude
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] star_trkr_mag    : Structure pointer to s_adcs_star_trkr_mag
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_magnitude(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_trkr_mag *star_trkr_mag);

/**
 * @brief Function to get star performance
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] star_perform     : Structure pointer to s_adcs_star_trkr_perform
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_performance(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_trkr_perform *star_perform);

/**
 * @brief Function to get star timing
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] star_timing      : Structure pointer to s_adcs_star_trkr_timing
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_timing(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_trkr_timing *star_timing);

/**
 * @brief Function to get raw sensor measurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_sensor       : Structure pointer to s_adcs_raw_sensor
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_sensor_measure(s_adcs_ctx *adcs_ctx,\
        s_adcs_raw_sensor *raw_sensor);

/**
 * @brief Function to get raw GPS measurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_gps          : Structure pointer to s_adcs_raw_gps
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_gps_measure(s_adcs_ctx *adcs_ctx,\
        s_adcs_raw_gps *raw_gps);

/**
 * @brief Function to get raw star tracker measurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_star_measure : Structure pointer to s_adcs_raw_star_trkr
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_star_measure(s_adcs_ctx *adcs_ctx,\
        s_adcs_raw_star_trkr *raw_star_measure);

/**
 * @brief Function to get raw star tracker data
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_star_data    : Structure pointer to s_adcs_raw_star_trkr_data
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_star_data(s_adcs_ctx *adcs_ctx,uint8_t star_id,
        s_adcs_raw_star_trkr_data *raw_star_data);

/**
 * @brief Function to get raw secondary magnetometer measurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_mgmtr        : Structure pointer to s_adcs_raw_mgmtr
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sec_raw_magmtr_measure(s_adcs_ctx *adcs_ctx,\
        s_adcs_raw_mgmtr *raw_mgmtr);

/**
 * @brief Function to get raw sensor rates
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] raw_rates        : Structure pointer to s_adcs_raw_rate_sens
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_rates(s_adcs_ctx *adcs_ctx,\
        s_adcs_raw_rate_sens *raw_rates);

/**
 * @brief Function to get star tracker estimation rate
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] star_est_rate    : Structure pointer to s_adcs_star_est_rate
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_est_rate(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_est_rate *star_est_rate);

/**
 * @brief Function to get sensor current
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] sens_current     : Structure pointer to s_adcs_sens_cur
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sensor_current(s_adcs_ctx *adcs_ctx,\
        s_adcs_sens_cur *sens_current);

/**
 * @brief Function to get adcs consumed current measurement
 * @param[in] adcs_ctx              : Pointer to ADCS context
 * @param[out] con_current_measure  : Structure pointer to s_adcs_current
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_con_current_measure(s_adcs_ctx *adcs_ctx,\
        s_adcs_current *con_current_measure);

/**
 * @brief Function to get reaction wheel current
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] rw_current       : Structure pointer to s_adcs_rw_cur
 * @param[in] rw_cnt            : Number of Reaction wheels
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_rw_current(s_adcs_ctx *adcs_ctx,\
        uint8 rw_cnt, s_adcs_rw_cur *rw_current);

/**
 * @brief Function to get adcs temperature
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] temperature      : Structure pointer to s_adcs_temperature
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_temperature(s_adcs_ctx *adcs_ctx,\
        s_adcs_temperature *temperature);

/**
 * @brief Function to get rate sensor temperature
 * @param[in] adcs_ctx                  : Pointer to ADCS context
 * @param[out] rate_sens_temperature    : Structure pointer to
 *  s_adcs_rate_temperature
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_rate_sensor_temperature(s_adcs_ctx *adcs_ctx,\
        s_adcs_rate_temperature *rate_sens_temperature);

/**
 * @brief Function to get power and temperature measurement
 * @param[in] adcs_ctx              : Pointer to ADCS context
 * @param[out] power_temperature    : Structure pointer to s_adcs_cur_temp
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_power_temperature(s_adcs_ctx *adcs_ctx,\
        s_adcs_cur_temp *power_temperature);

/**
 * @brief Function to get gyro configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] gyro_cfg         : Structure pointer to s_adcs_gyro_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_gyro_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_gyro_cfg *gyro_cfg);

/**
 * @brief Function to get star tracker configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] star_trkr_cfg    : Structure pointer to s_adcs_star_trkr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_trkr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_trkr_cfg *star_trkr_cfg);

/**
 * @brief Function to get magnetometer configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] mgmtr_cfg        : Structure pointer to s_adcs_mgmtr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_mgmtr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgmtr_cfg *mgmtr_cfg);

/**
 * @brief Function to get coarse sun sensor configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] css_cfg          : Structure pointer to s_adcs_css_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_css_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_css_cfg *css_cfg);

/**
 * @brief Function to get fine sun sensor configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] fss_cfg          : Structure pointer to s_adcs_fss_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_fss_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_fss_cfg *fss_cfg);

/**
 * @brief Function to get nadir configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] nadir_cfg        : Structure pointer to s_adcs_nadir_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_nadir_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_nadir_cfg *nadir_cfg);

/**
 * @brief Function to get redudent magnetometer configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] red_magmtr_cfg   : Structure pointer to s_adcs_mgmtr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_red_mgmtr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgmtr_cfg *red_magmtr_cfg);

/**
 * @brief Function to get magnetorquer configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] mgntrqr_cfg      : Structure pointer to s_adcs_mgntrqr_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_mgntrqr_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgntrqr_cfg *mgntrqr_cfg);

/**
 * @brief Function to get reaction wheel configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] rw_cfg           : Structure pointer to s_adcs_rw_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_rw_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_rw_cfg *rw_cfg);

/**
 * @brief Function to get detumble control parameters
 * @param[in] adcs_ctx              : Pointer to ADCS context
 * @param[out] detumble_ctrl_param  : Structure pointer to s_adcs_detumble_ctrl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_detumble_param(s_adcs_ctx *adcs_ctx,\
        s_adcs_detumble_ctrl *detumble_ctrl_param);

/**
 * @brief Function to get Y reaction wheel control
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] y_rw_ctrl        : Structure pointer to s_adcs_y_rw_ctrl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_y_rw_ctrl(s_adcs_ctx *adcs_ctx,\
        s_adcs_y_rw_ctrl *y_rw_ctrl);

/**
 * @brief Function to get reaction wheel control
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] rw_ctrl          : Structure pointer to s_adcs_rw_ctrl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_rw_ctrl(s_adcs_ctx *adcs_ctx,\
        s_adcs_rw_ctrl *rw_ctrl);

/**
 * @brief Function to get tracking control gain
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] trck_ctrl_gain   : Structure pointer to s_adcs_trck_ctrl_gain
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_trck_ctrl_gain(s_adcs_ctx *adcs_ctx,\
        s_adcs_trck_ctrl_gain *trck_ctrl_gain);

/**
 * @brief Function to get attitude angle
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] attitude_angle   : Structure pointer to s_adcs_attitude_angl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_attitude(s_adcs_ctx *adcs_ctx,\
        s_adcs_attitude_angl *attitude_angle);

/**
 * @brief Function to get target tracking parameters
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] trck_trget       : Structure pointer to s_adcs_trck_target
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_target_track(s_adcs_ctx *adcs_ctx,\
        s_adcs_trck_target *trck_trget);

/**
 * @brief Function to get inertial reference
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] inrt_ref         : Structure pointer to s_adcs_inrt_ref
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_inertial_ref(s_adcs_ctx *adcs_ctx,\
        s_adcs_inrt_ref *inrt_ref);

/**
 * @brief Function to get estimation paremeters
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] est_param        : Structure pointer to s_adcs_est_param
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_est_param(s_adcs_ctx *adcs_ctx,\
        s_adcs_est_param *est_param);

/**
 * @brief Function to get sattelite position ECI
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] eci_position     : Structure pointer to s_adcs_eci_position
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_eci_postition(s_adcs_ctx *adcs_ctx,\
        s_adcs_eci_position *eci_position);

/**
 * @brief Function to get sattelite velocity
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] eci_velocity     : Structure pointer to s_adcs_eci_velocity
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sat_velocity(s_adcs_ctx *adcs_ctx,\
        s_adcs_eci_velocity *eci_velocity);

/**
 * @brief Function to get sattelte position LLH
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] llh_position     : Structure pointer to s_adcs_trck_target
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_llh_psition(s_adcs_ctx *adcs_ctx,\
        s_adcs_trck_target *llh_position);

/**
 * @brief Function to get estimation rates
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] est_rate         : Structure pointer to s_adcs_est_rate
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_est_rate(s_adcs_ctx *adcs_ctx,\
        s_adcs_est_rate *est_rate);

/**
 * @brief Function to get estimated quaternion
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] est_qutrn        : Structure pointer to s_adcs_est_qutrn
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_est_qutrn(s_adcs_ctx *adcs_ctx,\
        s_adcs_est_qutrn *est_qutrn);

/**
 * @brief Function to get ECEF sattelite position
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] ecef_poistion    : Structure pointer to s_adcs_eci_position
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_ecef_position(s_adcs_ctx *adcs_ctx,\
        s_adcs_eci_position *ecef_poistion);

/**
 * @brief Function to get moduled magnetic field vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] mod_mag_vector   : Structure pointer to s_adcs_mag_vector
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_mog_mag_vector(s_adcs_ctx *adcs_ctx,\
        s_adcs_mag_vector *mod_mag_vector);

/**
 * @brief Function to get moduled sun vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] mod_sun_vector   : Structure pointer to s_adcs_sun_vector
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_mod_sun_vector(s_adcs_ctx *adcs_ctx,\
        s_adcs_sun_vector *mod_sun_vector);

/**
 * @brief Function to get estimated gyro measurement
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] est_gyro         : Structure pointer to s_adcs_est_gyro
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_est_gyro_measure(s_adcs_ctx *adcs_ctx,\
        s_adcs_est_gyro *est_gyro);

/**
 * @brief Function to get estimation innovation
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] est_innovn       : Structure pointer to s_adcs_est_innovn
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_est_innovation(s_adcs_ctx *adcs_ctx,\
        s_adcs_est_innovn *est_innovn);

/**
 * @brief Function to get quaternion error vector
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] qutrn_error      : Structure pointer to s_adcs_qutr_error
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_qutrn_error(s_adcs_ctx *adcs_ctx,\
        s_adcs_qutr_error *qutrn_error);

/**
 * @brief Function to get quaternion covariance
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] qutrn_covr       : Structure pointer to s_adcs_qutr_covr
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_qutrn_covr(s_adcs_ctx *adcs_ctx,\
        s_adcs_qutr_covr *qutrn_covr);

/**
 * @brief Function to get angular rate covariance
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] ang_rate_covr    : Structure pointer to s_adcs_angl_rate_covr
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_ang_rate_covr(s_adcs_ctx *adcs_ctx,\
        s_adcs_angl_rate_covr *ang_rate_covr);

/**
 * @brief Function to get Commanded Reaction wheel speed
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] rw_cmd           : Structure pointer to s_adcs_rw_speed
 * @param[in] rw_cnt            : Number of Reaction wheels
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_rw_speed_cmd(s_adcs_ctx *adcs_ctx,\
        uint8 rw_cnt, s_adcs_rw_speed *rw_cmd);

/**
 * @brief Function to get Measured Reaction wheel speed
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] rw_measure       : Structure pointer to s_adcs_rw_speed
 * @param[in] rw_cnt            : Number of Reaction wheels
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_rw_speed_measure(s_adcs_ctx *adcs_ctx,\
        uint8 rw_cnt, s_adcs_rw_speed *rw_measure);

/**
 * @brief Function to get boot and running program status
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] boot_run_prog_sts: Structure pointer to s_adcs_b_run_prog_sts
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_boot_run_prog_status(s_adcs_ctx *adcs_ctx,\
        s_adcs_b_run_prog_sts *boot_run_prog_sts);

/**
 * @brief Function to get boot index and status
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] boot_indx_sts    : Structure pointer to s_adcs_b_index_sts
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_boot_indx_status(s_adcs_ctx *adcs_ctx,\
        s_adcs_b_index_sts *boot_indx_sts);

/**
 * @brief Function to get last logged event
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] last_log_event   : Structure pointer to s_adcs_last_log_evnt
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_last_log_evnt(s_adcs_ctx *adcs_ctx,\
        s_adcs_last_log_evnt *last_log_event);

/**
 * @brief Function to get SRAM latchup counter
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] latchup_cntr     : Structure pointer to s_adcs_latchup_cntr
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_latchup_cntr(s_adcs_ctx *adcs_ctx,\
        s_adcs_latchup_cntr *latchup_cntr);

/**
 * @brief Function to get EDAC error counters
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] edac_err_cntr    : Structure pointer to s_adcs_edac_err_cntr
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_edac_err_cntr(s_adcs_ctx *adcs_ctx,\
        s_adcs_edac_err_cntr *edac_err_cntr);

/**
 * @brief Function to get Communication status
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] comm_sts         : Structure pointer to s_adcs_comm_sts
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_comm_sts(s_adcs_ctx *adcs_ctx,\
        s_adcs_comm_sts *comm_sts);

/**
 * @brief Function to get SD card format or erase progress
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] erase_prgrs      : Structure pointer to s_adcs_erase_prgrs
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sd_erase_prgrs(s_adcs_ctx *adcs_ctx,\
        s_adcs_erase_prgrs *erase_prgrs);

/**
 * @brief Function to get Telecommand acknowledge
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] tc_ack           : Structure pointer to s_adcs_tc_ack
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_tc_ack(s_adcs_ctx *adcs_ctx,\
        s_adcs_tc_ack *tc_ack);

/**
 * @brief Function to get File Download Buffer with File Contents
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] file_dwnld_buff  : Structure pointer to s_adcs_file_dwnld_buffer
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_file_dwnld(s_adcs_ctx *adcs_ctx,\
        s_adcs_file_dwnld_buffer *file_dwnld_buff);

/**
 * @brief Function to get File Download Buffer with File Contents
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] dwnld_blck_rdy   : Structure pointer to s_adcs_dwnld_blck_ready
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_dwnld_blck_rdy(s_adcs_ctx *adcs_ctx,\
        s_adcs_dwnld_blck_ready *dwnld_blck_rdy);

/**
 * @brief Function to get File information
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] file_info        : Structure pointer to s_adcs_file_info
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_file_info(s_adcs_ctx *adcs_ctx,\
        s_adcs_file_info *file_info);

/**
 * @brief Function to get Initialize Upload Complete
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] init_upld_cmplt  : Structure pointer to s_adcs_init_upld
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_initialize_upld_cmplt(s_adcs_ctx *adcs_ctx,\
        s_adcs_init_upld *init_upld_cmplt);

/**
 * @brief Function to get Initialize Upload Complete
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] upld_blck_cmplt  : Structure pointer to s_adcs_upld_blck_cmplt
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_upld_blck_cmplt(s_adcs_ctx *adcs_ctx,\
        s_adcs_upld_blck_cmplt *upld_blck_cmplt);

/**
 * @brief Function to get Block Checksum
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] blck_crc         : Structure pointer to s_adcs_blck_crc
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_blck_crc(s_adcs_ctx *adcs_ctx,\
        s_adcs_blck_crc *blck_crc);

/**
 * @brief Function to get Bootloader State
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] btlr_state       : Structure pointer to s_adcs_btlr_state
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_btlr_state(s_adcs_ctx *adcs_ctx,\
        s_adcs_btlr_state *btlr_state);

/**
 * @brief Function to get Program Information
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] prgrm_info       : Structure pointer to s_adcs_prgm_info
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_prgrm_info(s_adcs_ctx *adcs_ctx,\
        s_adcs_prgm_info *prgrm_info);

/**
 * @brief Function to get Copy To Internal Flash Progress
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] intrnl_flsh_prgrs: Structure pointer to
 *                   s_adcs_cpy_intrnl_flsh_prgrs
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_cpy_intrnl_flsh_prgrs(s_adcs_ctx *adcs_ctx,\
        s_adcs_cpy_intrnl_flsh_prgrs *intrnl_flsh_prgrs);
/**
 * @brief Function Returns the length of telemetry by Id.
 *
 * @param[in] tlm_id            : Telemetry Id
 * @return Return value of Telemetry length
 * @retval -1 -> Eroor
 *          Other values -> Success
 */
int16_t bsk_get_tlm_len(uint8_t tlm_id);

/**
 * @brief Abstracted function for select program to boot
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] boot_index: Structure pointer to
 *                   s_adcs_boot_index
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_boot_index(s_adcs_ctx *adcs_ctx,\
        s_adcs_boot_index* boot_index);
/**
 * @brief Abstracted function for run selected program
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_run_sel_prog(s_adcs_ctx *adcs_ctx);

/**
 * @brief Abstracted function for read program information
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] prog_list: Structure pointer to
 *                   s_adcs_read_prog
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_readprog_info(s_adcs_ctx *adcs_ctx,\
        s_adcs_read_prog* prog_list);
/**
 * @brief Abstracted function for copy program to internal flash
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] copy_prog_t: Structure pointer to
 *                   s_adcs_copy_p_to_interflash
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_copy_prog_to_interflash(s_adcs_ctx *adcs_ctx,\
        s_adcs_copy_p_to_interflash *copy_prog_t);

/**
 * @brief Abstracted function for reset log pointer.
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_reset_log_ptr(s_adcs_ctx *adcs_ctx);
/**
 * @brief Abstracted function for advance log pointer
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_advance_log_ptr(s_adcs_ctx *adcs_ctx);
/**
 * @brief Abstracted function for format SD Card
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] formatmagic      :  Magic number to prevent
 *                              against accidental format.
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_format_sd_card(s_adcs_ctx *adcs_ctx,\
        uint8 formatmagic);
/**
 * @brief Abstracted function for erase file
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] erasefile         : Structure pointer to s_adcs_erasefile
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_erase_file(s_adcs_ctx *adcs_ctx,\
        s_adcs_erasefile *erasefile);
/**
 * @brief Abstracted function for load file download block
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] loadfile         : Structure pointer to s_adcs_load_dwnld_blk
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_load_file_dwnld_blk(s_adcs_ctx *adcs_ctx,\
        s_adcs_load_dwnld_blk *loadfile);
/**
 * @brief Abstracted function for advance file list read pointer
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_advance_file_list(s_adcs_ctx *adcs_ctx);
/**
 * @brief Abstracted function for initiate file upload
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] init_file_upld    : Structure pointer to s_adcs_init_file_upld
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_init_file_upld(s_adcs_ctx *adcs_ctx,\
        s_adcs_init_file_upld *init_file_upld);
/**
 * @brief Abstracted function for file upload packet
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] file_upld_pkt    : Structure pointer to s_adcs_final_upld_pkt
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_file_upld_pkt(s_adcs_ctx *adcs_ctx,\
        s_adcs_final_upld_pkt *file_upld_pkt);
/**
 * @brief Abstracted function for finalize upload block
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] fupld_blk    : Structure pointer to s_adcs_flze_upld_blk
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_flze_upld_blk(s_adcs_ctx *adcs_ctx,\
        s_adcs_flze_upld_blk *fupld_blk);
/**
 * @brief Abstracted function for reset upload block
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_reset_upld_blk(s_adcs_ctx *adcs_ctx);
/**
 * @brief Abstracted function for Reset File List Read Pointer
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_rstfile_listrd_ptr(s_adcs_ctx *adcs_ctx);
/**
 * @brief Abstracted function for initiate download burst
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] init_dwnld_burst  : Structure pointer to s_adcs_init_dwnld_burst
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_init_dwnld_burst(s_adcs_ctx *adcs_ctx,\
        s_adcs_init_dwnld_burst *init_dwnld_burst);
/**
 * @brief Abstracted function for ADCS Run Mode
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] run_mode  : ADCS Run mode enumeration
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_run_mode(s_adcs_ctx *adcs_ctx,\
        e_adcs_run_mode run_mode);
/**
 * @brief Abstracted function for Trigger ADCS Loop With Simulated Sensor Data
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] simu_sns  : Structure pointer to s_adcs_simu_sns_data
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_trig_simu_sns(s_adcs_ctx *adcs_ctx,\
        s_adcs_simu_sns_data *simu_sns);
/**
 * @brief Abstracted function for ASGP4 Run Mode
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] asgp4_run_mode  : ASGP4 Run mode enumeration
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_asgp4_run_mode(s_adcs_ctx *adcs_ctx,\
        e_adcs_asgp4_run_mode asgp4_run_mode);
/**
 * @brief Abstracted function for convert to JPG File
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] con_jpg  : Structure pointer to s_adcs_con_to_jpg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_conv_to_jpg(s_adcs_ctx *adcs_ctx,\
        s_adcs_con_to_jpg *con_jpg);
/**
 * @brief Abstracted function for save image
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] save_img  : Structure pointer to s_adcs_save_img
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_save_image(s_adcs_ctx *adcs_ctx,\
        s_adcs_save_img *save_img);
/**
 * @brief Abstracted function for reset boot register
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_reset_boot_reg(s_adcs_ctx *adcs_ctx);
/**
 * @brief Abstracted function for Trigger ADCS Loop
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_trig_adcs_loop(s_adcs_ctx *adcs_ctx);

/**
 * @brief Abstracted function for ASGP4 Trigger command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_asgp4_trig(s_adcs_ctx *adcs_ctx);

/**
 * @brief Abstracted function for save configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_save_cfg(s_adcs_ctx *adcs_ctx);

/**
 * @brief Abstracted function for set cache command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] cache  : Structure pointer to s_adcs_cache_cmd
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_cache_cmd(s_adcs_ctx *adcs_ctx,\
        s_adcs_cache_cmd *cache);

/**
 * @brief Abstracted function for set sram scrub settings
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] sram_scrub  : Structure pointer to s_adcs_sram_scrub
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_sram_scrub(s_adcs_ctx *adcs_ctx,\
        s_adcs_sram_scrub *sram_scrub);

/**
 * @brief Abstracted function for set unix time save to flash memory
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] utc_flash  : Structure pointer to s_adcs_utc_flash
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_utc_flash(s_adcs_ctx *adcs_ctx,\
        s_adcs_utc_flash *utc_flash);

/**
 * @brief Abstracted function for set ASGP4 Params command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] asgp4_param  : Structure pointer to s_adcs_asgp4_param
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_asgp4_param(s_adcs_ctx *adcs_ctx,\
        s_adcs_asgp4_param *asgp4_param);
/**
 * @brief Abstracted function for set user-coded controller and
 *   estimator parameters command to the cubeacp
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] user_ctrlr_est  : Structure pointer to s_adcs_user_ctrlr_est_sett
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_user_ctrlr_est_sett(s_adcs_ctx *adcs_ctx,\
        s_adcs_user_ctrlr_est_sett *user_ctrlr_est);

/**
 * @brief Abstracted function for set SD Log1 Configuration.
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] sd_log1_cfg  : Structure pointer to s_adcs_sdlog_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_sdlog1_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_sdlog_cfg *sd_log1_cfg);

/**
 * @brief Abstracted function for set SD Log2 Configuration.
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] sd_log1_cfg  : Structure pointer to s_adcs_sdlog_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_sdlog2_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_sdlog_cfg *sd_log2_cfg);

/**
 * @brief Abstracted function for set UART log configuration
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] uart_log_cfg  : Structure pointer to s_adcs_uart_log_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_uart_log(s_adcs_ctx *adcs_ctx,\
        s_adcs_uart_log_cfg *uart_log_cfg);

/**
 * @brief Abstracted function for set Hole Map 1 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap1  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map1(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap1);

/**
 * @brief Abstracted function for set Hole Map 2 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap2  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map2(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap2);

/**
 * @brief Abstracted function for set Hole Map 3 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap3  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map3(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap3);

/**
 * @brief Abstracted function for set Hole Map 4 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap4  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map4(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap4);

/**
 * @brief Abstracted function for set Hole Map 5 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap5  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map5(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap5);

/**
 * @brief Abstracted function for set Hole Map 6 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap6  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map6(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap6);

/**
 * @brief Abstracted function for set Hole Map 7 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap7  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map7(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap7);

/**
 * @brief Abstracted function for set Hole Map 8 command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[in] holemap8  : Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_set_hole_map8(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap *holemap8);

/**
 * @brief Function to get cache command
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] cache  : Structure pointer to s_adcs_cache_cmd
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_cache_cmd(s_adcs_ctx *adcs_ctx,\
        s_adcs_cache_cmd* cache);
/**
 * @brief Function to get sram scrub settings
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] sram_scrub  : Structure pointer to s_adcs_sram_scrub
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sram_scrub(s_adcs_ctx *adcs_ctx,\
        s_adcs_sram_scrub* sram_scrub);
/**
 * @brief Function to get save unix time to flash
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] utc_flash  : Structure pointer to s_adcs_utc_flash
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_utc_flash(s_adcs_ctx *adcs_ctx,\
        s_adcs_utc_flash *utc_flash);
/**
 * @brief Function to get ASGP4 Params
 * @param[in] adcs_ctx          : Pointer to ADCS context
 * @param[out] asgp4_param  : Structure pointer to s_adcs_asgp4_param
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_asgp4_param(s_adcs_ctx *adcs_ctx,\
        s_adcs_asgp4_param *asgp4_param);
/**
 * @brief Function to get user-coded controller and estimator parameters
 *        command.
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] user_ctrlr_est: Structure pointer to s_adcs_user_ctrlr_est_sett
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_user_ctrlr_est_sett(s_adcs_ctx *adcs_ctx,\
        s_adcs_user_ctrlr_est_sett *user_ctrlr_est);
/**
 * @brief Function to get SD Log1 configuration message
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] sdlog1_cfg: Structure pointer to s_adcs_sdlog_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sdlog1_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_sdlog_cfg *sdlog1_cfg);
/**
 * @brief Function to get SD Log2 configuration message
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] sdlog2_cfg: Structure pointer to s_adcs_sdlog_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sdlog2_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_sdlog_cfg *sdlog2_cfg);
/**
 * @brief Function to get UART Log configuration message
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] uart_log_cfg: Structure pointer to s_adcs_uart_log_cfg
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_uart_log_cfg(s_adcs_ctx *adcs_ctx,\
        s_adcs_uart_log_cfg *uart_log_cfg);
/**
 * @brief Function to get Hole Map 1 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap1: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map1(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap1);
/**
 * @brief Function to get Hole Map 2 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap2: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map2(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap2);
/**
 * @brief Function to get Hole Map 3 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap3: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map3(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap3);
/**
 * @brief Function to get Hole Map 4 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap4: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map4(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap4);
/**
 * @brief Function to get Hole Map 5 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap5: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map5(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap5);
/**
 * @brief Function to get Hole Map 6 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap6: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map6(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap6);
/**
 * @brief Function to get Hole Map 7 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap7: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map7(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap7);
/**
 * @brief Function to get Hole Map 8 frame
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] holemap8: Structure pointer to s_adcs_holemap
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_hole_map8(s_adcs_ctx *adcs_ctx,\
        s_adcs_holemap* holemap8);
/**
 * @brief Function to get current unix time
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] utc_time: Structure pointer to s_adcs_time
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_crnt_unix_time(s_adcs_ctx *adcs_ctx,\
        s_adcs_time* utc_time);
/**
 * @brief Function to get Estimated Attitude Angles
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] att_angle: Structure pointer to s_adcs_attitude_angl
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_est_attitude(s_adcs_ctx *adcs_ctx,\
        s_adcs_attitude_angl* att_angle);
/**
 * @brief Function to get ADCS misc current measurements
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] misc_cur: Structure pointer to s_adcs_misc_cur
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_misc_cur(s_adcs_ctx *adcs_ctx,\
        s_adcs_misc_cur* misc_cur);
/**
 * @brief Function to get ASGP4 TLEs telemetry
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] asgp4_tle: Structure pointer to s_adcs_asgp4_tle
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_asgp4_tle(s_adcs_ctx *adcs_ctx,\
        s_adcs_asgp4_tle* asgp4_tle);
/**
 * @brief Function to get star performance 2
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] star_perform2: Structure pointer to s_adcs_star_perform2
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_perform2(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_perform2* star_perform2);

/**
 * @brief Function to get JPG Conversion Progress
 * @param[in] adcs_ctx       : Pointer to ADCS context
 * @param[out] jpg_cnvrsn_prgrs: Structure pointer to s_adcs_jpg_cnvrsn_prgrs
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_jpg_cnvrsn_prgrs(s_adcs_ctx *adcs_ctx,\
        s_adcs_jpg_cnvrsn_prgrs *jpg_cnvrsn_prgrs);

/**
 * @brief Function to get Execution Times
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] exec_time    : Structure pointer to s_adcs_exec_time
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_exec_time(s_adcs_ctx *adcs_ctx,\
        s_adcs_exec_time *exec_time);

/**
 * @brief Function to get ACP Execution state
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] exec_state   : Structure pointer to s_adcs_exec_state
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_exec_state(s_adcs_ctx *adcs_ctx,\
        s_adcs_exec_state *exec_state);

/**
 * @brief Function to get Image save status
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] img_sts      : Structure pointer to s_adcs_img_sv_sts
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_img_sv_sts(s_adcs_ctx *adcs_ctx,\
        s_adcs_img_sv_sts *img_sts);

/**
 * @brief Function to get Magnetorquer command
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] mgntrqr_cmd  : Structure pointer to s_adcs_mgntrqr_out
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_mgntrqr_cmd(s_adcs_ctx *adcs_ctx,\
        s_adcs_mgntrqr_out *mgntrqr_cmd);

/**
 * @brief Function to get Actuator commands
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] actuator_cmd : Structure pointer to s_adcs_actuator_cmd
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_actuator_cmd(s_adcs_ctx *adcs_ctx,\
        s_adcs_actuator_cmd *actuator_cmd);

/**
 * @brief Function to get Estimation Data
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] estm_data    : Structure pointer to s_adcs_estmiation_data
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_estimation_data(s_adcs_ctx *adcs_ctx,\
        s_adcs_estmiation_data *estm_data);

/**
 * @brief Function to get Attitude quaternion estimated by Star tracker
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] qutr_est_attitude: Structure pointer to s_adcs_qutr_attitude
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_qutr_attitude(s_adcs_ctx *adcs_ctx,\
        s_adcs_qutr_attitude *qutr_est_attitude);

/**
 * @brief Function to get Attitude quaternion estimated by Star tracker
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] est_rates    : Structure pointer to s_adcs_star_trckr_est_rates
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_star_est_rates(s_adcs_ctx *adcs_ctx,\
        s_adcs_star_trckr_est_rates *est_rates);

/**
 * @brief Function to get calibarated ADCS sensor measurement
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] adcs_measure : Structure pointer to s_adcs_measurement
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_adcs_measurement(s_adcs_ctx *adcs_ctx,\
        s_adcs_measurement *adcs_measure);

/**
 * @brief Function to get Control Mode Configuration
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] cntrl_mode   : pointer to control mode
 * @param[out] control_mode_param : Structure pointer to u_control_mode_param
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_control_mode(s_adcs_ctx *adcs_ctx,\
        uint8 *cntrl_mode, u_control_mode_param *control_mode_param);

/**
 * @brief Function to get Estimation Mode
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[out] est_mode     : pointer to Estimation mode
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_est_mode(s_adcs_ctx *adcs_ctx, uint8 *est_mode);

/**
 * @brief Function to get adcs sensors configuration parameter
 * @param[in] adcs_ctx      : Pointer to ADCS context
 * @param[in] sensor_type   : Enum to sensor types
 * @param[in] sensor_id     : Specified sensor on same type
 * @param[out] sensor_cfg   : Union pointer to u_adcs_sensor_config
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_sensor_params(s_adcs_ctx *adcs_ctx,\
        e_adcs_sensor_type sensor_type,uint8_t sensor_id,\
        u_adcs_sensor_config *sensor_cfg);

/**
 * @brief Function to get adcs acutator configuration parameters
 * @param[in] adcs_ctx        : Pointer to ADCS context
 * @param[in] actuator_type   : Enum to autator types
 * @param[in] actuator_id     : Specified acutator on same type
 * @param[out] actuator_cfg   : Union pointer to u_adcs_acutator_config
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_actuator_params(s_adcs_ctx *adcs_ctx,\
        e_adcs_actuator_type actuator_type,uint8_t actuator_id,\
        u_adcs_acutator_config *actuator_cfg);

/**
 * @brief Function to get raw CSS measurement
 * @param[in] adcs_ctx        : Pointer to ADCS context
 * @param[in] css_id          : Specific CSS id
 * @param[out] raw_css        : pointer to s_adcs_raw_css
 * @return Return value from ADCS module
 * @retval API_SUCCESS -> Success
 *         Other values -> Error
 */
e_adcs_status adcs_vapi_get_raw_css(s_adcs_ctx *adcs_ctx,\
        uint8_t css_id, s_adcs_raw_css *raw_css);

/**
 * @brief This function handle the socket timeout
 *
 * @param[in] adcs_sock_fd : Handle client or server
 *
 * @return void
 */
void socket_flush(int adcs_sock_fd);

#ifdef __cplusplus
}
#endif
#endif /* ADCS_VAPI_H_ */
