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

#ifndef COMMS_SBAND_TMR_H
#define COMMS_SBAND_TMR_H

#include "comms_csw.h"


#ifdef __cplusplus
extern "C" {
#endif


#define SBAND_5MIN_TIMER 5*60*1000
#define SBAND_XLINK_TM_STOR_TIMER  					30*1000 //1000 represnt as 1 sec
#define SBAND_RX_SHORT_TIMER						10*1000
#define SBAND_RX_LONG_TIMER							60*1000


int8_t comms_sband_timer_init(void);

/**
* @brief This api Initialize the SBAND sync.
*/
//void sband_initial_sync_cb(void);

/**
 * @brief call back function at short duration expiry
 * pass fsm state via IPC
 *
 */
void sband_rx_on_timer_cb(void);

/**
 *
 */
void sband_beacon_enb_timer_exp_hdlr(void);

/**
 *sband reinit timer expiry call back 
 * */
void sband_reinit_tmr_exp_cb(void);

/**
* @brief This api Initialize the SBAND rx sync.
*/

void sband_tm_periodic_read_cb(void);
/**
* @brief This API monitor tx sband ground contact
*/
void sband_tx_tm_on_cb(void);

/**
* @brief Callback function for beacon timer expiry
*/

void sband_beacon_timer_exp_cb(void *ptr);
/**
* @brief This function handles the timer expiry of transmit sync
*
* @param ptr : unused pointer
*/
//void sband_beacon_timer_cb_tmr_exp(void *ptr);


/**
 * @brief This function is the callback for sband window tx on timer expiry
 */
void sband_tx_win_on_cb(void);


/**
 * @brief This function is the callback for sband beacon rep timer expiry
 */
void sband_beacon_rep_timer_exp_hdlr(void);

void sband_cmd_wait_tmr_exp_cb(void);

#ifdef __cplusplus
}
#endif
#endif /*COMMS_CSW_H */
