Presentation is loading. Please wait.

Presentation is loading. Please wait.

EPICS Workshop 2003Dirk Zimoch 1 StreamDevice 2.0 A Multi-Purpose Character Driver for EPICS 3.14.

Similar presentations


Presentation on theme: "EPICS Workshop 2003Dirk Zimoch 1 StreamDevice 2.0 A Multi-Purpose Character Driver for EPICS 3.14."— Presentation transcript:

1 EPICS Workshop 2003Dirk Zimoch 1 StreamDevice 2.0 A Multi-Purpose Character Driver for EPICS 3.14

2 EPICS Workshop 2003Dirk 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

3 EPICS Workshop 2003Dirk 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

4 EPICS Workshop 2003Dirk Zimoch 4 Applications GPIB devices Serial line devices Network devices Logging to files Console I/O Client/Server Applications

5 EPICS Workshop 2003Dirk 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;

6 EPICS Workshop 2003Dirk Zimoch 6 I/O Formatting printf/scanf-like format strings standard formats (%f, %d, %s, …) additional formats –%bbinary (ASCII 0 and 1) –%rraw (two´s complement number) –%DBCD –%{…|…} enumeration user defined (exotic) formats

7 EPICS Workshop 2003Dirk 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

8 EPICS Workshop 2003Dirk 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.!";}

9 EPICS Workshop 2003Dirk 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 filename protocol protocol parameter I/O parameter

10 EPICS Workshop 2003Dirk 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";

11 EPICS Workshop 2003Dirk 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


Download ppt "EPICS Workshop 2003Dirk Zimoch 1 StreamDevice 2.0 A Multi-Purpose Character Driver for EPICS 3.14."

Similar presentations


Ads by Google