Lab::SCPI - Match SCPI headers and parameters against keywords.
This module exports a single function:
Return true, if $header matches the SCPI keyword expression $keyword.
$header
$keyword
The calls
scpi_match($header, 'voltage[:APERture]') scpi_match($header, 'voltage|CURRENT|resistance') scpi_match($header, '[:abcdef]:ghi[:jkl]')
are convenient replacements for
$header =~ /^(voltage:aperture|voltage:aper|voltage|volt:aperture|volt:aper|volt)$/i $header =~ /^(voltage|volt|current|curr|resistance|res)$/i $header =~ /^(:abcdef:ghi:jkl|:abcdef:ghi|:abcd:ghi:jkl|:abcd:ghi|:ghi:jkl|:ghi)$/i
respectively.
Leading and trailing whitespace is removed from the first argument, before matching against the keyword.
See Sec. 6 "Program Headers" in the SCPI spec. Always give the long form of a keyword; the short form will be derived automatically. The colon is optional for the first mnemonic. There must be at least one non-optional mnemonic in the keyword.
scpi_match will throw, if it is given an invalid keyword.
scpi_match
To install Lab::Measurement, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lab::Measurement
CPAN shell
perl -MCPAN -e shell install Lab::Measurement
For more information on module installation, please visit the detailed CPAN module installation guide.