rohdeschwarz  0.2.0
TCPIP socket library for Rohde & Schwarz instrument control
Static Public Member Functions | Public Attributes | List of all members
rohdeschwarz::scpi::IndexName Struct Reference

Data type for handling named and indexed quantities. More...

#include <index_name.hpp>

Static Public Member Functions

static std::vector< IndexNameparse (const char *csvList)
 Parses index-name pairs from text. More...
 
static std::vector< IndexNameparse (const std::string &csvList)
 Parses index-name pairs from text. More...
 
static std::vector< unsigned int > indexesFrom (const std::vector< IndexName > &list)
 Returns index list from IndexName list. More...
 
static std::vector< std::string > namesFrom (const std::vector< IndexName > &list)
 Returns names list from IndexName list. More...
 

Public Attributes

unsigned int index
 
std::string name
 

Detailed Description

Data type for handling named and indexed quantities.

The ZNX will often return a list of objects in the format:

<index1>,<name1>,<index2>,<name2>,...

This struct is designed to handle this type of data

Definition at line 29 of file index_name.hpp.

Member Function Documentation

◆ indexesFrom()

std::vector< unsigned int > IndexName::indexesFrom ( const std::vector< IndexName > &  list)
static

Returns index list from IndexName list.

Definition at line 46 of file index_name.cpp.

◆ namesFrom()

std::vector< std::string > IndexName::namesFrom ( const std::vector< IndexName > &  list)
static

Returns names list from IndexName list.

Definition at line 61 of file index_name.cpp.

◆ parse() [1/2]

std::vector< IndexName > IndexName::parse ( const char *  csvList)
static

Parses index-name pairs from text.

Parameters
[in]csvListCSV list of index-name pairs in a C style string

Definition at line 17 of file index_name.cpp.

◆ parse() [2/2]

std::vector< IndexName > IndexName::parse ( const std::string &  csvList)
static

Parses index-name pairs from text.

Parameters
[in]csvListCSV list of index-name pairs in a C++ style string

Definition at line 24 of file index_name.cpp.

Member Data Documentation

◆ index

unsigned int rohdeschwarz::scpi::IndexName::index

Definition at line 33 of file index_name.hpp.

◆ name

std::string rohdeschwarz::scpi::IndexName::name

Definition at line 34 of file index_name.hpp.


The documentation for this struct was generated from the following files: