⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cal_com.c

📁 Atheros AP Test with Agilent N4010A source code
💻 C
📖 第 1 页 / 共 5 页
字号:
			else if(strnicmp("START_ETHERNET_PORT", pLine, strlen("START_ETHERNET_PORT")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &CalSetup.startEthernetPort)) {
					uiPrintf("Unable to read the START_ETHERNET_PORT from %s\n", eep_file);
				}
			}
		   else if(strnicmp("TURBO_DISABLE", pLine, strlen("TURBO_DISABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the TURBO_DISABLE from %s\n", eep_file);
				}
				else {
					CalSetup.turboDisable = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("11g_TURBO_DISABLE", pLine, strlen("11g_TURBO_DISABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the 11g_TURBO_DISABLE from %s\n", eep_file);
				}
				else {
					CalSetup.turboDisable_11g = (testVal) ? TRUE : FALSE;
				}
			}

		   else if(strnicmp("UART_ENABLE", pLine, strlen("UART_ENABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the UART_ENABLE from %s\n", eep_file);
				}
				else {
					CalSetup.uartEnable = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("DISABLE_DYNAMIC_EAR", pLine, strlen("DISABLE_DYNAMIC_EAR")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the DISABLE_DYNAMIC_EAR from %s\n", eep_file);
				}
				else {
					//reverse the flag entered by user (disable) to internal enable flag
					CalSetup.enableDynamicEAR = (testVal) ? FALSE : TRUE;
				}
			}
		   else if(strnicmp("XR_DISABLE", pLine, strlen("XR_DISABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the XR_DISABLE from %s\n", eep_file);
				}
				else {
					CalSetup.xrDisable = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("COMPRESSION_DISABLE", pLine, strlen("COMPRESSION_DISABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the COMPRESSION_DISABLE from %s\n", eep_file);
				}
				else {
					CalSetup.compressionDisable = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("AES_DISABLE", pLine, strlen("AES_DISABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the AES_DISABLE from %s\n", eep_file);
				}
				else {
					CalSetup.aesDisable = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("ENABLE_HEAVY_CLIP", pLine, strlen("ENABLE_HEAVY_CLIP")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the ENABLE_HEAVY_CLIP from %s\n", eep_file);
				}
				else {
					CalSetup.enableHeavyClip = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("FAST_FRAME_DISABLE", pLine, strlen("FAST_FRAME_DISABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the FAST_FRAME_DISABLE from %s\n", eep_file);
				}
				else {
					CalSetup.fastFrameDisable = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("BURSTING_DISABLE", pLine, strlen("BURSTING_DISABLE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the BURSTING_DISABLE from %s\n", eep_file);
				}
				else {
					CalSetup.burstingDisable = (testVal) ? TRUE : FALSE;
				}
			}
		   else if(strnicmp("MAX_NUM_QCU", pLine, strlen("MAX_NUM_QCU")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &CalSetup.maxNumQCU)) {
					uiPrintf("Unable to read the MAX_NUM_QCU from %s\n", eep_file);
				}
			}
		   else if(strnicmp("KEY_CACHE_SIZE", pLine, strlen("KEY_CACHE_SIZE")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &CalSetup.keyCacheSize)) {
					uiPrintf("Unable to read the KEY_CACHE_SIZE from %s\n", eep_file);
				}
			}

		   else if(strnicmp("ENABLE_FCC_MIDBAND", pLine, strlen("ENABLE_FCC_MIDBAND")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the ENABLE_FCC_MIDBAND from %s\n", eep_file);
				}
				else {
					CalSetup.enableFCCMid = (testVal) ? TRUE : FALSE;
				}
			}

		   else if(strnicmp("ENABLE_JAPAN_EVEN_CHANNELS_UNI1_BAND", pLine, strlen("ENABLE_JAPAN_EVEN_CHANNELS_UNI1_BAND")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the ENABLE_JAPAN_EVEN_CHANNELS_UNI1_BAND from %s\n", eep_file);
				}
				else {
					CalSetup.enableJapanEvenU1 = (testVal) ? TRUE : FALSE;
				}
			}

		   else if(strnicmp("ENABLE_JAPAN_UNI2_BAND", pLine, strlen("ENABLE_JAPAN_UNI2_BAND")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the ENABLE_JAPAN_UNI2_BAND from %s\n", eep_file);
				}
				else {
					CalSetup.enableJapenU2 = (testVal) ? TRUE : FALSE;
				}
			}

		   else if(strnicmp("ENABLE_JAPAN_MIDBAND", pLine, strlen("ENABLE_JAPAN_MIDBAND")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the ENABLE_JAPAN_MIDBAND from %s\n", eep_file);
				}
				else {
					CalSetup.enableJapnMid = (testVal) ? TRUE : FALSE;
				}
			}

		   else if(strnicmp("DISABLE_JAPAN_ODD_CHANNELS_UNI1_BAND", pLine, strlen("DISABLE_JAPAN_ODD_CHANNELS_UNI1_BAND")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the DISABLE_JAPAN_ODD_CHANNELS_UNI1_BAND from %s\n", eep_file);
				}
				else {
					CalSetup.disableJapanOddU1 = (testVal) ? TRUE : FALSE;
				}
			}

		   else if(strnicmp("ENABLE_JAPAN_MODE_11A_NEW", pLine, strlen("ENABLE_JAPAN_MODE_11A_NEW")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the ENABLE_JAPAN_MODE_11A_NEW from %s\n", eep_file);
				}
				else {
					CalSetup.enableJapanMode11aNew = (testVal) ? TRUE : FALSE;
				}
			}

		   else if(strnicmp("RF_SILENT", pLine, strlen("RF_SILENT")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the RF_SILENT from %s\n", eep_file);
				}
				else {
					CalSetup.RFSilent = (testVal) ? TRUE : FALSE;
				}
			}
			else if((strnicmp("DEVICE_TYPE", pLine, strlen("DEVICE_TYPE")) == 0) &&
				((pLine[strlen("DEVICE_TYPE")] == ' ') ||
				 (pLine[strlen("DEVICE_TYPE")] == '\t') ) ){

				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				pLine = strtok(pLine," ;#");
				if(!sscanf(pLine, "%d", &CalSetup.deviceType)) {
					uiPrintf("Unable to read the DEVICE_TYPE from %s\n", eep_file);
				}
			}
			else if((strnicmp("STA_CARD_ON_AP", pLine, strlen("STA_CARD_ON_AP")) == 0) &&
				((pLine[strlen("STA_CARD_ON_AP")] == ' ') ||
				 (pLine[strlen("STA_CARD_ON_AP")] == '\t') ) ){

				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				pLine = strtok(pLine," ;#");
				if(!sscanf(pLine, "%d", &testVal)) {
					uiPrintf("Unable to read the STA_CARD_ON_AP from %s\n", eep_file);
				}
				else {
					CalSetup.staCardOnAP = (testVal) ? TRUE : FALSE;
				}
			}

			else if((strnicmp("ENABLE_32KHZ", pLine, strlen("ENABLE_32KHZ")) == 0) &&
					((pLine[strlen("ENABLE_32KHZ")] == ' ') ||
					 (pLine[strlen("ENABLE_32KHZ")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.Enable_32khz)) {
					uiPrintf("Unable to read the ENABLE_32KHZ from %s\n", eep_file);
					}
			}
			else if((strnicmp("ENABLE_WAKE_ON_WLAN", pLine, strlen("ENABLE_WAKE_ON_WLAN")) == 0) &&
					((pLine[strlen("ENABLE_WAKE_ON_WLAN")] == ' ') ||
					 (pLine[strlen("ENABLE_WAKE_ON_WLAN")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.Enable_WOW)) {
					uiPrintf("Unable to read the ENABLE_WAKE_ON_WLAN from %s\n", eep_file);
					}
			}
			else if(strnicmp("TURBO_MAXPOWER_5G", pLine, strlen("TURBO_MAXPOWER_5G")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%lf", &CalSetup.TurboMaxPower_5G)) {
					uiPrintf("Unable to read the TURBO_MAXPOWER_5G from %s\n", eep_file);
				}
			}
			else if(strnicmp("TURBO_MAXPOWER_2p5G", pLine, strlen("TURBO_MAXPOWER_2p5G")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%lf", &CalSetup.TurboMaxPower_11g)) {
					uiPrintf("Unable to read the TURBO_MAXPOWER_2p5G from %s\n", eep_file);
				}
			}
			else if(strnicmp("CCK_OFDM_DELTA", pLine, strlen("CCK_OFDM_DELTA")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%lf", &CalSetup.cck_ofdm_delta)) {
					uiPrintf("Unable to read the CCK_OFDM_DELTA from %s\n", eep_file);
				}
			}
			else if(strnicmp("CH14_FILTER_CCK_DELTA", pLine, strlen("CH14_FILTER_CCK_DELTA")) == 0) {
				pLine = strchr(pLine, '=');
				pLine = strtok(pLine, delimiters);
				if(!sscanf(pLine, "%lf", &CalSetup.ch14_filter_cck_delta)) {
					uiPrintf("Unable to read the CH14_FILTER_CCK_DELTA from %s\n", eep_file);
				}
			}
			else if((strnicmp("A_MODE", pLine, strlen("A_MODE")) == 0) &&
					((pLine[strlen("A_MODE")] == ' ') ||
					 (pLine[strlen("A_MODE")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.Amode)) {
					uiPrintf("Unable to read the A_MODE from %s\n", eep_file);
					}
			}
			else if((strnicmp("B_MODE", pLine, strlen("B_MODE")) == 0) &&
					((pLine[strlen("B_MODE")] == ' ') ||
					 (pLine[strlen("B_MODE")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.Bmode)) {
					uiPrintf("Unable to read the B_MODE from %s\n", eep_file);
					}
					//printf("ENABLED B MODE ******\n");
			}
			else if((strnicmp("G_MODE", pLine, strlen("G_MODE")) == 0) &&
					((pLine[strlen("G_MODE")] == ' ') ||
					 (pLine[strlen("G_MODE")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.Gmode)) {
					uiPrintf("Unable to read the G_MODE from %s\n", eep_file);
					}
			}
			else if((strnicmp("ANTENNA_GAIN_5G", pLine, strlen("ANTENNA_GAIN_5G")) == 0) &&
					((pLine[strlen("ANTENNA_GAIN_5G")] == ' ') ||
					(pLine[strlen("ANTENNA_GAIN_5G")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.antennaGain5G)) {
					uiPrintf("Unable to read the ANTENNA_GAIN_5G from %s\n", eep_file);
					}
			}
			else if((strnicmp("ANTENNA_GAIN_2p5G", pLine, strlen("ANTENNA_GAIN_2p5G")) == 0) &&
					((pLine[strlen("ANTENNA_GAIN_2p5G")] == ' ') ||
					(pLine[strlen("ANTENNA_GAIN_2p5G")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.antennaGain2p5G)) {
					uiPrintf("Unable to read the ANTENNA_GAIN_2p5G from %s\n", eep_file);
					}
			}
			else if((strnicmp("XLNA_GAIN", pLine, strlen("XLNA_GAIN")) == 0) &&
					((pLine[strlen("XLNA_GAIN")] == ' ') ||
					 (pLine[strlen("XLNA_GAIN")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");
					if(!sscanf(pLine, "%d", &CalSetup.xlnaGain)) {
					uiPrintf("Unable to read the XLNA_GAIN from %s\n", eep_file);
					}
			}
			else if((strnicmp("NOISE_FLOOR_THRESHOLD", pLine, strlen("NOISE_FLOOR_THRESHOLD")) == 0) &&
					((pLine[strlen("NOISE_FLOOR_THRESHOLD")] == ' ') ||
					(pLine[strlen("NOISE_FLOOR_THRESHOLD")] == '\t') ) ){

					pLine = strchr(pLine, '=');
					pLine = strtok(pLine, delimiters);
					pLine = strtok(pLine," ;#");

					if(!sscanf(pLine, "%d", &CalSetup.noisefloor_thresh)) {
					uiPrintf("Unable to read the NOISE_FLOOR_THRESHOLD from %s\n", eep_file);
					}

			}
			else if((strnicmp("11b_XLNA_GAIN", pLine, strlen("11b_XLNA_GAIN")) == 0) &&
					((pLine[strlen("11b_XLNA_GAIN")] == ' ') ||
					 (pLine[strlen("11b_XLNA_GAIN")] == '\t') ) ){

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -