/**
 * @file ftds.h
 *
 * @brief This file contains function prototypes and data definitions that
 * helps to prepare FTDS frame and transmit FTDS frame
 *
 * @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 FTDS_H_
#define FTDS_H_
#include "data_type.h"


/******************************************************************************/
/*               Declaration of exported function prototypes                  */
/******************************************************************************/

/**
 * @brief This API manages FTDS message transaction and monitoring the transmission
 * It will perform segemntation, FTDS frame formation and taansmit FTDS
 *
 * @param[in]  void
 *
 * @return none
 * @retval none
 */
void ftds(void);

/**
 * @brief This function will update sequence drop list to be re transmitted
 *
 * @param[in]  seq_num : Sequence number to be added in drop list
 *
 * @return status of drop list update
 * @retval 1 indicates sequence number has added, 0 indicates already the list has full
 */
uint8_t ftds_update_resend_seq_id_list(uint32_t seq_num);

/**
 * @brief This function is used to change the sequence counter head
 *
 * @param[in]  set : new head position
 *
 * @return none
 * @retval void : none
 *
 */
void ftds_change_head_position(uint32_t set);

/**
 * @brief This function is used to clear the ping request failure counter logic
 *
 * @param[in]  none
 *
 * @return none
 * @retval void : none
 *
 */
void ftds_clear_ping_request(void);

/**
 * @brief This function maintain delay time for 2 seconds
 *
 * @param[in]  none
 *
 * @return none
 * @retval void : none
 *
 */
void ftds_waitfor2seconds(void);

#endif /*FTDS_H_ */
