Jan Breuer
2013-11-08 b0326fb63170801353cbc4d53b80846381de82f4
README.md
@@ -15,13 +15,9 @@
    Pattern "SYSTem:VERsion?" mathes strings "SYST:version?", "system:ver?", "SYST:VER?", ...
SCPI standard also uses brackets "[]" to define unnecesery parts of command. This behaviour is not implemented yet.
SCPI standard also uses brackets "[]" to define unnecesery parts of command.
    Pattern "SYSTem:ERRor[:NEXT]?" should match "SYST:ERR?", "system:err?" and also "system:error:next?", ...
In current implementation, you should write two patterns to implement this behaviour
    Pattern "SYSTem:ERRor?" and "SYSTem:ERRor:NEXT?"
    Pattern "SYSTem:ERRor[:NEXT]?" mathes "SYST:ERR?", "system:err?" and also "system:error:next?", ...
Command callback
@@ -45,16 +41,20 @@
Source codes are devided into few files to provide better portability to other systems.
- *scpi_parser.c* - provides the core parser library
- *scpi_error.c* - provides basic error handling (error queue of the instrument)
- *scpi_ieee488.c* - provides basic implementation of IEEE488.2 mandatory commands
- *scpi_minimal.c* - provides basic implementation of SCPI mandatory commands
- *scpi_utils.c* - provides string handling routines and conversion routines
- *scpi_units.c* - provides handling of special numners (DEF, MIN, MAX, ...) and units
- *scpi_fifo.c* - provides basic implementation of error queue FIFO
- *scpi_debug.c* - provides debug functions
- *libscpi/parser.c* - provides the core parser library
- *libscpi/error.c* - provides basic error handling (error queue of the instrument)
- *libscpi/ieee488.c* - provides basic implementation of IEEE488.2 mandatory commands
- *libscpi/minimal.c* - provides basic implementation of SCPI mandatory commands
- *libscpi/utils.c* - provides string handling routines and conversion routines
- *libscpi/units.c* - provides handling of special numners (DEF, MIN, MAX, ...) and units
- *libscpi/fifo.c* - provides basic implementation of error queue FIFO
- *libscpi/debug.c* - provides debug functions
- *test-parser.c* - is the basic non-interactive demo of the parser
- *examples/test-parser* - is the basic non-interactive demo of the parser
- *examples/test-interactive* - is the basic interactive demo of the parser
- *examples/test-tcp* - is the basic interactive tcp server (port 5025)
- *examples/common* - common examples commands
Implementation to your instrument
-------------
@@ -166,11 +166,14 @@
 - `SCPI_ParamNumber` - read double value with or without units or represented by special number (DEF, MIN, MAX, ...). This function is more universal then SCPI_ParamDouble.
 - `SCPI_ParamText` - read text value - may be encapsuled in ""
 - `SCPI_ParamString` - read unspecified parameter not encapsulated in ""
 - `SCPI_ParamBool` - read boolean value (ON, OFF, 0, 1)
 - `SCPI_ParamChoice` - read enumeration value eg. (BUS, IMMediate, EXTernal) defined by parameter
These are the functions, you can use to write results
 - `SCPI_ResultInt` - write integer value
 - `SCPI_ResultDouble` - write double value
 - `SCPI_ResultText` - write text value encapsulated in ""
 - `SCPI_ResultString` - directly write string value
 - `SCPI_ResultBool` - write boolean value
You can use function `SCPI_NumberToStr` to convert number with units to textual representation and then use `SCPI_ResultString` to write this to the user.