1 / 11

StreamDevice 2.0

StreamDevice 2.0. A Multi-Purpose Character Driver for EPICS 3.14. What´s cool. Protocol controlled character I/O Support new devices by easy configuration Modular design allows to support any record type (with device support) new I/O hardware exotic data formats user defined functions.

shelleyt
Download Presentation

StreamDevice 2.0

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. StreamDevice 2.0 A Multi-Purpose Character Driver for EPICS 3.14 Dirk Zimoch

  2. What´s cool • Protocol controlled character I/O • Support new devices by easy configuration • Modular design allows to support • any record type (with device support) • new I/O hardware • exotic data formats • user defined functions Dirk Zimoch

  3. What´s new • Using R3.14 OSI libraries • can run on a PC • Using C++ • modules with well-defined interfaces • plug in your own modules • New protocol features • exception handlers • pre/post processing Dirk Zimoch

  4. Applications • GPIB devices • Serial line devices • Network devices • Logging to files • Console I/O • Client/Server Applications Dirk Zimoch

  5. Protocol File • Plain text configuration • One file per device type • One protocol per function • Simple commands • in string; • out string; • wait timeout; • event timeout; Dirk Zimoch

  6. I/O Formatting printf/scanf-like format strings • standard formats (%f, %d, %s, …) • additional formats • %b binary (ASCII 0 and 1) • %r raw (two´s complement number) • %D BCD • %{…|…} enumeration • user defined (exotic) formats Dirk Zimoch

  7. Exception Handlers Do something special in a special situation • onError • when input doesn’t match • onReplyTimeout • when device doesn’t answer • onInit (not really an exception :-) • when processed during initialisation Dirk Zimoch

  8. Protocol Examples terminator = CR LF; get_freq {out "FREQ?"; in "FREQ %f HZ";} set_freq {out "FREQ %f HZ"; onInit {out "FREQ?"; in "FREQ %f HZ";} } generic_read {out "%s"; in "%39c";} # parameter \$1: switch number set_switch {out "SW \$1 %{OFF|ON}";} # exotic formats (..!!...!..!) get_status {out "ST"; in "%11B.!";} Dirk Zimoch

  9. I/O Link Record link INP or OUT contains • Name of I/O channel (bus) • Name of protocol file and protocol • Protocol parameters (optional) • I/O-hardware dependent parameters field (DTYP, "stream") field (OUT, "@gpib1 mydevice set_switch(2) 7") channel I/O parameter protocol parameter filename protocol Dirk Zimoch

  10. Pre/Post Processing Apply user defined functions to output/input • checksums out checksum("value %f"); in verify("%20c" 0 skip); • encryption out "password " scramble("%s"); • additional information out date("\%H:\%m:\%s") " X = %f"; Dirk Zimoch

  11. Work in Process • Support of new asynDriver • standardised character driver interface • Implementation of new protocol features • Debugging • Documentation • Release this summer mailto: dirk.zimoch@psi.ch Dirk Zimoch

More Related