编辑 | blame | 历史 | 原始文档

SCPI parser library v2

Build status Coverage Status

Documentation

Documentation is available at http://j123b567.github.io/scpi-parser.

Examples

Library contains several examples of usage but please note, that this code is just for educational purpose and not production ready.
Examples are from several contributors and they are not tested and it is also not known, if they really work or can compile at all.

The core library itself is well tested and has more then 93% of the code covered by unit tests and integration tests and tries to be SCPI-99 compliant as much as possible.

About

SCPI Parser library aims to provide parsing ability of SCPI commands on instrument side. All commands are defined by its patterns eg: "STATus:QUEStionable:EVENt?".

Source codes are published with open source BSD 2-Clause License.

SCPI parser library is based on these standards

SCPI version compliance



SCPI version v1999.0

Supported command patterns









Feature Pattern example
Short and long form MEASure means MEAS or MEASURE command
Common command *CLS
Compound command CONFigure:VOLTage
Query command MEASure:VOLTage?, *IDN?
Optional keywords MEASure:VOLTage[:DC]?
Numeric keyword suffix
Multiple identical capabilities
OUTput#:FREQuency

Supported parameter types














Type Example
Decimal 10, 10.5
Decimal with suffix -5.5 V, 1.5 KOHM
Hexadecimal #HFF
Octal #Q77
Binary #B11
String "text", 'text'
Arbitrary block #12AB
Program expression (1)
Numeric list (1,2:50,80)
Channel list (@1!2:3!4,5!6)
Character data MINimum, DEFault, INFinity

编辑 | blame | 历史 | 原始文档
BSD 2-Clause License

Copyright (c) 2012-2018, Jan Breuer
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
CMakeLists 755 b
README 3 KB