/**
 * @file mfcc_tc_tm_sample.h
 *
 * @brief This file contains functions prototypes that provides demonstration
 *         of 
 * @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.
 *        usage of TC TM Library APIs
 */
#ifndef _MFCC_TC_TM_SAMPLE_H_
#define _MFCC_TC_TM_SAMPLE_H_

#include "exo_types.h"
#include "exo_osal_mem_management.h"

/**
 *  @brief  TCTM Encoder Decoder API Execution status macros
 */
#define TCTM_OK                   (0)      ///< Success return value
#define TCTM_NULL_PTR             (-1)     ///< Null pointer return value

/*!
 *  @brief This enum holds the enumeration values of TC and TM ID
 */
typedef enum _tc_tm_id
{
    TC_TRGT_PT = 1,
    TC_LOC_INFO,

    TM_TRGT_PT = 100,
    TM_LOC_INFO,
    TC_TM_MAX_ID

}tc_tm_id_e;

/*********************************************************************************/
/***************** TeleCommand Payload Structure Definitions *********************/
/*********************************************************************************/

/*!
 *  @brief This structure holds the Target Pointing request parameter information
 */
typedef struct _tctm_trgt_pt_req
{
    float lat;
    float longit;
    float alt;
    uint8 pld_hw_id;
    uint8 act_tmr_min;
    uint8 act_tmr_sec;
    uint16 act_tmr_ms;
}tctm_trgt_pt_req_s;

/*********************************************************************************/
/******************* TeleMetry Payload Structure Definitions *********************/
/*********************************************************************************/

/*!
 *  @brief This structure holds the location information
 */
typedef struct _tctm_gnss_loc_info
{
    uint8 status;
    float lat;
    float longit;
    float alt;
}tctm_gnss_loc_info_s;

/*!
 * @brief This API decodes the TM for GNNS location
 * sharing information
 *
 * @param[in] data : pointer to decode data
 * @param[out] gli : pointer to gnss location info
 *
 * @return status of decode data
 * @retval Always success->TCTM_OK
 */
int8 tm_gnss_loc_info_dec(uint8* data, tctm_gnss_loc_info_s *gli);

/*!
 * @brief This API encodes the Interface Control Messsage for
 * Target point request
 *
 * @param[in] data : pointer to encode data
 * @param[out] tpr : pointer to target pointing info
 *
 * @return status of encode data
 * @retval Always success->TCTM_OK
 */
int8 tc_trgt_point_req_enc(uint8* data, tctm_trgt_pt_req_s *tpr);

#endif
