[feature] cut function test

Change-Id: Ie2fccd8aff332ca543d13a7fc748daf4e7c90b26
diff --git a/packages/apps/lynq-function-test/src/audio_test.cpp b/packages/apps/lynq-function-test/src/audio_test.tmp
old mode 100644
new mode 100755
similarity index 100%
rename from packages/apps/lynq-function-test/src/audio_test.cpp
rename to packages/apps/lynq-function-test/src/audio_test.tmp
diff --git a/packages/apps/lynq-function-test/src/fota_test.cpp b/packages/apps/lynq-function-test/src/fota_test.tmp
old mode 100644
new mode 100755
similarity index 99%
rename from packages/apps/lynq-function-test/src/fota_test.cpp
rename to packages/apps/lynq-function-test/src/fota_test.tmp
index 35ee638..d91c715
--- a/packages/apps/lynq-function-test/src/fota_test.cpp
+++ b/packages/apps/lynq-function-test/src/fota_test.tmp
@@ -20,7 +20,7 @@
 extern "C" {

 #endif

 #include "include/iot_rock.h"

-#include "ftp/lynq_ftp.h"

+//#include "ftp/lynq_ftp.h"

 #ifdef __cplusplus

 }

 #endif

diff --git a/packages/apps/lynq-function-test/src/gpio_test.cpp b/packages/apps/lynq-function-test/src/gpio_test.tmp
old mode 100644
new mode 100755
similarity index 100%
rename from packages/apps/lynq-function-test/src/gpio_test.cpp
rename to packages/apps/lynq-function-test/src/gpio_test.tmp
diff --git a/packages/apps/lynq-function-test/src/main.cpp b/packages/apps/lynq-function-test/src/main.cpp
old mode 100644
new mode 100755
index f490c22..048861c
--- a/packages/apps/lynq-function-test/src/main.cpp
+++ b/packages/apps/lynq-function-test/src/main.cpp
@@ -3,27 +3,17 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <libtel/lib_tele.h>
-#include "ril_test.h"
-#include "gpio_test.h"
-#include "fota_test.h"
-#include "audio_test.h"
-#include "system_test.h"
-//#include "service_test.h"
+//#include "fota_test.h"
 #include "function_common.h"
-//#include "conti_plugin_test.h"
-//#include "exception_multicast.h"
-
-
 #include<unistd.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
-#include "liblynq-broadcast/broadcast_send.h"
+//#include "liblynq-broadcast/broadcast_send.h"
 #include <gio/gio.h>
 #include <glib.h>
-#include "liblynq-driver/libdriver.h"
+//#include "liblynq-driver/libdriver.h"
 
 #ifdef __cplusplus
 }
@@ -37,37 +27,12 @@
     DEMO_MENU,
 }TEST_MAIN_ITEM;
 typedef enum{
-    API_RIL=0,
-    API_GPIO,
-    API_MQTT,
-    API_HTTP,
-    API_WIFI,
-    API_GNSS,
-    API_SERVICE,
-    API_AUDIO,
-    API_DHCP,
-    API_SYSTEM,
+    API_WIFI=0,
+	API_AUDIO,
     API_FOTA,
 } API_MOUDLE;
 
 
-void lynq_incoming_call_cb(RIL_SOCKET_ID soc_id,int index, char * addr, RIL_CallState state, int toa)
-{
-   // printf("[SIM%d]index is %d,addr is %s,state is %d,toa is %d\n",soc_id,index,addr,state,toa);
-    LYVERBLOG("[SIM%d]index is %d,addr is %s,state is %d,toa is %d\n",soc_id,index,addr,state,toa);
-}
-
-void lynq_recive_new_sms_cb(RIL_SOCKET_ID soc_id,char * num, char * smsc, char * msg, int charset)
-{
-  //  printf("[SIM%d]num is %s,smsc is %s,msg is %s,charset is %d\n",soc_id,num,smsc,msg,charset);
-    LYVERBLOG("[SIM%d]num is %s,smsc is %s,msg is %s,charset is %d\n",soc_id,num,smsc,msg,charset);
-}
-
-static user_cb mytest={
-    lynq_recive_new_sms_cb,
-    lynq_incoming_call_cb
-};
-
 
 static void getCallback(const char* str_arg, int int_arg )
 {
@@ -138,50 +103,21 @@
        // LYVERBLOG("+[command error]:error num = %d\n",MENU_INPUT_ERROR);
         return -1;
     }
-    if(!strcmp(module,"ril"))
-    {
-        return API_RIL;
-    }
-    else if(!strcmp(module,"gpio"))
-    {
-        return API_GPIO;
-    }
-    else if(!strcmp(module,"MQTT"))
-    {
-        return API_MQTT;
-    }
-    else if(!strcmp(module,"HTTP"))
-    {
-        return API_HTTP;
-    }
-    else if(!strcmp(module,"WIFI"))
+    if(!strcmp(module,"WIFI"))
     {
         return API_WIFI;
     }
-    else if(!strcmp(module,"GNSS"))
-    {
-        return API_GNSS;
-    }
-  //  else if(!strcmp(module, "SERVICE"))
-   // {
-  //      return API_SERVICE;
-  //  }
-      else if(!strcmp(module, "AUDIO"))
+/*
+    else if(!strcmp(module, "AUDIO"))
     {
         return API_AUDIO;
     }
-	else if(!strcmp(module,"DHCP"))
-    {
-        return API_DHCP;
-    }
-    else if(!strcmp(module,"SYSTEM"))
-    {
-        return API_SYSTEM;
-    }
+
     else if(!strcmp(module, "fota"))
     {
         return API_FOTA;
     }
+*/
     else
     {
        LYVERBLOG("+[command error]:error num = %d\n",MENU_INPUT_ERROR);
@@ -205,50 +141,19 @@
    // }
     switch(module)
     {
-        case API_RIL:
-        {
-            if(argvHead)
-            {
-                ril_test(menu[1],argvHead);
-                break;
-            }
-        }
         /* Add the code of the owner modules below*/
-        case API_GPIO:
-        {
-            gpio_test(menu[1],argvHead);
-            break;
-        }
-     //   case API_SERVICE:
-    //    {
-      //      service_test(menu[1],argvHead);
-       //     break;
-     //   }
         case API_AUDIO:
         {
-            audio_test(menu[1],argvHead);
+            //audio_test(menu[1],argvHead);
             break;
         }
-        case API_DHCP:
-        {
-            //dhcp_test(menu[1],argvHead);
-            break;
-        }
-        case API_SYSTEM:
-        {
-            system_test(menu[1],argvHead);
-            break;
-        }
-	case API_FOTA:
-	{
-		fota_test(menu[1],argvHead);		
-		break;
-	}
 
-        case API_MQTT:
-        case API_HTTP:
+		case API_FOTA:
+		{
+			//fota_test(menu[1],argvHead);		
+			break;
+		}
         case API_WIFI:
-        case API_GNSS:
             break;
         default:
           //  printf("pram module error\n");
@@ -274,7 +179,7 @@
 				LYDBGLOG("[%s-%d] argv[2] = [%s]\n", __FUNCTION__, __LINE__, argv[2]);
 				if(strlen(argv[2])){//rita add @2021.6.21 for data error
 					LYDBGLOG("[%s-%d] argv[2] = [%s]\n", __FUNCTION__, __LINE__, argv[2]);
-					send_broadcast_by_name("function", strlen(argv[2]), argv[2]);
+					//send_broadcast_by_name("function", strlen(argv[2]), argv[2]);
 				}
 				else{
 					LYVERBLOG("+[thhandle]: error num = %d\n", INVALID_CMD);
@@ -360,35 +265,11 @@
 }
 int main()
 {   
-
     LYLOGEINIT(USER_LOG_TAG);
-    LYLOGSET(4);
-    registerTriggerCallback(getCallback);
-    register_key_info();
-    lynqRegisterUnsolicitedResponse(&mytest);
+   // LYLOGSET(4);
 
     /*Check whether the modem works correctly and start the corresponding service*/  //add by liulei
     char buf[1024]={0};
-    int fd[2];
-    int backfd;
-    pipe(fd);
-    backfd=dup(STDOUT_FILENO);//备份标准输出,用于恢复
-    dup2(fd[1],STDOUT_FILENO);  //将标准输出重定向到fd[1]
-    system("cat /sys/kernel/ccci/boot");
-    read(fd[0],buf,1024);
-    dup2(backfd,STDOUT_FILENO);  //恢复标准输出
-    LYVERBLOG("this is a test :\n%s",buf);  //上面不恢复,则此处的执行结果无法再屏幕上打印
-    if(!strncmp(buf, "md1:4", 5)){
-        lynq_ril_init();
-    }
-    else{
-        printf("\033[40;31mmodem go wrong, May cause problems with your subsequent use of the service\033[0m\n");
-        printf("\033[40;31mmodem go wrong, May cause problems with your subsequent use of the service\033[0m\n");
-        printf("\033[40;31mmodem go wrong, May cause problems with your subsequent use of the service\033[0m\n");
-    }
-    /*Check whether the modem works correctly and start the corresponding service*/
-    sleep_with_restart(1);
-    register_broadcast_send();
 
     while (1) {
         char *argv[MAX_ARGS];
diff --git a/packages/apps/lynq-function-test/src/makefile b/packages/apps/lynq-function-test/src/makefile
old mode 100644
new mode 100755
index 740ad4a..69e9037
--- a/packages/apps/lynq-function-test/src/makefile
+++ b/packages/apps/lynq-function-test/src/makefile
@@ -49,13 +49,7 @@
   -I$(ROOT)$(includedir)/ \
   -I$(ROOT)$(includedir)/include  \
   -I$(ROOT)$(includedir)/logger \
-  -I$(ROOT)$(includedir)/liblynq-media \
-  -I$(ROOT)$(includedir)/liblynq-broadcast \
-  -I$(ROOT)$(includedir)/vendor-ril \
   -I$(ROOT)$(includedir)/liblog \
-  -I$(ROOT)$(includedir)/ftp \
-  -I$(ROOT)$(includedir)/liblynq-driver \
-  -I$(ROOT)$(includedir)/gstreamer-1.0 \
   -I$(ROOT)$(includedir)/glib-2.0 \
   -I$(ROOT)$(libdir)/glib-2.0/include \
   -I$(ROOT)$(libdir)/gstreamer-1.0/include\
@@ -72,13 +66,10 @@
     -llog \
     -lcutils \
     -lutils \
-    -llynq-media \
-    -lpower \
     -lbinder \
     -llynq-log \
     -lpthread \
     -lrt \
-    -llynq-driver \
     -lpal \
     -lgstreamer-1.0 \
     -lglib-2.0 \
@@ -89,15 +80,9 @@
     -ldtmf \
     -lapn \
     -ldbus-1 \
-    -llynq-broadcast \
-    -llynq-system-own \
-    -llynq-tele-ril \
-    -llynq-protcl \
-    -llynq-fota \
-    -lnandapi  \
 
-LOCAL_SRC_FILES_CPP = $(wildcard *.cpp gpio/*.cpp ril/*.cpp)
-LOCAL_SRC_FILES_C = $(wildcard *.c gps/*.c)
+LOCAL_SRC_FILES_CPP = $(wildcard *.cpp)
+LOCAL_SRC_FILES_C = $(wildcard *.c )
 EXECUTABLE = lynq-function-test
 
 OBJECTS=$(LOCAL_SRC_FILES_CPP:.cpp=.o) $(LOCAL_SRC_FILES_C:.c=.o)
diff --git a/packages/apps/lynq-function-test/src/ril_test.cpp b/packages/apps/lynq-function-test/src/ril_test.cpp
deleted file mode 100644
index eb54b0b..0000000
--- a/packages/apps/lynq-function-test/src/ril_test.cpp
+++ /dev/null
@@ -1,1770 +0,0 @@
-/*============================================================================= 

-**     FileName: ril_test.cpp

-**     Desc: about function test

-**     Author: Warren

-**     Version: V1.0

-**     LastChange: 2021-02-26 

-**     History: 

-=============================================================================*/

-#include "function_common.h"

-#include <log/log.h>

-#include <liblog/lynq_deflog.h>

-#include "libtel/lib_tele.h"

-#include <libtel/lynq_call.h>

-#include <libtel/lynq_sim.h>

-#include <libtel/lynq_network.h>

-#include <libtel/lynq_data.h>

-#include <libtel/lynq_sms.h>

-#include "ril_test.h"

-#include <cutils/properties.h>

-#include <string.h>

-#define MAX_P 1024

-RIL_COMMAND api_commands[] = {

-#include "commands.h"

-};

-static int strUpper(char * str)

-{
-    int i=0;
-    while(1)
-    {
-        if(str[i]=='\0')
-        {
-            break;
-        }
-        if(str[i]>='a'&&str[i]<='z')
-        {
-             //printf("str %c\n",str[i]-32);
-             str[i]=str[i]-32;
-        }
-        i++;
-    }
-    return 0;
-}

-

-int eventDial(char **argv)

-{

-    int32_t token;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][dial]: Please input phony number,and try again\n");

-        return -1;

-    }

-    char* addr = argv[0];

-    char output[1024] = {0};

-    lynqCallList *msg = (lynqCallList*)malloc(sizeof(lynqCallList));
-    memset(msg,0,sizeof(lynqCallList));
-    msg->addr=(char *)malloc(sizeof(char));
-    memset(msg->addr,0,sizeof(char));

-    token = lynq_call(addr, msg);

-    LYINFLOG("[MAIN_LOG] request is %d,phone number is %s,token is %x,error is %d,call_state is %d\n",

-        msg->base.request,msg->addr,msg->base.token,msg->base.e,msg->call_state);

-    if(msg->base.e!=0)

-    {

-        LYVERBLOG( "+[ril][dial]: error num = %d\n",msg->base.e);

-    }

-    else

-    {

-        LYVERBLOG( "+[ril][dial]: ok!!\n");

-    }

-    free(msg->addr);
-    msg->addr=NULL;
-    free(msg);
-    msg=NULL;

-    return 0;
-}

-

-int eventAnswer(char **argv)

-{
-    int32_t token;

-    char output[1024] = {0};

-    lynqCallList *msg = (lynqCallList*)malloc(sizeof(lynqCallList));
-    memset(msg,0,sizeof(lynqCallList));
-    msg->addr=(char *)malloc(sizeof(char));
-    memset(msg->addr,0,sizeof(char));
-    //printf("call start \n");

-    token = lynq_call_answer(msg);
-    //printf("[MAIN_LOG] request is %d,phone number is %s,token is %x,error is %d,call_state is %d\n",

-        //msg->base.request,msg->addr,msg->base.token,msg->base.e,msg->call_state);

-    LYINFLOG("[MAIN_LOG] request is %d,phone number is %s,token is %x,error is %d,call_state is %d",

-        msg->base.request,msg->addr,msg->base.request,msg->base.e,msg->call_state);

-    if(msg->base.e==0)

-    {

-        LYVERBLOG( "+[ril][an]: error num = %d\n",msg->base.e);

-    }

-    else

-    {

-        LYVERBLOG( "+[ril][an]: ok!!\n");

-    }

-    //emResultNotify(output,command);

-    free(msg->addr);
-    msg->addr=NULL;
-    free(msg);
-    msg=NULL;
-    return 0;
-}
-int eventAutoAnswer(char **argv)

-{
-    int32_t token=0;
-    int mode=0;

-    char output[1024] = {0};

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][atan]: Please input auto answer mode value:0 or 1,and try again\n");

-        return -1;

-    }

-    int status = atoi(argv[0]);

-    if(!(status==1 ||status ==0))

-    {

-        LYERRLOG("+[ril][atan]: Please input auto answer mode value:0 or 1,and try again\n");

-        return -1;

-    }

-    token = lynq_set_auto_answercall(status,&mode);

-    if(mode!=status)

-    {

-        LYVERBLOG( "+[ril][atan]: error num = %d\n",RIL_E_GENERIC_FAILURE);

-    }

-    else

-    {

-        LYVERBLOG( "+[ril][atan]: ok!!\n");

-    }

-    return 0;
-}
-int eventSetMute(char **argv)

-{
-    int32_t token = 0;
-    int status =0;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][stme]: Please input set mute mode:0 or 1,and try again!\n");

-        return -1;

-    }

-    int mute = atoi(argv[0]);

-    token = lynq_set_mute_mic(mute, &status);

-    LYINFLOG("set mute status is %s,current mute status is %s\n",mute>0?"mute on":"mute off",status>0?"mute on":"mute off");

-    if(mute!=status)

-    {

-        LYVERBLOG("+[ril][stme]: error num = %d\n",RIL_E_GENERIC_FAILURE);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][stme]: ok!!\n");

-    }

-    return 0;
-}
-int eventGetMute(char **argv)

-{
-    int32_t token = 0;
-    int status =0;

-    char output[1024] = {0};

-    token = lynq_get_mute_status(&status);
-    LYVERBLOG("+[ril][gtme]: status = %d\n",status>0?1:0);

-    LYVERBLOG("+[ril][gtme]: ok!!\n");

-    return 0;
-}
-int eventLastCallFailCause(char **argv)

-{
-    int32_t token = 0;
-    int status =0;

-    char output[1024] = {0};

-    lynqLastCallFailCause * msg = (lynqLastCallFailCause*)malloc(sizeof(lynqLastCallFailCause));
-    memset(msg,0,sizeof(lynqLastCallFailCause));
-    msg->vendor_cause = (char *)malloc(sizeof(char)*64);

-    memset(msg->vendor_cause,0,sizeof(char));
-    token = lynq_get_last_call_fail_cause(msg);
-    LYINFLOG("token is %x,request is %d,error_code is %d,cause_code is %d,vendor_cause  is %s\n",msg->base.token,

-        msg->base.request,msg->base.e,msg->cause_code,msg->vendor_cause);

-    if(msg->base.e!=0)

-    {

-        LYVERBLOG("+[ril][lcfc]: error num = %d\n",msg->base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][lcfc]: cause_code = %d,vendor_cause = %s\n",msg->cause_code,msg->vendor_cause);

-        LYVERBLOG("+[ril][lcfc]: ok!!\n");

-    }

-    free(msg->vendor_cause);
-    free(msg);
-    return 0;
-}
-int eventCallHangUp(char **argv)

-{
-    lynqBase msg;

-    char output[1024] = {0};

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][hup]: Please input call index,and try again!\n");

-        return -1;

-    }

-    int index = atoi(argv[0]);

-    lynq_call_hang_up(index,&msg);

-    //printf("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    LYINFLOG("request is %d,token is %x,error is %d",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][hup]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][hup]: ok!!\n");

-    }

-    return 0;
-}
-int eventRejectCall(char **argv)

-{
-    lynqBase msg;

-    char output[1024] = {0};

-    lynq_reject_call(&msg);
-    //printf("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][udub]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][udub]: ok!!\n");

-    }

-    return 0;
-}
-int eventSetDTMF(char **argv)

-{
-    lynqBase msg;

-    char output[1024] = {0};

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][dtmf]: Please  input DTMF value:0-9,8,#,and try again!\n");

-        return -1;

-    }

-    char value = argv[0][0];

-    lynq_set_DTMF(value,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][dtmf]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][dtmf]: ok!!\n");

-    }

-    return 0;
-}
-int eventSetDTMFVolume(char **argv)

-{
-    int32_t token =0;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][dtmfv]: Please  input DTMF volume(0-36),and try again!\n");

-        return -1;

-    }

-    int volume = atoi(argv[0]);

-    token = lynq_set_DTMF_volume(volume);

-    LYVERBLOG("+[ril][dtmfv]: ok!!\n");

-    //printf("Factory_result set DTMF Volume is %s\n",(token>0?"success":"fail"));

-    return 0;
-}
-int eventDoMultiConference(char **argv)

-{
-    lynqCallList msg;
-    msg.addr=NULL;

-    lynq_do_multi_conference(&msg);

-    LYINFLOG("request is %d,call id is %d,phone number is %s,type of address is %d,token is %x,error is %d,call_state is %d\n",

-        msg.base.request,msg.call_id,msg.addr,msg.toa,msg.base.token,msg.base.e,msg.call_state);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][dmc]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][dmc]: ok!!\n");

-    }

-    return 0;
-}
-int eventOthercallHold(char **argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][och]: Please  input call id,and try again!\n");

-        return -1;

-    }

-    int call_id = atoi(argv[0]);

-    lynq_othercall_hold(call_id,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][och]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][och]: ok!!\n");

-    }

-    return 0;
-}
-int eventHangupWatingForCall(char **argv)

-{
-    lynqCallList msg;
-    msg.addr=NULL;

-    lynq_hangup_wating_for_call(&msg);

-    LYINFLOG("[MAIN_LOG] request is %d,call id is %d,phone number is %s,type of address is %d,token is %x,error is %d,call_state is %d\n",

-        msg.base.request,msg.call_id,msg.addr,msg.toa,msg.base.token,msg.base.e,msg.call_state);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][hwc]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][hwc]: ok!!\n");

-    }

-    return 0;
-}
-int eventHangupForegroundResumeBackground(char **argv)

-{
-    lynqCallList msg;
-    msg.addr=NULL;

-    lynq_hangup_foreground_resume_background(&msg);

-    LYINFLOG("[MAIN_LOG] request is %d,call id is %d,phone number is %s,type of address is %d,token is %x,error is %d,call_state is %d\n",

-        msg.base.request,msg.call_id,msg.addr,msg.toa,msg.base.token,msg.base.e,msg.call_state);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][hfrb]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][hfrb]: ok!!\n");

-    }

-    return 0;
-}
-int eventSwitchWaitOrHoldAndActiveCall(char ** argv)

-{
-    lynqCallList msg;
-    msg.addr=NULL;

-    lynq_switch_hold_and_active_call(&msg);

-    LYINFLOG("[MAIN_LOG] request is %d,call id is %d,phone number is %s,type of address is %d,token is %x,error is %d,call_state is %d\n",

-        msg.base.request,msg.call_id,msg.addr,msg.toa,msg.base.token,msg.base.e,msg.call_state);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][swha]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][swha]: ok!!\n");

-    }

-    return 0;
-}

-

-int eventQueryOperator(char ** argv)

-{
-    operatorInfo msg;

-    msg.OperatorFN=NULL;
-    msg.OperatorSH=NULL;
-    msg.MccMnc=NULL;
-    lynq_query_operater(&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][qop]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][qop]: OperatorFN = %s,OperatorSH = %s,MccMnc = %s\n",msg.OperatorFN,msg.OperatorSH,msg.MccMnc);

-        LYVERBLOG("+[ril][qop]: ok!!\n");

-    }

-    return 0;
-}
-int eventQueryNetSelectMode(char ** argv)

-{

-    networkSelecttionMode msg;
-    lynq_query_network_selection_mode(& msg);
-    //printf("request is %d,token is %x,error is %d,mode is %d\n",msg.base.request,msg.base.token,msg.base.e,msg.mode);

-    LYINFLOG("request is %d,token is %x,error is %d,mode is %d\n",msg.base.request,msg.base.token,msg.base.e,msg.mode);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][qnsm]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][qnsm]: mode = %d\n",msg.mode);

-        LYVERBLOG("+[ril][qnsm]: ok!!\n");

-    }

-    return 0;

-}
-int eventSetNetSelectMode(char ** argv)

-{

-    char str[100]={0};

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][snsm]: Please  input network selection mode,and try again!\n");

-        return -1;

-    }

-    int mode = atoi(argv[0]);

-    const char * mccmnc = "46000";//just China Mobile Communications Group

-    lynqBase msg;

-    sprintf(str,"%s",(mode==0?"Auto":"Manual"));

-    if(mode==0)

-    {

-        lynq_set_network_selection_mode(str,NULL,&msg);

-    }

-    else if(mode ==1)

-    {

-        LYVERBLOG("+[ril][snsm]: You have selected manual mode, this command only supports CMCC SIM card temporarily");

-        lynq_set_network_selection_mode(str,mccmnc,&msg);

-    }

-    else

-    {

-        LYERRLOG("+[ril][snsm]: please input network selection mode:0 or 1,and try again\n");

-        return 0;

-    }

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][snsm]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][snsm]: ok!!\n");

-    }

-    return 0;

-}
-int eventQueryAvailableNetwork(char **argv)

-{
-    int32_t token=0;

-    availableNetwork msg;
-    msg.OperatorFN=NULL;
-    msg.OperatorSH=NULL;
-    msg.MccMnc=NULL;
-    msg.NetStatus=NULL;
-    lynq_query_available_network(&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][qan]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][qan]: OperatorFN = %s,OperatorSH = %s,MccMnc = %s,NetStatus = %s\n",msg.OperatorFN,msg.OperatorSH,msg.MccMnc,msg.NetStatus);

-        LYVERBLOG("+[ril][qan]: ok!!\n");

-    }

-    return 0;

-
-}
- int eventQueryRegistrationState(char ** argv)

-{

-    registrationStateInfo msg;
-    msg.CID=NULL;
-    msg.LAC=NULL;

-    char str[10];

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][qrs]: Please  input voice/data/ims,and try again!\n");

-        return -1;

-    }

-    char *type = argv[0];

-    if (strlen(type)>10)
-    {
-        LYERRLOG("+[ril][qrs]: the parameter is inavaliable !\n");

-        return -1;

-    }
-    memcpy(str,type,strlen(type)+1);

-    strUpper(str);

-    //printf("upper str is %s\n",str);

-    lynq_query_registration_state(str,&msg);

-    if(!strcmp(str,"VOICE")){

-        LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-        if(msg.base.e!=0)

-        {

-            LYVERBLOG("+[ril][qrs]: error num = %d\n",msg.base.e);

-        }

-        else

-        {

-            LYVERBLOG("+[ril][qrs]: registrationState = %d\n",msg.regState);

-            LYVERBLOG("+[ril][qrs]: ok!!\n");

-        }

-    }else if(!strcmp(str,"DATA")){
-

-        LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-        if(msg.base.e!=0)

-        {

-            LYVERBLOG("+[ril][qrs]: error num = %d\n",msg.base.e);

-        }

-        else

-        {

-            LYVERBLOG("+[ril][qrs]: registrationState = %d,LAC = %s,CID = %s,networkTyp = %d\n",msg.regState,msg.LAC,msg.CID,msg.netType);

-            LYVERBLOG("+[ril][qrs]: ok!!\n");

-        }

-    }else if(!strcmp(str,"IMS")){

-        LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-        if(msg.base.e!=0)

-        {

-            LYVERBLOG("+[ril][qrs]: error num = %d\n",msg.base.e);

-        }

-        else

-        {

-            LYVERBLOG("+[ril][qrs]: imsRegistrationState = %d,radioTechFamily = %d\n",msg.imsRegState,msg.radioTechFam);

-            LYVERBLOG("+[ril][qrs]: ok!!\n");

-        }

-    }else{
-        LYERRLOG("+[ril][qrs]: [%s][%d] query ims registration state about voice, data, and ims!!! \n",__FUNCTION__,__LINE__);

-        return -1;
-    }

-    return 0;
- }
- int eventQueryPrefferredNetworkType(char ** argv)

-{

-    prefferredNetworkType msg;
-    lynq_query_prefferred_networktype(&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][gpnt]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][gpnt]: pnt = %d\n",msg.pnt);

-        LYVERBLOG("+[ril][gpnt]: ok!!\n");

-    }

-    return 0;
-}
- int eventSetPrefferredNetworkType(char ** argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][spnt]: Please  input prefferrend neteork type,and try again!\n");

-        return -1;

-    }

-    int type = atoi(argv[0]);

-    lynq_set_prefferred_networktype(type,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][spnt]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][spnt]: ok!!\n");

-    }

-    return 0;
-}
-int eventQueryCellInfo(char ** argv)

-{
-    cellInfoList **msg;

-    int num=5;
-    int realNum =0;
-    int32_t token=0;
-    msg = (cellInfoList **)malloc(sizeof(cellInfoList *)*num);
-    if(msg==NULL)
-    {
-        LYERRLOG("+[ril][gcil]: malloc LYNQ_Data_Call_Response_v11 fail \n");

-        return -1;
-    }
-    for(int i =0;i<num;i++)
-    {
-        msg[i] = (cellInfoList*)malloc(sizeof(cellInfoList));
-        if (msg[i]==NULL)
-        {
-            for (int n=0;n<i;n++)
-            {
-                free(msg[n]);
-            }
-            return -1;
-        }
-        memset(msg[i],0,sizeof(cellInfoList));
-    }
-    token = lynq_query_cell_info(msg, num, &realNum);

-    LYINFLOG("+[ril][gcil]: request is %d,token is %x,e is %d\n",msg[0]->base.request,msg[0]->base.token,msg[0]->base.e);

-    if(msg[0]->base.e!=0)

-    {

-        LYVERBLOG("+[ril][gcil]: error num = %d\n",msg[0]->base.e);

-    }

-    else

-    {

-        for(int i = 0; i<realNum; i++)

-        {

-            LYVERBLOG("+[ril][gcil]: cellInfoType = %d,registered = %d,timeStampType = %d,timeStamp = %d\n",msg[i]->cellinfo.cellInfoType,msg[i]->cellinfo.registered,msg[i]->cellinfo.timeStampType,msg[i]->cellinfo.timeStamp);

-            switch(msg[i]->cellinfo.cellInfoType) {

-                case RIL_CELL_INFO_TYPE_GSM: {

-                    LYVERBLOG("+[ril][gcil]: gsm_mcc = %d,gsm_mnc = %d,gsm_lac = %d,gsm_cid = %d,gsm_signalStrength = %d,gsm_bitErrorRate%d,gsm_timingAdvance = %d\n",

-                        msg[i]->cellinfo.CellInfo.gsm.cellIdentityGsm.mcc,

-                        msg[i]->cellinfo.CellInfo.gsm.cellIdentityGsm.mnc,

-                        msg[i]->cellinfo.CellInfo.gsm.cellIdentityGsm.lac,

-                        msg[i]->cellinfo.CellInfo.gsm.cellIdentityGsm.cid,

-                        msg[i]->cellinfo.CellInfo.gsm.signalStrengthGsm.signalStrength,

-                        msg[i]->cellinfo.CellInfo.gsm.signalStrengthGsm.bitErrorRate,

-                        msg[i]->cellinfo.CellInfo.gsm.signalStrengthGsm.timingAdvance);

-                    break;

-                }

-                case RIL_CELL_INFO_TYPE_WCDMA: {

-                    LYVERBLOG("+[ril][gcil]: wcdma_mcc = %d,wcdma_mnc = %d,wcdma_lac = %d,wcdma_cid = %d,wcdma_psc = %d,wcdma_signalStrength = %d,wcdma_bitErrorRate = %d\n",

-                        msg[i]->cellinfo.CellInfo.wcdma.cellIdentityWcdma.mcc,

-                        msg[i]->cellinfo.CellInfo.wcdma.cellIdentityWcdma.mnc,

-                        msg[i]->cellinfo.CellInfo.wcdma.cellIdentityWcdma.lac,

-                        msg[i]->cellinfo.CellInfo.wcdma.cellIdentityWcdma.cid,

-                        msg[i]->cellinfo.CellInfo.wcdma.cellIdentityWcdma.psc,

-                        msg[i]->cellinfo.CellInfo.wcdma.signalStrengthWcdma.signalStrength,

-                        msg[i]->cellinfo.CellInfo.wcdma.signalStrengthWcdma.bitErrorRate);

-                    break;

-                }

-                case RIL_CELL_INFO_TYPE_CDMA: {

-                    LYVERBLOG("+[ril][gcil]: cdma_networkId = %d,cdma_systemId = %d,cdma_basestationId = %d,cdma_longitude = %d,cdma_latitude = %d,cdma_dbm = %d,cdma_ecio = %d,cdma_Evdo_dbm = %d,cdma_Evdo_ecio = %d,cdma_Evdo_signalNoiseRatio = %d\n",

-                        msg[i]->cellinfo.CellInfo.cdma.cellIdentityCdma.networkId,

-                        msg[i]->cellinfo.CellInfo.cdma.cellIdentityCdma.systemId,

-                        msg[i]->cellinfo.CellInfo.cdma.cellIdentityCdma.basestationId,

-                        msg[i]->cellinfo.CellInfo.cdma.cellIdentityCdma.longitude,

-                        msg[i]->cellinfo.CellInfo.cdma.cellIdentityCdma.latitude,

-                        msg[i]->cellinfo.CellInfo.cdma.signalStrengthCdma.dbm,

-                        msg[i]->cellinfo.CellInfo.cdma.signalStrengthCdma.ecio,

-                        msg[i]->cellinfo.CellInfo.cdma.signalStrengthEvdo.dbm,

-                        msg[i]->cellinfo.CellInfo.cdma.signalStrengthEvdo.ecio,

-                        msg[i]->cellinfo.CellInfo.cdma.signalStrengthEvdo.signalNoiseRatio);

-                    break;

-                }

-                case RIL_CELL_INFO_TYPE_LTE: {

-                    LYVERBLOG("+[ril][gcil]: lte_mcc = %d,lte_mnc = %d,lte_ci = %d,lte_pci = %d,lte_tac = %d,lte_signalStrength = %d,lte_rsrp = %d,lte_rsrq = %d,lte_rssnr = %d,lte_cqi = %d,lte_timingAdvance = %d\n",

-                        msg[i]->cellinfo.CellInfo.lte.cellIdentityLte.mcc,

-                        msg[i]->cellinfo.CellInfo.lte.cellIdentityLte.mnc,

-                        msg[i]->cellinfo.CellInfo.lte.cellIdentityLte.ci,

-                        msg[i]->cellinfo.CellInfo.lte.cellIdentityLte.pci,

-                        msg[i]->cellinfo.CellInfo.lte.cellIdentityLte.tac,

-                        msg[i]->cellinfo.CellInfo.lte.signalStrengthLte.signalStrength,

-                        msg[i]->cellinfo.CellInfo.lte.signalStrengthLte.rsrp,

-                        msg[i]->cellinfo.CellInfo.lte.signalStrengthLte.rsrq,

-                        msg[i]->cellinfo.CellInfo.lte.signalStrengthLte.rssnr,

-                        msg[i]->cellinfo.CellInfo.lte.signalStrengthLte.cqi,

-                        msg[i]->cellinfo.CellInfo.lte.signalStrengthLte.timingAdvance);

-                    break;

-                }

-                case RIL_CELL_INFO_TYPE_TD_SCDMA: {

-                    LYVERBLOG("+[ril][gcil]: tdscdma_mcc = %d,tdscdma_mnc = %d,tdscdma_lac = %d,tdscdma_cid = %d,tdscdma_cpid = %d,tdscdma_rscp = %d\n",

-                        msg[i]->cellinfo.CellInfo.tdscdma.cellIdentityTdscdma.mcc,

-                        msg[i]->cellinfo.CellInfo.tdscdma.cellIdentityTdscdma.mnc,

-                        msg[i]->cellinfo.CellInfo.tdscdma.cellIdentityTdscdma.lac,

-                        msg[i]->cellinfo.CellInfo.tdscdma.cellIdentityTdscdma.cid,

-                        msg[i]->cellinfo.CellInfo.tdscdma.cellIdentityTdscdma.cpid,

-                        msg[i]->cellinfo.CellInfo.tdscdma.signalStrengthTdscdma.rscp);

-                    break;

-                }

-                default:

-                    break;

-            }

-        }

-        LYVERBLOG("+[ril][gcil]: ok!!\n");

-    }

-    for (int i = 0; i < num; i++) 
-    {
-        if (msg[i]!=NULL)
-        {    
-            free(msg[i]);
-            msg[i]=NULL;
-        }
-    }
-    free(msg);
-    msg=NULL;
-    return 0;
-}
-int eventSetUnsolCellInfoListrate(char ** argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][sucilr]:Please  input unsolicited cell infomation list rate,and try again!\n");

-        return -1;

-    }

-    int rate = atoi(argv[0]);

-    lynq_set_unsol_cell_info_listrate(rate,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][sucilr]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][sucilr]: ok!!\n");

-    }

-    return 0;
-}
-int eventQueryNeighboringCellids(char ** argv)

-{
-    neighboringCellIDs **msg=NULL;

-    int num=5;
-    int realNum =0;
-    int32_t token=0;
-    msg = (neighboringCellIDs **)malloc(sizeof(neighboringCellIDs *)*num);
-    if(msg==NULL)
-    {
-        RLOGD("malloc LYNQ_Data_Call_Response_v11 fail \n");
-        return -1;
-    }
-    for(int i =0;i<num;i++)
-    {
-        msg[i] = (neighboringCellIDs*)malloc(sizeof(neighboringCellIDs));
-        msg[i]->cid = (char*)malloc(sizeof(char));
-        if (msg[i]==NULL)
-        {
-            for (int n=0;n<i;n++)
-            {
-                free(msg[n]->cid);
-                free(msg[n]);
-            }
-            return -1;
-        }
-        memset(msg[i],0,sizeof(neighboringCellIDs));
-    }

-    msg[0]->base.e=(RIL_Errno)(-1);

-    token = lynq_query_neighboring_cellids(msg, num, &realNum);

-    if(msg[0]->base.e!=0)

-    {

-        LYVERBLOG("+[ril][gncid]: error num = %d\n",msg[0]->base.e);

-    }

-    else

-    {

-        LYINFLOG("request is %d,token is %x,error is %d\n",msg[0]->base.request,msg[0]->base.token,msg[0]->base.e);

-        for(int i =0;i<realNum;i++)

-        {

-            LYVERBLOG("+[ril][gncid]: cid = %s,rssi = %d\n",msg[i]->cid,msg[i]->rssi);

-        }

-        LYVERBLOG("+[ril][gncid]: ok!!\n");

-    }

-    for (int i = 0; i < num; i++) 
-    {
-        if (msg[i]!=NULL)
-        {
-            free(msg[i]->cid);
-            msg[i]->cid=NULL;
-            free(msg[i]);
-            msg[i]=NULL;
-        }
-    }
-    free(msg);
-    msg=NULL;
-    return 0;
-}
-int eventSetBandMode(char ** argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][sbm]: Please  input band mode,and try again!\n");

-        return -1;

-    }

-    int mode = atoi(argv[0]);

-    lynq_set_band_mode(mode,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][sbm]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][sbm]: ok!!\n");

-    }

-    return 0;

-}
-int eventQueryAvailableBandmode(char ** argv)

-{
-    availableBandMode msg;

-    lynq_query_available_bandmode(&msg);

-    char buffer[256] = {0};

-    char element[256] = {0};

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-    if(msg.bandmode[0]>0)
-    {

-        for(int i =1;i<=msg.bandmode[0];i++)
-        {

-            sprintf(element,"%d,",msg.bandmode[i]);

-            strncat(buffer, element, strlen(element));

-        }

-        LYVERBLOG("+[ril][qabm]: availableBandMode = %s\n",buffer);

-        LYVERBLOG("+[ril][qabm]: ok!!\n",buffer);

-        return 0;

-    }

-    LYVERBLOG("+[ril][qabm]: error num = %d\n",msg.base.e);

-    LYINFLOG("available band mode is null");

-    return 0;
-}
-int eventRadioOn(char ** argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][rpo]: Please  input radio on value,0 or 1,and try again!\n");

-        return -1;

-    }

-    int state = atoi(argv[0]);

-    lynq_radio_on(state,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][rpo]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][rpo]: ok!!\n");

-    }

-    return 0;
-}
-int eventQueryRadioTech(char ** argv)

-{
-    radioTechnology msg;

-    char output[1024] = {0};

-    lynq_query_radio_tech(&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][vrt]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][vrt]: RadioTech = %d\n",msg.radioTech);

-        LYVERBLOG("+[ril][vrt]: ok!!\n");

-    }

-    return 0;
-}

-int eventSolicitedSignalStrength(char ** argv)

-{
-    solicitedSignalStrength msg;

-    lynq_solicited_signal_strength(&msg);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.base.request,msg.base.token,msg.base.e);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][sst]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][sst]: GW_signalStrength = %d,GW_bitErrorRate = %d,GW_timingAdvance = %d\n",

-            msg.signalStrength.GW_SignalStrength.signalStrength,

-            msg.signalStrength.GW_SignalStrength.bitErrorRate,

-            msg.signalStrength.GW_SignalStrength.timingAdvance);

-        LYVERBLOG("+[ril][sst]: CDMA_dbm = %d,CDMA_ecio = %d\n",

-            msg.signalStrength.CDMA_SignalStrength.dbm,

-            msg.signalStrength.CDMA_SignalStrength.ecio);

-        LYVERBLOG("+[ril][sst]: EVDO_dbm = %d,EVDO_ecio = %d,EVDO_signalNoiseRatio = %d\n",

-            msg.signalStrength.EVDO_SignalStrength.dbm,

-            msg.signalStrength.EVDO_SignalStrength.ecio,

-            msg.signalStrength.EVDO_SignalStrength.signalNoiseRatio);

-        LYVERBLOG("+[ril][sst]: LTE_signalStrength = %d,LTE_rsrp = %d,LTE_rsrq = %d,LTE_rssnr = %d,LTE_cqi = %d,LTE_timingAdvance = %d\n",

-            msg.signalStrength.LTE_SignalStrength.signalStrength,

-            msg.signalStrength.LTE_SignalStrength.rsrp,

-            msg.signalStrength.LTE_SignalStrength.rsrq,

-            msg.signalStrength.LTE_SignalStrength.rssnr,

-            msg.signalStrength.LTE_SignalStrength.cqi,

-            msg.signalStrength.LTE_SignalStrength.timingAdvance);

-        LYVERBLOG("+[ril][sst]: TD_SCDMA_signalStrength = %d,TD_SCDMA_bitErrorRate = %d,TD_SCDMA_rscp = %d\n",

-            msg.signalStrength.TD_SCDMA_SignalStrength.signalStrength,

-            msg.signalStrength.TD_SCDMA_SignalStrength.bitErrorRate,

-            msg.signalStrength.TD_SCDMA_SignalStrength.rscp);

-        LYVERBLOG("+[ril][sst]: WCDMA_signalStrength = %d,WCDMA_bitErrorRate = %d,WCDMA_rscp = %d,WCDMA_ecno = %d\n",

-            msg.signalStrength.WCDMA_SignalStrength.signalStrength,

-            msg.signalStrength.WCDMA_SignalStrength.bitErrorRate,

-            msg.signalStrength.WCDMA_SignalStrength.rscp,

-            msg.signalStrength.WCDMA_SignalStrength.ecno);

-        LYVERBLOG("+[ril][sst]: ok!!\n");

-    }

-    return 0;
-}
-int eventModemOn(char **argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][mpo]: Please  input mode on value,0 or 1,and try again!\n");

-        return -1;

-    }

-    int state = atoi(argv[0]);

-    lynq_modem_on(state,&msg);

-    //printf("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][mpo]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][mpo]: ok!!\n");

-    }

-    return 0;
-}

-int eventSetupDataCall(char ** argv)

-{
-    int32_t token;

-    int state=0;
-    token = lynq_data_enable_data(&state);
-    //printf("pdn state is %s\n",state<0?"disconnect":"connect");

-    if(state<0)

-    {

-        LYVERBLOG("+[ril][edc]: error num = %d\n",RIL_E_GENERIC_FAILURE);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][edc]: ok!!\n");

-    }

-    return 0;
-}
-int eventDeactiveDataCall(char ** argv)

-{
-    int32_t token;
-    int state=0;

-    token = lynq_data_dectivate_data_call(&state);

-    LYVERBLOG("+[ril][ddc]: ok!!\n");

-    //printf("Factory_result pdn state is %s\n",state<0?"connect":"disconnect");

-    return 0;
-}
-int eventGetDataCalllist(char ** argv)

-{
-    int32_t token=0;

-    int num=5;
-    int realNum=0;
-    LYNQ_Data_Call_Response_v11 **msg=(LYNQ_Data_Call_Response_v11**)malloc(sizeof(LYNQ_Data_Call_Response_v11*)*num);
-    if (msg == NULL)
-    {
-        LYERRLOG("+[ril][gdcl]: malloc LYNQ_Data_Call_Response_v11 fail \n");

-        return -1;
-    }
-    for(int i =0;i<num;i++)
-    {
-        msg[i] = (LYNQ_Data_Call_Response_v11*)malloc(sizeof(LYNQ_Data_Call_Response_v11));
-        if (msg[i]==NULL)
-        {
-            for (int n=0;n<i;n++)
-            {
-                free(msg[n]);
-            }
-            return -1;
-        }
-        memset(msg[i],0,sizeof(LYNQ_Data_Call_Response_v11));
-    }
-    token = lynq_get_data_call_list(msg, num,&realNum);

-    /*

-    for(int i = 0; i<realNum; i++)
-    {

-        printf("status is %d,\nsuggestedRetryTime is %d,\ncid is %d,\nactive is %d,\nmtu is %d\n",msg[i]->status,msg[i]->suggestedRetryTime,msg[i]->cid,msg[i]->active,msg[i]->mtu);
-        printf("type is %s\n",msg[i]->type);
-        printf("ifname is %s\n",msg[i]->ifname);
-        printf("addresses is %s\n",msg[i]->addresses);
-        printf("dnses is %s\n",msg[i]->dnses);
-        printf("gateways is %s\n",msg[i]->gateways);
-        printf("pcscf is %s\n",msg[i]->pcscf);
-    }

-    */

-    if(realNum>0)

-    {

-    

-        //printf("Factory_result error code 1\n");

-        for(int i = 0; i<realNum; i++)

-        {

-            LYVERBLOG("+[ril][gdcl]: status = %d,suggestedRetryTime = %d,cid = %d,active = %d,mtu = %d\n",msg[i]->status,msg[i]->suggestedRetryTime,msg[i]->cid,msg[i]->active,msg[i]->mtu);

-            LYVERBLOG("+[ril][gdcl]: type = %s,ifname = %s,addresses = %s,dnses = %s,gateways = s%,pcscf = %s\n",msg[i]->type,msg[i]->ifname,msg[i]->addresses,msg[i]->dnses,msg[i]->gateways,msg[i]->pcscf);

-        }

-        LYVERBLOG("+[ril][gdcl]: ok!!\n");

-    }

-    else

-    {

-        LYVERBLOG("+[ril][gdcl]: error num = %d\n",RIL_E_GENERIC_FAILURE);

-    }

-    for (int i = 0; i < num; i++) 
-    {
-        if (msg[i]!=NULL)
-        {    
-            free(msg[i]);
-            msg[i]=NULL;
-        }
-    }
-    free(msg);
-    msg=NULL;
-    return 0;

-}
-

-int eventGetSimStatus(char ** argv)

-{
-    static int32_t token=0;

-    simStatus * sim_status=NULL;
-    sim_status = (simStatus *)malloc(sizeof(simStatus));
-    token = lynq_get_sim_status(sim_status);

-    LYINFLOG("card_status:%d,card_type:%d,pin_state:%d,error_code:%d,request:%d,token:%x\n",sim_status->card_status,

-        sim_status->card_type,sim_status->pin_state,sim_status->base.e,sim_status->base.request,sim_status->base.token);

-    if(sim_status->base.e!=0)

-    {

-        LYVERBLOG("+[ril][gss]: error num = %d\n",sim_status->base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][gss]: card_status = %d,card_type = %d,pin_state = %d\n",sim_status->card_status,

-        sim_status->card_type,sim_status->pin_state);

-        LYVERBLOG("+[ril][gss]: ok!!\n");

-    }

-    if (sim_status->base.e==-1)

-    {
-        free(sim_status);
-        sim_status=NULL;
-        return -1;
-    }
-    free(sim_status);
-    sim_status=NULL;
-    return 0;
-}
-int eventGetImsi(char ** argv)

-{
-    simImsi msg;

-    lynq_get_imsi(&msg);
-    //printf("request is %d, token is %x,error_code %d,imsi is %s\n",msg.base.request,msg.base.token, msg.base.e,msg.imsi);

-    LYINFLOG("request is %d, token is %x,error_code %d,imsi is %s\n",msg.base.request,msg.base.token, msg.base.e,msg.imsi);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][gimsi]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][gimsi]: imsi = %s\n",msg.imsi);

-        LYVERBLOG("+[ril][gimsi]: ok!!\n");

-    }

-    if (msg.base.e==-1)

-    {
-        return -1;
-    }
-    return 0;
-}

-int eventSendSms(char ** argv)

-{
-    int32_t token=0;

-    if(argv[0]==NULL||argv[1]==NULL)

-    {

-        LYERRLOG("+[ril][ssm: Please  input telephonyNumber and message,and try again!\n");

-        return -1;

-    }

-    char *telephonyNumber = argv[0];

-    char *msgcont = argv[1];

-    smsResponse msg;
-    msg.smsResp.ackPDU=NULL;

-    //const char *telephonyNumber ="10086";

-    //const char * msgcont = "103";

-    token = lynq_send_sms(telephonyNumber, 0,msgcont, NULL,&msg);

-    //printf("request is %d,token is %x,error is %d,\nmessageRef is %d,ackPDU is %s,errorCode is %d\n",msg.base.request,msg.base.token,msg.base.e,

-        //msg.smsResp.messageRef,msg.smsResp.ackPDU,msg.smsResp.errorCode);

-    LYINFLOG("request is %d,token is %x,error is %d,messageRef is %d,ackPDU is %s,errorCode is %d\n",msg.base.request,msg.base.token,msg.base.e,

-        msg.smsResp.messageRef,msg.smsResp.ackPDU,msg.smsResp.errorCode);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][ssm]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][ssm]: ok!!\n");

-    }

-    return 0;
-}
-int eventImsSendSms(char ** argv)

-{
-    int32_t token=0;

-    smsResponse msg;

-    if(argv[0]==NULL||argv[1]==NULL)

-    {

-        LYERRLOG("+[ril][iss]:Please  input telephonyNumber and message,and try again!\n");

-        return -1;

-    }

-    char *telephonyNumber = argv[0];

-    char *msgcont = argv[1];

-    msg.smsResp.ackPDU=NULL;

-    //const char *telephonyNumber ="10086";

-    //const char * msgcont = "103";

-    const char* retryNum ="0";

-    const char *messageRef = "201";

-    token = lynq_Ims_send_sms(telephonyNumber, 0,msgcont,retryNum,messageRef, NULL,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d,messageRef is %d,ackPDU is %s,errorCode is %d\n",msg.base.request,msg.base.token,msg.base.e,

-        msg.smsResp.messageRef,msg.smsResp.ackPDU,msg.smsResp.errorCode);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][iss]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][iss]: ok!!\n");

-    }

-    return 0;
-}
-int eventWriteSmsToSim(char ** argv)

-{
-    int32_t token=0;

-    messageStoreInfo msg;

-    if(argv[0]==NULL||argv[1]==NULL||argv[2]==NULL)

-    {

-        LYERRLOG("+[ril][wsts]: Please  input telephonyNumber,message and sms status,and try again!\n");

-        return -1;

-    }

-    const int smsStatus = atoi(argv[0]);

-    const char *recPhonNum = argv[1];

-    const char *msgcont = argv[2];

-    token = lynq_write_sms_to_sim(smsStatus,recPhonNum,0,msgcont,NULL,&msg);

-    LYINFLOG("request is %d,token is %x,error is %d,\nmessage strore index is %d\n",msg.base.request,msg.base.token,msg.base.e,

-        msg.msgStoreIndex);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][wsts]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][wsts]: ok!!\n");

-    }

-    return 0;
-}
-int eventReportSmsMemoryStatus(char **argv)

-{
-    lynqBase msg;

-    char output[1024] = {0};

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][rsms]: Please  input memory status,0 or 1,and try again!\n");

-        return -1;

-    }

-    int value = atoi(argv[0]);

-    lynq_report_sms_memory_status(value,&msg);

-    //printf("request is %d,token is %x,error is %d,\n",msg.request,msg.token,msg.e);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][rsms]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][rsms]: ok!!\n");

-    }

-    return 0;
-}
-int eventDeletSmsOnSim(char **argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][dsos]: Please  input sms index,and try again!\n");

-        return -1;

-    }

-    int value = atoi(argv[0]);

-    lynq_delet_sms_on_sim(value,&msg);

-    //printf("request is %d,token is %x,error is %d,\n",msg.request,msg.token,msg.e);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][dsos]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][dsos]: ok!!\n");

-    }

-    return 0;
-}
-int eventGetSmscAddress(char **argv)

-{
-    smscCbInfo msg;

-    lynq_get_smsc_address(&msg);
-    //printf("request is %d,token is %x,error is %d,smsc address is %s\n",msg.base.request,msg.base.token,msg.base.e,msg.smsc);

-    LYINFLOG("request is %d,token is %x,error is %d,smsc address is %s\n",msg.base.request,msg.base.token,msg.base.e,msg.smsc);

-    if(msg.base.e!=0)

-    {

-        LYVERBLOG("+[ril][gsmsc]: error num = %d\n",msg.base.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][gsmsc]: smsc = %s\n",msg.smsc);

-        LYVERBLOG("+[ril][gsmsc]: ok!!\n");

-    }

-    return 0;
-}
-int eventSetSmscAddress(char **argv)

-{
-    lynqBase msg;

-    if(argv[0]==NULL)

-    {

-        LYERRLOG("+[ril][ssmsc]: Please  input smsc address,and try again!\n");

-        return -1;

-    }

-    const char* serviceNumber = argv[0];

-    lynq_set_smsc_address(serviceNumber,&msg);

-    //printf("request is %d,token is %x,error is %d,\n",msg.request,msg.token,msg.e);

-    LYINFLOG("request is %d,token is %x,error is %d\n",msg.request,msg.token,msg.e);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][ssmsc]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][ssmsc]: ok!!\n");

-    }

-    return 0;

-}

-int evenStoreSmsToMemory(char **argv)

-{
-    lynqBase msg;

-    msg.e = (RIL_Errno)(-1);

-    //printf("argv[2]%d,argv[3]%s,argv[4]%s\n",atoi(argv[2]), argv[3],argv[4]);

-    lynq_store_sms_to_memory(RIL_SOCKET_1,atoi(argv[0]), argv[1],argv[2],&msg);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][sstm]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][sstm]: ok!!\n");

-    }

-    return 0;
-}
-int eventGetSmsFromMemory(char **argv)

-{
-    lynqBase msg;
-    msg.e = (RIL_Errno)(-1);
-    storeMessageInfo sms;

-    lynq_get_sms_from_memory(atoi(argv[0]),&sms, &msg);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][gstfm]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][gsfm]: Index = %d,Message = %s,Status = %d,teleNum= %s\n",sms.index,sms.message,sms.status,sms.teleNum);

-        LYVERBLOG("+[ril][gsfm]: ok!!\n");

-    }

-    return 0;
-}
-int eventDeleteMessageFromMemory(char **argv)

-{
-    lynqBase msg;

-    msg.e = (RIL_Errno)(-1);

-    lynq_delete_message_from_memory(atoi(argv[0]), &msg);

-    if(msg.e!=0)

-    {

-        LYVERBLOG("+[ril][dmfm]: error num = %d\n",msg.e);

-    }

-    else

-    {

-        LYVERBLOG("+[ril][dmfm]: ok!!\n");

-    }

-    return 0;
-}

-

-//int callController(int *item, char *value,int command);

-//int networkcontroller(int *item, char *value,int command);

-//int datacontroller(int *item, char *value,int command);

-//int simcontroller(int *item, char *value,int command);

-//int smscontroller(int *item, char *value,int command);

-

-int ril_test(char *api,char *string) {

-    char *argv[MAX_P] = {0};

-    parseParameters(string,argv);

-    RIL_COMMAND *command = find_command(api,api_commands);

-    if(command)

-    {

-        (*(command->func)) (argv);

-    }

-    else

-    {

-        LYERRLOG("Can not find this command from function_test!!!\n");

-    }

-    /*

-    switch (module) {

-        case CALL_API:

-        {

-            callController(menu[1],argv);

-            break;

-        }

-        case NETWORK_API:

-        {

-            networkcontroller(menu[1],argv);

-            break;

-        }

-        case DATA_API:

-        {

-            datacontroller(menu[1],argv);

-            break;

-        }

-        case SMS_API:

-        {

-            smscontroller(menu[1],argv);

-            //RLOGD("test_api,RIL_API");

-            break;

-        }

-        case SIM_API:

-        {

-            simcontroller(menu[1],argv);

-            break;

-        }

-        default:

-            break;

-    }

-    */

-    return 0;

-}

-/*

-int callController(char *api,char **param)

-{

-    char output[1024] = {0};

-    RIL_COMMAND *command = find_command(api,api_commands);

-    (*(command->func)) (param);

-    

-    switch(call_api_choice)

-    {

-        case DAIL:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventDial(argv[1],command);

-            }

-            else

-            {

-                printf("please input inavaliable call number,and try again!\n");

-                emResultNotify(output,command);

-            }

-            

-            //eventDial(item[4],command);

-            //printf("please input inavaliable call number,and try again!\n");

-            //emResultNotify(output,command);

-            

-            break;

-        }

-        case ANSWER_CALL:

-        {

-            eventAnswer(command);

-            break;

-        }

-        case HANGUP_CALL:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventCallHangUp(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                printf("please input call id,and try again!\n");

-                emResultNotify(output ,command);

-            }

-            break;

-        }

-        case REJECT_CALL:

-        {

-            eventRejectCall(command);

-            break;

-        }

-        case AUTO_ANSWER_CALL:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventAutoAnswer(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input auto answer mode value:0 or 1,and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case SET_MUTE_STATUS:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetMute(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input set mute mode:0 or 1,and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case GET_MUTE_STATUS:

-        {

-            eventGetMute(command);

-            break;

-        }

-        case SET_DTMF:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetDTMF(argv[1][0],command);

-            }

-            else

-            {

-                sprintf(output,"please input DTMF value:0-9,8,#,and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case SET_DTMF_V:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetDTMFVolume(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input volume value,0-36,and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case DO_MULTI_CONF:

-        {

-            eventDoMultiConference(command);

-            break;

-        }

-        case OTHER_CALL_HOLD:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventOthercallHold(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input call id, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case HANGUP_WAITING_CALL:

-        {

-            eventHangupWatingForCall(command);

-            break;

-        }

-        case HANGUP_FORE_RES_BACK:

-        {

-            eventHangupForegroundResumeBackground(command);

-            break;

-        }

-        case SWITCH_HOLD_AND_ACTIVE_CALL:

-        {

-            eventSwitchWaitOrHoldAndActiveCall(command);

-            break;

-        }

-        case GET_LAST_CALL_FAIL_CAUSE:

-        {

-            eventLastCallFailCause(command);

-            break;

-        }

-        default:

-            break;

-    }

-    return 0;

-}

-int networkcontroller(char *api,char **param)

-{

-    int network_api_choice = item[3];

-    char output[1024] = {0};

-    switch(network_api_choice)

-    {

-        case QUERY_OPERATOR:

-        {

-            eventQueryOperator(command);

-            break;

-        }

-        case QUERY_NETWORK_SELECTION_MODE:

-        {

-            eventQueryNetSelectMode(command);

-            break;

-        }

-        case SET_NETWORK_SELECTION_MODE:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetNetSelectMode(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input network selection mode 0 or 1, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case QUERY_AVAILABLE_NETWORKS:

-        {

-            eventQueryAvailableNetwork(command);

-            break;

-        }

-        case QUERY_REGISTRATION_STATE:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventQueryRegistrationState(argv[1],command);

-            }

-            else

-            {

-                sprintf(output,"please input type voice,data,or ims, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case GET_PREFERRED_NETWORK_TYPE:

-        {

-            eventQueryPrefferredNetworkType(command);

-            break;

-        }

-        case SET_PREFERRED_NETWORK_TYPE:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetPrefferredNetworkType(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input preferred network type value , and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case GET_CELL_INFO_LIST:

-        {

-            eventQueryCellInfo(command);

-            break;

-        }

-        case SET_UNSOL_CELL_INFO_LIST_RATE:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetUnsolCellInfoListrate(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input unsolicited cell infomation list rate , and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case GET_NEIGHBORING_CELL_IDS:

-        {

-            eventQueryNeighboringCellids(command);

-            break;

-        }

-        case SET_BAND_MODE:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetBandMode(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input band mode, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case QUERY_AVAILABLE_BAND_MODE:

-        {

-            eventQueryAvailableBandmode(command);

-            break;

-        }

-        case RADIO_POWER:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventRadioOn(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input radio power status value 0 or 1, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case VOICE_RADIO_TECH:

-        {

-            eventQueryRadioTech(command);

-            break;

-        }

-        case SIGNAL_STRENGTH:

-        {

-            eventSolicitedSignalStrength(command);

-            break;

-        }

-        case MODEM_POWER:

-        {

-            int num=0;

-            char *argv[2]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventModemOn(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input modem power status value 0 or 1, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        default:

-            break;

-    }

-    return 0;

-}

-int datacontroller(char *api,char **param)

-{

-    int data_api_choice = item[3];

-    char output[1024] = {0};

-    switch(data_api_choice)

-    {

-        case SETUP_DATA_CALL:

-        {

-            eventSetupDataCall(command);

-            break;

-        }

-        case DEACTIVATE_DATA_CALL:

-        {

-            eventDeactiveDataCall(command);

-            break;

-        }

-        case GET_DATA_CALL_LIST:

-        {

-            eventGetDataCalllist(command);

-            break;

-        }

-        default:

-            break;

-    }

-    return 0;

-}

-int simcontroller(char *api,char **param)

-{

-    int sim_api_choice = item[3];

-    char output[1024] = {0};

-    switch(sim_api_choice)

-    {

-        case GET_SIM_STATUS:

-        {

-            eventGetSimStatus(command);

-            break;

-        }

-        case GET_IMSI:

-        {

-            eventGetImsi(command);

-            break;

-        }

-        default:

-            break;

-    }

-    return 0;

-}

-int smscontroller(int *item, char *value,int command)

-{

-    int sms_api_choice = item[3];

-    char output[1024] = {0};

-    switch(sms_api_choice)

-    {

-        case SEND_SMS:

-        {

-            int num=0;

-            char *argv[MAX_P]={0};

-            if(num==parseParam(2, value,argv))

-            {

-                eventSendSms(argv[1], argv[2],command);

-            }

-            else

-            {

-                sprintf(output,"please input phone number and message, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case IMS_SEND_SMS:

-        {

-            int num=0;

-            char *argv[MAX_P]={0};

-            if(num==parseParam(2, value,argv))

-            {

-                eventImsSendSms(argv[1], argv[2],command);

-            }

-            else

-            {

-                sprintf(output,"please input phone number and message, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case WRITE_SMS_TO_SIM:

-        {

-            int num=0;

-            char *argv[MAX_P]={0};

-            if(num==parseParam(3, value,argv))

-            {

-                eventWriteSmsToSim(atoi(&argv[1][0]),argv[2], argv[3],command);

-            }

-            else

-            {

-                sprintf(output,"please input sms status,phone number and message, and try again!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case REPORT_SMS_MEMORY_STATUS:

-        {

-            int num=0;

-            char *argv[MAX_P]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventReportSmsMemoryStatus(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input memory status 0 or 1,and try agin!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case DELETE_SMS_ON_SIM:

-        {

-            int num=0;

-            char *argv[MAX_P]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventDeletSmsOnSim(atoi(&argv[1][0]),command);

-            }

-            else

-            {

-                sprintf(output,"please input sms index,and try agin!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-        case GET_SMSC_ADDRESS:

-        {

-            eventGetSmscAddress(command);

-            break;

-        }

-        case SET_SMSC_ADDRESS:

-        {

-            int num=0;

-            char *argv[MAX_P]={0};

-            if(num==parseParam(1, value,argv))

-            {

-                eventSetSmscAddress(argv[1],command);

-            }

-            else

-            {

-                sprintf(output,"please input serviceNumber,and try agin!\n");

-                emResultNotify(output,command);

-            }

-            break;

-        }

-    }

-    return 0;

-}

-*/

-

-

diff --git a/packages/apps/lynq-function-test/src/ril_test.h b/packages/apps/lynq-function-test/src/ril_test.h
deleted file mode 100644
index 7b1aa66..0000000
--- a/packages/apps/lynq-function-test/src/ril_test.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*============================================================================= 

-**     FileName: ril_test.h

-**     Desc: about function test

-**     Author: Warren

-**     Version: V1.0

-**     LastChange: 2021-02-26 

-**     History: 

-=============================================================================*/

-

-#ifndef __LYNQ_RIL_TEST_H__

-#define __LYNQ_RIL_TEST_H__

-typedef enum {
-   SIM_API  = 0,

-   CALL_API,

-   NETWORK_API,
-   DATA_API,
-   SMS_API,

-}RIL_API_MENU;

-

-typedef enum{
-    DAIL= 0,
-    ANSWER_CALL,
-    HANGUP_CALL,
-    REJECT_CALL,
-    AUTO_ANSWER_CALL,
-    SET_MUTE_STATUS,
-    GET_MUTE_STATUS,
-    SET_DTMF,
-    SET_DTMF_V,
-    DO_MULTI_CONF,
-    OTHER_CALL_HOLD,
-    HANGUP_WAITING_CALL,
-    HANGUP_FORE_RES_BACK,
-    SWITCH_HOLD_AND_ACTIVE_CALL,
-    GET_LAST_CALL_FAIL_CAUSE,
-}RIL_CALL_MENU;
-
-typedef enum
-{
-    QUERY_OPERATOR=0,
-    QUERY_NETWORK_SELECTION_MODE,
-    SET_NETWORK_SELECTION_MODE,
-    QUERY_AVAILABLE_NETWORKS,
-    QUERY_REGISTRATION_STATE,
-    GET_PREFERRED_NETWORK_TYPE,
-    SET_PREFERRED_NETWORK_TYPE,
-    GET_CELL_INFO_LIST,
-    SET_UNSOL_CELL_INFO_LIST_RATE,
-    GET_NEIGHBORING_CELL_IDS  ,
-    SET_BAND_MODE,
-    QUERY_AVAILABLE_BAND_MODE,
-    RADIO_POWER,
-    VOICE_RADIO_TECH,
-    SIGNAL_STRENGTH,
-    MODEM_POWER,
-}RIL_NETWORK_MENU;
-
-typedef enum{
-    SETUP_DATA_CALL=0,
-    DEACTIVATE_DATA_CALL,
-    GET_DATA_CALL_LIST,
-}RIL_DATA_MENU;
-
-typedef enum{
-    GET_SIM_STATUS=0,
-    GET_IMSI,
-}RIL_SIM_MENU;
-
-typedef enum{
-    SEND_SMS=0,
-    IMS_SEND_SMS,
-    WRITE_SMS_TO_SIM,
-    REPORT_SMS_MEMORY_STATUS,
-    DELETE_SMS_ON_SIM,
-    GET_SMSC_ADDRESS,
-    SET_SMSC_ADDRESS,
-}RIL_SMS_MENU;
-int eventDial(char **argv);

-int eventAnswer(char **argv);

-int eventAutoAnswer(char **argv);

-int eventSetMute(char **argv);

-int eventGetMute(char **argv);

-int eventLastCallFailCause(char **argv);

-int eventCallHangUp(char **argv);

-int eventRejectCall(char **argv);

-int eventSetDTMF(char **argv);

-int eventSetDTMFVolume(char **argv);

-int eventDoMultiConference(char **argv);

-int eventOthercallHold(char **argv);

-int eventHangupWatingForCall(char **argv);

-int eventHangupForegroundResumeBackground(char **argv);

-int eventSwitchWaitOrHoldAndActiveCall(char ** argv);

-int eventQueryOperator(char ** argv);

-int eventQueryNetSelectMode(char ** argv);

-int eventSetNetSelectMode(char ** argv);

-int eventQueryAvailableNetwork(char **argv);

-int eventQueryRegistrationState(char ** argv);

-int eventQueryPrefferredNetworkType(char ** argv);

-int eventSetPrefferredNetworkType(char ** argv);

-int eventQueryCellInfo(char ** argv);

-int eventSetUnsolCellInfoListrate(char ** argv);

-int eventQueryNeighboringCellids(char ** argv);

-int eventSetBandMode(char ** argv);

-int eventQueryAvailableBandmode(char ** argv);

-int eventRadioOn(char ** argv);

-int eventQueryRadioTech(char ** argv);

-int eventSolicitedSignalStrength(char ** argv);

-int eventModemOn(char **argv);

-int eventSetupDataCall(char ** argv);

-int eventDeactiveDataCall(char ** argv);

-int eventGetDataCalllist(char ** argv);

-int eventGetSimStatus(char ** argv);

-int eventGetImsi(char ** argv);

-int eventSendSms(char ** argv);

-int eventImsSendSms(char ** argv);

-int eventWriteSmsToSim(char ** argv);

-int eventReportSmsMemoryStatus(char **argv);

-int eventDeletSmsOnSim(char **argv);

-int eventGetSmscAddress(char **argv);

-int eventSetSmscAddress(char **argv);

-int evenStoreSmsToMemory(char **argv);

-int eventGetSmsFromMemory(char **argv);

-int eventDeleteMessageFromMemory(char **argv);

-

-

-int ril_test(char *api,char *string);

-
-
-#endif //__LYNQ_RIL_TEST_H__
-

diff --git a/packages/apps/lynq-function-test/src/system_test.cpp b/packages/apps/lynq-function-test/src/system_test.tmp
old mode 100644
new mode 100755
similarity index 100%
rename from packages/apps/lynq-function-test/src/system_test.cpp
rename to packages/apps/lynq-function-test/src/system_test.tmp