C++ Instrument Catalog
Typedefs | Functions
MTL::SCPI Namespace Reference

Typedefs

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

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

Typedef Documentation

◆ tChannel

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

SCPI channel

Definition at line 25 of file SCPIParsing.h.

◆ tChannelList

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

SCPI channel list

Definition at line 26 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 213 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 147 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 84 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 245 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 132 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 230 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 193 of file SCPIParsing.h.