免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2341 | 回复: 1
打印 上一主题 下一主题

[VTL与磁带系统] 有关IOCTL_CHANGER_MOVE_MEDIUM参数的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-03-15 19:26 |只看该作者 |倒序浏览
Windows平台下,操作机械臂。

我用DeviceIoControl函数,选dwIoControlCode为IOCTL_CHANGER_MOVE_MEDIUM。

当中涉及到多个CHANGER_ELEMENT结构体,该结构体中又包含一个ELEMENT_TYPE结构体。
我想问下如何对这个ELEMENT_TYPE结构体初始化或者用什么方法能给这个结构体赋初始值?

论坛徽章:
0
2 [报告]
发表于 2011-03-18 07:37 |只看该作者
Here is the elemenet type list:
typedef enum _ELEMENT_TYPE {
  AllElements,
  ChangerTransport,
  ChangerSlot,
  ChangerIEPort,
  ChangerDrive,
  ChangerDoor,
  ChangerKeypad
} ELEMENT_TYPE, *PELEMENT_TYPE;

How to set the element type up to the tape library setup.
For example, transport(robot) address is 0, 1, 2. You can pick up any one from 0 to 2.
  CHANGER_MOVE_MEDIUM ch_mm;

  ch_mm.Transport.ElementAddress = 0;
  ch_mm.Transport.ElementType = ChangerTransport;

The storage slot addresses are in the range of 1024h -- 3000h.
The Import/export slot addresses are from 301h -- 316h.

You want to move the cartridge from 301h to 1024h
  ch_mm.Source.ElementAddress = 0x301;
  ch_mm.Source.ElementType = ChangerIEPort;

  ch_mm.Destination.ElementAddress = 0x1024;
  ch_mm.Destination.ElementType = ChangerSlot;

So, your programer must have the library inventory data first so that you can determine the address is belonged to what element type.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP