有关IOCTL_CHANGER_MOVE_MEDIUM参数的问题
Windows平台下,操作机械臂。
我用DeviceIoControl函数,选dwIoControlCode为IOCTL_CHANGER_MOVE_MEDIUM。
当中涉及到多个CHANGER_ELEMENT结构体,该结构体中又包含一个ELEMENT_TYPE结构体。
我想问下如何对这个ELEMENT_TYPE结构体初始化或者用什么方法能给这个结构体赋初始值?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.