- 1、本文档共30页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
天线增益(Antenna gain)
天线增益(Antenna gain)
/ / cmeas_gain对话框
cmeas_gain::cmeas_gain(CWnd *本/ * =空* /)定义四个输入变量,初始频率,终止频率,频率间隔,文件路径
:CDialog(cmeas_gain::IDD、本)
{
/ { { afx_data_init(cmeas_gain)
m_start = _t(“”);
m_end = _t(“”);
m_span = _t(“”);
m_fileroute = _t(“”);
// } } afx_data_init
}
cmeas_gain::~ cmeas_gain()
{
如果(hcom!= null)
close_comport(hcom);
}
无效cmeas_gain::DoDataExchange(cdataexchange * PDX)将四个变量增加到主菜单对话框中
{
CDialog::DoDataExchange(PDX);
/ { { afx_data_map(cmeas_gain)
ddx_text(PDX,idc_edit1,m_start);
ddx_text(PDX,idc_edit2,m_end);
ddx_text(PDX,idc_edit3,m_span);
ddx_text(PDX,idc_edit4,m_fileroute);
// } } afx_data_map
}
begin_message_map(cmeas_gain,CDialog)设置对话框按钮:左微调,右微调,标准天线,待测天线,仪器设置,测量
/ { { afx_msg_map(cmeas_gain)
on_bn_clicked(idc_gain_left,OnGainLeft)
on_bn_clicked(idc_gain_right,OnGainRight)
on_bn_clicked(idc_radio1,onradio1)
on_bn_clicked(idc_radio2,onradio2)
on_bn_clicked(idc_gain_setup,OnGainSetup)
on_bn_clicked(idc_gain_measure,ongainmeasure)
// } } afx_msg_map
end_message_map()
/////////////////////////////////////////////////////////////////////////////
/ / cmeas_gain消息处理程序
无效cmeas_gain::poll()
{
/ /当前角度查询函数
char * str2com =新字符[ 12 ];
char * readstr =新字符[ 1024 ];
sprintf(str2com,“% % % % % C C C C C C C % % % % % C C”,0x55,0x55,0x26,0,0,0,0,0,0,0xd0);/ /查询转台当前的绝对位置坐标
睡眠(500);
write_comport(hcom,10,str2com);/ /发送查询命令
睡眠(200);
国际tmpint;
无符号长bytesread;
tmpcharaz字符符号;
字符符号tmpinth,tmpintl;
int TMP;
tmpint = read_comport(hcom,与bytesread,1024,readstr);
如果(tmpint){
// fprintf(fpklength,“%d %d \ \ T T %d\n”,bytesread,*(readstr + 2),讨论);
如果(bytesread = 6){ //接收到6个字节或6个字节以上。
int k = bytesread / 6;
tmpcharaz = *(readstr + 3 + 6 *(k-1));//接收最新的数据
如果(tmpcharaz 128){
Tmpinth = * (readstr + 3 + 6 * (K - 1));
Tmpintl = * (readstr + 4 + 6 * (K - 1));
Tmpcuraz = ((float tmpinth * 256 + tmpintl - 65536.0) / 10.0); 考虑溢出
} else {
Tmpinth = * (readstr + 3 + 6 * (K - 1));
Tmpintl = * (readstr + 4 + 6 * (K - 1));
Tmp = tmpinth * 256;
Tmpcuraz = float (TMP + tmpintl) / 10.0);
}
}
} else {
您可能关注的文档
- 雌激素对心血管作用的分子基础(The molecular basis of cardiovascular effects of estrogen).doc
- 集中管理为核心的财务管理模式的构想(The idea of centralized management as the core of the financial management mode).doc
- 雕塑论文(The sculpture).doc
- 零售业简述(The retail industry).doc
- 零售业业务流程和计算机管理(The retail business process and computer management).doc
- 零售产业安全问题与我国零售产业生态结构构想(The retail industry safety problems and the idea of China's retail industry ecological structure).doc
- 零售企业人力资源管理现状及对策(The current situation of human resources management of retail enterprises and Countermeasures).doc
- 零售业规模≠效益(Retail size and benefits).doc
- 零售企业的魔法先体验再营销(Retail enterprises first experience marketing magic).doc
- 零售学复习题(Retail sales review questions).doc
文档评论(0)