|
ngscopeclient v0.2
|
Touchstone (SxP) file parser. More...
#include <TouchstoneParser.h>
Public Member Functions | |
| TouchstoneParser () | |
| Default constructor, does nothing. | |
| virtual | ~TouchstoneParser () |
| Default destructor, does nothing. | |
| bool | Load (const std::string &fname, SParameters ¶ms) |
| Reads a SxP file. | |
Protected Member Functions | |
| void | ComplexToPolar (float &f1, float &f2) |
| Converts a complex number in (real, imaginary) form to (magnitude, angle) | |
| bool | ReadFloat (const char *buf, size_t &i, size_t len, float &f) |
| Reads a single ASCII float from the input buffer. | |
Touchstone (SxP) file parser.
Converts a complex number in (real, imaginary) form to (magnitude, angle)
| f1 | Input real part, output magnitude part |
| f2 | Input imaginary part, output angle part |
| bool TouchstoneParser::Load | ( | const std::string & | fname, |
| SParameters & | params | ||
| ) |
Reads a SxP file.
| fname | Path to the .s*p file | |
| [out] | params | The parsed S-parameters (if successful) |
is a comment, ignore everything until the next newline
Reads a single ASCII float from the input buffer.
| 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 |