CMU200指令“FETC:POW:MPR?"返回内容
返回3.222375E+001,3.240007E+001,1.500000E+001,-3.320313E-002,0.000000E+000,MATC,-3.120117E+000,3.170650E+000,-3.592529E+000,1.219933E+000,1.259458E+000,1.389728E+000,-6.000000E-002,-5.200000E-001,6.390000E+000,3.223026E+001
其中某些值我知道,但个别值还是不能看明白,
有高手能为我解释下这16个值所对应的项目吗?
小弟在此感激不尽
说明书上都有,每个项目代表什么意思
没有说明书的话,http://www.52rd.com/bbs/Detail_RD.BBS_7627_121_1_1.html
很感谢CUIJW的耐心指导!后续有问题我会继续讨教的~谢谢
再次感谢CUIJW,你介绍的资料比我上次下的400多页的全多了~非常感谢呵呵!
“FETC:POW:MPR?"返回内容3.222375E+001,3.240007E+001,1.500000E+001,-3.320313E-002,0.000000E+000,MATC,-3.120117E+000,3.170650E+000,-3.592529E+000,1.219933E+000,1.259458E+000,1.389728E+000,-6.000000E-002,-5.200000E-001,6.390000E+000,3.223026E+001
中的MATC怎么获取啊?试过用C的sscanf好象有问题,没办法比较
请高手指点!
有什么问题,有问题是因为你的取值格式有问题.
一知名手机设计公司是这样写的
else
{
cc.Replace("NAN","-1");
strcpy(buf_Power,cc);
sscanf(buf_Power,"%lf,%lf,%lf,%lf,%lf,%s ,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
&(pPowerData->dbAvgBurstPwCurr),
&(pPowerData->dbPeakBurstPwCurr),
&(pPowerData->nPowerControlLevel),
&(pPowerData->dbTimingAdvError),
&(pPowerData->dbBurstOutofTol),
&(pPowerData->chBurstMatching),
&(pPowerData->dbPhErrPeakCurrent),
&(pPowerData->dbPhErrPeakAverage),
&(pPowerData->dbPhErrPeakMaxMin),
&(pPowerData->dbPhErrRMSCurrent),
&(pPowerData->dbPhErrRMSAverage),
&(pPowerData->dbPhErrRMSMaxMin),
&(pPowerData->dbFreqErrCurrent),
&(pPowerData->dbFreqErrAverage),
&(pPowerData->dbFreqErrMaxMin),
&(pPowerData->dbAvgBurstPwAvg));
}
如果只做获取那个MATC,很简单,strtok(cc,","),及strtok(NULL,",")就可以取到了.
试过你的格式但还是抓不到MATC和之后的数据...
请指教问题在哪?
sscanf抓字符串好象不要地址符号&的,但你发的这个里面抓字符串有地址,有点不明白,请指教谢谢!
sscanf (source,format,target);
target 解释如下:
Data Type:any type (passed by reference)
Contains a pointer to the object that receives the converted input from the source string. If there are multiple arguments, you must separate the arguments by commas.
大家觉得软件好学吗?能够发点小财吗?
有兴趣就好学,没兴趣就不好学