1 / 15

Human Interface Devices EPICS Support

Human Interface Devices EPICS Support. Mice Keyboards Presentation Remotes Joysticks Game Controllers Barcode Scanners Card Readers Variety of other devices. What are Human Interface Devices?. Human Interface Devices. Set of interfaces to communicate with a given device

lettiee
Download Presentation

Human Interface Devices EPICS Support

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Human Interface Devices EPICS Support

  2. Mice Keyboards Presentation Remotes Joysticks Game Controllers Barcode Scanners Card Readers Variety of other devices What are Human Interface Devices?

  3. Human Interface Devices • Set of interfaces to communicate with a given device • Generally, one interface per capability (Mouse + Keyboard = 2 interfaces) • Interfaces are described by a USB descriptor • You can find this information with the ‘lsusb’ command

  4. HID EPICS Support https://github.com/keenanlang/epics-usb

  5. HID EPICS Support • Based on asynPortDriver from asyn EPICS module from Mark Rivers https://github.com/epics-modules/asyn • Descriptor file → asyn parameters • Handles communications with the device in the background. Updates parameters as data changes.

  6. Current Uses • APS Open House Demonstration • Beamline Motor Control with Wireless Controller

  7. HID Driver • Every device will send data over their interfaces on a periodic basis • Just a set of raw bytes • Descriptor file defines how to interpret that data into asyn parameters • Compares new data to old data and only updates changed data

  8. Descriptor File • One definition per line Parameter_Name [Indicies] -> Parameter_Type • Example X_AXIS_VALUE [0,1] -> UInt16

  9. Descriptor File • Optionally, there are bit shifts and bit masks available for data that doesn’t align to specific bytes. • Name [Index] >> Shift -> Type /0xMask • TEN_BIT_DATA [0,1] -> UInt16 /0x03FF • OFFSET_DATA [1,2] >> 2 -> UInt16 /0x03FF

  10. usbCreateDriver (portName, definitionFile) Loads the definitions file to create the driver usbConnectDevice (portName, interface, vendorID, productID, serial) Connects the driver to a given device, serial is optional, interface=0 connects to the first available interface usbShowIO (portName, on_off) Displays the bytes the device sends every period Driver Functions

  11. Driver Functions • usbSetFrequency (portName, pollFreq) Sets the polling frequency of the device for devices that have a constant connection. Many devices will only send information when an event happens. For those, leave this at 0.0 • usbSetTimeout (portName, timeout) Sets the number of seconds before the device is considered to have timed out. Useful for devices that only send out event data. • UsbSetDelay (portName, delay) Sets the amount of time between attempting to reconnect to a disconnected device.

  12. Example

More Related