| THM1176InstrumentDriver 1.2 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< tChannel > | tChannelList
| 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] | pBinaryChanList | Pointer to binary channel list.
  [in] | Len | Length of binary channel list, in bytes.
  [out] | rChannelList | Resulting 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_type | Type of iterator

Parameters

  [in] | first | Beginning of buffer.
  [in] | last | End of buffer.
  [out] | rChannelList | Resulting 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_type | Type of iterator

Parameters

  [in] | first | Beginning of buffer.
  [in] | last | End of buffer.
  [out] | rStartOffset | Starting offset of the arbitrary-block data.
  [out] | rLength | Length 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] | rStr | String to be split.
  [out] | rStrings | Resulting substrings.
  [in] | Sep | Separator 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] | rStr | Data to be packaged.
  [out] | rArbitraryBlock | Resulting arbitray block.
  [in] | InfiniteFormat | Whether 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] | rChannelList | Channel list.
  [out] | rBinaryChanList | Resulting 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] | rChannelList | Channel list.
  [out] | rStr | Resulting string.

Definition at line 201 of file SCPIParsing.h.