/*
 * @Description: NB模块-svc层-nb81指令集子模块
 * @Author: yangsw
 * @Date: 2021-06-04 14:05:58
 * @LastEditTime: 2023-08-28 13:36:36
 * @LastEditors: LiDa
 * @Reference: 
 */
#ifndef H_SVC_MB26_LATCMD_H
#define H_SVC_MB26_LATCMD_H


#include "svc_nb_core.h"

#ifdef MB26S_LIERDA_MODEL

#define NB_PDP_CONTEXT_ADDR     "\"nbiot\""
#define NB_CDP_SERVER           "\"221.229.214.202\",5683"


typedef enum{
    AT_CMD=0,
    AT_CMD_CFUN_0=1,
    AT_CMD_CFUN_1=2,
    AT_CMD_CEREG=3,
    AT_CMD_COAP_REG=4,
    AT_CMD_COAP=5,
    AT_CMD_COAP_SEND=6,
    AT_CMD_CGSN_1=7,
    AT_CMD_CGMR=8,
    AT_CMD_CMEE_1=9,
    AT_CMD_CSQ=10,
    AT_CMD_CCLK=11,
    AT_CMD_CIMI=12,
    AT_CMD_BAND=13,
    AT_CMD_CEREG_1=14,
    AT_CMD_CSCON_1=15,
    AT_CMD_CGATT_1=16,
    AT_CMD_CGPADDR=17,
    AT_CMD_CGATT=18,
    AT_CMD_ECNPICFG=19,
    AT_CMD_ECICCID=20,
    AT_CMD_CESQ=21,
    AT_CMD_STATUSPHY=22,
    AT_CMD_STATUSRRC=23,
}E_Nb_At_Cmd;

#define NB_AT_CMD_NUM 24//sizeof(E_Nb_At_Cmd)/sizeof(int)
#define NB_AT_CMD_NOTICE_NUM 1

typedef struct S_Nb_At_Cmd_Data
{
    E_Nb_At_Cmd  e_nb_at_cmd;          
    gw_u8           *send_cmd;       
    gw_u8           *ack_cmd;       
    gw_u16          timeout; 
    gw_u8           resend_times;
    //gw_s8           (*callback)(gw_u8 *data);  
    gw_s8           (*callback)(void *data);     
} S_Nb_At_Cmd_Data;

typedef struct
{     
    gw_u8           *recv_cmd;       
    //gw_s8           (*callback)(gw_u8 *data);   
    gw_s8           (*callback)(void *pData);     
} S_Nb_At_Cmd_Notice;

S_Nb_At_Cmd_Data* Svc_Nb_Find_At_Cmd(E_Nb_At_Cmd in_at_cmd);
E_Result_State Svc_Nb_At_Cmd_Notice_Parse(gw_u8 *data);
gw_u16 Svc_Nb_Coap_Send_Data_Creat(gw_u8* in_data,gw_u16 in_len,gw_u8* out_data);
gw_u16 Svc_Nb_Coap_Creat(gw_u8* out_data);


#endif

#endif