static size_t current_test; /* Extern data to please the underlying code */ void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; extern void test_replay_gprs_attach(struct gprs_bssgp_pcu *pcu); extern void test_replay_gprs_data(struct gprs_bssgp_pcu *, struct msgb *, struct tlv_parsed *); extern void test_pdp_activation_start(struct gprs_bssgp_pcu *pcu); extern void test_pdp_activation_data(struct gprs_bssgp_pcu *, struct msgb *, struct tlv_parsed*); struct gprs_test all_tests[] = { gprs_test("gprs_attach_with_tmsi", "A simple test that verifies that N(U) is " "increasing across various messages. This makes " "sure that no new LLE/LLME is created on the fly.", test_replay_gprs_attach, test_replay_gprs_data), gprs_test("gprs_full_attach_pdp_activation", "A simple test to do a GPRS attach and open a PDP " "context. Then goes to sleep and waits for you to ping " "the connection and hopefully re-produce a crash.", test_pdp_activation_start, test_pdp_activation_data), }; static void init_main_bts() { struct gprs_rlcmac_bts *bts = bts_main_data(); bts->fc_interval = 100; bts->initial_cs_dl = bts->initial_cs_ul = 1;
/***************************************************************** 函数原型:main() 功能描述:主函数 参数描述: 返回值: 无 作 者: 刘及华 日 期: 2012-11-24 修改历史: 日期 修改人 修改描述 ------ --------- ------------- *****************************************************************/ int main(int argc, char **argv) { INT8U ret = 0; char mainflag = 1; uchar uckey; uint uikey; (void)EA_ucSetStopFlag( EM_DISABLE_STOP ); //不允许系统进入睡眠状态; reboot: ret = System_Init(); //系统初始化,包括PSAM,参数表,GPRS初始化 if( ret != ok ) { lcddisperr("系统初始化失败!"); goto reboot; } Beep(1000); //(void)EA_ucSetStopFlag( EM_ENABLE_STOP ); //允许系统进入睡眠状态; for ( ;; ) { if( mainflag == 1 ) { DisplayWelcomeMenu(); mainflag = 0; } uckey = EA_ucKBHit(); if(uckey == EM_key_HIT) //有按键 { uikey = EA_uiInkey(0); //读取按键键值 switch ( uikey ) { case EM_key_EXIT: //关机 { mainflag = 1; goto shutdown; break; } case EM_key_F3: { Login(); //登录界面 mainflag = 1; break; } case EM_key_F1: { Parm_Setting(); //参数设置 mainflag = 1; break; } case EM_key_1: { gprs_test(); //无线连接测试 mainflag = 1; break; } case EM_key_F2: { kuaijiefangshi(); //快捷方式 // Gprs_Upload_data(); // GPRS_Close(); mainflag = 1; break; } default: break; } } } shutdown: Power_Down(); }