Touchstone (SxP) file parser.
More...
#include <TouchstoneParser.h>
|
| TouchstoneParser () |
| Default constructor, does nothing.
|
|
virtual | ~TouchstoneParser () |
| Default destructor, does nothing.
|
|
bool | Load (std::string fname, SParameters ¶ms) |
| Reads a SxP file. More...
|
|
|
void | ComplexToPolar (float &f1, float &f2) |
| Converts a complex number in (real, imaginary) form to (magnitude, angle) More...
|
|
bool | ReadFloat (const char *buf, size_t &i, size_t len, float &f) |
| Reads a single ASCII float from the input buffer. More...
|
|
Touchstone (SxP) file parser.
◆ ComplexToPolar()
void TouchstoneParser::ComplexToPolar |
( |
float & |
f1, |
|
|
float & |
f2 |
|
) |
| |
|
protected |
Converts a complex number in (real, imaginary) form to (magnitude, angle)
- Parameters
-
f1 | Input real part, output magnitude part |
f2 | Input imaginary part, output angle part |
◆ Load()
bool TouchstoneParser::Load |
( |
std::string |
fname, |
|
|
SParameters & |
params |
|
) |
| |
Reads a SxP file.
- Parameters
-
| fname | Path to the .s*p file |
[out] | params | The parsed S-parameters (if successful) |
- Returns
- True on success, false on failure
is a comment, ignore everything until the next newline
◆ ReadFloat()
bool TouchstoneParser::ReadFloat |
( |
const char * |
buf, |
|
|
size_t & |
i, |
|
|
size_t |
len, |
|
|
float & |
f |
|
) |
| |
|
protected |
Reads a single ASCII float from the input buffer.
- Parameters
-
| buf | Input buffer |
| i | Index of the cursor within the buffer |
| len | Size of the buffer |
[out] | f | Output value |
| True | on success, false on EOF or malformed data |
The documentation for this class was generated from the following files: