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

#ifndef COMMS_SBAND_API_H_
#define COMMS_SBAND_API_H_

#include<comms_csw.h>

#define SRS_4_PORT_ID              24          ///< Identity of SRS_4
#define DEFAULT_TIMEOUT            1000        ///< Default waiting time

/**
 * @brief SRS_4 boot options defined in enumeration
 */
typedef enum
{
    SRS4_BOOT_SET_ALTERNATE,
    SRS4_BOOT_FLASH_ALTERNATE,
    SRS4_BOOT_ERASE_ALTERNATE,
    SRS4_BOOT_CHECK_ALTERNATE,
    SRS4_BOOT_VERIFY_ALTERNATE,

}e_srs4_boot_opt;

/**
* @brief This function set the sband calibration configuration.
*
* @param cal_cfg : pointer to calibrate configuration.
*
* @return status of set calibrate config.
*/
int32_t sdr_srs4_sband_set_cal_cfg(s_comms_cal_cfg *cal_cfg);

/**
* @brief This function set the sband system configuration.
*
* @param sys_cfg : pointer to system configuration.
*
* @return status of set system config.
*/
int32_t sdr_srs4_sband_set_sys_cfg(s_comms_sys_cfg *sys_cfg);

/**
* @brief This function get the sband system configuration.
*
* @param sys_cfg : pointer to system configuration.
*
* @return status of get system config.
*/
int32_t sdr_srs4_sband_get_sys_cfg(s_comms_sys_cfg *sys_cfg);

/**
* @brief This function get the sband calibration configuration.
*
* @param cal_cfg : pointer to calibrate configuration.
*
* @return status of get calibrate config.
*/
int32_t sdr_srs4_sband_get_cal_cfg(s_comms_cal_cfg *cal_cfg);

/**
* @brief This function set the sband receive configuration.
*
* @param rx_cfg : pointer to receive configuration.
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg(s_comms_rx_cfg *rx_cfg);

/**
* @brief This function set the sband transmit configuration.
*
* @param tx_cfg : pointer to transmit configuration.
*
* @return status of transmit config.
*/
int32_t sdr_srs4_sband_set_tx_cfg(s_comms_tx_cfg *tx_cfg);

/**
* @brief This function get the sband receive configuration.
*
* @param rx_cfg : pointer to receive configuration.
*
* @return status of get receive config.
*/
int32_t sdr_srs4_sband_get_rx_cfg(s_comms_rx_cfg *rx_cfg);

/**
* @brief This function get the sband transmit configuration.
*
* @param tx_cfg : pointer to transmit configuration
*
* @return status of get transmit config.
*/
int32_t sdr_srs4_sband_get_tx_cfg(s_comms_tx_cfg *tx_cfg);

/**
* @brief This function handle the sband firmware configuration.
*
* @param tc_cmd : pointer to telecommand
*
* @return status of sband boot.
*/
int32_t sdr_srs4_sband_firmware_cfg(uint8_t *tc_cmd);

/**
* @brief This function set the sband configuration.
*
* @param prop_id : Identity of sband
* @param value : pointer to set value
* @param size : size of the value
*
* @return status of set sband configuration.
* @retval COMMS_TX_CFG_SUCCESS->success, COMMS_TX_CFG_FAILURE->failed
*/
int32_t sdr_srs4_sband_set_cfg(uint16_t prop_id, void *value, uint32_t size);

/**
* @brief This function get the sband configuration.
*
* @param prop_id : Identity of sband
* @param value : pointer to set value
* @param size : size of the value
*
* @return status of get sband configuration.
* @retval COMMS_TX_CFG_SUCCESS->success, COMMS_TX_CFG_FAILURE->failed
*/
int32_t sdr_srs4_sband_get_cfg(uint16_t prop_id, void *value, uint32_t size);

/**
* @brief This function handle sband reset request.
*
* @param id : Identity of sband
*
* @return status of reset.
*/
int32_t sdr_srs4_sband_reset_req(uint16_t id);

/**
* @brief This function handle the sband group save request.
*
* @param group : Identity of group
* @param fallback : Retreat the group
*
* @return status of group save.
*/
int32_t sdr_srs4_sband_group_save_req(uint16_t group,uint8_t fallback);

/**
* @brief This function handle the sband group load request.
*
* @param group : Identity of group
* @param fallback : Retreat the group
*
* @return status of group load.
*/
int32_t sdr_srs4_sband_group_load_req(uint16_t group,uint8_t fallback);

/**
* @brief This function handle the sband group erase request.
*
* @param group : Identity of group
* @param fallback : Retreat the group
*
* @return status of group erase.
*/
int32_t sdr_srs4_sband_group_erase_req(uint16_t group, uint8_t fallback);

/**
* @brief This function handle the sband group lock request.
*
* @param group : Identity of group
* @param fallback : Retreat the group
*
* @return status of group lock.
*/
int32_t sdr_srs4_sband_group_lock_req(uint16_t group, uint8_t fallback);

/**
* @brief This function handle the sband group unlock request.
*
* @param group : Identity of group
* @param fallback : Retreat the group
*
* @return status of group unlock.
*/
int32_t sdr_srs4_sband_group_unlock_req(uint16_t group, uint8_t fallback);

/**
* @brief This function set the sband transmit frequency.
*
* @param tx_cfg_freq : Transmit frequency
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_freq(uint32_t tx_cfg_freq);

/**
* @brief This function set the sband transmit type.
*
* @param tx_cfg_type : Transmit type
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_type(uint8_t tx_cfg_type);

/**
* @brief This function set the sband transmit baudrate.
*
* @param tx_cfg_rate : Transmit rate
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_rate(uint32_t tx_cfg_rate);

/**
* @brief This function set the sband transmit rolloff.
*
* @param tx_cfg_rolloff : Transmit rolloff
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_rolloff(uint8_t tx_cfg_rolloff);

/**
* @brief This function set the sband transmit powerout.
*
* @param tx_cfg_pout : Transmit powerout
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_pout(f32 tx_cfg_pout);

/**
* @brief This function set the sband transmit automatic level control mode.
*
* @param tx_cfg_alc_mode : Transmit ALC mode.
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_alc_mode(uint8_t tx_cfg_alc_mode);

/**
* @brief This function set the sband transmit reed-solomon coding.
*
* @param tx_cfg_rs : Transmit reed solomon.
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_rs(uint8_t tx_cfg_rs);

/**
* @brief This function set the sband transmit convolutional coding.
*
* @param tx_cfg_cc : Transmit convolutional coding.
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_cc(uint8_t tx_cfg_cc);

/**
* @brief This function set the sband transmit randomization.
*
* @param tx_cfg_rand : Transmit randomization.
*
* @return status of set transmit config
*/
int32_t sdr_srs4_sband_set_tx_cfg_rand(uint8_t tx_cfg_rand);

/**
* @brief This function set the sband transmit CRC checksum.
*
* @param tx_cfg_crc : Tranmsit CRC.
*
* @return status of set tranmsit config.
*/
int32_t sdr_srs4_sband_set_tx_cfg_crc(uint8_t tx_cfg_crc);

/**
* @brief This function set the sband transmit idletime.
*
* @param tx_cfg_idletime : Transmit idletime.
*
* @return status of set tranmsit config.
*/
int32_t sdr_srs4_sband_set_tx_cfg_idletime(uint16_t tx_cfg_idletime);

/**
* @brief This function set the sband transmit size.
*
* @param tx_cfg_size : Transmit size.
*
* @return status of set tranmsit config.
*/
int32_t sdr_srs4_sband_set_tx_cfg_size(uint16_t tx_cfg_size);

/**
* @brief This function set the sband transmit id.
*
* @param tx_cfg_id : Identity of transmit
*
* @return status of set tranmsit config.
*/
int32_t sdr_srs4_sband_set_tx_cfg_id(uint16_t tx_cfg_id);

/**
* @brief This function set the sband transmit crypto configuration.
*
* @param crypto_cfg : pointer to crypto configuration
*
* @return status of set sband crypto config.
*/
int32_t sdr_srs4_sband_set_tx_cfg_crypto(s_comms_tx_crypto_cfg *crypto_cfg);

/**
* @brief This function set the sband transmit PA temperature limit.
*
* @param tx_cfg_pa_templimit : Transmit PA temperature limit.
*
* @return status of set sband PA temperature limit.
*/
int32_t sdr_srs4_sband_set_tx_cfg_pa_templimit(uint8_t tx_cfg_pa_templimit);

/**
* @brief This function get the sband transmit frequency.
*
* @param tx_cfg_freq : Transmit frequency
* @param size : pointer to transmit frequency size
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_freq(uint32_t tx_cfg_freq, uint16_t *size);

/**
* @brief This function get the sband transmit type.
*
* @param tx_cfg_type : Transmit type
* @param size : pointer to size of transmit type.
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_type(uint8_t tx_cfg_type, uint16_t *size);

/**
* @brief This function get the sband transmit baudrate.
*
* @param tx_cfg_rate : Transmit rate
* @param size : pointer to size of transmit rate.
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_rate(uint32_t tx_cfg_rate, uint16_t *size);

/**
* @brief This function get the sband transmit rolloff.
*
* @param tx_cfg_rolloff : Transmit rolloff
* @param size : pointer to size of transmit rolloff
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_rolloff(uint8_t tx_cfg_rolloff, uint16_t *size);

/**
* @brief This function get the sband transmit powerout.
*
* @param tx_cfg_pout : Transmit powerout
* @param size : pointer to size of transmit powerout.
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_pout(f32 tx_cfg_pout, uint16_t *size);

/**
* @brief This function get the sband transmit automatic level control mode.
*
* @param tx_cfg_alc_mode : Transmit ALC mode.
* @param size : pointer to size of alc mode.
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_alc_mode(uint8_t tx_cfg_alc_mode, uint16_t *size);

/**
* @brief This function get the sband transmit reed-solomon coding.
*
* @param tx_cfg_rs : Transmit reed solomon.
* @param size : pointer to size of transmit reed solomon
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_rs(uint8_t tx_cfg_rs, uint16_t *size);

/**
* @brief This function set the sband transmit convolutional coding.
*
* @param tx_cfg_cc : Transmit convolutional coding.
* @param size : pointer to size of transmit convolutional coding.
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_cc(uint8_t tx_cfg_cc, uint16_t *size);

/**
* @brief This function get the sband transmit randomization.
*
* @param tx_cfg_rand : Transmit randomization.
* @param size : pointer to size of transmit randomization.
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_rand(uint8_t tx_cfg_rand, uint16_t *size);

/**
* @brief This function get the sband transmit CRC checksum.
*
* @param tx_cfg_crc : Tranmsit CRC.
* @param size : pointer to size of transmit CRC.
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_crc(uint8_t tx_cfg_crc, uint16_t *size);

/**
* @brief This function get the sband transmit idletime.
*
* @param tx_cfg_idletime : Transmit idletime.
* @param size : pointer to size of transmit idletime
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_idletime(uint16_t tx_cfg_idletime, uint16_t *size);

/**
* @brief This function get the sband transmit size.
*
* @param tx_cfg_size : Transmit size.
* @param size : pointer to size of transmit
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_size(uint16_t tx_cfg_size, uint16_t *size);

/**
* @brief This function get the sband transmit id.
*
* @param tx_cfg_id : Identity of transmit
* @param size : pointer to size
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_id(uint16_t tx_cfg_id, uint16_t *size);

/**
* @brief This function get the sband transmit crypto configuration.
*
* @param crypto_cfg : pointer to crypto configuration
* @param size : pointer to size
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_crypto(s_comms_tx_crypto_cfg *crypto_cfg, uint16_t *size);

/**
* @brief This function get the sband transmit PA temperature limit.
*
* @param tx_cfg_pa_templimit : Transmit PA temperature limit.
* @param size : pointer to size
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_pa_templimit(uint8_t tx_cfg_pa_templimit, uint16_t *size);

/**
* @brief This function get the sband transmit frames.
*
* @param tx_cfg_frames : Transmit frames
* @param size : pointer to size of frame
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_frames(uint32_t tx_cfg_frames, uint16_t *size);

/**
* @brief This function get the sband transmit measured forward power.
*
* @param tx_cfg_pwr_fwd : Transmit measured forward power.
* @param size : pointer to size
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_pwr_fwd(f32 tx_cfg_pwr_fwd, uint16_t *size);

/**
* @brief This function get the sband transmit measured reflected power.
*
* @param tx_cfg_pwr_rfl : Transmit measured reflected power.
* @param size : pointer to size
*
* @return status of get transmit config
*/
int32_t sdr_srs4_sband_get_tx_cfg_pwr_rfl(f32 tx_cfg_pwr_rfl, uint16_t *size);

/**
* @brief This function set the sband receive frequency.
*
* @param rx_cfg_freq : Receive frequency
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_freq(uint32_t rx_cfg_freq);

/**
* @brief This function set the sband receive type.
*
* @param rx_cfg_type : receive type
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_type(uint8_t rx_cfg_type);

/**
* @brief This function set the sband receive baudrate.
*
* @param rx_cfg_rate : receive rate
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_rate(uint32_t rx_cfg_rate);

/**
* @brief This function set the sband receive rolloff.
*
* @param rx_cfg_rolloff : Receive rolloff
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_rolloff(uint8_t rx_cfg_rolloff);

/**
* @brief This function set the sband receive AFC.
*
* @param afc_cfg : Receive AFC.
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_afc(s_comms_rx_afc_cfg *afc_cfg);

/**
* @brief This function set the sband receive reed-solomon coding.
*
* @param rx_cfg_rs : receive reed solomon.
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_rs(uint8_t rx_cfg_rs);

/**
* @brief This function set the sband receive convolutional coding.
*
* @param rx_cfg_cc : receive convolutional coding.
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_cc(uint8_t rx_cfg_cc);

/**
* @brief This function set the sband receive randomization.
*
* @param rx_cfg_rand : receive randomization.
*
* @return status of set receive config
*/
int32_t sdr_srs4_sband_set_rx_cfg_rand(uint8_t rx_cfg_rand);

/**
* @brief This function set the sband receive CRC checksum.
*
* @param rx_cfg_crc : Receive CRC.
*
* @return status of set Receive config.
*/
int32_t sdr_srs4_sband_set_rx_cfg_crc(uint8_t rx_cfg_crc);

/**
* @brief This function set the sband receive size.
*
* @param rx_cfg_size : receive size.
*
* @return status of set receive config.
*/
int32_t sdr_srs4_sband_set_rx_cfg_size(uint16_t rx_cfg_size);

/**
* @brief This function set the sband receive id.
*
* @param rx_cfg_id : Identity of receive
*
* @return status of set receive config.
*/
int32_t sdr_srs4_sband_set_rx_cfg_id(uint16_t rx_cfg_id);

/**
* @brief This function set the sband receive crypto configuration.
*
* @param crypto_cfg : pointer to crypto configuration
*
* @return status of set sband crypto config.
*/
int32_t sdr_srs4_sband_set_rx_cfg_crypto(s_comms_rx_crypto_cfg *crypto_cfg);

/**
* @brief This function get the sband receive frequency.
*
* @param rx_cfg_freq : Receive frequency
* @param size : pointer to size of frequency
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_freq(uint32_t rx_cfg_freq, uint16_t *size);

/**
* @brief This function get the sband receive type.
*
* @param rx_cfg_type : receive type
* @param size : pointer to size of type
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_type(uint8_t rx_cfg_type, uint16_t *size);

/**
* @brief This function get the sband receive baudrate.
*
* @param rx_cfg_rate : receive rate
* @param size : pointer to size of baudrate
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_rate(uint32_t rx_cfg_rate, uint16_t *size);

/**
* @brief This function get the sband receive rolloff.
*
* @param rx_cfg_rolloff : Receive rolloff
* @param size : pointer to size of rolloff.
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_rolloff(uint8_t rx_cfg_rolloff, uint16_t *size);

/**
* @brief This function get the sband receive AFC.
*
* @param afc_cfg : Receive AFC.
* @param size : pointer to size of AFC.
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_afc(s_comms_rx_afc_cfg *afc_cfg, uint16_t *size);

/**
* @brief This function get the sband receive reed-solomon coding.
*
* @param rx_cfg_rs : receive reed solomon.
* @param size : pointer to size.
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_rs(uint8_t rx_cfg_rs, uint16_t *size);

/**
* @brief This function get the sband receive convolutional coding.
*
* @param rx_cfg_cc : receive convolutional coding.
* @param size : pointer to size of cc.
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_cc(uint8_t rx_cfg_cc, uint16_t *size);

/**
* @brief This function get the sband receive randomization.
*
* @param rx_cfg_rand : receive randomization.
* @param size : pointer to size of rand.
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_rand(uint8_t rx_cfg_rand, uint16_t *size);

/**
* @brief This function get the sband receive randomization.
*
* @param rx_cfg_crc
* @param size
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_crc(uint8_t rx_cfg_crc, uint16_t *size);

/**
* @brief This function get the sband receive CRC checksum.
*
* @param rx_cfg_crc : Receive CRC.
* @param size : pointer to size of CRC
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_size(uint16_t rx_cfg_size, uint16_t *size);

/**
* @brief This function get the sband receive id.
*
* @param rx_cfg_id : Identity of receive
* @param size : pointer to size
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_id(uint16_t rx_cfg_id, uint16_t *size);

/**
* @brief This function get the sband receive crypto configuration.
*
* @param crypto_cfg : pointer to crypto configuration
* @param size : pointer to size of crypto configuration.
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_crypto(s_comms_rx_crypto_cfg *crypto_cfg, uint16_t *size);

/**
* @brief This function get the sband receive frames configuration.
*
* @param rx_cfg_frames : Receive frames
* @param size : pointer to size of frames
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_frames(uint32_t rx_cfg_frames, uint16_t *size);

/**
* @brief This function get the sband receive detected configuration.
*
* @param rx_cfg_detected : Detected
* @param size : pointer to size
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_detected(uint32_t rx_cfg_detected, uint16_t *size);

/**
* @brief This function get the sband receive measured RSSI.
*
* @param rx_cfg_rssi : Receive RSSI
* @param size : pointer to size of RSSI.
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_rssi(f32 rx_cfg_rssi, uint16_t *size);

/**
* @brief This function get the sband receive frequency error.
*
* @param rx_cfg_freqerr : Receive frequency error
* @param size : pointer to size of frequency error
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_freqerr(f32 rx_cfg_freqerr, uint16_t *size);

/**
* @brief This function get the sband receive estimated symbol rate error.
*
* @param rx_cfg_symerr : Estimated symbol rate error.
* @param size : pointer to size
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_symerr(f32 rx_cfg_symerr, uint16_t *size);

/**
* @brief This function get the sband receive estimated Eb/n0.
*
* @param rx_cfg_ebn0 : Estimated Eb/n0.
* @param size : pointer to size
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_ebn0(f32 rx_cfg_ebn0, uint16_t *size);

/**
* @brief This function get the sband receive carrier lock.
*
* @param rx_cfg_carrier_lock : Receive carrier lock.
* @param size : pointer to size
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_carrier_lock(uint8_t rx_cfg_carrier_lock, uint16_t *size);

/**
* @brief This function get the sband receive frame lock.
*
* @param rx_cfg_frame_lock : Receive frame lock
* @param size : pointer to size
*
* @return status of get receive config
*/
int32_t sdr_srs4_sband_get_rx_cfg_frame_lock(uint8_t rx_cfg_frame_lock, uint16_t *size);

/**
* @brief This function set the sband system name
*
* @param sys_name : system name
*
* @return status of set system config
*/
int32_t sdr_srs4_sband_set_sys_cfg_name(uint8_t *sys_name);

/**
* @brief This function set the sband system boot configuration.
*
* @param boot_cfg : pointer to boot option
*
* @return status of set system boot config
*/
int32_t sdr_srs4_sband_set_sys_cfg_boot_cfg(s_comms_boot_cfg *boot_cfg);

/**
* @brief This function set the sband system GWDT configuration.
*
* @param gwdt_cfg : pointer to GWDT config
*
* @return status of set system GWDT config
*/
int32_t sdr_srs4_sband_set_sys_cfg_gwdt_cfg(s_comms_gwdt_cfg *gwdt_cfg);

/**
* @brief This function set the sband system CSP protocol configuration.
*
* @param csp_cfg : pointer to CSP configuration
*
* @return status of set system CSP config
*/
int32_t sdr_srs4_sband_set_sys_cfg_csp_cfg(s_comms_csp_cfg *csp_cfg);

/**
* @brief This function set the sband system CAN interface configuration.
*
* @param can_cfg : pointer to CAN configuration
*
* @return status of set system CAN config
*/
int32_t sdr_srs4_sband_set_sys_cfg_can_cfg(s_comms_can_cfg *can_cfg);

/**
* @brief This function set the sband system UART interface configuration.
*
* @param uart_cfg : pointer to UART configuration
*
* @return status of set system UART config
*/
int32_t sdr_srs4_sband_set_sys_cfg_uart_cfg(s_comms_uart_cfg *uart_cfg);

/**
* @brief This function set the sband system NET configuration.
*
* @param net_cfg : pointer to NET configuration
*
* @return status of set system NET config
*/
int32_t sdr_srs4_sband_set_sys_cfg_net_cfg(s_comms_net_cfg *net_cfg);

/**
* @brief This function get the sband system name
*
* @param size : pointer to size of name
*
* @return status of get system config
*/
int32_t sdr_srs4_sband_get_sys_cfg_name(uint16_t *size);

/**
* @brief This function get the sband system boot configuration.
*
* @param boot_cfg : pointer Boot option
* @param size : pointer to size
*
* @return status of get system boot config
*/
int32_t sdr_srs4_sband_get_sys_cfg_boot_cfg(s_comms_boot_cfg *boot_cfg, uint16_t *size);

/**
* @brief This function get the sband system GWDT configuration.
*
* @param gwdt_cfg : pointer to GWDT config
* @param size : pointer to size
*
* @return status of get system GWDT config
*/
int32_t sdr_srs4_sband_get_sys_cfg_gwdt_cfg(s_comms_gwdt_cfg *gwdt_cfg, uint16_t *size);

/**
* @brief This function get the sband system CSP protocol configuration.
*
* @param csp_cfg : pointer to CSP configuration
* @param size : pointer to size
*
* @return status of get system CSP config
*/
int32_t sdr_srs4_sband_get_sys_cfg_csp_cfg(s_comms_csp_cfg *csp_cfg, uint16_t *size);

/**
* @brief This function get the sband system CAN interface configuration.
*
* @param can_cfg : pointer to CAN configuration
* @param size : pointer to size
*
* @return status of get system CAN config
*/
int32_t sdr_srs4_sband_get_sys_cfg_can_cfg(s_comms_can_cfg *can_cfg, uint16_t *size);

/**
* @brief This function get the sband system UART interface configuration.
*
* @param uart_cfg : pointer to UART configuration
* @param size : pointer to size
*
* @return status of get system UART config
*/
int32_t sdr_srs4_sband_get_sys_cfg_uart_cfg(s_comms_uart_cfg *uart_cfg, uint16_t *size);

/**
* @brief This function get the sband system NET configuration.
*
* @param net_cfg : pointer to NET configuration
* @param size : pointer to size
*
* @return status of get system NET config
*/
int32_t sdr_srs4_sband_get_sys_cfg_net_cfg(s_comms_net_cfg *net_cfg, uint16_t *size);

/**
* @brief This function set the sband power sensor gain configuration.
*
* @param cal_ps_gain : power sensor gain
*
* @return status of set calibrate PS gain config
*/
int32_t sdr_srs4_sband_set_cal_cfg_ps_gain(f32 cal_ps_gain);

/**
* @brief This function set the sband power sensor intercept.
*
* @param cal_ps_intercept : power sensor intercept.
*
* @return status of set calibrate config
*/
int32_t sdr_srs4_sband_set_cal_cfg_ps_intercept(f32 cal_ps_intercept);

/**
* @brief This function set sband VCTCXO adjust.
*
* @param cal_vctcxo : calibrate VCTCXO
*
* @return status of set calibrate config
*/
int32_t sdr_srs4_sband_set_cal_cfg_vctcxo(uint16_t cal_vctcxo);

/**
* @brief This function get the sband power sensor gain configuration.
*
* @param cal_ps_gain : power sensor gain
* @param size : pointer to power sensor gain size
*
* @return status of get calibrate power sensor gain config
*/
int32_t sdr_srs4_sband_get_cal_cfg_ps_gain(f32 cal_ps_gain, uint16_t *size);

/**
* @brief This function get the sband power sensor intercept.
*
* @param cal_ps_intercept : power sensor intercept.
* @param size : pointer to size of intercept
*
* @return status of get calibrate PS intercept
*/
int32_t sdr_srs4_sband_get_cal_cfg_ps_intercept(f32 cal_ps_intercept, uint16_t *size);

/**
* @brief This function get sband VCTCXO adjust.
*
* @param cal_vctcxo : calibrate VCTCXO
* @param size : pointer to size
*
* @return status of get calibrate config
*/
int32_t sdr_srs4_sband_get_cal_cfg_vctcxo(uint16_t cal_vctcxo, uint16_t *size);

/**
* @brief This function get the sband current powerout setpoint.
*
* @param cal_pwr_set : powerout setpoint
* @param size : pointer to size powerout
*
* @return status of get powerout setpoint
*/
int32_t sdr_srs4_sband_get_cal_cfg_pwr_set(f32 cal_pwr_set, uint16_t *size);

/**
* @brief This function get the sbnad BER test.
*
* @param cal_ber_enable : BER test enable
* @param size : pointer to size
*
* @return status of get BER enable
*/
int32_t sdr_srs4_sband_get_cal_cfg_ber_enable(uint8_t cal_ber_enable, uint16_t *size);

/**
* @brief This function get the sband BER window size.
*
* @param cal_ber_window : BER window
* @param size : pointer to size of BER window
*
* @return status of get BER window
*/
int32_t sdr_srs4_sband_get_cal_cfg_ber_window(uint32_t cal_ber_window, uint16_t *size);

/**
* @brief This function get the count of sband BER test.
*
* @param cal_ber_count : BER test count
* @param size : pointer to size of test count
*
* @return status of get BER test count
*/
int32_t sdr_srs4_sband_get_cal_cfg_ber_count(uint32_t cal_ber_count, uint16_t *size);

/**
* @brief This function get the count of BER locks.
*
* @param cal_ber_locks : BER count lock
* @param size : pointer to size of BER lock count
*
* @return status of get BER lock count
*/
int32_t sdr_srs4_sband_get_cal_cfg_ber_locks(uint32_t cal_ber_locks, uint16_t *size);

/**
* @brief This function get the telemetry of power conversation temperature.
*
* @param temp_psu : power conversation temperature
* @param size : pointer to size of power conversation temperature
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_temp_psu(int16_t temp_psu, uint16_t *size);

/**
* @brief This function get the telemetry of MCU package temperature
*
* @param temp_mcu : MCU package temperature.
* @param size : pointer to size of MCU package temperature
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_temp_mcu(int16_t temp_mcu, uint16_t *size);

/**
* @brief This function get the telemetry of FPGA temperature
*
* @param temp_fpga : FPGA temperature
* @param size : pointer to size of FPGA temperature
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_temp_fpga(int16_t temp_fpga, uint16_t *size);

/**
* @brief This function get the telemetry of transceiver temperature
*
* @param temp_xcvr : Transceiver temperature
* @param size : pointer to size of transceiver temperature
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_temp_xcvr(int16_t temp_xcvr, uint16_t *size);

/**
* @brief This function get the telemetry of LNA temperature
*
* @param temp_lna : LNA temperature
* @param size : pointer to size of LNA temperature
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_temp_lna(int16_t temp_lna, uint16_t *size);

/**
* @brief This function get the telemetry of PA temperature
*
* @param temp_pa : PA temperature
* @param size : pointer to size of PA temperature
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_temp_pa(int16_t temp_pa, uint16_t *size);

/**
* @brief This function get the sband telemetry of input voltage.
*
* @param volt_vin : Input voltage
* @param size : pointer to size of input voltage
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_volt_vin(uint16_t volt_vin, uint16_t *size);

/**
* @brief This function get the sbnad telemetry of 3.3 rail voltage.
*
* @param volt_3v3 : Rail voltage
* @param size : pointer to size of rail voltage
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_volt_3v3(uint16_t volt_3v3, uint16_t *size);

/**
* @brief This function get the sbnad telemetry of 1.8 rail voltage.
*
* @param volt_1v8 : Rail voltage
* @param size : pointer to size of rail voltage
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_volt_1v8(uint16_t volt_1v8, uint16_t *size);

/**
* @brief This function get the sbnad telemetry of 1 rail voltage.
*
* @param volt_1v8 : Rail voltage
* @param size : pointer to size of rail voltage
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_volt_1v0(uint16_t volt_1v0, uint16_t *size);

/**
* @brief This function get the telemetry of PA current.
*
* @param temp_pa : PA temperature
* @param size : pointer to size of PA temperature
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_volt_pa(uint16_t volt_pa, uint16_t *size);

/**
* @brief This function get the telemetry of input power.
*
* @param cur_vin : Input power.
* @param size : pointer to size of input power
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_cur_vin(int16_t cur_vin, uint16_t *size);

/**
* @brief This function get the telemetry of 3.3 rail current.
*
* @param cur_3v3 : Rail current
* @param size : pointer to size of rail current
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_cur_3v3(int16_t cur_3v3, uint16_t *size);

/**
* @brief This function get the telemetry of 1.8 rail current.
*
* @param cur_1v8 : Rail current
* @param size : pointer to size of rail current
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_cur_1v8(int16_t cur_1v8, uint16_t *size);

/**
* @brief This function get the telemetry of 1 rail current.
*
* @param cur_1v0 : Rail current
* @param size : pointer to size of rail current
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_cur_1v0(int16_t cur_1v0, uint16_t *size);

/**
* @brief This function get the telemetry of PA current.
*
* @param cur_pa : PA current
* @param size : pointer to size of PA current
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_cur_pa(int16_t cur_pa, uint16_t *size);

/**
* @brief This function get the telemetry of input power.
*
* @param power_vin : Input power
* @param size : pointer to size of input power
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_power_vin(uint16_t power_vin, uint16_t *size);

/**
* @brief This function get the sband telemetry of 3.3 rail power.
*
* @param power_3v3 : Rail power
* @param size : pointer to size of rail power
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_power_3v3(uint16_t power_3v3, uint16_t *size);

/**
* @brief This function get the sband telemetry of 1.8 rail power.
*
* @param power_1v8 : Rail power
* @param size : pointer to size of rail power
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_power_1v8(uint16_t power_1v8, uint16_t *size);

/**
* @brief This function get the sband telemetry of 1 rail power.
*
* @param power_1v0 : Rail power
* @param size : pointer to size of rail power
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_power_1v0(uint16_t power_1v0, uint16_t *size);

/**
* @brief This function get the sband telemetry of PA power.
*
* @param power_pa : PA power
* @param size : pointer to size of PA power
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop_power_pa(uint16_t power_pa, uint16_t *size);

/**
* @brief This function get the sband transmit telemetry.
*
* @param tx_tm : pointer to Transmit telemetry
* @param size : pointer to size of transmit telemetry
*
* @return status of get transmit telemetry properties
*/
int32_t sdr_srs4_sband_get_tx_tm_prop(s_comms_tx_tm *tx_tm, uint16_t *size);

/**
* @brief This function get the sband receive telemetry.
*
* @param rx_tm : pointer to Receive telemetry
* @param size : pointer to size of receive telemetry
*
* @return status of get receive telemetry properties
*/
int32_t sdr_srs4_sband_get_rx_tm_prop(s_comms_rx_tm *rx_tm, uint16_t *size);

/**
* @brief This function get the sband telemetry properties.
*
* @param tm : pointer to telemetry
* @param size : size of telemetry
*
* @return status of get telemetry properties
*/
int32_t sdr_srs4_sband_get_tm_prop(s_comms_tm_prop *tm, uint16_t size);

/**
 * @brief  This function is used to get CSP - TM property of CSP library
 * @param csp_tm : pointer to csp telemetry
 * @param size : size of csp telemetry
 *
 * @return status of csp telemetry property.
 */
int32_t sdr_get_csp_tm_prop(s_comms_csp_tm  *csp_tm, uint16_t *size);

uint8_t comms_cust_pattern_rf_tx(uint8_t* sync);
#endif /*COMMS_SBAND_API_H_*/
