中国教育和科研计算机网
EDU首页 |  中国教育 |   高校科技 |   教育信息化 |   CERNET
教育信息化

资讯 | 专题 会议 观点 专栏 访谈 企业 产品 CIO 技术 校园信息化 下一代互联网 IPv6视频课堂

中国教育网 > 教育信息化
您现在的位置: EDU首页 > 教育信息化 > 无线网络 > 无线校园 > 国内情况
数字校园移动终端性能评测
http://www.edu.cn   2010-08-13 中国教育和科研计算机网 作者:杜丰1 韩博2 李一鸣2 刘国营1

字体选择:【大】 【中】 【小】

  4.电池功耗测试

  测试目的:获取移动终端使用电池供电时各功能模块在不同使用频度下的使用次数和时间,计算其工作或待机状态下的功耗,为在此平台环境下开发应用程序的可行性提供分析依据。

  测试代码:

  private void Form1_Load(object sender, EventArgs e)
  {
  //初始化RFID读头
  int portNo = (int)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\ComParam\\", "RFIDConfig", 0);
  CRFID.GPB_OUTH(portNo);
  CRFID.ZLG522Init((byte)portNo);
  //连接条码扫描设备并加电
  CommonApi.KDT_Scan_PowerOn();
  CommonApi.KDT_Scan_ConnectEx();
  //打开网线网络
  CommonApi.KDT_Wifi_On();
  }
  private void button1_Click(object sender, EventArgs e)
  {
  this.button1.Enabled = false;
  int time = Environment.TickCount;
  //利用Timer模拟各功能模块的使用频率
  if (false == this.timer1.Enabled)
  {
  timer1.Enabled = true;
  if (this.checkBox1.Checked)
  {
  this.timer1.Interval = 60 * 1000;
  this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
  }
  }
  if (false == this.timer2.Enabled)
  {
  timer2.Enabled = true;
  this.timer2.Interval = int.Parse(textBox2.Text) * 1000;
  this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
  }
  if (false == this.timer3.Enabled)
  {
  timer3.Enabled = true;
  if (!"".Equals(st3))
  {
  this.timer3.Interval = int.Parse(textBox3.Text) * 1000;
  this.timer3.Tick += new System.EventHandler(this.timer3_Tick);
  }
  }
  if (false == this.timer4.Enabled)
  {
  timer4.Enabled = true;
  if (!"".Equals(st4))
  {
  this.timer4.Interval = int.Parse(textBox4.Text) * 1000;
  this.timer4.Tick += new System.EventHandler(this.timer4_Tick);
  }
  }
  if (false == this.timer5.Enabled)
  {
  timer5.Enabled = true;
  if (!"".Equals(st5))
  {
  this.timer5.Interval = int.Parse(textBox5.Text) * 1000;
  this.timer5.Tick += new System.EventHandler(this.timer5_Tick);
  }
  }
  //设置各Timer任务
  private void timer1_Tick(object sender, EventArgs e)
  {
  CommonApi.KDT_Open_BackLight(1);
  }
  private void timer2_Tick( object sender, EventArgs e)
  {
  CommonApi.KDT_Beep(int.Parse(textBox1.Text));
  }
  private void timer3_Tick(object sender, EventArgs e)
  {
  this.ReadRfid();
  }
  private void timer4_Tick(object sender, EventArgs e)
  {
  this.ScanBarCode();
  }
  private void timer5_Tick(object sender, EventArgs e)
  {
  this.getContent();
  }
  }

页面功能 【打印】 【关闭】 【我有话说

MOOC风暴来袭

版权所有:中国教育和科研计算机网网络中心 CERNIC,CERNET,京ICP备15006448号-16,京网文[2017]10376-1180号

关于假冒中国教育网的声明 | 有任何问题与建议请联络:Webmaster@staff.cernet.com