📄 cal_com.c
字号:
if(strnicmp("#BEGIN_11g_TEST_CHANNEL_MATRIX", pLine, strlen("#BEGIN_11g_TEST_CHANNEL_MATRIX")) == 0) {
parseTestChannels(fStream, pLine, MODE_11g);
continue;
}
if(*pLine == '#') {
continue;
}
else if(strnicmp("SUBSYSTEM_ID", pLine, strlen("SUBSYSTEM_ID")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
CalSetup.subsystemID = (A_UINT16) strtoul(pLine, NULL, 0);
}
else if(strnicmp("USE_INSTRUMENTS", pLine, strlen("USE_INSTRUMENTS")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the USE_INSTRUMENTS from %s\n", CALSETUP_FILE);
}
else {
CalSetup.useInstruments = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("COUNTRY_OR_DOMAIN_FLAG", pLine, strlen("COUNTRY_OR_DOMAIN_FLAG")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &CalSetup.countryOrDomain)) {
uiPrintf("Unable to read the COUNTRY_OR_DOMAIN_FLAG flag from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("WORLD_WIDE_ROAMING_FLAG", pLine, strlen("WORLD_WIDE_ROAMING_FLAG")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &CalSetup.worldWideRoaming)) {
uiPrintf("Unable to read the WORLD_WIDE_ROAMING_FLAG flag from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("COUNTRY_OR_DOMAIN_CODE", pLine, strlen("COUNTRY_OR_DOMAIN_CODE")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
CalSetup.countryOrDomainCode = (A_UINT16) strtoul(pLine, NULL, 0);
}
else if(strnicmp("READ_FROM_FILE", pLine, strlen("READ_FROM_FILE")) == 0) {
pLine = strchr(pLine, '=');
pLine++;
if(!sscanf(pLine, "%d", &testVal)) {
printf("Unable to read the READ_FROM_FILE from %s\n", CALSETUP_FILE);
}
else {
CalSetup.readFromFile = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("RAW_DATA_FILENAME", pLine, strlen("RAW_DATA_FILENAME")) == 0) {
pLine = strchr(pLine, '=');
pLine++;
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%s", CalSetup.rawDataFilename)) {
printf("Unable to read the RAW_DATA_FILENAME from %s\n", CALSETUP_FILE);
}
else {
//printf("Will read data from file %s\n", CalSetup.rawDataFilename);
}
}
else if(strnicmp("11b_READ_FROM_FILE", pLine, strlen("11b_READ_FROM_FILE")) == 0) {
pLine = strchr(pLine, '=');
pLine++;
if(!sscanf(pLine, "%d", &testVal)) {
printf("Unable to read the 11b_READ_FROM_FILE from %s\n", CALSETUP_FILE);
}
else {
CalSetup.readFromFile_2p4[MODE_11b] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11b_RAW_DATA_FILENAME", pLine, strlen("11b_RAW_DATA_FILENAME")) == 0) {
pLine = strchr(pLine, '=');
pLine++;
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%s", CalSetup.rawDataFilename_2p4[MODE_11b])) {
printf("Unable to read the 11b_RAW_DATA_FILENAME from %s\n", CALSETUP_FILE);
}
else {
//printf("Will read data from file %s\n", CalSetup.rawDataFilename);
}
}
else if(strnicmp("11g_READ_FROM_FILE", pLine, strlen("11g_READ_FROM_FILE")) == 0) {
pLine = strchr(pLine, '=');
pLine++;
if(!sscanf(pLine, "%d", &testVal)) {
printf("Unable to read the 11g_READ_FROM_FILE from %s\n", CALSETUP_FILE);
}
else {
CalSetup.readFromFile_2p4[MODE_11g] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11g_RAW_DATA_FILENAME", pLine, strlen("11g_RAW_DATA_FILENAME")) == 0) {
pLine = strchr(pLine, '=');
pLine++;
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%s", CalSetup.rawDataFilename_2p4[MODE_11g])) {
printf("Unable to read the 11g_RAW_DATA_FILENAME from %s\n", CALSETUP_FILE);
}
else {
//printf("Will read data from file %s\n", CalSetup.rawDataFilename);
}
}
else if(strnicmp("TEST_32KHZ_SLEEP_CRYSTAL", pLine, strlen("TEST_32KHZ_SLEEP_CRYSTAL")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_32KHZ_SLEEP_CRYSTAL from %s\n", CALSETUP_FILE);
}
else {
CalSetup.test32KHzSleepCrystal = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_TEMP_MARGIN", pLine, strlen("TEST_TEMP_MARGIN")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_TEMP_MARGIN from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTempMargin[MODE_11a] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11b_TEST_TEMP_MARGIN", pLine, strlen("11b_TEST_TEMP_MARGIN")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the 11b_TEST_TEMP_MARGIN from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTempMargin[MODE_11b] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11g_TEST_TEMP_MARGIN", pLine, strlen("11g_TEST_TEMP_MARGIN")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the 11g_TEST_TEMP_MARGIN from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTempMargin[MODE_11g] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11g_TEST_DATA_INTEGRITY", pLine, strlen("11g_TEST_DATA_INTEGRITY")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the 11g_TEST_DATA_INTEGRITY from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testDataIntegrity[MODE_11g] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11b_TEST_DATA_INTEGRITY", pLine, strlen("11b_TEST_DATA_INTEGRITY")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the 11b_TEST_DATA_INTEGRITY from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testDataIntegrity[MODE_11b] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_DATA_INTEGRITY", pLine, strlen("TEST_DATA_INTEGRITY")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_DATA_INTEGRITY from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testDataIntegrity[MODE_11a] = (testVal) ? TRUE : FALSE;
}
}
#if !defined(CUSTOMER_REL) && !defined(__ATH_DJGPPDOS__)
else if(strnicmp("USE_FAST_CAL", pLine, strlen("USE_FAST_CAL")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the USE_FAST_CAL from %s\n", CALSETUP_FILE);
}
else {
CalSetup.useFastCal = (testVal) ? TRUE : FALSE;
}
}
#endif
else if(strnicmp("CAL_POWER", pLine, strlen("CAL_POWER")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the CAL_POWER from %s\n", CALSETUP_FILE);
}
else {
CalSetup.calPower = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("REPROGRAM_TARGET_POWER", pLine, strlen("REPROGRAM_TARGET_POWER")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the REPROGRAM_TARGET_POWER from %s\n", CALSETUP_FILE);
}
else {
CalSetup.reprogramTargetPwr = (testVal) ? TRUE : FALSE;
}
}
/* else if(strnicmp("TEST_OBW_MASK", pLine, strlen("TEST_OBW_MASK")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
CalSetup.testOBW = (A_UINT16) strtoul(pLine, NULL, 2);
}
*/
else if(strnicmp("TEST_OBW_MASK", pLine, strlen("TEST_OBW_MASK")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_OBW_MASK from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testOBW = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_SPEC_MASK", pLine, strlen("TEST_SPEC_MASK")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_SPEC_MASK from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testSpecMask = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_TXPER", pLine, strlen("TEST_TXPER")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_TXPER from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTXPER = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_RXSEN", pLine, strlen("TEST_RXSEN")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_RXSEN from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testRXSEN = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_TURBO_MODE", pLine, strlen("TEST_TURBO_MODE")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_TURBO_MODE from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTURBO= (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11g_TEST_TURBO_MODE", pLine, strlen("11g_TEST_TURBO_MODE")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the 11g_TEST_TURBO_MODE from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTURBO_2p4[MODE_11g] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_HALF_RATE_MODE", pLine, strlen("TEST_HALF_RATE_MODE")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_HALF_RATE_MODE from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testHALFRATE= (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TEST_TARGET_POWER", pLine, strlen("TEST_TARGET_POWER")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the TEST_TARGET_POWER from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTargetPowerControl[MODE_11a] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11b_TEST_TARGET_POWER", pLine, strlen("11b_TEST_TARGET_POWER")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the 11b_TEST_TARGET_POWER from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTargetPowerControl[MODE_11b] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("11g_TEST_TARGET_POWER", pLine, strlen("11g_TEST_TARGET_POWER")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the 11g_TEST_TARGET_POWER from %s\n", CALSETUP_FILE);
}
else {
CalSetup.testTargetPowerControl[MODE_11g] = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("TARGET_POWER_TOLERANCE_UPPER", pLine, strlen("TARGET_POWER_TOLERANCE_UPPER")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -