/**
 * @file comms_sband_api.c
 *
 * @brief #TODO
 *
 * @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.
*/

#ifdef SDR_SBAND_SRS4
#include <stdio.h>
#include "comms_csw.h"
#include "comms_sband_sim.h"
#include "comms_sband_api.h"
#include "comms_sband_xlink_api.h"
#include "comms_sband_xlink_sock.h"
#include "comms_sband_csp.h"
#include "comms_uhf_ipc.h"
#include "prop_client.h"
#include "prop_query.h"
#include "srs4_props.h"
#include "srs4_boot.h"
#include "srs4_proto.h"
#include <stdint.h>
#include "comms_ipc.h"
#include "csp_iflist.h"
#include "exo_types.h"
#include "logger.h"
#include "exo_tctm_ipc.h"

/** Transmission configuration structure in ring buffer */
extern s_comms_tx_cfg PLACE_IN_EXT_RAM_MEM tx_cfg_rb;

/** Reception configuration structure in ring buffer */  
extern s_comms_rx_cfg PLACE_IN_EXT_RAM_MEM rx_cfg_rb;

/** System configuration structure in ring buffer */
extern s_comms_sys_cfg PLACE_IN_EXT_RAM_MEM sys_cfg_rb;

/** Transmission configuration global structure */
extern s_comms_tx_cfg PLACE_IN_EXT_RAM_MEM tx_cfg_global;

/** CSP telemetry global structure */
extern s_comms_csp_tm PLACE_IN_EXT_RAM_MEM csp_tm_global;

/** S-band radio ID */
extern uint8_t PLACE_IN_EXT_RAM_MEM sband_radio_id;

/** Reception buffer for CSW packets */
extern uint8_t PLACE_IN_EXT_RAM_MEM comms_csw_rx_buf[512];

void sband_send_ipc_pld(uint16_t msg_id, uint16_t dest, uint16_t pld_size, uint8_t *pld_ptr);
/*
 * @brief This function is used for getting the configurable params from the S-Band Module 
* @brief Gets a configuration parameter value from the S-Band module
*
* @param prop_id ID of the configuration parameter to get 
* @param value Pointer to store the parameter value
* @param size Size of the parameter value in bytes
*
* @return Status of getting the configuration parameter
 */
int32_t sdr_srs4_sband_get_cfg(uint16_t prop_id, void *value, uint32_t size)
{
    int32_t ret = 0;

    ret = sl_prop_remote_get(SRS_4_PORT_ID , DEFAULT_TIMEOUT , prop_id, value, size);

    if(ret < 0)
    {
    	ret = COMMS_TX_CFG_FAILURE;
    }
    else
    {
    	ret = COMMS_TX_CFG_SUCCESS;
    }

    return ret;

}

/**
 * @brief This function is used for setting the configurable paraams of the S-Band module
* @brief Sets a configuration parameter value in the S-Band module
*
* @param prop_id ID of the configuration parameter to set
* @param value Pointer to the parameter value to set  
* @param size Size of the parameter value in bytes
*
* @return Status of setting the configuration parameter
 */
int32_t sdr_srs4_sband_set_cfg(uint16_t prop_id, void *value, uint32_t size)
{
    int32_t ret = 0;

    ret = sl_prop_remote_set(SRS_4_PORT_ID , DEFAULT_TIMEOUT , prop_id, value, size);

    if(ret < 0)
    {
    	ret = COMMS_TX_CFG_FAILURE;
    }
    else
    {
    	ret = COMMS_TX_CFG_SUCCESS;
    }

    return ret;
}

/**
 * @brief  This function is used for getting the transmission config of the S-Band Module
* @brief Gets the transmission configuration from the S-Band module
*
* @param tx_cfg Pointer to transmission config struct to populate  
*
* @return Status of getting transmission configuration
 */
int32_t sdr_srs4_sband_get_tx_cfg(s_comms_tx_cfg *tx_cfg)
{

    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg->tx_cfg_freq;
    size = sizeof(tx_cfg->tx_cfg_freq);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_FREQ, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX Frequency is %lu\r\n", tx_cfg->tx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_FREQUENCY_IS__u32_,tx_cfg->tx_cfg_freq);
#pragma GCC diagnostic pop
    }

    value = &tx_cfg->tx_cfg_type;
    size = sizeof(tx_cfg->tx_cfg_type);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_TYPE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX modulation type is %hu\r\n", tx_cfg->tx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_MODULATION_TYPE_IS__u8_,tx_cfg->tx_cfg_type);
    }

    value = &tx_cfg->tx_cfg_rate;
    size = sizeof(tx_cfg->tx_cfg_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX baud rate is %lu\r\n", tx_cfg->tx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_BAUD_RATE_IS__u32_,tx_cfg->tx_cfg_rate);
#pragma GCC diagnostic pop
    }


    value = &tx_cfg->tx_cfg_rolloff;
    size = sizeof(tx_cfg->tx_cfg_rolloff);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_ROLLOFF, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX roll off is %hu\r\n", tx_cfg->tx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ROLL_OFF_IS__u8_,tx_cfg->tx_cfg_rolloff);
    }


    value = &tx_cfg->tx_cfg_pout;
    size = sizeof(tx_cfg->tx_cfg_pout);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_POUT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX pout is %f\r\n", tx_cfg->tx_cfg_pout));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_POUT_IS__u16_pt_u16_,tx_cfg->tx_cfg_pout);
    }


    value = &tx_cfg->tx_cfg_alc_mode;
    size = sizeof(tx_cfg->tx_cfg_alc_mode);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_ALC_MODE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX ALC mode is %hu\r\n", tx_cfg->tx_cfg_alc_mode));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ALC_MODE_IS__u8_,tx_cfg->tx_cfg_alc_mode);
    }


    value = &tx_cfg->tx_cfg_rs;
    size = sizeof(tx_cfg->tx_cfg_rs);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_RS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX RS enable is %hu\r\n", tx_cfg->tx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RS_ENABLE_IS__u8_,tx_cfg->tx_cfg_rs);
    }


    value = &tx_cfg->tx_cfg_cc;
    size = sizeof(tx_cfg->tx_cfg_cc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CC enable is %hu\r\n", tx_cfg->tx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CC_ENABLE_IS__u8_,tx_cfg->tx_cfg_cc);
    }


    value = &tx_cfg->tx_cfg_rand;
    size = sizeof(tx_cfg->tx_cfg_rand);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_RAND, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX randomisation enable is %hu\r\n", tx_cfg->tx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RANDOMISATION_ENABLE_IS__u8_,tx_cfg->tx_cfg_rand);
    }


    value = &tx_cfg->tx_cfg_crc;
    size = sizeof(tx_cfg->tx_cfg_crc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CRC checksum enable is %hu\r\n", tx_cfg->tx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRC_CHECKSUM_ENABLE_IS__u8_,tx_cfg->tx_cfg_crc);
    }


    value = &tx_cfg->tx_cfg_idletime;
    size = sizeof(tx_cfg->tx_cfg_idletime);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_IDLETIME, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX idletime is %hi\r\n", tx_cfg->tx_cfg_idletime));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_IDLETIME_IS__u16_,tx_cfg->tx_cfg_idletime);
    }


    value = &tx_cfg->tx_cfg_size;
    size = sizeof(tx_cfg->tx_cfg_size);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_SIZE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX payload size is %hi\r\n", tx_cfg->tx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PAYLOAD_SIZE_IS__u16_,tx_cfg->tx_cfg_size);
    }


    value = &tx_cfg->tx_cfg_id;
    size = sizeof(tx_cfg->tx_cfg_id);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_ID, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX satellite ID is %hi\r\n", tx_cfg->tx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_SATELLITE_ID_IS__u16_,tx_cfg->tx_cfg_id);
    }


    value = &tx_cfg->crypto_cfg.crypto_key;
    size = sizeof(tx_cfg->crypto_cfg.crypto_key);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRYPTO_KEY, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto key is %s\r\n", tx_cfg->crypto_cfg.crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The TX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)tx_cfg->crypto_cfg.crypto_key);
    }


    value = &tx_cfg->crypto_cfg.crypto_encrypt;
    size = sizeof(tx_cfg->crypto_cfg.crypto_encrypt);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRYPTO_ENCRYPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto encrypt is %hu\r\n", tx_cfg->crypto_cfg.crypto_encrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_ENCRYPT_IS__u8_,tx_cfg->crypto_cfg.crypto_encrypt);
    }


    value = &tx_cfg->crypto_cfg.crypto_auth;
    size = sizeof(tx_cfg->crypto_cfg.crypto_auth);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRYPTO_AUTH, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto Auth is %hu\r\n", tx_cfg->crypto_cfg.crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_AUTH_IS__u8_,tx_cfg->crypto_cfg.crypto_auth);

    }


    value = &tx_cfg->tx_cfg_pa_templimit;
    size = sizeof(tx_cfg->tx_cfg_pa_templimit);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PA_TEMPLIMIT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX PA temp limit is %hhd\r\n", tx_cfg->tx_cfg_pa_templimit));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PA_TEMP_LIMIT_IS__u8_,tx_cfg->tx_cfg_pa_templimit);
    }


    value = &tx_cfg->tx_cfg_frames;
    size = sizeof(tx_cfg->tx_cfg_frames);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_FRAMES, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The transmitted frames are %lu\r\n", tx_cfg->tx_cfg_frames));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TRANSMITTED_FRAMES_ARE__u32_,tx_cfg->tx_cfg_frames);
#pragma GCC diagnostic pop
        }


    value = &tx_cfg->tx_cfg_pwr_fwd;
    size = sizeof(tx_cfg->tx_cfg_pwr_fwd);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PWR_FWD, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX measured forward power is %.2f\r\n", tx_cfg->tx_cfg_pwr_fwd));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_MEASURED_FORWARD_POWER_IS__u16_pt_u16_,tx_cfg->tx_cfg_pwr_fwd);
    }

    value = &tx_cfg->tx_cfg_pwr_rfl;
    size = sizeof(tx_cfg->tx_cfg_pwr_rfl);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PWR_RFL, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX refected power is %.2f\r\n", tx_cfg->tx_cfg_pwr_rfl));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_REFECTED_POWER_IS__u16_pt_u16_,tx_cfg->tx_cfg_pwr_rfl);
    }
    return ret;
}

/**
 * @brief  This function is used for getting the receive config from the S-Band Module
* @brief Gets the reception configuration from the S-Band module
*
* @param rx_cfg Pointer to reception config struct to populate
*
* @return Status of getting reception configuration  
 */
int32_t sdr_srs4_sband_get_rx_cfg(s_comms_rx_cfg *rx_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg->rx_cfg_freq;
    size = sizeof(rx_cfg->rx_cfg_freq);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FREQ, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX frequency is %lu\r\n", rx_cfg->rx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FREQUENCY_IS__u32_,rx_cfg->rx_cfg_freq);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_type;
    size = sizeof(rx_cfg->rx_cfg_type);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_TYPE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX type is %hu\r\n", rx_cfg->rx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_TYPE_IS__u8_,rx_cfg->rx_cfg_type);
    }

    value = &rx_cfg->rx_cfg_rate;
    size = sizeof(rx_cfg->rx_cfg_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX RATE is %lu\r\n", rx_cfg->rx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RATE_IS__u32_,rx_cfg->rx_cfg_rate);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_rolloff;
    size = sizeof(rx_cfg->rx_cfg_rolloff);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_ROLLOFF, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Roll off is %hu\r\n", rx_cfg->rx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_ROLL_OFF_IS__u8_,rx_cfg->rx_cfg_rolloff);
    }

    value = &rx_cfg->afc_cfg.rx_cfg_afc_enable;
    size = sizeof(rx_cfg->afc_cfg.rx_cfg_afc_enable);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_AFC_ENABLE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX AFC enable is %hu\r\n", rx_cfg->afc_cfg.rx_cfg_afc_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_AFC_ENABLE_IS__u8_,rx_cfg->afc_cfg.rx_cfg_afc_enable);
    }

    value = &rx_cfg->afc_cfg.rx_cfg_afc_range;
    size = sizeof(rx_cfg->afc_cfg.rx_cfg_afc_range);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_AFC_RANGE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The AFC Range is %lu\r\n", rx_cfg->afc_cfg.rx_cfg_afc_range));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_AFC_RANGE_IS__u32_,rx_cfg->afc_cfg.rx_cfg_afc_range);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_rs;
    size = sizeof(rx_cfg->rx_cfg_rs);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX RS config is %hu\r\n", rx_cfg->rx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RS_CONFIG_IS__u8_,rx_cfg->rx_cfg_rs);
    }

    value = &rx_cfg->rx_cfg_cc;
    size = sizeof(rx_cfg->rx_cfg_cc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CC enable is %hu\r\n", rx_cfg->rx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CC_ENABLE_IS__u8_,rx_cfg->rx_cfg_cc);
    }

    value = &rx_cfg->rx_cfg_rand;
    size = sizeof(rx_cfg->rx_cfg_rand);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RAND, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX randomisation enable is %hu\r\n", rx_cfg->rx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RANDOMISATION_ENABLE_IS__u8_,rx_cfg->rx_cfg_rand);
    }

    value = &rx_cfg->rx_cfg_crc;
    size = sizeof(rx_cfg->rx_cfg_crc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CRC checksum enable is %hu\r\n", rx_cfg->rx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRC_CHECKSUM_ENABLE_IS__u8_,rx_cfg->rx_cfg_crc);
    }

    value = &rx_cfg->rx_cfg_size;
    size = sizeof(rx_cfg->rx_cfg_size);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_SIZE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX payload size is %hu\r\n", rx_cfg->rx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_PAYLOAD_SIZE_IS__u8_,rx_cfg->rx_cfg_size);
    }

    value = &rx_cfg->rx_cfg_id;
    size = sizeof(rx_cfg->rx_cfg_id);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_ID, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The Satellite ID is %hu\r\n", rx_cfg->rx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_SATELLITE_ID_IS__u16_,rx_cfg->rx_cfg_id);
    }

    value = &rx_cfg->crypto_cfg.crypto_key;
    size = sizeof(rx_cfg->crypto_cfg.crypto_key);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRYPTO_KEY, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Key is %s\r\n", rx_cfg->crypto_cfg.crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The RX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)rx_cfg->crypto_cfg.crypto_key);
    }
    ;

    value = &rx_cfg->crypto_cfg.crypto_decrypt;
    size = sizeof(rx_cfg->crypto_cfg.crypto_decrypt);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRYPTO_DECRYPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto decrypt is %hu\r\n", rx_cfg->crypto_cfg.crypto_decrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_DECRYPT_IS__u8_,rx_cfg->crypto_cfg.crypto_decrypt);
    }

    value = &rx_cfg->crypto_cfg.crypto_auth;
    size = sizeof(rx_cfg->crypto_cfg.crypto_auth);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRYPTO_AUTH, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Auth is %hu\r\n", rx_cfg->crypto_cfg.crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_AUTH_IS__u8_,rx_cfg->crypto_cfg.crypto_auth);
    }

    value = &rx_cfg->rx_cfg_frames;
    size = sizeof(rx_cfg->rx_cfg_frames);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FRAMES, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX Frames received is  %lu\r\n", rx_cfg->rx_cfg_frames));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAMES_RECEIVED_IS__u32_, rx_cfg->rx_cfg_frames);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_detected;
    size = sizeof(rx_cfg->rx_cfg_detected);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_DETECTED, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX Frames detected is %lu\r\n", rx_cfg->rx_cfg_detected));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAMES_DETECTED_IS__u32_,rx_cfg->rx_cfg_detected);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_rssi;
    size = sizeof(rx_cfg->rx_cfg_rssi);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RSSI, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RSSI is %lf\r\n", rx_cfg->rx_cfg_rssi));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RSSI_IS__u16_pt_u16_,rx_cfg->rx_cfg_rssi);
    }

    value = &rx_cfg->rx_cfg_freqerr;
    size = sizeof(rx_cfg->rx_cfg_freqerr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FREQERR, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Frquency deviation is %lf\r\n", rx_cfg->rx_cfg_freqerr));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_FREQUENCY_DEVIATION_IS__u16_pt_u16_,rx_cfg->rx_cfg_freqerr);
    }

    value = &rx_cfg->rx_cfg_symerr;
    size = sizeof(rx_cfg->rx_cfg_symerr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_SYMERR, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Symbol deviation is %lf\r\n", rx_cfg->rx_cfg_symerr));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_SYMBOL_DEVIATION_IS__u16_pt_u16_,rx_cfg->rx_cfg_symerr);
    }

    value = &rx_cfg->rx_cfg_ebn0;
    size = sizeof(rx_cfg->rx_cfg_ebn0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_EBN0, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The is RX EBN0 %lf\r\n", rx_cfg->rx_cfg_ebn0));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_IS_RX_EBN0__u16_pt_u16_,rx_cfg->rx_cfg_ebn0);

    }

    value = &rx_cfg->rx_cfg_carrier_lock;
    size = sizeof(rx_cfg->rx_cfg_carrier_lock);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CARRIER_LOCK, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Carrier lock is %d\r\n", rx_cfg->rx_cfg_carrier_lock));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CARRIER_LOCK_IS__u8_,rx_cfg->rx_cfg_carrier_lock);
    }

    value = &rx_cfg->rx_frame_lock;
    size = sizeof(rx_cfg->rx_frame_lock);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FRAME_LOCK, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Frame Lock is %d\r\n", rx_cfg->rx_frame_lock));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAME_LOCK_IS__u8_,rx_cfg->rx_frame_lock);
    }
    return ret;
}

/**
 * @brief  This function is used for setting the transmit config of the S-Band module
* @brief Sets the transmission configuration in the S-Band module 
*
* @param tx_cfg Pointer to transmission config struct to set
*
* @return Status of setting transmission configuration
 */
int32_t sdr_srs4_sband_set_tx_cfg(s_comms_tx_cfg *tx_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg->tx_cfg_freq;
    size = sizeof(tx_cfg->tx_cfg_freq);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_FREQ, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX Frequency is %lu\r\n", tx_cfg->tx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_FREQUENCY_IS__u32_,tx_cfg->tx_cfg_freq);
#pragma GCC diagnostic pop
        }

    value = &tx_cfg->tx_cfg_type;
    size = sizeof(tx_cfg->tx_cfg_type);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_TYPE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX modulation type is %hu\r\n", tx_cfg->tx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_MODULATION_TYPE_IS__u8_,tx_cfg->tx_cfg_type);
    }

    value = &tx_cfg->tx_cfg_rate;
    size = sizeof(tx_cfg->tx_cfg_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX baud rate is %lu\r\n", tx_cfg->tx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_BAUD_RATE_IS__u32_,tx_cfg->tx_cfg_rate);
#pragma GCC diagnostic pop
        }


    value = &tx_cfg->tx_cfg_rolloff;
    size = sizeof(tx_cfg->tx_cfg_rolloff);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_ROLLOFF, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX roll off is %hu\r\n", tx_cfg->tx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ROLL_OFF_IS__u8_,tx_cfg->tx_cfg_rolloff);
    }


    value = &tx_cfg->tx_cfg_pout;
    size = sizeof(tx_cfg->tx_cfg_pout);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_POUT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX pout is %f\r\n", tx_cfg->tx_cfg_pout));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_POUT_IS__u16_pt_u16_,tx_cfg->tx_cfg_pout);
    }


    value = &tx_cfg->tx_cfg_alc_mode;
    size = sizeof(tx_cfg->tx_cfg_alc_mode);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_ALC_MODE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX ALC mode is %hu\r\n", tx_cfg->tx_cfg_alc_mode));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ALC_MODE_IS__u8_,tx_cfg->tx_cfg_alc_mode);
    }


    value = &tx_cfg->tx_cfg_rs;
    size = sizeof(tx_cfg->tx_cfg_rs);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_RS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX RS enable is %hu\r\n", tx_cfg->tx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RS_ENABLE_IS__u8_,tx_cfg->tx_cfg_rs);
    }


    value = &tx_cfg->tx_cfg_cc;
    size = sizeof(tx_cfg->tx_cfg_cc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CC enable is %hu\r\n", tx_cfg->tx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CC_ENABLE_IS__u8_,tx_cfg->tx_cfg_cc);
    }


    value = &tx_cfg->tx_cfg_rand;
    size = sizeof(tx_cfg->tx_cfg_rand);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_RAND, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX randomisation enable is %hu\r\n", tx_cfg->tx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RANDOMISATION_ENABLE_IS__u8_,tx_cfg->tx_cfg_rand);
    }


    value = &tx_cfg->tx_cfg_crc;
    size = sizeof(tx_cfg->tx_cfg_crc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CRC checksum enable is %hu\r\n", tx_cfg->tx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRC_CHECKSUM_ENABLE_IS__u8_,tx_cfg->tx_cfg_crc);
    }


    value = &tx_cfg->tx_cfg_idletime;
    size = sizeof(tx_cfg->tx_cfg_idletime);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_IDLETIME, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX idletime is %hi\r\n", tx_cfg->tx_cfg_idletime));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_IDLETIME_IS__u16_,tx_cfg->tx_cfg_idletime);
    }


    value = &tx_cfg->tx_cfg_size;
    size = sizeof(tx_cfg->tx_cfg_size);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_SIZE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX payload size is %hi\r\n", tx_cfg->tx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PAYLOAD_SIZE_IS__u16_,tx_cfg->tx_cfg_size);
    }


    value = &tx_cfg->tx_cfg_id;
    size = sizeof(tx_cfg->tx_cfg_id);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_ID, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX satellite ID is %hi\r\n", tx_cfg->tx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_SATELLITE_ID_IS__u16_,tx_cfg->tx_cfg_id);
    }


    value = &tx_cfg->crypto_cfg.crypto_key;
    size = sizeof(tx_cfg->crypto_cfg.crypto_key);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRYPTO_KEY, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto key is %s\r\n", tx_cfg->crypto_cfg.crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The TX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)tx_cfg->crypto_cfg.crypto_key);
    }


    value = &tx_cfg->crypto_cfg.crypto_encrypt;
    size = sizeof(tx_cfg->crypto_cfg.crypto_encrypt);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRYPTO_ENCRYPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto encrypt is %hu\r\n", tx_cfg->crypto_cfg.crypto_encrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_ENCRYPT_IS__u8_,tx_cfg->crypto_cfg.crypto_encrypt);
    }


    value = &tx_cfg->crypto_cfg.crypto_auth;
    size = sizeof(tx_cfg->crypto_cfg.crypto_auth);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRYPTO_AUTH, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto Auth is %hu\r\n", tx_cfg->crypto_cfg.crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_AUTH_IS__u8_,tx_cfg->crypto_cfg.crypto_auth);
    }


    value = &tx_cfg->tx_cfg_pa_templimit;
    size = sizeof(tx_cfg->tx_cfg_pa_templimit);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_PA_TEMPLIMIT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX PA temp limit is %hhd\r\n", tx_cfg->tx_cfg_pa_templimit));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PA_TEMP_LIMIT_IS__u8_,tx_cfg->tx_cfg_pa_templimit);
    }

    return ret;
}

/**
 * @brief  This function is used for setting the receive config of the S-Band Module
* @brief Sets the reception configuration in the S-Band module  
*
* @param rx_cfg Pointer to reception config struct to set
*
* @return Status of setting reception configuration
 */
int32_t sdr_srs4_sband_set_rx_cfg(s_comms_rx_cfg *rx_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg->rx_cfg_freq;
    size = sizeof(rx_cfg->rx_cfg_freq);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_FREQ, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX frequency is %lu\r\n", rx_cfg->rx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FREQUENCY_IS__u32_,rx_cfg->rx_cfg_freq);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_type;
    size = sizeof(rx_cfg->rx_cfg_type);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_TYPE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX type is %hu\r\n", rx_cfg->rx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_TYPE_IS__u8_,rx_cfg->rx_cfg_type);

    }

    value = &rx_cfg->rx_cfg_rate;
    size = sizeof(rx_cfg->rx_cfg_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX RATE is %lu\r\n", rx_cfg->rx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RATE_IS__u32_,rx_cfg->rx_cfg_rate);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_rolloff;
    size = sizeof(rx_cfg->rx_cfg_rolloff);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_ROLLOFF, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Roll off is %hu\r\n", rx_cfg->rx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_ROLL_OFF_IS__u8_,rx_cfg->rx_cfg_rolloff);
    }

    value = &rx_cfg->afc_cfg.rx_cfg_afc_enable;
    size = sizeof(rx_cfg->afc_cfg.rx_cfg_afc_enable);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_AFC_ENABLE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX AFC enable is %hu\r\n", rx_cfg->afc_cfg.rx_cfg_afc_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_AFC_ENABLE_IS__u8_,rx_cfg->afc_cfg.rx_cfg_afc_enable);
    }

    value = &rx_cfg->afc_cfg.rx_cfg_afc_range;
    size = sizeof(rx_cfg->afc_cfg.rx_cfg_afc_range);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_AFC_RANGE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The AFC Range is %lu\r\n", rx_cfg->afc_cfg.rx_cfg_afc_range));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_AFC_RANGE_IS__u32_,rx_cfg->afc_cfg.rx_cfg_afc_range);
#pragma GCC diagnostic pop
        }

    value = &rx_cfg->rx_cfg_rs;
    size = sizeof(rx_cfg->rx_cfg_rs);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_RS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX RS config is %hu\r\n", rx_cfg->rx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RS_CONFIG_IS__u8_,rx_cfg->rx_cfg_rs);
    }

    value = &rx_cfg->rx_cfg_cc;
    size = sizeof(rx_cfg->rx_cfg_cc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CC enable is %hu\r\n", rx_cfg->rx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CC_ENABLE_IS__u8_,rx_cfg->rx_cfg_cc);
    }

    value = &rx_cfg->rx_cfg_rand;
    size = sizeof(rx_cfg->rx_cfg_rand);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_RAND, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX randomisation enable is %hu\r\n", rx_cfg->rx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RANDOMISATION_ENABLE_IS__u8_,rx_cfg->rx_cfg_rand);
    }

    value = &rx_cfg->rx_cfg_crc;
    size = sizeof(rx_cfg->rx_cfg_crc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CRC checksum enable is %hu\r\n", rx_cfg->rx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRC_CHECKSUM_ENABLE_IS__u8_,rx_cfg->rx_cfg_crc);
    }

    value = &rx_cfg->rx_cfg_size;
    size = sizeof(rx_cfg->rx_cfg_size);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_SIZE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX payload size is %hu\r\n", rx_cfg->rx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_PAYLOAD_SIZE_IS__u8_,rx_cfg->rx_cfg_size);
    }

    value = &rx_cfg->rx_cfg_id;
    size = sizeof(rx_cfg->rx_cfg_id);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_ID, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The Satellite ID is %hu\r\n", rx_cfg->rx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_SATELLITE_ID_IS__u16_,rx_cfg->rx_cfg_id);
    }

    value = &rx_cfg->crypto_cfg.crypto_key;
    size = sizeof(rx_cfg->crypto_cfg.crypto_key);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRYPTO_KEY, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Key is %s\r\n", rx_cfg->crypto_cfg.crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The RX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)rx_cfg->crypto_cfg.crypto_key);
    }
    ;

    value = &rx_cfg->crypto_cfg.crypto_decrypt;
    size = sizeof(rx_cfg->crypto_cfg.crypto_decrypt);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRYPTO_DECRYPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto decrypt is %hu\r\n", rx_cfg->crypto_cfg.crypto_decrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_DECRYPT_IS__u8_,rx_cfg->crypto_cfg.crypto_decrypt);
    }

    value = &rx_cfg->crypto_cfg.crypto_auth;
    size = sizeof(rx_cfg->crypto_cfg.crypto_auth);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRYPTO_AUTH, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Auth is %hu\r\n", rx_cfg->crypto_cfg.crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_AUTH_IS__u8_,rx_cfg->crypto_cfg.crypto_auth);
    }

    return ret;
}

/**
 * @brief This function is used for getting the system config from the S-Band module
* @brief Gets the system configuration from the S-Band module
*
* @param sys_cfg Pointer to system config struct to populate 
*
* @return Status of getting system configuration
 */
int32_t sdr_srs4_sband_get_sys_cfg(s_comms_sys_cfg *sys_cfg)
{

    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &sys_cfg->sys_name;
    size = sizeof(sys_cfg->sys_name);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NAME, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->sys_name: %s\r\n", sys_cfg->sys_name));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_name");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->sys_name);
    }

    value = &sys_cfg->boot_cfg.sys_serial;
    size = sizeof(sys_cfg->boot_cfg.sys_serial);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_SERIAL, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_serial: %lu\r\n", sys_cfg->boot_cfg.sys_serial));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_SERIAL__u32_,sys_cfg->boot_cfg.sys_serial);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->boot_cfg.sys_sw_version;
    size = sizeof(sys_cfg->boot_cfg.sys_sw_version);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_SW_VERSION, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_sw_version: %lu\r\n", sys_cfg->boot_cfg.sys_sw_version));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_SW_VERSION__u32_,sys_cfg->boot_cfg.sys_sw_version);
#pragma GCC diagnostic pop
        }


    value = &sys_cfg->boot_cfg.sys_bootcount;
    size = sizeof(sys_cfg->boot_cfg.sys_bootcount);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_BOOTCOUNT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_bootcount: %lu\r\n", sys_cfg->boot_cfg.sys_bootcount));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_BOOTCOUNT__u32_,sys_cfg->boot_cfg.sys_bootcount);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->boot_cfg.sys_reboot;
    size = sizeof(sys_cfg->boot_cfg.sys_reboot);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_REBOOT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_reboot: %d\r\n", sys_cfg->boot_cfg.sys_reboot));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_REBOOT__u16_,sys_cfg->boot_cfg.sys_reboot);
    }

    value = &sys_cfg->gwdt_cfg.sys_gwdt_init;
    size = sizeof(sys_cfg->gwdt_cfg.sys_gwdt_init);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_GWDT_INIT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->gwdt_cfg.sys_gwdt_init: %lu\r\n", sys_cfg->gwdt_cfg.sys_gwdt_init));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_pt_SYS_GWDT_INIT__u32_,sys_cfg->gwdt_cfg.sys_gwdt_init);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->gwdt_cfg.sys_gwdt_counter;
    size = sizeof(sys_cfg->gwdt_cfg.sys_gwdt_counter);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_GWDT_COUNTER, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->gwdt_cfg.sys_gwdt_counter: %lu\r\n", sys_cfg->gwdt_cfg.sys_gwdt_counter));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_pt_SYS_GWDT_COUNTER__u32_,sys_cfg->gwdt_cfg.sys_gwdt_counter);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->gwdt_cfg.sys_gwdt_reset;
    size = sizeof(sys_cfg->gwdt_cfg.sys_gwdt_reset);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_GWDT_RESET, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->gwdt_cfg.sys_gwdt_reset: %lu\r\n", sys_cfg->gwdt_cfg.sys_gwdt_reset));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_pt_SYS_GWDT_RESET__u32_,sys_cfg->gwdt_cfg.sys_gwdt_reset);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->csp_cfg.sys_csp_address;
    size = sizeof(sys_cfg->csp_cfg.sys_csp_address);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CSP_ADDRESS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg.sys_csp_address: %hhd\r\n", sys_cfg->csp_cfg.sys_csp_address));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CSP_CFG_pt_SYS_CSP_ADDRESS__u8_, sys_cfg->csp_cfg.sys_csp_address);
    }

    value = &sys_cfg->csp_cfg.sys_csp_routes;
    size = sizeof(sys_cfg->csp_cfg.sys_csp_routes);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CSP_ROUTES, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg.sys_csp_routes: %s\r\n", sys_cfg->csp_cfg.sys_csp_routes));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_csp_routes");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->csp_cfg.sys_csp_routes);
    }
    value = &sys_cfg->can_cfg.sys_can_rate;
    size = sizeof(sys_cfg->can_cfg.sys_can_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CAN_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->can_cfg.sys_can_rate: %lu\r\n", sys_cfg->can_cfg.sys_can_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_pt_SYS_CAN_RATE__u32_,sys_cfg->can_cfg.sys_can_rate);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->can_cfg.sys_can_promisc;
    size = sizeof(sys_cfg->can_cfg.sys_can_promisc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CAN_PROMISC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->can_cfg.sys_can_promisc: %hu\r\n", sys_cfg->can_cfg.sys_can_promisc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_pt_SYS_CAN_PROMISC__u8_,sys_cfg->can_cfg.sys_can_promisc);
    }

    value = &sys_cfg->uart_cfg.sys_uart_rate;
    size = sizeof(sys_cfg->uart_cfg.sys_uart_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_UART_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg.sys_uart_rate: %lu\r\n", sys_cfg->uart_cfg.sys_uart_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG_pt_SYS_UART_RATE__u32_,sys_cfg->uart_cfg.sys_uart_rate);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->uart_cfg.sys_uart_multidrop;
    size = sizeof(sys_cfg->uart_cfg.sys_uart_multidrop);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_UART_MULTIDROP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg.sys_uart_multidrop: %hu\r\n", sys_cfg->uart_cfg.sys_uart_multidrop));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG_pt_SYS_UART_MULTIDROP__u8_,sys_cfg->uart_cfg.sys_uart_multidrop);
    }

    value = &sys_cfg->net_cfg.sys_net_enable;
    size = sizeof(sys_cfg->net_cfg.sys_net_enable);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_ENABLE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_enable: %hu\r\n", sys_cfg->net_cfg.sys_net_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_pt_SYS_NET_ENABLE__u8_,sys_cfg->net_cfg.sys_net_enable);
    }

    value = &sys_cfg->net_cfg.sys_net_en_ip;
    size = sizeof(sys_cfg->net_cfg.sys_net_en_ip);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_EN_IP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_en_ip: %s\r\n", sys_cfg->net_cfg.sys_net_en_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_ip");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_en_ip);
    }

    value = &sys_cfg->net_cfg.sys_net_en_prefix;
    size = sizeof(sys_cfg->net_cfg.sys_net_en_prefix);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_EN_PREFIX, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_en_prefix: %hhd\r\n", sys_cfg->net_cfg.sys_net_en_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_pt_SYS_NET_EN_PREFIX__u8_,sys_cfg->net_cfg.sys_net_en_prefix);
    }

    value = &sys_cfg->net_cfg.sys_net_en_gw;
    size = sizeof(sys_cfg->net_cfg.sys_net_en_gw);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_EN_GW, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_en_gw: %s\r\n", sys_cfg->net_cfg.sys_net_en_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_en_gw);
    }

    value = &sys_cfg->net_cfg.sys_net_rf_ip;
    size = sizeof(sys_cfg->net_cfg.sys_net_rf_ip);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_RF_IP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_rf_ip: %s\r\n", sys_cfg->net_cfg.sys_net_rf_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"SYS_CFG_NET_CFG_pt_SYS_NET_RF_IP");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_rf_ip);
    }

    value = &sys_cfg->net_cfg.sys_net_rf_prefix;
    size = sizeof(sys_cfg->net_cfg.sys_net_rf_prefix);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_RF_PREFIX, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_rf_prefix: %hhd\r\n", sys_cfg->net_cfg.sys_net_rf_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_pt_SYS_NET_RF_PREFIX__u8_,sys_cfg->net_cfg.sys_net_rf_prefix);
    }

    value = &sys_cfg->net_cfg.sys_net_rf_gw;
    size = sizeof(sys_cfg->net_cfg.sys_net_rf_gw);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_RF_GW, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_rf_gw: %s\r\n", sys_cfg->net_cfg.sys_net_rf_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_rf_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_rf_gw);
    }

    return ret;
}

/**
 * @brief  This function is used for getting the calibration config from the S-Band Module
* @brief Gets the calibration configuration from the S-Band module
*
* @param cal_cfg Pointer to calibration config struct to populate
*
* @return Status of getting calibration configuration
 */
int32_t sdr_srs4_sband_get_cal_cfg(s_comms_cal_cfg *cal_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &cal_cfg->cal_ps_gain;
    size = sizeof(cal_cfg->cal_ps_gain);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_PS_GAIN, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_gain: %lf\r\n", cal_cfg->cal_ps_gain));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_GAIN__u16_pt_u16_,cal_cfg->cal_ps_gain);
    }


    value = &cal_cfg->cal_ps_intercept;
    size = sizeof(cal_cfg->cal_ps_intercept);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_PS_INTERCEPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_intercept: %lf\r\n", cal_cfg->cal_ps_intercept));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_INTERCEPT__u16_pt_u16_,cal_cfg->cal_ps_intercept);
    }


    value = &cal_cfg->cal_vctcxo;
    size = sizeof(cal_cfg->cal_vctcxo);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_VCTCXO, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_vctcxo: %d\r\n", cal_cfg->cal_vctcxo));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_VCTCXO__u16_,cal_cfg->cal_vctcxo);
    }


    value = &cal_cfg->cal_pwr_set;
    size = sizeof(cal_cfg->cal_pwr_set);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_PWR_SET, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_pwr_set: %.2f\r\n", cal_cfg->cal_pwr_set));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PWR_SET__u16_pt_u16_,cal_cfg->cal_pwr_set);
    }


    value = &cal_cfg->cal_ber_enable;
    size = sizeof(cal_cfg->cal_ber_enable);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_ENABLE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_enable: %d\r\n", cal_cfg->cal_ber_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_ENABLE__u8_,cal_cfg->cal_ber_enable);
    }


    value = &cal_cfg->cal_ber_window;
    size = sizeof(cal_cfg->cal_ber_window);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_WINDOW, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_window: %lu\r\n", cal_cfg->cal_ber_window));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_WINDOW__u32_,cal_cfg->cal_ber_window);
#pragma GCC diagnostic pop
        }


    value = &cal_cfg->cal_ber_count;
    size = sizeof(cal_cfg->cal_ber_count);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_COUNT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_count: %lu\r\n", cal_cfg->cal_ber_count));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_COUNT__u32_,cal_cfg->cal_ber_count);
#pragma GCC diagnostic pop
        }


    value = &cal_cfg->cal_ber_locks;
    size = sizeof(cal_cfg->cal_ber_locks);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_LOCKS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_locks: %lu\r\n", cal_cfg->cal_ber_locks));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_LOCKS__u32_,cal_cfg->cal_ber_locks);
#pragma GCC diagnostic pop
        }

    return ret;
}

/**
 * @brief  This function is used for setting the system config of the S-Band Module
* @brief Sets the system configuration in the S-Band module
*
* @param sys_cfg Pointer to system config struct to set  
*
* @return Status of setting system configuration
 */
int32_t sdr_srs4_sband_set_sys_cfg(s_comms_sys_cfg *sys_cfg)
{

    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &sys_cfg->sys_name;
    size = sizeof(sys_cfg->sys_name);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NAME, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->sys_name: %s\r\n", sys_cfg->sys_name));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_name");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->sys_name);
    }

    value = &sys_cfg->boot_cfg.sys_bootcount;
    size = sizeof(sys_cfg->boot_cfg.sys_bootcount);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_BOOTCOUNT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_bootcount: %lu\r\n", sys_cfg->boot_cfg.sys_bootcount));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_BOOTCOUNT__u32_,sys_cfg->boot_cfg.sys_bootcount);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->gwdt_cfg.sys_gwdt_init;
    size = sizeof(sys_cfg->gwdt_cfg.sys_gwdt_init);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_GWDT_INIT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->gwdt_cfg.sys_gwdt_init: %lu\r\n", sys_cfg->gwdt_cfg.sys_gwdt_init));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_pt_SYS_GWDT_INIT__u32_,sys_cfg->gwdt_cfg.sys_gwdt_init);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->csp_cfg.sys_csp_address;
    size = sizeof(sys_cfg->csp_cfg.sys_csp_address);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CSP_ADDRESS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg.sys_csp_address: %hhd\r\n", sys_cfg->csp_cfg.sys_csp_address));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CSP_CFG_pt_SYS_CSP_ADDRESS__u8_, sys_cfg->csp_cfg.sys_csp_address);
    }

    value = &sys_cfg->csp_cfg.sys_csp_routes;
    size = sizeof(sys_cfg->csp_cfg.sys_csp_routes);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CSP_ROUTES, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg.sys_csp_routes: %s\r\n", sys_cfg->csp_cfg.sys_csp_routes));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_csp_routes");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->csp_cfg.sys_csp_routes);
    }

    value = &sys_cfg->can_cfg.sys_can_rate;
    size = sizeof(sys_cfg->can_cfg.sys_can_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CAN_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->can_cfg.sys_can_rate: %lu\r\n", sys_cfg->can_cfg.sys_can_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_pt_SYS_CAN_RATE__u32_,sys_cfg->can_cfg.sys_can_rate);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->can_cfg.sys_can_promisc;
    size = sizeof(sys_cfg->can_cfg.sys_can_promisc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CAN_PROMISC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->can_cfg.sys_can_promisc: %hu\r\n", sys_cfg->can_cfg.sys_can_promisc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_pt_SYS_CAN_PROMISC__u8_,sys_cfg->can_cfg.sys_can_promisc);
    }

    value = &sys_cfg->uart_cfg.sys_uart_rate;
    size = sizeof(sys_cfg->uart_cfg.sys_uart_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_UART_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg.sys_uart_rate: %lu\r\n", sys_cfg->uart_cfg.sys_uart_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG_pt_SYS_UART_RATE__u32_,sys_cfg->uart_cfg.sys_uart_rate);
#pragma GCC diagnostic pop
        }

    value = &sys_cfg->uart_cfg.sys_uart_multidrop;
    size = sizeof(sys_cfg->uart_cfg.sys_uart_multidrop);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_UART_MULTIDROP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg.sys_uart_multidrop: %hu\r\n", sys_cfg->uart_cfg.sys_uart_multidrop));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG_pt_SYS_UART_MULTIDROP__u8_,sys_cfg->uart_cfg.sys_uart_multidrop);
    }

    value = &sys_cfg->net_cfg.sys_net_enable;
    size = sizeof(sys_cfg->net_cfg.sys_net_enable);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_ENABLE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_enable: %hu\r\n", sys_cfg->net_cfg.sys_net_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_pt_SYS_NET_ENABLE__u8_,sys_cfg->net_cfg.sys_net_enable);
    }

    value = &sys_cfg->net_cfg.sys_net_en_ip;
    size = sizeof(sys_cfg->net_cfg.sys_net_en_ip);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_EN_IP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_en_ip: %s\r\n", sys_cfg->net_cfg.sys_net_en_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_ip");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_en_ip);
    }

    value = &sys_cfg->net_cfg.sys_net_en_prefix;
    size = sizeof(sys_cfg->net_cfg.sys_net_en_prefix);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_EN_PREFIX, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_en_prefix: %hhd\r\n", sys_cfg->net_cfg.sys_net_en_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_pt_SYS_NET_EN_PREFIX__u8_,sys_cfg->net_cfg.sys_net_en_prefix);
    }

    value = &sys_cfg->net_cfg.sys_net_en_gw;
    size = sizeof(sys_cfg->net_cfg.sys_net_en_gw);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_EN_GW, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_en_gw: %s\r\n", sys_cfg->net_cfg.sys_net_en_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_en_gw);
    }

    value = &sys_cfg->net_cfg.sys_net_rf_ip;
    size = sizeof(sys_cfg->net_cfg.sys_net_rf_ip);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_RF_IP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_rf_ip: %s\r\n", sys_cfg->net_cfg.sys_net_rf_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_rf_ip");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_rf_ip);
    }

    value = &sys_cfg->net_cfg.sys_net_rf_prefix;
    size = sizeof(sys_cfg->net_cfg.sys_net_rf_prefix);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_RF_PREFIX, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_rf_prefix: %hhd\r\n", sys_cfg->net_cfg.sys_net_rf_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_pt_SYS_NET_RF_PREFIX__u8_,sys_cfg->net_cfg.sys_net_rf_prefix);
    }

    value = &sys_cfg->net_cfg.sys_net_rf_gw;
    size = sizeof(sys_cfg->net_cfg.sys_net_rf_gw);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_RF_GW, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg.sys_net_rf_gw: %s\r\n", sys_cfg->net_cfg.sys_net_rf_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_rf_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_cfg->net_cfg.sys_net_rf_gw);
    }

    return ret;
}

/**
 * @brief  This function is used for setting the calibration config of the S-Band Module
* @brief Sets the calibration configuration in the S-Band module
*
* @param cal_cfg Pointer to calibration config struct to set
*
* @return Status of setting calibration configuration  
 */
int32_t sdr_srs4_sband_set_cal_cfg(s_comms_cal_cfg *cal_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &cal_cfg->cal_ps_gain;
    size = sizeof(cal_cfg->cal_ps_gain);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_CAL_PS_GAIN, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_gain: %lf\r\n", cal_cfg->cal_ps_gain));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_GAIN__u16_pt_u16_,cal_cfg->cal_ps_gain);

    }


    value = &cal_cfg->cal_ps_intercept;
    size = sizeof(cal_cfg->cal_ps_intercept);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_CAL_PS_INTERCEPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_intercept: %lf\r\n", cal_cfg->cal_ps_intercept));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_INTERCEPT__u16_pt_u16_,cal_cfg->cal_ps_intercept);
    }


    value = &cal_cfg->cal_vctcxo;
    size = sizeof(cal_cfg->cal_vctcxo);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_CAL_VCTCXO, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_vctcxo: %d\r\n", cal_cfg->cal_vctcxo));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_VCTCXO__u16_,cal_cfg->cal_vctcxo);
    }

    return ret;
}

/**
 * @brief  This function is used for getting the telemetry properties of the S-Band module
* @brief Gets telemetry properties from the S-Band module
*
* @param tm Pointer to telemetry property struct to populate  
* @param size Size of the telemetry property struct
*
* @return Status of getting telemetry properties
 */
int32_t sdr_srs4_sband_get_tm_prop(s_comms_tm_prop *tm, uint16_t size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tm->temp_psu;
    size = sizeof(tm->temp_psu);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_PSU, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_psu;: %d\r\n", tm->temp_psu));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_PSU__s16_,tm->temp_psu);
    }


    value = &tm->temp_mcu;
    size = sizeof(tm->temp_mcu);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_MCU, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_mcu;: %d\r\n", tm->temp_mcu));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_MCU__s16_,tm->temp_mcu);
    }


    value = &tm->temp_fpga;
    size = sizeof(tm->temp_fpga);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_FPGA, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_fpga;: %d\r\n", tm->temp_fpga));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_FPGA__s16_,tm->temp_fpga);
    }


    value = &tm->temp_xcvr;
    size = sizeof(tm->temp_xcvr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_XCVR, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_xcvr;: %d\r\n", tm->temp_xcvr));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_XCVR__s16_,tm->temp_xcvr);
    }


    value = &tm->temp_lna;
    size = sizeof(tm->temp_lna);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_LNA, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_lna;: %d\r\n", tm->temp_lna));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_LNA__s16_,tm->temp_lna);
    }


    value = &tm->temp_pa;
    size = sizeof(tm->temp_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_PA, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_pa;: %d\r\n", tm->temp_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_PA__s16_,tm->temp_pa);
    }


    value = &tm->volt_vin;
    size = sizeof(tm->volt_vin);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_VIN, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_vin;: %d\r\n", tm->volt_vin));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_VIN__u16_,tm->volt_vin);
    }


    value = &tm->volt_3v3;
    size = sizeof(tm->volt_3v3);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_3V3, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_3v3;: %d\r\n", tm->volt_3v3));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_3V3__u16_,tm->volt_3v3);
    }


    value = &tm->volt_1v8;
    size = sizeof(tm->volt_1v8);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_1V8, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_1v8;: %d\r\n", tm->volt_1v8));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_1V8__u16_,tm->volt_1v8);
    }


    value = &tm->volt_1v0;
    size = sizeof(tm->volt_1v0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_1V0, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_1v0;: %d\r\n", tm->volt_1v0));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_1V0__u16_,tm->volt_1v0);
    }


    value = &tm->volt_pa;
    size = sizeof(tm->volt_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_PA, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_pa;: %d\r\n", tm->volt_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_PA__u16_,tm->volt_pa);
    }


    value = &tm->cur_vin;
    size = sizeof(tm->cur_vin);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_VIN, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_vin;: %d\r\n", tm->cur_vin));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_VIN__s16_,tm->cur_vin);
    }


    value = &tm->cur_3v3;
    size = sizeof(tm->cur_3v3);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_3V3, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_3v3;: %d\r\n", tm->cur_3v3));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_3V3__s16_,tm->cur_3v3);
    }


    value = &tm->cur_1v8;
    size = sizeof(tm->cur_1v8);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_1V8, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_1v8;: %d\r\n", tm->cur_1v8));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_1V8__s16_,tm->cur_1v8);
    }


    value = &tm->cur_1v0;
    size = sizeof(tm->cur_1v0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_1V0, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_1v0;: %d\r\n", tm->cur_1v0));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_1V0__s16_,tm->cur_1v0);
    }


    value = &tm->cur_pa;
    size = sizeof(tm->cur_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_PA, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_pa;: %d\r\n", tm->cur_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_PA__s16_,tm->cur_pa);
    }


    value = &tm->power_vin;
    size = sizeof(tm->power_vin);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_VIN, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_vin;: %d\r\n", tm->power_vin));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_VIN__u16_,tm->power_vin);
    }


    value = &tm->power_3v3;
    size = sizeof(tm->power_3v3);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_3V3, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_3v3;: %d\r\n", tm->power_3v3));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_3V3__u16_,tm->power_3v3);
    }


    value = &tm->power_1v8;
    size = sizeof(tm->power_1v8);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_1V8, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_1v8;: %d\r\n", tm->power_1v8));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_1V8__u16_,tm->power_1v8);
    }


    value = &tm->power_1v0;
    size = sizeof(tm->power_1v0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_1V0, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_1v0;: %d\r\n", tm->power_1v0));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_1V0__u16_,tm->power_1v0);
    }


    value = &tm->power_pa;
    size = sizeof(tm->power_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_PA, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_pa;: %d\r\n", tm->power_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_PA__u16_,tm->power_pa);
    }

    return ret;
}

/**
 * @brief  This function is used for updating the firmware configuration of the S-Band
* @brief Sends a firmware configuration command to the S-Band module
*
* @param tc_cmd Pointer to the firmware command to send
*
* @return Status of sending firmware command
 */
int32_t sdr_srs4_sband_firmware_cfg(uint8_t *tc_cmd)
{
    int32_t ret=0;
    uint8_t boot_opt = tc_cmd[0];
    uint8_t boots = 0;
    ptr_typ crc = 0, size = 0;
    uint8_t filename[SL_SRS4_BOOTLOADER_FILENAME_MAX] = {0};

    switch(boot_opt)
    {
        case SRS4_BOOT_SET_ALTERNATE:
            {
                boots = tc_cmd[1];
                ret = sl_srs4_bootloader_set_alternate(SRS_4_PORT_ID,DEFAULT_TIMEOUT,boots);
                comms_tc_tm_set_rsp_hdlr(TC_COMMS_FW_CFG, ret ,tc_cmd);
            }
            break;
        case SRS4_BOOT_FLASH_ALTERNATE:
            {
                os_memcpy(&crc,&tc_cmd[1],sizeof(uint32_t));
                os_memcpy(&size,&tc_cmd[5],sizeof(uint8_t));
                os_memcpy(filename,&tc_cmd[6],size);

                ret = sl_srs4_bootloader_flash_alternate(SRS_4_PORT_ID,DEFAULT_TIMEOUT,(char*)filename,(ptr_typ*)crc);
                comms_tc_tm_set_rsp_hdlr(TC_COMMS_FW_CFG, ret ,tc_cmd);
            }
            break;
        case SRS4_BOOT_ERASE_ALTERNATE:
            {
                ret = sl_srs4_bootloader_erase_alternate(SRS_4_PORT_ID,DEFAULT_TIMEOUT);
                comms_tc_tm_set_rsp_hdlr(TC_COMMS_FW_CFG, ret ,tc_cmd);
            }
            break;
        case SRS4_BOOT_CHECK_ALTERNATE:
            {
                os_memcpy(&size,&tc_cmd[1],sizeof(uint32_t));
                ret = sl_srs4_bootloader_checksum_alternate(SRS_4_PORT_ID,DEFAULT_TIMEOUT,size,&crc);
                os_memcpy(&comms_csw_rx_buf[3],&crc,sizeof(uint32_t));
                comms_tc_tm_get_rsp_hdlr(TC_COMMS_FW_CFG, ret ,tc_cmd, sizeof(crc));
            }
            break;
        case SRS4_BOOT_VERIFY_ALTERNATE:
            {
                uint8_t partition =0;
                ptr_typ checksum = 0;
                os_memcpy(&partition,&tc_cmd[1],sizeof(uint8_t));
                ret = sl_srs4_bootloader_verify(SRS_4_PORT_ID,DEFAULT_TIMEOUT,partition,&size,&checksum);
                os_memcpy(&comms_csw_rx_buf[3],&size,sizeof(uint32_t));
                os_memcpy((&comms_csw_rx_buf[3+sizeof(uint32_t)]),&checksum,sizeof(uint32_t));
                comms_tc_tm_get_rsp_hdlr(TC_COMMS_FW_CFG, ret, tc_cmd, sizeof(uint32_t)*2);
            }
            break;
        default:
            {
                DEBUG_CPRINT(("\r\n Incorrect SRS4 Boot option "));
                log_id(LOG_WARNING,LOG_COMMS,INCORRECT_SRS4_BOOT_OPTION);
            }
            break;
    }


    return ret;
}


/**
 * @brief  This function is used to reset the S-Band Module
* @brief Sends a reset request to the S-Band module
*
* @param id Reset request ID
* 
* @return Status of sending reset request
 */
int32_t sdr_srs4_sband_reset_req(uint16_t id)
{
    int32_t ret;

    ret = sl_prop_remote_reset(SRS_4_PORT_ID, DEFAULT_TIMEOUT, id);

    return ret;
}

/**
 * @brief  This function is used for saving the configuration of a particular group(tx/rx/sys/cal) to an alternative memory
* @brief Requests the S-Band module to save a configuration group
*
* @param group ID of the configuration group to save 
* @param fallback Set to true to save as fallback group
*
* @return Status of save request
 */
int32_t sdr_srs4_sband_group_save_req(uint16_t group,uint8_t fallback)
{
    int32_t ret;

    ret = sl_prop_remote_save(SRS_4_PORT_ID, DEFAULT_TIMEOUT, group, fallback);

    return ret;
}

/**
 * @brief  This function is used to load back the previously saved configuration for the groups
* @brief Requests the S-Band module to load a configuration group
*
* @param group ID of the configuration group to load
* @param fallback Set to true to load fallback group
* 
* @return Status of load request 
 */
int32_t sdr_srs4_sband_group_load_req(uint16_t group,uint8_t fallback)
{
    int32_t ret;

    ret = sl_prop_remote_load(SRS_4_PORT_ID, DEFAULT_TIMEOUT, group, fallback);

    return ret;
}

/**
 * @brief  This function is used to erase the config from the alternate location of the groups
* @brief Requests the S-Band module to erase a configuration group
*
* @param group ID of the configuration group to erase
* @param fallback Set to true to erase fallback group
*
* @return Status of erase request
 */
int32_t sdr_srs4_sband_group_erase_req(uint16_t group, uint8_t fallback)
{
    int32_t ret;

    ret = sl_prop_remote_erase(SRS_4_PORT_ID, DEFAULT_TIMEOUT, group, fallback);

    return ret;
}

/**
 * @brief  This function is used to lock the configured params of the alternate location of groups
* @brief Requests the S-Band module to lock a configuration group
*
* @param group ID of the configuration group to lock
* @param fallback Set to true to lock fallback group  
*
* @return Status of lock request
 */
int32_t sdr_srs4_sband_group_lock_req(uint16_t group, uint8_t fallback)
{
    int32_t ret;

    ret = sl_prop_remote_lock(SRS_4_PORT_ID, DEFAULT_TIMEOUT, group, fallback);

    return ret;
}

/**
 * @brief  This function is used to unlock the configured paramas of the alternate location of groups
* @brief Requests the S-Band module to unlock a configuration group
*
* @param group ID of the configuration group to unlock
* @param fallback Set to true to unlock fallback group
*
* @return Status of unlock request
 */
int32_t sdr_srs4_sband_group_unlock_req(uint16_t group, uint8_t fallback)
{
    int32_t ret;

    ret = sl_prop_remote_unlock(SRS_4_PORT_ID, DEFAULT_TIMEOUT,  group, fallback);

    return ret;
}
/**
 * @brief  This function is used to set transmit freq config of the S-Band
 * @brief Sets the transmission frequency in the transmission config
*
* @param tx_cfg_freq Transmission frequency in Hz
*
* @return Status of setting transmission frequency
 */
int32_t sdr_srs4_sband_set_tx_cfg_freq(uint32_t tx_cfg_freq)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_freq;
    size = sizeof(tx_cfg_freq);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_FREQ, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX Frequency is %lu\r\n", tx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_FREQUENCY_IS__u32_,tx_cfg_freq);
#pragma GCC diagnostic pop
    }

    return ret;
}

/**
 * @brief This function is used to set transmit type config of the S-Band Module
 * @brief Sets the transmission type in the transmission config 
*
* @param tx_cfg_type Transmission type (CW, AX25, etc)
*
* @return Status of setting transmission type
 */
int32_t sdr_srs4_sband_set_tx_cfg_type(uint8_t tx_cfg_type)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_type;
    size = sizeof(tx_cfg_type);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_TYPE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX modulation type is %hu\r\n", tx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_MODULATION_TYPE_IS__u8_,tx_cfg_type);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit symbol rate config of the S-Band Module
 * @brief Sets the transmission data rate in the transmission config
* 
* This function sets the data rate in bits per second for transmission in the S-Band module.
*
* @param[in] tx_cfg_rate - Transmission data rate in bps
* 
* @retval int32_t - Returns status of setting transmission data rate
 */
int32_t sdr_srs4_sband_set_tx_cfg_rate(uint32_t tx_cfg_rate)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_rate;
    size = sizeof(tx_cfg_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX baud rate is %lu\r\n", tx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_BAUD_RATE_IS__u32_,tx_cfg_rate);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to set transmit rolloff config of the S-Band Module
 * @brief Sets the transmission rolloff factor in the transmission config
* 
* This function sets the rolloff factor used for transmission filtering in the S-Band module.
* 
* @param[in] tx_cfg_rolloff - Transmission rolloff factor value  
*
* @retval int32_t - Returns status of setting transmission rolloff factor
 */
int32_t sdr_srs4_sband_set_tx_cfg_rolloff(uint8_t tx_cfg_rolloff)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_rolloff;
    size = sizeof(tx_cfg_rolloff);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_ROLLOFF, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX roll off is %hu\r\n", tx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ROLL_OFF_IS__u8_,tx_cfg_rolloff);

    }
    return ret;
}

/**
 * @brief This function is used to set transmit power of the S-Band Module
* @brief Sets the transmission output power in the transmission config  
*
* This function sets the output power in dBm for transmission in the S-Band module.
*
* @param[in] tx_cfg_pout - Transmission output power in dBm
*
* @retval int32_t - Returns status of setting transmission output power  
 */
int32_t sdr_srs4_sband_set_tx_cfg_pout(f32 tx_cfg_pout)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_pout;
    size = sizeof(tx_cfg_pout);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_POUT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX pout is %f\r\n", tx_cfg_pout));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_POUT_IS__u32_,tx_cfg_pout);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit ALC mode config of the S-Band Module
* @brief Sets the transmission ALC mode in the transmission config
*
* This function sets the automatic level control mode for transmission in the S-Band module.
*
* @param[in] tx_cfg_alc_mode - Transmission ALC mode 
*
* @retval int32_t - Returns status of setting transmission ALC mode
 */
int32_t sdr_srs4_sband_set_tx_cfg_alc_mode(uint8_t tx_cfg_alc_mode)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_alc_mode;
    size = sizeof(tx_cfg_alc_mode);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_ALC_MODE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX ALC mode is %hu\r\n", tx_cfg_alc_mode));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ALC_MODE_IS__u8_,tx_cfg_alc_mode);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit Reed Solomon enable/ disable of the S-Band Module
 * @brief Sets the transmission Reed-Solomon coding in the transmission config  
*
* This function sets the Reed-Solomon coding scheme for transmission in the S-Band module.
*
* @param[in] tx_cfg_rs - Transmission Reed-Solomon coding scheme
*
* @retval int32_t - Returns status of setting transmission Reed-Solomon coding
 */
int32_t sdr_srs4_sband_set_tx_cfg_rs(uint8_t tx_cfg_rs)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_rs;
    size = sizeof(tx_cfg_rs);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_RS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX RS enable is %hu\r\n", tx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RS_ENABLE_IS__u8_,tx_cfg_rs);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit convolutional coding enable/ disable for the S-Band Module
 * @brief Sets the transmission convolutional coding in the transmission config
*
* This function sets the convolutional coding rate for transmission in the S-Band module.
* 
* @param[in] tx_cfg_cc - Transmission convolutional coding rate
*
* @retval int32_t - Returns status of setting transmission convolutional coding 
 */
int32_t sdr_srs4_sband_set_tx_cfg_cc(uint8_t tx_cfg_cc)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_cc;
    size = sizeof(tx_cfg_cc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CC enable is %hu\r\n", tx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CC_ENABLE_IS__u8_,tx_cfg_cc);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit randomization enable/ disable for the S-Band Module 
* @brief Sets randomization for transmission in the transmission config
* 
* This function enables or disables data randomization for transmission in the S-Band module.
*
* @param[in] tx_cfg_rand - Enable (1) or disable (0) transmission randomization
*
* @retval int32_t - Returns status of setting transmission randomization
 */
int32_t sdr_srs4_sband_set_tx_cfg_rand(uint8_t tx_cfg_rand)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_rand;
    size = sizeof(tx_cfg_rand);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_RAND, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX randomisation enable is %hu\r\n", tx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RANDOMISATION_ENABLE_IS__u8_,tx_cfg_rand);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit Cyclic Redundancy Check enable/ disable for the S-Band Module 
* @brief Sets CRC usage for transmission in the transmission config
*
* This function enables or disables CRC generation and checking for transmission in the S-Band module.
* 
* @param[in] tx_cfg_crc - Enable (1) or disable (0) transmission CRC  
*
* @retval int32_t - Returns status of setting transmission CRC
 */
int32_t sdr_srs4_sband_set_tx_cfg_crc(uint8_t tx_cfg_crc)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_crc;
    size = sizeof(tx_cfg_crc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CRC checksum enable is %hu\r\n", tx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRC_CHECKSUM_ENABLE_IS__u8_,tx_cfg_crc);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit idletime config for the S-Band Module
* @brief Sets idle time for transmission in the transmission config 
*
* This function sets the idle time in milliseconds between transmissions in the S-Band module.
*
* @param[in] tx_cfg_idletime - Transmission idle time in ms
*
* @retval int32_t - Returns status of setting transmission idle time
 */
int32_t sdr_srs4_sband_set_tx_cfg_idletime(uint16_t tx_cfg_idletime)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_idletime;
    size = sizeof(tx_cfg_idletime);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_IDLETIME, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX idletime is %hi\r\n", tx_cfg_idletime));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_IDLETIME_IS__u16_,tx_cfg_idletime);
    }
    return ret;
}

/**
 * @brief This function is used to set the transmit MTU size for the S-Band Module
* @brief Sets packet size for transmission in the transmission config
*
* This function sets the packet size in bytes for transmission in the S-Band module. 
*
* @param[in] tx_cfg_size - Transmission packet size in bytes  
*
* @retval int32_t - Returns status of setting transmission packet size 
 */
int32_t sdr_srs4_sband_set_tx_cfg_size(uint16_t tx_cfg_size)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_size;
    size = sizeof(tx_cfg_size);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_SIZE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX payload size is %hi\r\n", tx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PAYLOAD_SIZE_IS__u16_,tx_cfg_size);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit Satellite ID for the S-Band module
* @brief Sets packet ID for transmission in the transmission config
*
* This function sets the packet ID value for transmission in the S-Band module.
*
* @param[in] tx_cfg_id - Transmission packet ID value
* 
* @retval int32_t - Returns status of setting transmission packet ID
 */
int32_t sdr_srs4_sband_set_tx_cfg_id(uint16_t tx_cfg_id)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_id;
    size = sizeof(tx_cfg_id);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_ID, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX satellite ID is %hi\r\n", tx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_SATELLITE_ID_IS__u16_,tx_cfg_id);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit security config for the S-Band Module
* @brief Sets encryption for transmission in the transmission config
*
* This function sets the encryption configuration for transmission in the S-Band module.
*
* @param[in] crypto_cfg - Pointer to transmission encryption configuration
*
* @retval int32_t - Returns status of setting transmission encryption 
 */
int32_t sdr_srs4_sband_set_tx_cfg_crypto(s_comms_tx_crypto_cfg *crypto_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &crypto_cfg->crypto_key;
    size = sizeof(crypto_cfg->crypto_key);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRYPTO_KEY, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto key is %s\r\n",crypto_cfg->crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The TX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)crypto_cfg->crypto_key);
    }

    value = &crypto_cfg->crypto_encrypt;
    size = sizeof(crypto_cfg->crypto_encrypt);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRYPTO_ENCRYPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto encrypt is %hu\r\n",crypto_cfg->crypto_encrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_ENCRYPT_IS__u8_,crypto_cfg->crypto_encrypt);
    }

    value = &crypto_cfg->crypto_auth;
    size = sizeof(crypto_cfg->crypto_auth);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_CRYPTO_AUTH, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto Auth is %hu\r\n", crypto_cfg->crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_AUTH_IS__u8_,crypto_cfg->crypto_auth);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit PA temperature limit for the S-Band Module
* @brief Sets PA temperature limit for transmission in the transmission config
*
* This function sets the PA temperature limit in Celsius for transmission in the S-Band module.
* 
* @param[in] tx_cfg_pa_templimit - Transmission PA temperature limit in Celsius
* 
* @retval ret - Returns status of setting transmission PA temperature limit
 */
int32_t sdr_srs4_sband_set_tx_cfg_pa_templimit(uint8_t tx_cfg_pa_templimit)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_pa_templimit;
    size = sizeof(tx_cfg_pa_templimit);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_PA_TEMPLIMIT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX PA temp limit is %hhd\r\n", tx_cfg_pa_templimit));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PA_TEMP_LIMIT_IS__u8_,tx_cfg_pa_templimit);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit frames for the S-Band Module
* @brief Sets number of frames for transmission in the transmission config  
*
* This function sets the number of frames to transmit in the S-Band module.
*
* @param[in] tx_cfg_frames - Number of frames to transmit
*
* @retval ret - Returns status of setting number of transmission frames
 */
int32_t sdr_srs4_sband_set_tx_cfg_frames(uint32_t tx_cfg_frames)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_frames;
    size = sizeof(tx_cfg_frames);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_FRAMES, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The transmitted frames are %lu\r\n", tx_cfg_frames));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TRANSMITTED_FRAMES_ARE__u32_,tx_cfg_frames);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to set the transmit power forward for the S-Band Module
* @brief Sets forward power limit for transmission in the transmission config
*
* This function sets the forward power limit in dBm for transmission in the S-Band module.
*
* @param[in] tx_cfg_pwr_fwd - Transmission forward power limit in dBm
* 
* @retval ret - Returns status of setting transmission forward power limit
 */
int32_t sdr_srs4_sband_set_tx_cfg_pwr_fwd(f32 tx_cfg_pwr_fwd)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_pwr_fwd;
    size = sizeof(tx_cfg_pwr_fwd);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_PWR_FWD, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX measured forward power is %.2f\r\n", tx_cfg_pwr_fwd));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_MEASURED_FORWARD_POWER_IS__u16_pt_u16_,tx_cfg_pwr_fwd);
    }
    return ret;
}

/**
 * @brief This function is used to set transmit reflected power fr the S-Band Module
* @brief Sets reflected power limit for transmission in the transmission config
* 
* This function sets the reflected power limit in dBm for transmission in the S-Band module.
*
* @param[in] tx_cfg_pwr_rfl - Transmission reflected power limit in dBm
*
* @retval ret - Returns status of setting transmission reflected power limit
 */
int32_t sdr_srs4_sband_set_tx_cfg_pwr_rfl(f32 tx_cfg_pwr_rfl)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &tx_cfg_pwr_rfl;
    size = sizeof(tx_cfg_pwr_rfl);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_TX_PWR_RFL, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX refected power is %.2f\r\n", tx_cfg_pwr_rfl));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_REFECTED_POWER_IS__u16_pt_u16_,tx_cfg_pwr_rfl);

    }
    return ret;
}
/**
 * @brief This function is used to set transmit frequency for the S-Band module
* @brief Gets transmission frequency from the transmission config  
*
* This function gets the transmission frequency value in Hz from the S-Band module.
* 
* @param[out] tx_cfg_freq - Pointer to store transmission frequency  
* @param[out] size - Pointer to size of frequency parameter
*
* @retval ret - Returns status of getting transmission frequency
 */
int32_t sdr_srs4_sband_get_tx_cfg_freq(uint32_t tx_cfg_freq, uint16_t *size)
{
    int32_t ret = 0;
    
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_freq;
    *size = sizeof(tx_cfg_freq);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_FREQ, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX Frequency is %lu\r\n", tx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_FREQUENCY_IS__u32_,tx_cfg_freq);
#pragma GCC diagnostic pop
        }

    return ret;

}

/**
 * @brief This function is used to get transmit modulation type of the S-Band Module
 * @brief Gets transmission type from the transmission config
*
* This function gets the transmission type (CW, AX25, etc) from the S-Band module.
*
* @param[out] tx_cfg_type - Pointer to store transmission type
* @param[out] size - Pointer to size of type parameter  
*
* @retval ret - Returns status of getting transmission type
 */
int32_t sdr_srs4_sband_get_tx_cfg_type(uint8_t tx_cfg_type, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_type;
    *size = sizeof(tx_cfg_type);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_TYPE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX modulation type is %hu\r\n", tx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_MODULATION_TYPE_IS__u8_,tx_cfg_type);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit symbol rate of the S-Band Module
* @brief Gets transmission data rate from the transmission config
* 
* This function gets the transmission data rate in bps from the S-Band module.
*
* @param[out] tx_cfg_rate - Pointer to store transmission data rate 
* @param[out] size - Pointer to size of rate parameter
*
* @retval ret - Returns status of getting transmission data rate
 */
int32_t sdr_srs4_sband_get_tx_cfg_rate(uint32_t tx_cfg_rate, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_rate;
    *size = sizeof(tx_cfg_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_RATE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The TX baud rate is %lu\r\n", tx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_BAUD_RATE_IS__u32_,tx_cfg_rate);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to get transmit rolloff config of the S-Band Module
* @brief Gets transmission rolloff factor from the transmission config 
*
* This function gets the transmission rolloff factor from the S-Band module.
*
* @param[out] tx_cfg_rolloff - Pointer to store transmission rolloff factor
* @param[out] size - Pointer to size of rolloff parameter  
*
* @retval ret - Returns status of getting transmission rolloff factor
 */
int32_t sdr_srs4_sband_get_tx_cfg_rolloff(uint8_t tx_cfg_rolloff, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_rolloff;
    *size = sizeof(tx_cfg_rolloff);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_ROLLOFF, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX roll off is %hu\r\n", tx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ROLL_OFF_IS__u8_,tx_cfg_rolloff);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit output power of the S-Band Module
* @brief Gets transmission output power from the transmission config
*
* This function gets the transmission output power in dBm from the S-Band module.
* 
* @param[out] tx_cfg_pout - Pointer to store transmission output power
* @param[out] size - Pointer to size of power parameter
*
* @retval ret - Returns status of getting transmission output power
 */
int32_t sdr_srs4_sband_get_tx_cfg_pout(f32 tx_cfg_pout, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_pout;
    *size = sizeof(tx_cfg_pout);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_POUT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX pout is %f\r\n", tx_cfg_pout));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_POUT_IS__u32_,tx_cfg_pout);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit ALC mode config of the S-Band Module
* @brief Gets transmission ALC mode from the transmission config 
*
* This function gets the transmission ALC mode from the S-Band module.
*
* @param[out] tx_cfg_alc_mode - Pointer to store transmission ALC mode
* @param[out] size - Pointer to size of ALC mode parameter
*
* @retval ret - Returns status of getting transmission ALC mode
 */
int32_t sdr_srs4_sband_get_tx_cfg_alc_mode(uint8_t tx_cfg_alc_mode, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_alc_mode;
    *size = sizeof(tx_cfg_alc_mode);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_ALC_MODE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX ALC mode is %hu\r\n", tx_cfg_alc_mode));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_ALC_MODE_IS__u8_,tx_cfg_alc_mode);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit Reed Solomon config of the S-Band module
* @brief Gets transmission Reed-Solomon coding from the transmission config
*
* This function gets the transmission Reed-Solomon coding scheme from the S-Band module.
* 
* @param[out] tx_cfg_rs - Pointer to store transmission Reed-Solomon coding 
* @param[out] size - Pointer to size of coding parameter
*
* @retval ret - Returns status of getting transmission Reed-Solomon coding
 */
int32_t sdr_srs4_sband_get_tx_cfg_rs(uint8_t tx_cfg_rs, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_rs;
    *size = sizeof(tx_cfg_rs);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_RS, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX RS enable is %hu\r\n", tx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RS_ENABLE_IS__u8_,tx_cfg_rs);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit convolutional code config of the S-Band Module
* @brief Gets transmission convolutional coding from the transmission config
* 
* This function gets the transmission convolutional coding rate from the S-Band module.
*
* @param[out] tx_cfg_cc - Pointer to store transmission convolutional coding
* @param[out] size - Pointer to size of coding parameter
* 
* @retval ret - Returns status of getting transmission convolutional coding
 */
int32_t sdr_srs4_sband_get_tx_cfg_cc(uint8_t tx_cfg_cc, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_cc;
    *size = sizeof(tx_cfg_cc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CC, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CC enable is %hu\r\n", tx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CC_ENABLE_IS__u8_,tx_cfg_cc);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit randomization config of the S-Band Module
 * @brief Get the transmit randomization configuration from the S-Band module
 *
 * This function retrieves the transmit randomization configuration setting from the S-Band module.
 * The tx_cfg_rand value indicates whether randomization is enabled or disabled.
 * 
 * @param[out] tx_cfg_rand Transmit randomization configuration value
 * @param[out] size Pointer to size of tx_cfg_rand
 * 
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_tx_cfg_rand(uint8_t tx_cfg_rand, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_rand;
    *size = sizeof(tx_cfg_rand);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_RAND, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX randomisation enable is %hu\r\n", tx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_RANDOMISATION_ENABLE_IS__u8_,tx_cfg_rand);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit Cyclic Redundancy Check config of the S-Band Module
 * @brief Get the transmit CRC checksum configuration from the S-Band module
 *
 * This function retrieves the transmit CRC checksum configuration setting from the S-Band module.
 * The tx_cfg_crc value indicates whether CRC checksum is enabled or disabled.
 *
 * @param[out] tx_cfg_crc Transmit CRC checksum configuration value  
 * @param[out] size Pointer to size of tx_cfg_crc
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_crc(uint8_t tx_cfg_crc, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_crc;
    *size = sizeof(tx_cfg_crc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRC, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX CRC checksum enable is %hu\r\n", tx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRC_CHECKSUM_ENABLE_IS__u8_,tx_cfg_crc);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit idletime config of the S-Band Module
 * @brief Get the transmit idle time configuration from the S-Band module
 *
 * This function retrieves the transmit idle time configuration setting from the S-Band module.
 * The tx_cfg_idletime value indicates the idle time in microseconds.
 *
 * @param[out] tx_cfg_idletime Transmit idle time configuration value
 * @param[out] size Pointer to size of tx_cfg_idletime
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_idletime(uint16_t tx_cfg_idletime, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_idletime;
    *size = sizeof(tx_cfg_idletime);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_IDLETIME, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX idletime is %hi\r\n", tx_cfg_idletime));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_IDLETIME_IS__u16_,tx_cfg_idletime);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit MTU size of the S-Band module
 * @brief Get the transmit size configuration from the S-Band module
 *
 * This function retrieves the transmit size configuration setting from the S-Band module.
 * The tx_cfg_size value indicates the size of transmit data in bytes.
 *
 * @param[out] tx_cfg_size Transmit size configuration value
 * @param[out] size Pointer to size of tx_cfg_size
 * 
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_size(uint16_t tx_cfg_size, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_size;
    *size = sizeof(tx_cfg_size);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_SIZE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX payload size is %hi\r\n", tx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PAYLOAD_SIZE_IS__u16_,tx_cfg_size);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit satellite ID of the S-Band module
 * @brief Get the transmit ID configuration from the S-Band module
 *
 * This function retrieves the transmit ID configuration setting from the S-Band module.
 * The tx_cfg_id value provides the transmit ID.
 *
 * @param[out] tx_cfg_id Transmit ID configuration value
 * @param[out] size Pointer to size of tx_cfg_id
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_id(uint16_t tx_cfg_id, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_id;
    *size = sizeof(tx_cfg_id);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_ID, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX satellite ID is %hi\r\n", tx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_SATELLITE_ID_IS__u16_,tx_cfg_id);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit security config of the S-Band Module
 * @brief Get the transmit crypto configuration from the S-Band module
 * 
 * This function retrieves the transmit crypto configuration settings from the S-Band module.
 * The crypto_cfg struct contains the crypto algorithm, key, and initialization vector.
 *
 * @param[out] crypto_cfg Pointer to transmit crypto configuration struct 
 * @param[out] size Pointer to size of crypto configuration struct
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_tx_cfg_crypto(s_comms_tx_crypto_cfg *crypto_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &crypto_cfg->crypto_key;
    *size = sizeof(crypto_cfg->crypto_key);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRYPTO_KEY, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto key is %s\r\n", crypto_cfg->crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The TX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)crypto_cfg->crypto_key);
    }

    value = &crypto_cfg->crypto_encrypt;
    *size = sizeof(crypto_cfg->crypto_encrypt);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRYPTO_ENCRYPT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto encrypt is %hu\r\n", crypto_cfg->crypto_encrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_ENCRYPT_IS__u8_,crypto_cfg->crypto_encrypt);

    }

    value = &crypto_cfg->crypto_auth;
    *size = sizeof(crypto_cfg->crypto_auth);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_CRYPTO_AUTH, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX crypto Auth is %hu\r\n", crypto_cfg->crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_CRYPTO_AUTH_IS__u8_,crypto_cfg->crypto_auth);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit PA temperature limit of the S-Band Module
 * @brief Get the transmit PA temperature limit from the S-Band module
 *
 * This function retrieves the transmit PA temperature limit setting from the S-Band module.
 * The tx_cfg_pa_templimit value indicates the PA temperature limit in Celsius.
 * 
 * @param[out] tx_cfg_pa_templimit Transmit PA temperature limit value
 * @param[out] size Pointer to size of tx_cfg_pa_templimit
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_pa_templimit(uint8_t tx_cfg_pa_templimit, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_pa_templimit;
    *size = sizeof(tx_cfg_pa_templimit);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PA_TEMPLIMIT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX PA temp limit is %hhd\r\n", tx_cfg_pa_templimit));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TX_PA_TEMP_LIMIT_IS__u8_,tx_cfg_pa_templimit);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit frames config of the S-Band Module
 * @brief Get the transmit frames configuration from the S-Band module
 *
 * This function retrieves the transmit frames configuration setting from the S-Band module. 
 * The tx_cfg_frames value indicates the number of frames to transmit.
 *
 * @param[out] tx_cfg_frames Transmit frames configuration value
 * @param[out] size Pointer to size of tx_cfg_frames
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_frames(uint32_t tx_cfg_frames, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_frames;
    *size = sizeof(tx_cfg_frames);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_FRAMES, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The transmitted frames are %lu\r\n", tx_cfg_frames));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TRANSMITTED_FRAMES_ARE__u32_,tx_cfg_frames);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to get transmit forward power of the S-Band Module
 * @brief Get the transmit power forward configuration from the S-Band module
 *
 * This function retrieves the transmit power forward configuration setting from the S-Band module.
 * The tx_cfg_pwr_fwd value indicates the forward power in dBm.
 *
 * @param[out] tx_cfg_pwr_fwd Transmit power forward value  
 * @param[out] size Pointer to size of tx_cfg_pwr_fwd
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_pwr_fwd(f32 tx_cfg_pwr_fwd, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_pwr_fwd;
    *size = sizeof(tx_cfg_pwr_fwd);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PWR_FWD, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX measured forward power is %.2f\r\n", tx_cfg_pwr_fwd));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_MEASURED_FORWARED_POWER_IS__u16_pt_u16_,tx_cfg_pwr_fwd);
    }
    return ret;
}

/**
 * @brief This function is used to get transmit reflected power od the S-Band Module
 * @brief Get the transmit power reflected configuration from the S-Band module
 *
 * This function retrieves the transmit power reflected configuration setting from the S-Band module.
 * The tx_cfg_pwr_rfl value indicates the reflected power in dBm.
 *
 * @param[out] tx_cfg_pwr_rfl Transmit power reflected value
 * @param[out] size Pointer to size of tx_cfg_pwr_rfl
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_tx_cfg_pwr_rfl(f32 tx_cfg_pwr_rfl, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_cfg_rb.tx_cfg_pwr_rfl;
    *size = sizeof(tx_cfg_pwr_rfl);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PWR_RFL, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX refected power is %.2f\r\n", tx_cfg_pwr_rfl));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_REFECTED_POWER_IS__u16_pt_u16_,tx_cfg_pwr_rfl);
    }
    return ret;
}

/**
 * @brief This function is used to set receive frequency of the S-Band Module
 * @brief Set the receive frequency configuration in the S-Band module
 *
 * This function sets the receive frequency configuration in the S-Band module.
 * The rx_cfg_freq value indicates the receive frequency in Hz.
 *
 * @param[in] rx_cfg_freq Receive frequency value
 *
 * @retval ret Status of set operation
 */
int32_t sdr_srs4_sband_set_rx_cfg_freq(uint32_t rx_cfg_freq)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_freq;
    size = sizeof(rx_cfg_freq);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_FREQ, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX frequency is %lu\r\n", rx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FREQUENCY_IS__u32_,rx_cfg_freq);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to set receive modulation type of the S-Band module
 * @brief Set the receive type configuration in the S-Band module
 *
 * This function sets the receive type configuration in the S-Band module.
 * The rx_cfg_type value indicates the receive type.
 *
 * @param[in] rx_cfg_type Receive type value
 * 
 * @retval ret Status of set operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_set_rx_cfg_type(uint8_t rx_cfg_type)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_type;
    size = sizeof(rx_cfg_type);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_TYPE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX type is %hu\r\n", rx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_TYPE_IS__u8_,rx_cfg_type);

    }
    return ret;
}

/**
 * @brief This function is used to set receive symbol rate of the S-Band Module
 * @brief Set the receive data rate configuration in the S-Band module
 *
 * This function sets the receive data rate configuration in the S-Band module.
 * The rx_cfg_rate value indicates the receive data rate in bits per second.
 *
 * @param[in] rx_cfg_rate Receive data rate value
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_rate(uint32_t rx_cfg_rate)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_rate;
    size = sizeof(rx_cfg_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX RATE is %lu\r\n", rx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RATE_IS__u32_,rx_cfg_rate);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to set receive rolloff config of the S-Band module 
 * @brief Set the receive roll-off factor configuration in the S-Band module
 *
 * This function sets the receive roll-off factor configuration in the S-Band module. 
 * The rx_cfg_rolloff value indicates the roll-off factor.
 *
 * @param[in] rx_cfg_rolloff Receive roll-off factor value
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_rolloff(uint8_t rx_cfg_rolloff)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_rolloff;
    size = sizeof(rx_cfg_rolloff);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_ROLLOFF, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Roll off is %hu\r\n", rx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_ROLL_OFF_IS__u8_,rx_cfg_rolloff);
    }
    return ret;
}

/**
 * @brief This function is used to set receive automatic frequency control enable/disable of the S-Band Module
 * @brief Set the receive AFC configuration in the S-Band module
 *
 * This function sets the receive AFC configuration in the S-Band module.
 * The afc_cfg struct contains the AFC mode and gain settings.
 *
 * @param[in] afc_cfg Pointer to receive AFC configuration struct
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_afc(s_comms_rx_afc_cfg *afc_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &afc_cfg->rx_cfg_afc_enable;
    size = sizeof(afc_cfg->rx_cfg_afc_enable);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_AFC_ENABLE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX AFC enable is %hu\r\n", afc_cfg->rx_cfg_afc_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_AFC_ENABLE_IS__u8_,afc_cfg->rx_cfg_afc_enable);
    }

    value = &afc_cfg->rx_cfg_afc_range;
    size = sizeof(afc_cfg->rx_cfg_afc_range);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_AFC_RANGE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The AFC Range is %lu\r\n", afc_cfg->rx_cfg_afc_range));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_AFC_RANGE_IS__u32_,afc_cfg->rx_cfg_afc_range);
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to set receive Reed Solomon enable/ disable of the S-Band Module
 * @brief Set the receive Reed-Solomon configuration in the S-Band module
 *
 * This function sets the receive Reed-Solomon configuration in the S-Band module. 
 * The rx_cfg_rs value indicates whether RS decoding is enabled.
 * 
 * @param[in] rx_cfg_rs Receive Reed-Solomon configuration value
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_rs(uint8_t rx_cfg_rs)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_rs;
    size = sizeof(rx_cfg_rs);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_RS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX RS config is %hu\r\n", rx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RS_CONFIG_IS__u8_,rx_cfg_rs);
    }
    return ret;
}

/**
 * @brief This function is used to set receive Convolutional code enable/ disable of the S-Band Module
 * @brief Set the receive convolutional code configuration in the S-Band module
 *
 * This function sets the receive convolutional code configuration in the S-Band module.
 * The rx_cfg_cc value indicates whether convolutional decoding is enabled.
 *
 * @param[in] rx_cfg_cc Receive convolutional code configuration value
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_cc(uint8_t rx_cfg_cc)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_cc;
    size = sizeof(rx_cfg_cc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CC enable is %hu\r\n", rx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CC_ENABLE_IS__u8_,rx_cfg_cc);
    }
    return ret;
}

/**
 * @brief This function is used to set receive randomization enable/disable of the S-Band Module
 * @brief Set the receive randomization configuration in the S-Band module
 *
 * This function sets the receive randomization configuration in the S-Band module.
 * The rx_cfg_rand value indicates whether randomization is enabled on receive.
 *
 * @param[in] rx_cfg_rand Receive randomization configuration value
 *
 * @retval ret Status of set operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_set_rx_cfg_rand(uint8_t rx_cfg_rand)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_rand;
    size = sizeof(rx_cfg_rand);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_RAND, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX randomisation enable is %d\r\n", rx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RANDOMISATION_ENABLE_IS__u8_,rx_cfg_rand);
    }
    return ret;
}

/**
 * @brief This function is used to set receive cyclic redundancy check enable/disable of the S-Band Module
 * @brief Set the receive CRC configuration in the S-Band module
 *
 * This function sets the receive CRC configuration in the S-Band module.
 * The rx_cfg_crc value indicates whether CRC checking is enabled on receive.
 *
 * @param[in] rx_cfg_crc Receive CRC configuration value
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_crc(uint8_t rx_cfg_crc)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_crc;
    size = sizeof(rx_cfg_crc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CRC checksum enable is %hu\r\n", rx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRC_CHECKSUM_ENABLE_IS__u8_,rx_cfg_crc);
    }
    return ret;
}

/**
 * @brief This function is used to set receive MTU size of the S-Band Module
 * @brief Set the receive size configuration in the S-Band module
 *
 * This function sets the expected receive data size configuration in the S-Band module.
 * The rx_cfg_size value indicates the expected receive data size in bytes.
 *
 * @param[in] rx_cfg_size Expected receive data size value
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_size(uint16_t rx_cfg_size)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_size;
    size = sizeof(rx_cfg_size);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_SIZE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX payload size is %hu\r\n", rx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_PAYLOAD_SIZE_IS__u8_,rx_cfg_size);
    }
    return ret;
}

/**
 * @brief This function is used to set receive satellite ID of the S-Band Module
 * @brief Set the receive ID configuration in the S-Band module
 *
 * This function sets the expected receive ID configuration in the S-Band module.
 * The rx_cfg_id value indicates the expected receive ID.
 *
 * @param[in] rx_cfg_id Expected receive ID value
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_id(uint16_t rx_cfg_id)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &rx_cfg_id;
    size = sizeof(rx_cfg_id);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_ID, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The Satellite ID is %hu\r\n", rx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_SATELLITE_ID_IS__u16_,rx_cfg_id);
    }
    return ret;
}

/**
 * @brief This function is used to set receive security config of the S-Band Module
 * @brief Set the receive crypto configuration in the S-Band module
 *
 * This function sets the receive crypto configuration in the S-Band module.
 * The crypto_cfg struct contains the crypto algorithm, key, and initialization vector.
 *
 * @param[in] crypto_cfg Pointer to receive crypto configuration struct
 *
 * @retval ret Status of set operation 
 */
int32_t sdr_srs4_sband_set_rx_cfg_crypto(s_comms_rx_crypto_cfg *crypto_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &crypto_cfg->crypto_key;
    size = sizeof(crypto_cfg->crypto_key);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRYPTO_KEY, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Key is %s\r\n", crypto_cfg->crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The RX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)crypto_cfg->crypto_key);
    }

    value = &crypto_cfg->crypto_decrypt;
    size = sizeof(crypto_cfg->crypto_decrypt);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRYPTO_DECRYPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto decrypt is %hu\r\n", crypto_cfg->crypto_decrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_DECRYPT_IS__u8_,crypto_cfg->crypto_decrypt);
    }

    value = &crypto_cfg->crypto_auth;
    size = sizeof(crypto_cfg->crypto_auth);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_RX_CRYPTO_AUTH, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Auth is %hu\r\n", crypto_cfg->crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_AUTH_IS__u8_,crypto_cfg->crypto_auth);
    }
    return ret;
}

/**
 * @brief This function is used to get receive frequency of the S-Band Module
 * @brief Get the receive frequency configuration from the S-Band module
 *
 * This function retrieves the receive frequency configuration from the S-Band module.
 * The rx_cfg_freq value indicates the receive frequency in Hz.
 *
 * @param[out] rx_cfg_freq Receive frequency value  
 * @param[out] size Pointer to size of rx_cfg_freq
 *
 * @retval ret Status of get operation 
 */
int32_t sdr_srs4_sband_get_rx_cfg_freq(uint32_t rx_cfg_freq, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_freq;
    *size = sizeof(rx_cfg_freq);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FREQ, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX frequency is %lu\r\n", rx_cfg_freq));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FREQUENCY_IS__u32_,rx_cfg_freq);
#pragma GCC diagnostic pop
        }
    return ret;

}

/**
 * @brief This function is used to get receive modulation type of the S-Band Module
 * @brief Get the receive type configuration from the S-Band module
 *
 * This function retrieves the receive type configuration from the S-Band module.
 * The rx_cfg_type value indicates the receive type.
 *
 * @param[out] rx_cfg_type Receive type value
 * @param[out] size Pointer to size of rx_cfg_type
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_type(uint8_t rx_cfg_type, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_type;
    *size = sizeof(rx_cfg_type);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_TYPE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX type is %hu\r\n", rx_cfg_type));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_TYPE_IS__u8_,rx_cfg_type);

    }
    return ret;
}

/**
 * @brief This function is used to get receive symbol rate of the S-Band Module
 * @brief Get the receive data rate configuration from the S-Band module
 *
 * This function retrieves the receive data rate configuration from the S-Band module.
 * The rx_cfg_rate value indicates the receive data rate in bits per second.
 *
 * @param[out] rx_cfg_rate Receive data rate value
 * @param[out] size Pointer to size of rx_cfg_rate
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_rate(uint32_t rx_cfg_rate, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_rate;
    *size = sizeof(rx_cfg_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RATE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX RATE is %lu\r\n", rx_cfg_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RATE_IS__u32_,rx_cfg_rate);
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to get receive rolloff config of the S-Band Module
 * @brief Get the receive roll-off factor configuration from the S-Band module
 *
 * This function retrieves the receive roll-off factor configuration from the S-Band module.
 * The rx_cfg_rolloff value indicates the roll-off factor.
 *
 * @param[out] rx_cfg_rolloff Receive roll-off factor value
 * @param[out] size Pointer to size of rx_cfg_rolloff
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_rolloff(uint8_t rx_cfg_rolloff, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_rolloff;
    *size = sizeof(rx_cfg_rolloff);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_ROLLOFF, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Roll off is %hu\r\n", rx_cfg_rolloff));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_ROLL_OFF_IS__u8_,rx_cfg_rolloff);
    }
    return ret;
}

/**
 * @brief This function is used to get receive automatic frequency control enable/disable of the S-Band Module
 * @brief Get the receive AFC configuration from the S-Band module
 * 
 * This function retrieves the receive AFC configuration from the S-Band module.
 * The afc_cfg struct contains the AFC mode and gain settings.
 *
 * @param[out] afc_cfg Pointer to receive AFC configuration struct
 * @param[out] size Pointer to size of afc_cfg struct 
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_afc(s_comms_rx_afc_cfg *afc_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &afc_cfg->rx_cfg_afc_enable;
    *size = sizeof(afc_cfg->rx_cfg_afc_enable);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_AFC_ENABLE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX AFC enable is %hu\r\n", afc_cfg->rx_cfg_afc_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_AFC_ENABLE_IS__u8_,afc_cfg->rx_cfg_afc_enable);
    }

    value = &afc_cfg->rx_cfg_afc_range;
    *size = sizeof(afc_cfg->rx_cfg_afc_range);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_AFC_RANGE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The AFC Range is %lu\r\n", afc_cfg->rx_cfg_afc_range));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_AFC_RANGE_IS__u32_,afc_cfg->rx_cfg_afc_range);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to get receive Reed Solomon enable/disable of the S-Band Module
 * @brief Get the receive Reed-Solomon configuration from the S-Band module
 *
 * This function retrieves the receive Reed-Solomon configuration from the S-Band module.
 * The rx_cfg_rs value indicates whether RS decoding is enabled.
 *
 * @param[out] rx_cfg_rs Receive Reed-Solomon configuration value
 * @param[out] size Pointer to size of rx_cfg_rs
 *
 * @retval ret Status of get operation (0 = success, negative = error) 
 */
int32_t sdr_srs4_sband_get_rx_cfg_rs(uint8_t rx_cfg_rs, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_rs;
    *size = sizeof(rx_cfg_rs);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RS, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX RS config is %hu\r\n", rx_cfg_rs));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RS_CONFIG_IS__u8_,rx_cfg_rs);
    }
    return ret;
}

/**
 * @brief This function is used to get receive convolutional code enable/disable of the S-Band Module
 * @brief Get the receive convolutional code configuration from the S-Band module
 * 
 * This function retrieves the receive convolutional code configuration from the S-Band module.
 * The rx_cfg_cc value indicates whether convolutional decoding is enabled.
 *
 * @param[out] rx_cfg_cc Receive convolutional code configuration value
 * @param[out] size Pointer to size of rx_cfg_cc
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_cc(uint8_t rx_cfg_cc, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_cc;
    *size = sizeof(rx_cfg_cc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CC, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CC enable is %hu\r\n", rx_cfg_cc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CC_ENABLE_IS__u8_,rx_cfg_cc);
    }
    return ret;
}

/**
 * @brief This function is used to get receive randomization enable/disable of the S-Band module
 * @brief Get the receive randomization configuration from the S-Band module
 *
 * This function retrieves the receive randomization configuration from the S-Band module. 
 * The rx_cfg_rand value indicates whether randomization is enabled on receive.
 *
 * @param[out] rx_cfg_rand Receive randomization configuration value
 * @param[out] size Pointer to size of rx_cfg_rand
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_rand(uint8_t rx_cfg_rand, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_rand;
    *size = sizeof(rx_cfg_rand);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RAND, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX randomisation enable is %hu\r\n", rx_cfg_rand));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_RANDOMISATION_ENABLE_IS__u8_,rx_cfg_rand);
    }
    return ret;
}

/**
 * @brief This function is used to get receive Cyclic Redundancy check enable/disable of the S-Band Module
 * @brief Get the receive CRC configuration from the S-Band module
 *
 * This function retrieves the receive CRC configuration from the S-Band module.
 * The rx_cfg_crc value indicates whether CRC checking is enabled on receive.
 *
 * @param[out] rx_cfg_crc Receive CRC configuration value
 * @param[out] size Pointer to size of rx_cfg_crc  
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_crc(uint8_t rx_cfg_crc, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_crc;
    *size = sizeof(rx_cfg_crc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRC, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX CRC checksum enable is %hu\r\n", rx_cfg_crc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRC_CHECKSUM_ENABLE_IS__u8_,rx_cfg_crc);
    }
    return ret;
}

/**
 * @brief This function is used to get receive MTU size of the S-Band Module
 * @brief Get the receive size configuration from the S-Band module
 *
 * This function retrieves the expected receive data size configuration from the S-Band module.
 * The rx_cfg_size value indicates the expected receive data size in bytes.
 * 
 * @param[out] rx_cfg_size Expected receive data size value
 * @param[out] size Pointer to size of rx_cfg_size
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_size(uint16_t rx_cfg_size, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_size;
    *size = sizeof(rx_cfg_size);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_SIZE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX payload size is %hu\r\n", rx_cfg_size));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_PAYLOAD_SIZE_IS__u8_,rx_cfg_size);
    }
    return ret;
}

/**
 * @brief This function is used to get receive satellite ID of the S-Band Module
 * @brief Get the receive ID configuration from the S-Band module
 *
 * This function retrieves the expected receive ID configuration from the S-Band module.
 * The rx_cfg_id value indicates the expected receive ID.
 *
 * @param[out] rx_cfg_id Expected receive ID value
 * @param[out] size Pointer to size of rx_cfg_id
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_id(uint16_t rx_cfg_id, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_id;
    *size = sizeof(rx_cfg_id);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_ID, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The Satellite ID is %hu\r\n", rx_cfg_id));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_SATELLITE_ID_IS__u16_,rx_cfg_id);
    }
    return ret;
}

/**
 * @brief This function is used to get receive security config of the S-Band Module
 * @brief Get the receive crypto configuration from the S-Band module
 *
 * This function retrieves the receive crypto configuration from the S-Band module.
 * The crypto_cfg struct contains the crypto algorithm, key, and initialization vector.
 *
 * @param[out] crypto_cfg Pointer to receive crypto configuration struct
 * @param[out] size Pointer to size of crypto_cfg struct
 * 
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_crypto(s_comms_rx_crypto_cfg *crypto_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &crypto_cfg->crypto_key;
    *size = sizeof(crypto_cfg->crypto_key);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRYPTO_KEY, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Key is %s\r\n", crypto_cfg->crypto_key));
        log_string(LOG_INFO_L1,LOG_COMMS,"The RX crypto key is");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)crypto_cfg->crypto_key);
    }

    value = &crypto_cfg->crypto_decrypt;
    *size = sizeof(crypto_cfg->crypto_decrypt);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRYPTO_DECRYPT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto decrypt is %hu\r\n", crypto_cfg->crypto_decrypt));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_DECRYPT_IS__u8_,crypto_cfg->crypto_decrypt);
    }

    value = &crypto_cfg->crypto_auth;
    *size = sizeof(crypto_cfg->crypto_auth);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CRYPTO_AUTH, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX crypto Auth is %hu\r\n", crypto_cfg->crypto_auth));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CRYPTO_AUTH_IS__u8_,crypto_cfg->crypto_auth);
    }
    return ret;
}

/**
 * @brief This function is used to get receive frames config of the S-Band Module
 * @brief Get the received frames count from the S-Band module 
 *
 * This function retrieves the number of frames received by the S-Band module.
 * The rx_cfg_frames value indicates the received frames count.
 *
 * @param[out] rx_cfg_frames Received frames count
 * @param[out] size Pointer to size of rx_cfg_frames
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_frames(uint32_t rx_cfg_frames, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_frames;
    *size = sizeof(rx_cfg_frames);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FRAMES, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX Frames received is  %lu\r\n", rx_cfg_frames));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAMES_RECEIVED_IS__u32_,rx_cfg_frames);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to get receive detected frames of the S-BAnd Module
 * @brief Get the detected frames count from the S-Band module
 *
 * This function retrieves the number of frames detected by the S-Band module. 
 * The rx_cfg_detected value indicates the detected frames count.
 *
 * @param[out] rx_cfg_detected Detected frames count
 * @param[out] size Pointer to size of rx_cfg_detected
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_detected(uint32_t rx_cfg_detected, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_detected;
    *size = sizeof(rx_cfg_detected);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_DETECTED, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX Frames detected is %lu\r\n", rx_cfg_detected));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAMES_DETECTED_IS__u32_,rx_cfg_detected);
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to get receive signal strength indicator of the S-Band Module
 * @brief Get the RSSI from the S-Band module
 *
 * This function retrieves the received signal strength indication (RSSI) from the S-Band module.
 * The rx_cfg_rssi value indicates the RSSI in dBm.
 *
 * @param[out] rx_cfg_rssi RSSI value
 * @param[out] size Pointer to size of rx_cfg_rssi
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_rssi(f32 rx_cfg_rssi, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_rssi;
    *size = sizeof(rx_cfg_rssi);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RSSI, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RSSI is %.2f\r\n", rx_cfg_rssi));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RSSI_IS__u16_pt_u16_,rx_cfg_rssi);
    }
    return ret;
}

/**
 * @brief This function is used to get receive frequency error of the S-Band Module
 * @brief Get the frequency error from the S-Band module
 *
 * This function retrieves the frequency error from the S-Band module.
 * The rx_cfg_freqerr value indicates the frequency error in Hz.
 *
 * @param[out] rx_cfg_freqerr Frequency error value
 * @param[out] size Pointer to size of rx_cfg_freqerr
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_freqerr(f32 rx_cfg_freqerr, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_freqerr;
    *size = sizeof(rx_cfg_freqerr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FREQERR, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Frquency error is %.2f\r\n", rx_cfg_freqerr));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_FREQUENCY_ERROR_IS__u16_pt_u16_,rx_cfg_freqerr);
    }
    return ret;
}

/**
 * @brief This function is used to get receive symbol error of the S-Band Module
 * @brief Get the symbol error rate from the S-Band module
 *
 * This function retrieves the symbol error rate from the S-Band module.
 * The rx_cfg_symerr value indicates the symbol error rate.
 * 
 * @param[out] rx_cfg_symerr Symbol error rate value
 * @param[out] size Pointer to size of rx_cfg_symerr
 *
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_symerr(f32 rx_cfg_symerr, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_symerr;
    *size = sizeof(rx_cfg_symerr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_SYMERR, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Symbol error is %.2f\r\n", rx_cfg_symerr));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_SYMBOL_ERROR_IS__u16_pt_u16_,rx_cfg_symerr);
    }
    return ret;
}

/**
 * @brief This function is used to get receive normalized signal to noise ratio of the S-Band Module
 * @brief Get the Eb/N0 from the S-Band module
 *
 * This function retrieves the Eb/N0 from the S-Band module. 
 * The rx_cfg_ebn0 value indicates the Eb/N0 in dB.
 *
 * @param[out] rx_cfg_ebn0 Eb/N0 value
 * @param[out] size Pointer to size of rx_cfg_ebn0
 * 
 * @retval ret Status of get operation (0 = success, negative = error)
 */
int32_t sdr_srs4_sband_get_rx_cfg_ebn0(f32 rx_cfg_ebn0, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_ebn0;
    *size = sizeof(rx_cfg_ebn0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_EBN0, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The is RX EBN0 %.2f\r\n", rx_cfg_ebn0));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_EBN0__u16_pt_u16_,rx_cfg_ebn0);
    }
    return ret;
}

/**
 * @brief This function is used to get receive carrier lock of the S-Band Module
 * @brief Get the S-Band receiver carrier lock status.
 *
 * This function retrieves the current carrier lock status of the 
 * S-Band receiver.
 *
 * @param[in] rx_cfg_carrier_lock - Output parameter to store carrier lock status.
 * @param[in] size - Size of the rx_cfg_carrier_lock parameter.
 *
 * @retval ret -Status of the get operation.
 */
int32_t sdr_srs4_sband_get_rx_cfg_carrier_lock(uint8_t rx_cfg_carrier_lock, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_cfg_carrier_lock;
    *size = sizeof(rx_cfg_carrier_lock);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CARRIER_LOCK, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Carrier lock is %d\r\n", rx_cfg_carrier_lock));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CARRIER_LOCK_IS__u8_,rx_cfg_carrier_lock);
    }
    return ret;
}

/**
 * @brief This function is used to get receive frame lock config of the S-Band Module
 * @brief Get the S-Band receiver frame lock status.
 *
 * This function retrieves the current frame lock status of the 
 * S-Band receiver.
 *
 * @param[in] rx_frame_lock - Output parameter to store frame lock status.
 * @param[in] size - Size of the rx_frame_lock parameter.
 * 
 * @retval ret -Status of the get operation.
 */
int32_t sdr_srs4_sband_get_rx_cfg_frame_lock(uint8_t rx_frame_lock, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_cfg_rb.rx_frame_lock;
    *size = sizeof(rx_frame_lock);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FRAME_LOCK, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Frame Lock is %d\r\n", rx_frame_lock));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAME_LOCK_IS__u8_,rx_frame_lock);
    }
    return ret;
}

/**
 * @brief This function is used to set system name of the S-Band Module
 * @brief Set the system name configuration. 
 *
 * This function sets the system name string for the S-Band module.
 *
 * @param[in] sys_name - Pointer to the system name string.
 *
 * @retval ret -Status of the set operation.
 */
int32_t sdr_srs4_sband_set_sys_cfg_name(uint8_t *sys_name)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &sys_name;
    size = sizeof(sys_name);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NAME, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->sys_name: %s\r\n", sys_name));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_name");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)sys_name);
    }
    return ret;
}

/**
 * @brief  This function is used to set ground watch dog timer configuration
 * @brief Set the GWDT configuration.
 * 
 * This function sets the GWDT configuration for the S-Band module.
 *
 * @param[in] gwdt_cfg - Pointer to the GWDT configuration structure.
 *
 * @retval ret -Status of the set operation.
 */
int32_t sdr_srs4_sband_set_sys_cfg_gwdt_cfg(s_comms_gwdt_cfg *gwdt_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &gwdt_cfg->sys_gwdt_init;
    size = sizeof(gwdt_cfg->sys_gwdt_init);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_GWDT_INIT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->sys_gwdt_init: %lu\r\n", gwdt_cfg->sys_gwdt_init));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_SYS_GWDT_INIT__u32_,gwdt_cfg->sys_gwdt_init);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to set CSP configuration 
 * @brief Set the CSP configuration. 
 *
 * This function sets the CSP configuration for the S-Band module.
 *
 * @param[in] csp_cfg - Pointer to the CSP configuration structure.
 *
 * @retval ret -Status of the set operation. 
 */
int32_t sdr_srs4_sband_set_sys_cfg_csp_cfg(s_comms_csp_cfg *csp_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &csp_cfg->sys_csp_address;
    size = sizeof(csp_cfg->sys_csp_address);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CSP_ADDRESS, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg->sys_csp_address: %hhd\r\n", csp_cfg->sys_csp_address));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CSP_CFG_SYS_CSP_ADDRESS__u8_, csp_cfg->sys_csp_address);
    }

    value = &csp_cfg->sys_csp_routes;
    size = sizeof(csp_cfg->sys_csp_routes);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CSP_ROUTES, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg->sys_csp_routes: %s\r\n", csp_cfg->sys_csp_routes));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_csp_routes");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)csp_cfg->sys_csp_routes);
    }
    return ret;
}

/**
 * @brief This function is used to set CAN interface configuration
 * @brief Set the CAN configuration.
 * 
 * This function sets the CAN configuration for the S-Band module.
 *
 * @param[in] can_cfg - Pointer to the CAN configuration structure.
 *
 * @retval ret -Status of the set operation.
 */
int32_t sdr_srs4_sband_set_sys_cfg_can_cfg(s_comms_can_cfg *can_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &can_cfg->sys_can_rate;
    size = sizeof(can_cfg->sys_can_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CAN_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->can_cfg->sys_can_rate: %lu\r\n", can_cfg->sys_can_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_SYS_CAN_RATE__u32_,can_cfg->sys_can_rate);
#pragma GCC diagnostic pop
        }

    value = &can_cfg->sys_can_promisc;
    size = sizeof(can_cfg->sys_can_promisc);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_CAN_PROMISC, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->can_cfg->sys_can_promisc: %hu\r\n", can_cfg->sys_can_promisc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_SYS_CAN_PROMISC__u8_,can_cfg->sys_can_promisc);
    }
    return ret;
}

/**
 * @brief This function is used to set UART interface configuration
 * @brief Set the UART configuration.
 *
 * This function sets the UART configuration for the S-Band module.
 *
 * @param[in] uart_cfg - Pointer to the UART configuration structure. 
 * 
 * @retval ret - Status of the set operation.
 */
int32_t sdr_srs4_sband_set_sys_cfg_uart_cfg(s_comms_uart_cfg *uart_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &uart_cfg->sys_uart_rate;
    size = sizeof(uart_cfg->sys_uart_rate);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_UART_RATE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg->sys_uart_rate: %lu\r\n", uart_cfg->sys_uart_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG__SYS_UART_RATE__u32_,uart_cfg->sys_uart_rate);
#pragma GCC diagnostic pop
    }

    value = &uart_cfg->sys_uart_multidrop;
    size = sizeof(uart_cfg->sys_uart_multidrop);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_UART_MULTIDROP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg->sys_uart_multidrop: %hu\r\n", uart_cfg->sys_uart_multidrop));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG_SYS_UART_MULTIDROP__u8_,uart_cfg->sys_uart_multidrop);
    }
    return ret;
}

/**
 * @brief This function is used to set IP configuration
 * @brief Set the network configuration.
 *
 * This function sets the network configuration for the S-Band module.
 *
 * @param[in] net_cfg - Pointer to the network configuration structure.
 *
 * @retval ret - Status of the set operation.
 */
int32_t sdr_srs4_sband_set_sys_cfg_net_cfg(s_comms_net_cfg *net_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &net_cfg->sys_net_enable;
    size = sizeof(net_cfg->sys_net_enable);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_ENABLE, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_enable: %hu\r\n", net_cfg->sys_net_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_SYS_NET_ENABLE__u8_,net_cfg->sys_net_enable);
    }

    value = &net_cfg->sys_net_en_ip;
    size = sizeof(net_cfg->sys_net_en_ip);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_EN_IP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_en_ip: %s\r\n", net_cfg->sys_net_en_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_ip");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_en_ip);
    }

    value = &net_cfg->sys_net_en_prefix;
    size = sizeof(net_cfg->sys_net_en_prefix);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_EN_PREFIX, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_en_prefix: %hhd\r\n", net_cfg->sys_net_en_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_SYS_NET_EN_PREFIX__u8_,net_cfg->sys_net_en_prefix);
    }

    value = &net_cfg->sys_net_en_gw;
    size = sizeof(net_cfg->sys_net_en_gw);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_EN_GW, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_en_gw: %s\r\n", net_cfg->sys_net_en_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_en_gw);
    }

    value = &net_cfg->sys_net_rf_ip;
    size = sizeof(net_cfg->sys_net_rf_ip);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_RF_IP, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_rf_ip: %s\r\n", net_cfg->sys_net_rf_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_rf_ip");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_rf_ip);
    }

    value = &net_cfg->sys_net_rf_prefix;
    size = sizeof(net_cfg->sys_net_rf_prefix);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_RF_PREFIX, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_rf_prefix: %hhd\r\n", net_cfg->sys_net_rf_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_SYS_NET_RF_PREFIX__u8_,net_cfg->sys_net_rf_prefix);
    }

    value = &net_cfg->sys_net_rf_gw;
    size = sizeof(net_cfg->sys_net_rf_gw);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_NET_RF_GW, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_rf_gw: %s\r\n", net_cfg->sys_net_rf_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_rf_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_rf_gw);
    }
    return ret;
}

/**
 * @brief This function is used to set the system name of S-Band module
 * @brief Get the system name configuration.
 *
 * This function retrieves the system name string from the S-Band module.
 * 
 * @param[out] size - Size of the system name string.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_sys_cfg_name( uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &sys_cfg_rb.sys_name;
    *size = sizeof(sys_cfg_rb.sys_name);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NAME, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->sys_name: %u\r\n",sys_cfg_rb.sys_name));
#ifndef LINUX_TEMP_PORT
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_SYS_NAME__u32_,(uint32_t)sys_cfg_rb.sys_name);
#endif
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to set boot configuration
 * @brief Set the boot configuration.
 *
 * This function sets the boot configuration for the S-Band module.
 *
 * @param[in] boot_cfg - Pointer to the boot configuration structure.
 *
 * @retval ret - Status of the set operation.
 */
int32_t sdr_srs4_sband_set_sys_cfg_boot_cfg(s_comms_boot_cfg *boot_cfg)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &boot_cfg->sys_bootcount;
    size = sizeof(boot_cfg->sys_bootcount);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_SYS_BOOTCOUNT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_bootcount: %lu\r\n", boot_cfg->sys_bootcount));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_BOOTCOUNT__u32_,boot_cfg->sys_bootcount);
#pragma GCC diagnostic pop
        }
    return ret;
}

/**
 * @brief This function is used to get boot configuration from S-Band module
 * @brief Get the boot configuration.
 *
 * This function retrieves the current boot configuration from the S-Band module.
 *
 * @param[out] boot_cfg - Pointer to store the boot configuration. 
 * @param[out] size - Size of the boot configuration structure.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_sys_cfg_boot_cfg(s_comms_boot_cfg *boot_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &boot_cfg->sys_serial;
    *size = sizeof(boot_cfg->sys_serial);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_SERIAL, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_serial: %lu\r\n", boot_cfg->sys_serial));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_SERIAL__u32_,boot_cfg->sys_serial);
#pragma GCC diagnostic pop
        }

    value = &boot_cfg->sys_sw_version;
    *size = sizeof(boot_cfg->sys_sw_version);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_SW_VERSION, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_sw_version: %lu\r\n", boot_cfg->sys_sw_version));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_SW_VERSION__u32_,boot_cfg->sys_sw_version);
#pragma GCC diagnostic pop
        }

    value = &boot_cfg->sys_bootcount;
    *size = sizeof(boot_cfg->sys_bootcount);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_BOOTCOUNT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->boot_cfg.sys_bootcount: %lu\r\n", boot_cfg->sys_bootcount));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_BOOTCOUNT__u32_,boot_cfg->sys_bootcount);
#pragma GCC diagnostic pop
    }

    value = &boot_cfg->sys_reboot;
    *size = sizeof(boot_cfg->sys_reboot);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_REBOOT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->sys_reboot: %d\r\n", boot_cfg->sys_reboot));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_BOOT_CFG_pt_SYS_REBOOT__u16_,boot_cfg->sys_reboot);
    }
    return ret;
}

/**
 * @brief  This function is used to get GWDT configuration
 * @brief Get the GWDT configuration.
 *
 * This function retrieves the current GWDT configuration from the S-Band module.
 * 
 * @param[out] gwdt_cfg - Pointer to store the GWDT configuration.
 * @param[out] size - Size of the GWDT configuration structure.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_sys_cfg_gwdt_cfg(s_comms_gwdt_cfg *gwdt_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &gwdt_cfg->sys_gwdt_init;
    *size = sizeof(gwdt_cfg->sys_gwdt_init);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_GWDT_INIT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->gwdt_cfg->sys_gwdt_init: %lu\r\n", gwdt_cfg->sys_gwdt_init));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_SYS_GWDT_INIT__u32_,gwdt_cfg->sys_gwdt_init);
#pragma GCC diagnostic pop
        }

    value = &gwdt_cfg->sys_gwdt_counter;
    *size = sizeof(gwdt_cfg->sys_gwdt_counter);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_GWDT_COUNTER, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->gwdt_cfg->sys_gwdt_counter: %lu\r\n", gwdt_cfg->sys_gwdt_counter));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_SYS_GWDT_COUNTER__u32_,gwdt_cfg->sys_gwdt_counter);
#pragma GCC diagnostic pop
    }

    value = &gwdt_cfg->sys_gwdt_reset;
    *size = sizeof(gwdt_cfg->sys_gwdt_reset);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_GWDT_RESET, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->gwdt_cfg->sys_gwdt_reset: %lu\r\n", gwdt_cfg->sys_gwdt_reset));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_GWDT_CFG_SYS_GWDT_RESET__u32_,gwdt_cfg->sys_gwdt_reset);
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to get CSP Configuration
 * @brief Get the CSP configuration.
 *
 * This function retrieves the current CSP configuration from the S-Band module.
 *
 * @param[out] csp_cfg - Pointer to store the CSP configuration. 
 * @param[out] size - Size of the CSP configuration structure.
 * 
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_sys_cfg_csp_cfg(s_comms_csp_cfg *csp_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &csp_cfg->sys_csp_address;
    *size = sizeof(csp_cfg->sys_csp_address);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CSP_ADDRESS, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg->sys_csp_address: %hhd\r\n", csp_cfg->sys_csp_address));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CSP_CFG_SYS_CSP_ADDRESS__u8_, csp_cfg->sys_csp_address);
    }

    value = &csp_cfg->sys_csp_routes;
    *size = sizeof(csp_cfg->sys_csp_routes);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CSP_ROUTES, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->csp_cfg->sys_csp_routes: %s\r\n", csp_cfg->sys_csp_routes));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_csp_routes");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)csp_cfg->sys_csp_routes);
    }
    return ret;
}

/**
 * @brief  This function is used to get CAN interface configuration
 * @brief Get the CAN configuration.
 *
 * This function retrieves the current CAN configuration from the S-Band module.
 *
 * @param[out] can_cfg - Pointer to store the CAN configuration.
 * @param[out] size - Size of the CAN configuration structure.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_sys_cfg_can_cfg(s_comms_can_cfg *can_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &can_cfg->sys_can_rate;
    *size = sizeof(can_cfg->sys_can_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CAN_RATE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
    	DEBUG_CPRINT(("\r\n sys_cfg->can_cfg->sys_can_rate: %lu\r\n", can_cfg->sys_can_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_SYS_CAN_RATE__u32_,can_cfg->sys_can_rate);
#pragma GCC diagnostic pop
    }

    value = &can_cfg->sys_can_promisc;
    *size = sizeof(can_cfg->sys_can_promisc);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_CAN_PROMISC, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->can_cfg->sys_can_promisc: %hu\r\n", can_cfg->sys_can_promisc));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_CAN_CFG_SYS_CAN_PROMISC__u8_,can_cfg->sys_can_promisc);
    }
    return ret;
}

/**
 * @brief This function is used to get UART configuration
 * @brief Get the UART configuration.
 * 
 * This function retrieves the current UART configuration from the S-Band module.
 *
 * @param[out] uart_cfg - Pointer to store the UART configuration.  
 * @param[out] size - Size of the UART configuration structure.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_sys_cfg_uart_cfg(s_comms_uart_cfg *uart_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &uart_cfg->sys_uart_rate;
    *size = sizeof(uart_cfg->sys_uart_rate);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_UART_RATE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg->sys_uart_rate: %lu\r\n", uart_cfg->sys_uart_rate));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG__SYS_UART_RATE__u32_,uart_cfg->sys_uart_rate);
#pragma GCC diagnostic pop
        }

    value = &uart_cfg->sys_uart_multidrop;
    *size = sizeof(uart_cfg->sys_uart_multidrop);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_UART_MULTIDROP, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->uart_cfg->sys_uart_multidrop: %hu\r\n", uart_cfg->sys_uart_multidrop));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_UART_CFG_SYS_UART_MULTIDROP__u8_,uart_cfg->sys_uart_multidrop);
    }
    return ret;
}

/**
 * @brief This function is used to get IP config
 * @brief Get the network configuration.
 *
 * This function retrieves the current network configuration from the S-Band module.
 *
 * @param[out] net_cfg - Pointer to store the network configuration.
 * @param[out] size - Size of the network configuration structure.
 * 
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_sys_cfg_net_cfg(s_comms_net_cfg *net_cfg, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &net_cfg->sys_net_enable;
    *size = sizeof(net_cfg->sys_net_enable);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_ENABLE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_enable: %hu\r\n", net_cfg->sys_net_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_SYS_NET_ENABLE__u8_,net_cfg->sys_net_enable);
    }

    value = &net_cfg->sys_net_en_ip;
    *size = sizeof(net_cfg->sys_net_en_ip);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_EN_IP, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_en_ip: %s\r\n", net_cfg->sys_net_en_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_ip");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_en_ip);
    }

    value = &net_cfg->sys_net_en_prefix;
    *size = sizeof(net_cfg->sys_net_en_prefix);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_EN_PREFIX, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_en_prefix: %hhd\r\n", net_cfg->sys_net_en_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_SYS_NET_EN_PREFIX__u8_,net_cfg->sys_net_en_prefix);
    }

    value = &net_cfg->sys_net_en_gw;
    *size = sizeof(net_cfg->sys_net_en_gw);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_EN_GW, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_en_gw: %s\r\n", net_cfg->sys_net_en_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_en_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_en_gw);
    }

    value = &net_cfg->sys_net_rf_ip;
    *size = sizeof(net_cfg->sys_net_rf_ip);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_RF_IP, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_rf_ip: %s\r\n", net_cfg->sys_net_rf_ip));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_rf_ip");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_rf_ip);
    }

    value = &net_cfg->sys_net_rf_prefix;
    *size = sizeof(net_cfg->sys_net_rf_prefix);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_RF_PREFIX, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_rf_prefix: %hhd\r\n", net_cfg->sys_net_rf_prefix));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,SYS_CFG_NET_CFG_SYS_NET_RF_PREFIX__u8_,net_cfg->sys_net_rf_prefix);
    }

    value = &net_cfg->sys_net_rf_gw;
    *size = sizeof(net_cfg->sys_net_rf_gw);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_SYS_NET_RF_GW, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n sys_cfg->net_cfg->sys_net_rf_gw: %s\r\n", net_cfg->sys_net_rf_gw));
        log_string(LOG_INFO_L1,LOG_COMMS,"sys_net_rf_gw");
        log_string(LOG_INFO_L1,LOG_COMMS,(char*)net_cfg->sys_net_rf_gw);
    }
    return ret;
}

/**
 * @brief This function is used to set PS Gain for calibration of S-Band module
 * @brief Set the preselector gain calibration value.
 *
 * This function sets the preselector gain calibration value in the S-Band module.
 *
 * @param[in] cal_ps_gain - Preselector gain calibration value.
 *
 * @retval ret - Status of the set operation.
 */
int32_t sdr_srs4_sband_set_cal_cfg_ps_gain(f32 cal_ps_gain)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &cal_ps_gain;
    size = sizeof(cal_ps_gain);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_CAL_PS_GAIN, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_gain: %lf\r\n", cal_ps_gain));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_GAIN__u16_pt_u16_,cal_ps_gain);
    }
    return ret;
}

/**
 * @brief This function is used to set PS intercept for S-Band module
 * @brief Set the preselector intercept calibration value.
 *
 * This function sets the preselector intercept calibration value in the S-Band module.
 *
 * @param[in] cal_ps_intercept - Preselector intercept calibration value.
 *
 * @retval ret - Status of the set operation.
 */
int32_t sdr_srs4_sband_set_cal_cfg_ps_intercept(f32 cal_ps_intercept)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &cal_ps_intercept;
    size = sizeof(cal_ps_intercept);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_CAL_PS_INTERCEPT, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_intercept: %f\r\n", cal_ps_intercept));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_INTERCEPT__u16_pt_u16_,cal_ps_intercept);
    }
    return ret;
}

/**
 * @brief This function is used to set VCTCXO for calibration of S-Band module
 * @brief Set the VCTCXO calibration value.
 *
 * This function sets the VCTCXO calibration value in the S-Band module.
 * 
 * @param[in] cal_vctcxo - VCTCXO calibration value.
 *
 * @retval ret - Status of the set operation.
 */
int32_t sdr_srs4_sband_set_cal_cfg_vctcxo(uint16_t cal_vctcxo)
{
    int32_t ret = 0;
    uint32_t size = 0;
    void *value = NULL;

    value = &cal_vctcxo;
    size = sizeof(cal_vctcxo);
    ret = sdr_srs4_sband_set_cfg(SL_SRS4_PROP_CAL_VCTCXO, value, size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_vctcxo: %d\r\n", cal_vctcxo));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_VCTCXO__u16_,cal_vctcxo);
    }
    return ret;
}

/**
 * @brief This function is used to get PS gain param value used for calibration of S_Band module
 * @brief Get the preselector gain calibration value.
 *
 * This function retrieves the preselector gain calibration value from the S-Band module.
 *
 * @param[out] cal_ps_gain - Pointer to store the preselector gain calibration value.
 * @param[out] size - Size of the calibration value parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_cal_cfg_ps_gain(f32 cal_ps_gain, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_ps_gain;
    *size = sizeof(cal_ps_gain);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_PS_GAIN, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_gain: %lf\r\n", cal_ps_gain));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_GAIN__u16_pt_u16_,cal_ps_gain);
    }
    return ret;
}

/**
 * @brief  This function is used to get PS intercept parameter value for calibration of S-Band module
 * @brief Get the preselector intercept calibration value. 
 *
 * This function retrieves the preselector intercept calibration value from the S-Band module.
 *
 * @param[out] cal_ps_intercept - Pointer to store the preselector intercept calibration value.
 * @param[out] size - Size of the calibration value parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_cal_cfg_ps_intercept(f32 cal_ps_intercept, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_ps_intercept;
    *size = sizeof(cal_ps_intercept);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_PS_INTERCEPT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ps_intercept: %f\r\n", cal_ps_intercept));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PS_INTERCEPT__u16_pt_u16_,cal_ps_intercept);
    }
    return ret;
}

/**
 * @brief This function is used to get VCTCXO of S-Band module
 * @brief Get the VCTCXO calibration value.
 *
 * This function retrieves the VCTCXO calibration value from the S-Band module.
 *
 * @param[out] cal_vctcxo - Pointer to store the VCTCXO calibration value. 
 * @param[out] size - Size of the calibration value parameter.
 *
 * @retval ret - Status of the get operation. 
 */
int32_t sdr_srs4_sband_get_cal_cfg_vctcxo(uint16_t cal_vctcxo, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_vctcxo;
    *size = sizeof(cal_vctcxo);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_VCTCXO, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_vctcxo: %d\r\n", cal_vctcxo));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_VCTCXO__u16_,cal_vctcxo);
    }
    return ret;
}

/**
 * @brief This function is used to get configured power for calibrating S-Band module
 * @brief Get the power set calibration value.
 *
 * This function retrieves the power set calibration value from the S-Band module.
 *
 * @param[out] cal_pwr_set - Pointer to store the power set calibration value.
 * @param[out] size - Size of the calibration value parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_cal_cfg_pwr_set(f32 cal_pwr_set, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_pwr_set;
    *size = sizeof(cal_pwr_set);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_PWR_SET, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_pwr_set: %.2f\r\n", cal_pwr_set));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_PWR_SET__u16_pt_u16_,cal_pwr_set);
    }
    return ret;
}

/**
 * @brief  This function is used to get BER enable status (BER is a standalone simulation model to measure the bit error rate)
 * @brief Get the BER enable status.
 *
 * This function retrieves the BER enable status from the S-Band module.
 * 
 * @param[out] cal_ber_enable - Pointer to store the BER enable status.
 * @param[out] size - Size of the status parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_cal_cfg_ber_enable(uint8_t cal_ber_enable, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_ber_enable;
    *size = sizeof(cal_ber_enable);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_ENABLE, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_enable: %d\r\n", cal_ber_enable));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_ENABLE__u8_,cal_ber_enable);
    }
    return ret;
}

/**
 * @brief This function is used to get BER window duration
 * @brief Get the BER window size.
 *
 * This function retrieves the BER window size from the S-Band module.
 *
 * @param[out] cal_ber_window - Pointer to store the BER window size.
 * @param[out] size - Size of the window size parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_cal_cfg_ber_window(uint32_t cal_ber_window, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_ber_window;
    *size = sizeof(cal_ber_window);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_WINDOW, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_window: %lu\r\n", cal_ber_window));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_WINDOW__u32_,cal_ber_window);
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to get BER count
 * @brief Get the BER count.
 *
 * This function retrieves the BER count from the S-Band module.
 *
 * @param[out] cal_ber_count - Pointer to store the BER count.
 * @param[out] size - Size of the count parameter.
 * 
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_cal_cfg_ber_count(uint32_t cal_ber_count, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_ber_count;
    *size = sizeof(cal_ber_count);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_COUNT, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_count: %lu\r\n", cal_ber_count));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_COUNT__u32_,cal_ber_count);
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to get BER lock status
 * @brief Get the BER locks count.
 *
 * This function retrieves the BER locks count from the S-Band module.
 *
 * @param[out] cal_ber_locks - Pointer to store the BER locks count.
 * @param[out] size - Size of the locks count parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_cal_cfg_ber_locks(uint32_t cal_ber_locks, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cal_ber_locks;
    *size = sizeof(cal_ber_locks);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_CAL_BER_LOCKS, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n cal_cfg->cal_ber_locks: %lu\r\n", cal_ber_locks));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,CAL_CFG_CAL_BER_LOCKS__u32_,cal_ber_locks);
#pragma GCC diagnostic pop
    }
    return ret;
}

/**
 * @brief This function is used to get temperature(psu) TM property
 * @brief Get the preselector temperature.
 *
 * This function retrieves the preselector temperature from the S-Band module.
 *
 * @param[out] temp_psu - Pointer to store the preselector temperature.
 * @param[out] size - Size of the temperature parameter.
 * 
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_temp_psu(int16_t temp_psu, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &temp_psu;
    *size = sizeof(temp_psu);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_PSU, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_psu;: %d\r\n", temp_psu));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_PSU__s16_,temp_psu);
    }

	return ret;
}


/**
 * @brief This function is used to get temperature(mcu) TM property
 * @brief Get the MCU temperature.
 * 
 * This function retrieves the MCU temperature from the S-Band module.
 *
 * @param[out] temp_mcu - Pointer to store the MCU temperature.
 * @param[out] size - Size of the temperature parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_temp_mcu(int16_t temp_mcu, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &temp_mcu;
    *size = sizeof(temp_mcu);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_MCU, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_mcu;: %d\r\n", temp_mcu));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_MCU__s16_,temp_mcu);
    }

	return ret;
}

/**
 * @brief This function is used to get temperature(fpga) TM property
 * @brief Get the FPGA temperature.
 *
 * This function retrieves the FPGA temperature from the S-Band module.
 * 
 * @param[out] temp_fpga - Pointer to store the FPGA temperature.
 * @param[out] size - Size of the temperature parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_temp_fpga(int16_t temp_fpga, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &temp_fpga;
    *size = sizeof(temp_fpga);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_FPGA, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_fpga;: %d\r\n", temp_fpga));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_FPGA__s16_,temp_fpga);
    }
	return ret;
}

/**
 * @brief This function is used to get temperature(xvcr) TM property
 * @brief Get the transceiver temperature.
 *
 * This function retrieves the transceiver temperature from the S-Band module.
 *
 * @param[out] temp_xcvr - Pointer to store the transceiver temperature.
 * @param[out] size - Size of the temperature parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_temp_xcvr(int16_t temp_xcvr, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &temp_xcvr;
    *size = sizeof(temp_xcvr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_XCVR, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_xcvr;: %d\r\n", temp_xcvr));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_XCVR__s16_,temp_xcvr);
    }
	return ret;
}

/**
 * @brief This function is used to get temperature(LNA) TM property
 * @brief Get the LNA temperature.
 *
 * This function retrieves the LNA temperature from the S-Band module.
 *
 * @param[out] temp_lna - Pointer to store the LNA temperature. 
 * @param[out] size - Size of the temperature parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_temp_lna(int16_t temp_lna, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &temp_lna;
    *size = sizeof(temp_lna);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_LNA, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_lna;: %d\r\n", temp_lna));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_LNA__s16_,temp_lna);
    }
	return ret;
}

/**
 * @brief This function is used to get temperature(PA) TM property
 * @brief Get the power amplifier temperature.
 *
 * This function retrieves the power amplifier temperature from the S-Band module.
 *
 * @param[out] temp_pa - Pointer to store the power amplifier temperature.
 * @param[out] size - Size of the temperature parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_temp_pa(int16_t temp_pa, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &temp_pa;
    *size = sizeof(temp_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_TEMP_PA, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->temp_pa;: %d\r\n", temp_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_TEMP_PA__s16_,temp_pa);
    }
	return ret;
}

/**
 * @brief This function is used to get Voltage(Vin) - TM property
 * @brief Get the input voltage.
 *
 * This function retrieves the input voltage from the S-Band module.
 *
 * @param[out] volt_vin - Pointer to store the input voltage.
 * @param[out] size - Size of the voltage parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_volt_vin(uint16_t volt_vin, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &volt_vin;
    *size = sizeof(volt_vin);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_VIN, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_vin;: %d\r\n", volt_vin));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_VIN__u16_,volt_vin);
    }
	return ret;
}

/**
 * @brief This function is used to get Voltage(3v3) - TM property
 * @brief Get the 3.3V voltage.
 * 
 * This function retrieves the 3.3V voltage from the S-Band module.
 *
 * @param[out] volt_3v3 - Pointer to store the 3.3V voltage.
 * @param[out] size - Size of the voltage parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_volt_3v3(uint16_t volt_3v3, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &volt_3v3;
    *size = sizeof(volt_3v3);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_3V3, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_3v3;: %d\r\n", volt_3v3));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_3V3__u16_,volt_3v3);
    }
	return ret;
}

/**
 * @brief This function is used to get Voltage(1v8) - TM property
 * @brief Get the 1.8V voltage.
 *
 * This function retrieves the 1.8V voltage from the S-Band module.
 *
 * @param[out] volt_1v8 - Pointer to store the 1.8V voltage.
 * @param[out] size - Size of the voltage parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_volt_1v8(uint16_t volt_1v8, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &volt_1v8;
    *size = sizeof(volt_1v8);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_1V8, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_1v8;: %d\r\n", volt_1v8));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_1V8__u16_,volt_1v8);
    }
	return ret;
}

/**
 * @brief This function is used to get Voltage(1v0) - TM property
 * @brief Get the 1.0V voltage.
 *
 * This function retrieves the 1.0V voltage from the S-Band module.
 *
 * @param[out] volt_1v0 - Pointer to store the 1.0V voltage.
 * @param[out] size - Size of the voltage parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_volt_1v0(uint16_t volt_1v0, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &volt_1v0;
    *size = sizeof(volt_1v0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_1V0, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_1v0;: %d\r\n", volt_1v0));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_1V0__u16_,volt_1v0);
    }
	return ret;
}

/**
 * @brief This function is used to get Voltage(Vpa) - TM property
 * @brief Get the power amplifier voltage.
 *
 * This function retrieves the power amplifier voltage from the S-Band module.
 *
 * @param[out] volt_pa - Pointer to store the power amplifier voltage.
 * @param[out] size - Size of the voltage parameter. 
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_volt_pa(uint16_t volt_pa, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &volt_pa;
    *size = sizeof(volt_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_VOLT_PA, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->volt_pa;: %d\r\n", volt_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_VOLT_PA__u16_,volt_pa);
    }
	return ret;
}

/**
 * @brief This function is used to get Current(Iin) - TM property
 * @brief Get the input current.
 *
 * This function retrieves the input current from the S-Band module.
 *
 * @param[out] cur_vin - Pointer to store the input current.
 * @param[out] size - Size of the current parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_cur_vin(int16_t cur_vin, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cur_vin;
    *size = sizeof(cur_vin);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_VIN, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_vin;: %d\r\n", cur_vin));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_VIN__s16_,cur_vin);
    }
	return ret;
}

/**
 * @brief This function is used to get Current(I 3v3) - TM property
 * @brief Get the 3.3V current.
 *
 * This function retrieves the 3.3V current from the S-Band module.
 *
 * @param[out] cur_3v3 - Pointer to store the 3.3V current.
 * @param[out] size - Size of the current parameter.
 *
 * @retval ret - Status of the get operation. 
 */
int32_t sdr_srs4_sband_get_tm_prop_cur_3v3(int16_t cur_3v3, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cur_3v3;
    *size = sizeof(cur_3v3);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_3V3, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_3v3;: %d\r\n", cur_3v3));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_3V3__s16_,cur_3v3);
    }
	return ret;
}

/**
 * @brief This function is used to get Current(I 1v8) - TM property
 * @brief Get the 1.8V current.
 *
 * This function retrieves the 1.8V current from the S-Band module.
 *
 * @param[out] cur_1v8 - Pointer to store the 1.8V current.
 * @param[out] size - Size of the current parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_cur_1v8(int16_t cur_1v8, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cur_1v8;
    *size = sizeof(cur_1v8);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_1V8, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_1v8;: %d\r\n", cur_1v8));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_1V8__s16_,cur_1v8);
    }
	return ret;
}

/**
 * @brief This function is used to get Current(I 1v0) - TM property
 * @brief Get the 1.0V current.
 *
 * This function retrieves the 1.0V current from the S-Band module.
 *
 * @param[out] cur_1v0 - Pointer to store the 1.0V current.
 * @param[out] size - Size of the current parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_cur_1v0(int16_t cur_1v0, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cur_1v0;
    *size = sizeof(cur_1v0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_1V0, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_1v0;: %d\r\n", cur_1v0));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_1V0__s16_,cur_1v0);
    }
	return ret;
}

/**
 * @brief This function is used to get Current(I pa) - TM property
 * @brief Get the power amplifier current.
 *
 * This function retrieves the power amplifier current from the S-Band module.
 *
 * @param[out] cur_pa - Pointer to store the power amplifier current.
 * @param[out] size - Size of the current parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_cur_pa(int16_t cur_pa, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &cur_pa;
    *size = sizeof(cur_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_CUR_PA, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->cur_pa;: %d\r\n", cur_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_CUR_PA__s16_,cur_pa);
    }
	return ret;
}

/**
 * @brief This function is used to get Power(Vin) - TM property
 * @brief Get the input power.
 *
 * This function retrieves the input power from the S-Band module.
 *
 * @param[out] power_vin - Pointer to store the input power.
 * @param[out] size - Size of the power parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_power_vin(uint16_t power_vin, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &power_vin;
    *size = sizeof(power_vin);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_VIN, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_vin;: %d\r\n", power_vin));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_VIN__u16_,power_vin);
    }
	return ret;
}

/**
 * @brief This function is used to get Power(3v3) - TM property
 * @brief Get the 3.3V power.
 *
 * This function retrieves the 3.3V power from the S-Band module.
 *
 * @param[out] power_3v3 - Pointer to store the 3.3V power.
 * @param[out] size - Size of the power parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_power_3v3(uint16_t power_3v3, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &power_3v3;
    *size = sizeof(power_3v3);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_3V3, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_3v3;: %d\r\n", power_3v3));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_3V3__u16_,power_3v3);
    }
	return ret;
}

/**
 * @brief This function is used to get Power(1v8) - TM property
 * @brief Get the 1.8V power.
 *
 * This function retrieves the 1.8V power from the S-Band module.
 *
 * @param[out] power_1v8 - Pointer to store the 1.8V power.
 * @param[out] size - Size of the power parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_power_1v8(uint16_t power_1v8, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &power_1v8;
    *size = sizeof(power_1v8);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_1V8, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_1v8;: %d\r\n", power_1v8));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_1V8__u16_,power_1v8);
    }
	return ret;
}

/**
 * @brief This function is used to get Power(1v0) - TM property
 * @brief Get the 1.0V power.
 *
 * This function retrieves the 1.0V power from the S-Band module.
 *
 * @param[out] power_1v0 - Pointer to store the 1.0V power.
 * @param[out] size - Size of the power parameter.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_power_1v0(uint16_t power_1v0, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &power_1v0;
    *size = sizeof(power_1v0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_1V0, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_1v0;: %d\r\n", power_1v0));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_1V0__u16_,power_1v0);
    }
	return ret;
}

/**
 * @brief This function is used to get Power(PA) - TM property
 * @brief Get the power amplifier power.
 *
 * This function retrieves the power amplifier power from the S-Band module.
 *
 * @param[out] power_pa - Pointer to store the power amplifier power.
 * @param[out] size - Size of the power parameter.
 * 
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tm_prop_power_pa(uint16_t power_pa, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &power_pa;
    *size = sizeof(power_pa);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TM_POWER_PA, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n tm->power_pa;: %d\r\n", power_pa));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,TM_POWER_PA__u16_,power_pa);
    }
	return ret;
}

/**
 * @brief This function is used to get transmission - TM property of S-Band module
 * @brief Get the transmitter telemetry.
 *
 * This function retrieves the full transmitter telemetry struct from the S-Band module.
 *
 * @param[out] tx_tm - Pointer to the transmitter telemetry struct.
 * @param[out] size - Size of the telemetry struct.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_tx_tm_prop(s_comms_tx_tm *tx_tm, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &tx_tm->tx_cfg_frames;
    *size = sizeof(tx_tm->tx_cfg_frames);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_FRAMES, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The transmitted frames are %lu", tx_tm->tx_cfg_frames));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_TRANSMITTED_FRAMES_ARE__u32_,tx_tm->tx_cfg_frames);
#pragma GCC diagnostic pop
    }


    value = &tx_tm->tx_cfg_pwr_fwd;
    *size = sizeof(tx_tm->tx_cfg_pwr_fwd);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PWR_FWD, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX measured forward power is %.2f", tx_tm->tx_cfg_pwr_fwd));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_MEASURED_FORWARED_POWER_IS__u16_pt_u16_,tx_tm->tx_cfg_pwr_fwd);
    }

    value = &tx_tm->tx_cfg_pwr_rfl;
    *size = sizeof(tx_tm->tx_cfg_pwr_rfl);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_TX_PWR_RFL, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The TX refected power is %.2f", tx_tm->tx_cfg_pwr_rfl));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_TX_REFECTED_POWER_IS__u16_pt_u16_,tx_tm->tx_cfg_pwr_rfl);
    }
    return ret;
}

/**
 * @brief  This function is used to get reception - TM property of S-Band module
 * @brief Get the receiver telemetry.
 *
 * This function retrieves the full receiver telemetry struct from the S-Band module.
 *
 * @param[out] rx_tm - Pointer to the receiver telemetry struct.
 * @param[out] size - Size of the telemetry struct.
 *
 * @retval ret - Status of the get operation.
 */
int32_t sdr_srs4_sband_get_rx_tm_prop(s_comms_rx_tm  *rx_tm, uint16_t *size)
{
    int32_t ret = 0;
    void *value = NULL;

    value = &rx_tm->rx_cfg_frames;
    *size = sizeof(rx_tm->rx_cfg_frames);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FRAMES, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX Frames received is  %lu\r\n", rx_tm->rx_cfg_frames));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAMES_RECEIVED_IS__u32_,rx_tm->rx_cfg_frames);
#pragma GCC diagnostic pop
    }

    value = &rx_tm->rx_cfg_detected;
    *size = sizeof(rx_tm->rx_cfg_detected);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_DETECTED, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
        DEBUG_CPRINT(("\r\n The RX Frames detected is %lu\r\n", rx_tm->rx_cfg_detected));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAMES_DETECTED_IS__u32_,rx_tm->rx_cfg_detected);
#pragma GCC diagnostic pop
    }

    value = &rx_tm->rx_cfg_rssi;
    *size = sizeof(rx_tm->rx_cfg_rssi);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_RSSI, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RSSI is %f", rx_tm->rx_cfg_rssi));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RSSI_IS__u16_pt_u16_,rx_tm->rx_cfg_rssi);
    }

    value = &rx_tm->rx_cfg_freqerr;
    *size = sizeof(rx_tm->rx_cfg_freqerr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FREQERR, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Frquency deviation is %f", rx_tm->rx_cfg_freqerr));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_FREQUENCY_DEVIATION_IS__u16_pt_u16_,rx_tm->rx_cfg_freqerr);

    }

    value = &rx_tm->rx_cfg_symerr;
    *size = sizeof(rx_tm->rx_cfg_symerr);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_SYMERR, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Symbol deviation is %f", rx_tm->rx_cfg_symerr));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_SYMBOL_DEVIATION_IS__u16_pt_u16_,rx_tm->rx_cfg_symerr);
    }

    value = &rx_tm->rx_cfg_ebn0;
    *size = sizeof(rx_tm->rx_cfg_ebn0);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_EBN0, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX EBN0 is %f", rx_tm->rx_cfg_ebn0));
        log_id_with_float(LOG_INFO_L1,LOG_COMMS,THE_RX_EBN0_IS__u16_pt_u16_,rx_tm->rx_cfg_ebn0);
    }

    value = &rx_tm->rx_cfg_carrier_lock;
    *size = sizeof(rx_tm->rx_cfg_carrier_lock);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_CARRIER_LOCK, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Carrier lock is %d", rx_tm->rx_cfg_carrier_lock));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_CARRIER_LOCK_IS__u8_,rx_tm->rx_cfg_carrier_lock);
    }

    value = &rx_tm->rx_frame_lock;
    *size = sizeof(rx_tm->rx_frame_lock);
    ret = sdr_srs4_sband_get_cfg(SL_SRS4_PROP_RX_FRAME_LOCK, value, *size);

    if(0>ret)
    {
        return ret;
    }
    else
    {
        DEBUG_CPRINT(("\r\n The RX Frame Lock is %d", rx_tm->rx_frame_lock));
        log_id_with_one_arg(LOG_INFO_L1,LOG_COMMS,THE_RX_FRAME_LOCK_IS__u8_,rx_tm->rx_frame_lock);
    }
    return ret;
}

#endif
