![]() |
THM1176InstrumentDriver
1.0
C++ API for Metrolab THM1176
|
#include <SCPIInstrumentBuffer.h>
Classes | |
struct | sToken |
Location of a token within a buffer. More... | |
Public Types | |
typedef std::vector< sToken > | tTokens |
List of tokens. More... | |
Public Member Functions | |
CSCPIBufferParser (std::vector< char >::const_iterator begin, std::vector< char >::const_iterator end) | |
Constructor. More... | |
std::vector< char >::const_iterator | begin () |
Return the beginning of the data to be parsed. More... | |
std::vector< char >::const_iterator | end () |
Return the end of the data to be parsed. More... | |
const tTokens | Tokenize (const char Separator=';', size_t Offset=0) |
Split the buffer into tokens. More... | |
bool | GetNext (std::vector< char >::const_iterator &rNextBegin, std::vector< char >::const_iterator &rNextEnd, const char Separator=';') |
Find the next token. More... | |
void | SetNextOffset (std::vector< char >::const_iterator Offset) |
Manually set the offset to the next token. More... | |
SCPI buffer parser.
Class to help parse SCPI reponse strings.
Definition at line 216 of file SCPIInstrumentBuffer.h.
typedef std::vector<sToken> MTL::Instrument::CSCPIBufferParser::tTokens |
List of tokens.
Definition at line 233 of file SCPIInstrumentBuffer.h.
|
inline |
Constructor.
[in] | begin | Beginning of the data to be parsed. |
[out] | end | End of the data to be parsed. |
Definition at line 239 of file SCPIInstrumentBuffer.h.
|
inline |
Return the beginning of the data to be parsed.
Definition at line 243 of file SCPIInstrumentBuffer.h.
|
inline |
Return the end of the data to be parsed.
Definition at line 249 of file SCPIInstrumentBuffer.h.
|
inline |
Find the next token.
Attention: When next token is an arbitrary block, it may contain a ';', which causes rNextEnd to be wrong.
[out] | rNextBegin | Beginning of next token. |
[out] | rNextEnd | End of next token. |
[in] | Separator | Separator between tokens. |
Definition at line 297 of file SCPIInstrumentBuffer.h.
|
inline |
Manually set the offset to the next token.
When parsing arbitrary block, it is necessary to force offset to skip ';' chars that are not separators.
[in] | Offset | Offset to next token. |
Definition at line 330 of file SCPIInstrumentBuffer.h.
|
inline |
Split the buffer into tokens.
[in] | Separator | Separator between tokens. |
[in] | Offset | Starting offset, relative to the beginning of the data to be parsed. |
Definition at line 258 of file SCPIInstrumentBuffer.h.