rohdeschwarz  0.2.0
TCPIP socket library for Rohde & Schwarz instrument control
data_format.hpp
Go to the documentation of this file.
1 
7 #ifndef ROHDESCHWARZ_INSTRUMENTS_VNA_DATA_FORMAT_HPP
8 #define ROHDESCHWARZ_INSTRUMENTS_VNA_DATA_FORMAT_HPP
9 
10 
11 // std lib
12 #include <string>
13 
14 
16 {
17 
18 
19 // forward declare Vna
20 class Vna;
21 
22 
36 {
37 
38 public:
39 
40  // life cycle
41 
47  DataFormat(Vna* vna);
48 
49 
50  // ascii
51 
55  bool isAscii();
56 
57 
63  void setAscii();
64 
65 
66  // binary 32 bit
67 
71  bool isBinary32Bit();
72 
73 
80  void setBinary32Bit();
81 
82 
83  // binary 64 bit
84 
88  bool isBinary64Bit();
89 
90 
97  void setBinary64Bit();
98 
99 
100  // big endian
101 
105  bool isBigEndian();
106 
107 
111  void setBigEndian();
112 
113 
114  // little endian
115 
119  bool isLittleEndian();
120 
121 
125  void setLittleEndian();
126 
127 private:
128 
129  Vna* _vna;
130 
131 
132  // helpers
133 
139  std::string dataFormat();
140 
141 
147  std::string byteOrder();
148 
149 
150 }; // class DataFormat
151 
152 
153 } // namespace rohdeschwarz::instruments::vna
154 #endif // ROHDESCHWARZ_INSTRUMENTS_VNA_DATA_FORMAT_HPP
Object-oriented control of the data transfer format and byte order.
Definition: data_format.hpp:36
void setBigEndian()
Sets the byte order for float data transfer to big-endian.
Definition: data_format.cpp:64
void setLittleEndian()
Sets the byte order for float data transfer to little-endian.
Definition: data_format.cpp:76
bool isLittleEndian()
Queries if the byte order for float data transfer is little-endian.
Definition: data_format.cpp:70
bool isBinary32Bit()
Queries if data transfer format is 32-bit float.
Definition: data_format.cpp:34
bool isAscii()
Queries if data transfer format is ASCII.
Definition: data_format.cpp:22
void setAscii()
Sets data transfer format to ASCII.
Definition: data_format.cpp:28
void setBinary64Bit()
Sets data transfer format to 64-bit float.
Definition: data_format.cpp:52
bool isBinary64Bit()
Queries if data transfer format is 64-bit float.
Definition: data_format.cpp:46
bool isBigEndian()
Queries if the byte order for float data transfer is big-endian.
Definition: data_format.cpp:58
void setBinary32Bit()
Sets data transfer format to 32-bit float.
Definition: data_format.cpp:40
Object-oriented R&S ZNX-series VNA control.
Definition: vna.hpp:34