StreamDevice 2.0 - PowerPoint PPT Presentation

About This Presentation
Title:

StreamDevice 2.0

Description:

A Multi-Purpose Character Driver. for EPICS 3.14. EPICS Workshop 2003. Dirk Zimoch. 2 ... Protocol controlled character I/O. Support new devices by easy configuration ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 12
Provided by: Zim4
Learn more at: https://epics.anl.gov
Category:

less

Transcript and Presenter's Notes

Title: StreamDevice 2.0


1
StreamDevice 2.0
  • A Multi-Purpose Character Driver
  • for EPICS 3.14

2
Whats 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

3
Whats 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

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

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

6
I/O Formatting
  • printf/scanf-like format strings
  • standard formats (f, d, s, )
  • additional formats
  • b binary (ASCII 0 and 1)
  • r raw (twos complement number)
  • D BCD
  • enumeration
  • user defined (exotic) formats

7
Exception Handlers
  • Do something special in a special situation
  • onError
  • when input doesnt match
  • onReplyTimeout
  • when device doesnt answer
  • onInit (not really an exception -)
  • when processed during initialisation

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 OFFON"
  • exotic formats (..!!...!..!)
  • get_status out "ST" in "11B.!"

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, "_at_gpib1 mydevice set_switch(2) 7")

channel
I/O parameter
protocol parameter
filename
protocol
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"

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_at_psi.ch
Write a Comment
User Comments (0)
About PowerShow.com