本站首页    管理页面    写新日志    退出


HMP学习-srl相关函数-sr_GetThreadDeviceGroup( )
zhu_ruixian 发表于 2007/1/9 15:25:05

函数原型: Linux  long sr_GetThreadDeviceGroup (long *Devices,int *NumDevices)Windows  int sr_GetThreadDeviceGroup (long *Devices,int *NumDevices) 参数:设备指针,设备个数 返回值:0成功 -1失败 作用:返回该线程创建的所有设备句柄。 示例程序: #define MAX_DEVICES 96#define DEVICES_PER_TRUNK 24 EventPollThread (){long Devices [MAX_DEVICES];int DevNum, index;long EventHandle;for (DevNum = 0; DevNum < DEVICES_PER_TRUNK; DevNum++){Devices [DevNum] = dx_open(...);}sr_CreateThreadDeviceGroup (Devices);while (1){sr_WaitThreadDeviceGroup (-1);// do something with the eventif (done == true){break;}}DevNum = MAX_DEVICES;sr_GetThreadDeviceGroup (&Devices, &DevNum);printf ("%d devices in the device group:\n", DevNum);for (index = 0; index < DevNum; index++){// NOTE: This loop will execute 24 timesprintf ("Device handle #%2d: %d\n", index, Devices[index]);}sr_DeleteThreadDeviceGroup();}

阅读全文(1643) | 回复(0) | 编辑 | 精华

发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)

 
«September 2025»
123456
78910111213
14151617181920
21222324252627
282930

  公告
欢迎大家留言!既然来了,多少说两句!呵呵!

 


  我的分类(专题)
  最近日志

  最新评论

  留言板

  链接


  Blog信息
blog名称:
日志总数:33
评论数量:61
留言数量:-8
访问次数:236575
建立时间:2006年4月27日



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.107 second(s), page refreshed 144790628 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号