Files
openairinterface5g/targets/TEST/AT_COMMANDS/oaisim.c
T
Lionel Gauthier 059a0a3fdc astyle --recursive --indent=spaces=2 --style=kr --indent-col1-comments --break-blocks --convert-tabs --max-code-length=200
This is done for better merging branch/LG_PRE_RELEASE_0.3 into trunk (same process is applied on this branch)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7073 818b1a75-f10b-46b9-bf7c-635c3b92a50f
2015-04-09 09:29:12 +00:00

62 lines
2.0 KiB
C
Executable File

#include <string.h>
#include <math.h>
#include <unistd.h>
#include "SIMULATION/TOOLS/defs.h"
#include "SIMULATION/RF/defs.h"
#include "PHY/types.h"
#include "PHY/defs.h"
#include "PHY/vars.h"
#include "MAC_INTERFACE/vars.h"
#include "LAYER2/RLC/AM_v9.3.0/rlc_am.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/vars.h"
#include "UTIL/LOG/log_if.h"
#include "UTIL/LOG/log_extern.h"
#include "RRC/LITE/vars.h"
#include "PHY_INTERFACE/vars.h"
#include "UTIL/OCG/OCG.h"
#include "UTIL/AT_COMMANDS/parser.h"
mapping level_names[] = {
{"emerg", LOG_EMERG},
{"alert", LOG_ALERT},
{"crit", LOG_CRIT},
{"err", LOG_ERR},
{"warn", LOG_WARNING},
{"notice", LOG_NOTICE},
{"info", LOG_INFO},
{"debug", LOG_DEBUG},
{"trace", LOG_TRACE},
{NULL, -1}
};
int main(int argc, char **argv)
{
char * g_log_level="trace"; // by default global log level is set to trace
//initialize the log generator
logInit(map_str_to_int(level_names, g_log_level));
LOG_T(LOG,"global log level is set to %s \n",g_log_level );
at_parse_init(at_null_callback_handler, mt_null_attach_state_request_handler, mt_null_attach_request_handler, mt_null_detach_request_handler);
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
at_parse_string("AT+CGATT=?\r");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
at_parse_string("AT+CGATT?\r");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
at_parse_string("AT+CGATT?\r");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
at_parse_string("AT+CGATT?\r");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
at_parse_string("AT+CGATT?\r");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
at_parse_string("AT+CGATT=1\r");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
at_parse_string("AT+CGATT=0\r");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
return(0);
}