THM1176InstrumentDriver 1.1
C++ API for Metrolab THM1176
Loading...
Searching...
No Matches
MTL::SCPI Namespace Reference

Typedefs

typedef std::vector< unsigned char > tChannel
 SCPI channel
 
typedef std::vector< tChanneltChannelList
 SCPI channel list
 

Functions

template<class iterator_type>
bool IsArbitraryBlock (const iterator_type first, const iterator_type last, size_t &rStartOffset, size_t &rLength)
 Find arbitrary-block data within a buffer.
 
void ToArbitraryBlock (const std::string &rStr, std::string &rArbitraryBlock, bool InfiniteFormat=false)
 Package data as an arbitrary block.
 
template<class iterator_type>
void FromStringChannelList (iterator_type first, iterator_type last, tChannelList &rChannelList)
 Decode channel list string.
 
void ToStringChannelList (const tChannelList &rChannelList, std::string &rStr)
 Encode channel list string.
 
void FromBinaryChannelList (const char *pBinaryChanList, size_t Len, tChannelList &rChannelList)
 Decode binary channel list.
 
void ToBinaryChannelList (const tChannelList &rChannelList, std::vector< char > &rBinaryChanList)
 Encode binary channel list.
 
void SplitString (const std::string &rStr, std::vector< std::string > &rStrings, char Sep)
 Split a string into substrings separated by a given character.
 

Typedef Documentation

◆ tChannel

typedef std::vector<unsigned char> MTL::SCPI::tChannel

SCPI channel

Definition at line 28 of file SCPIParsing.h.

◆ tChannelList

typedef std::vector<tChannel> MTL::SCPI::tChannelList

SCPI channel list

Definition at line 29 of file SCPIParsing.h.

Function Documentation

◆ FromBinaryChannelList()

void MTL::SCPI::FromBinaryChannelList ( const char * pBinaryChanList,
size_t Len,
tChannelList & rChannelList )
inline

Decode binary channel list.

Parameters
[in]pBinaryChanListPointer to binary channel list.
[in]LenLength of binary channel list, in bytes.
[out]rChannelListResulting channel list.

Definition at line 221 of file SCPIParsing.h.

◆ FromStringChannelList()

template<class iterator_type>
void MTL::SCPI::FromStringChannelList ( iterator_type first,
iterator_type last,
tChannelList & rChannelList )

Decode channel list string.

Template Parameters
iterator_typeType of iterator
Parameters
[in]firstBeginning of buffer.
[in]lastEnd of buffer.
[out]rChannelListResulting channel list.

Definition at line 155 of file SCPIParsing.h.

◆ IsArbitraryBlock()

template<class iterator_type>
bool MTL::SCPI::IsArbitraryBlock ( const iterator_type first,
const iterator_type last,
size_t & rStartOffset,
size_t & rLength )

Find arbitrary-block data within a buffer.

Template Parameters
iterator_typeType of iterator
Parameters
[in]firstBeginning of buffer.
[in]lastEnd of buffer.
[out]rStartOffsetStarting offset of the arbitrary-block data.
[out]rLengthLength of the arbitrary-block data.
Returns
True if successful.

Definition at line 87 of file SCPIParsing.h.

◆ SplitString()

void MTL::SCPI::SplitString ( const std::string & rStr,
std::vector< std::string > & rStrings,
char Sep )
inline

Split a string into substrings separated by a given character.

Parameters
[in]rStrString to be split.
[out]rStringsResulting substrings.
[in]SepSeparator character.

Definition at line 253 of file SCPIParsing.h.

◆ ToArbitraryBlock()

void MTL::SCPI::ToArbitraryBlock ( const std::string & rStr,
std::string & rArbitraryBlock,
bool InfiniteFormat = false )
inline

Package data as an arbitrary block.

Parameters
[in]rStrData to be packaged.
[out]rArbitraryBlockResulting arbitray block.
[in]InfiniteFormatWhether or not to use "infinite format" (header = "#0")

Definition at line 142 of file SCPIParsing.h.

◆ ToBinaryChannelList()

void MTL::SCPI::ToBinaryChannelList ( const tChannelList & rChannelList,
std::vector< char > & rBinaryChanList )
inline

Encode binary channel list.

Parameters
[in]rChannelListChannel list.
[out]rBinaryChanListResulting binary channel list.

Definition at line 238 of file SCPIParsing.h.

◆ ToStringChannelList()

void MTL::SCPI::ToStringChannelList ( const tChannelList & rChannelList,
std::string & rStr )
inline

Encode channel list string.

Parameters
[in]rChannelListChannel list.
[out]rStrResulting string.

Definition at line 201 of file SCPIParsing.h.