1 / 11

Stream Device 2.x

Stream Device 2.x is a versatile device driver for byte stream-oriented I/O, supporting various record types and interfaces. It features a modular design, easy implementation of record types, and new protocol extensions. The driver is compatible with EPICS R3.14.6 and supports asynDriver, GPIB, CAN, RS232, and network drivers. It allows for seamless communication between software and hardware, offers exceptional protocol features, and includes format converter modules for easy data manipulation.

boozer
Download Presentation

Stream Device 2.x

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. Stream Device 2.x A device driver for byte stream oriented I/O

  2. asynDriver ... GPIB CAN RS232 What was Stream Device again? ... records ai bo stringout waveform record interfaces Stream Device kernel protocol files bus interfaces bus drivers

  3. Proven Features • Plain text config file (protocol file) • No C coding necessary to support new devices • Modular design • Support for all standard I/O record types • ai, ao, bi, bo, mbbi, mbbo, mbbiDirect, mbboDirect, longin, longout, stringin, stringout, waveform • other record types easy to implement • Independent of underlying I/O hardware

  4. New Features • EPICS R3.14.6 compatible • Runs on a PC as well as on vxWorks • Support for asynDriver • Generic serial line, GPIB, and network driver included • Stream Device and other software can talk to the same device without interference. • Lots of protocol extensions

  5. New Protocol Features • Exception handlers • E.g. init handler (used in init_record) • Sub-protocols (use one protocol in an other one) • More protocol variables • E.g. minimal and maximal input length • User defined variables • Direct access to record fields

  6. user variable sub-protocol exception handlers Examples • Handlers, variables, sub-protocols terminator = CR LF; F = "FREQ"; read_freq { out $F "?"; in "%f"; @readError { out "RESET"; } } set_freq { out $F " %.9f"; @init { read_freq; } }

  7. Format converter modules • Standard formats (%f %x %[a-z] …) • Additional formats (%b %D %{s0|s1|s2} …) • New formats can be implemented easily • e.g. regular expression: %/regexp/ • User functions as pseudo-formats • e.g. checksum as %@ • encode after format, decode before scan

  8. Examples • Formats, field access, user functions read_strange_status_bits { out "stat?"; in "%12B.!";}access_record_fields { out "%(A).3f, %(B)g, %(C)d, %(DESC)s"; in "%f%(EGU)s";}apply_user_function { in "A=%d%@";}

  9. Some Gimmicks • Reload protocols without reboot • dbior shows all used protocols • Support for calcout record • Memory tracing to find leaks • Dynamically allocated buffers • don't care about buffer sizes • implemented with new StreamBuffer class

  10. StreamBuffer Class • Used for all buffers in Stream Device • Transparently uses static or allocated memory • Implements appending, deleting, replacing of bytes or strings, and memory management in an efficient way • Implements printf to append formatted values • Can be used by other software as well

  11. Where to get Stream Device 2.x • Pre-release available from dirk.zimoch@psi.ch • Might be instable (testers welcome) • No complete documentation yet • but Stream Device 1.x documentation helps:www.delta.uni-dortmund.de/controls

More Related