11/* **********************************************************************************************************************
22* *
3- * libscopehal v0.1 *
3+ * libscopehal *
44* *
5- * Copyright (c) 2012-2021 Andrew D. Zonenberg and contributors *
5+ * Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
66* All rights reserved. *
77* *
88* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
3131 @file
3232 @author Andrew D. Zonenberg
3333 @brief Implementation of TouchstoneParser
34+ @ingroup core
3435 */
3536#include " scopehal.h"
3637#include < math.h>
@@ -40,17 +41,28 @@ using namespace std;
4041// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4142// TouchstoneParser
4243
44+ /* *
45+ @brief Default constructor, does nothing
46+ */
4347TouchstoneParser::TouchstoneParser ()
4448{
4549}
4650
51+ /* *
52+ @brief Default destructor, does nothing
53+ */
4754TouchstoneParser::~TouchstoneParser ()
4855{
4956
5057}
5158
5259/* *
5360 @brief Reads a SxP file
61+
62+ @param fname Path to the .s*p file
63+ @param[out] params The parsed S-parameters (if successful)
64+
65+ @return True on success, false on failure
5466 */
5567bool TouchstoneParser::Load (string fname, SParameters& params)
5668{
@@ -238,6 +250,13 @@ bool TouchstoneParser::Load(string fname, SParameters& params)
238250
239251/* *
240252 @brief Reads a single ASCII float from the input buffer
253+
254+ @param buf Input buffer
255+ @param i Index of the cursor within the buffer
256+ @param len Size of the buffer
257+ @param[out] f Output value
258+
259+ @param True on success, false on EOF or malformed data
241260 */
242261bool TouchstoneParser::ReadFloat (const char * buf, size_t & i, size_t len, float & f)
243262{
@@ -259,6 +278,9 @@ bool TouchstoneParser::ReadFloat(const char* buf, size_t& i, size_t len, float&
259278
260279/* *
261280 @brief Converts a complex number in (real, imaginary) form to (magnitude, angle)
281+
282+ @param f1 Input real part, output magnitude part
283+ @param f2 Input imaginary part, output angle part
262284 */
263285void TouchstoneParser::ComplexToPolar (float & f1, float & f2)
264286{
0 commit comments