Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
check_touchstone.h
Go to the documentation of this file.
1 /*
2  * check_touchstone.h - checker definitions for Touchstone files
3  *
4  * Copyright (C) 2003, 2004, 2005, 2006 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id$
22  *
23  */
24 
25 #ifndef __CHECK_TOUCHSTONE_H__
26 #define __CHECK_TOUCHSTONE_H__
27 
28 /* Touchstone (R) File Format Specification Rev 1.1
29 
30  A Touchstone (R) file (also known as an SnP file) is an ASCII text file
31  used for documenting the n-port network parameter data of an active
32  device or passive interconnect network. While Touchstone file have
33  been accepted as a de-facto standard for the transfer of frequency
34  dependent n-port network data, up till now there has been no formal
35  documentation of the file format or syntax. This document, base upon
36  information from Agilent Corporation (the originator of Touchstone), is
37  a formal specification of the Touchstone file format, intended for use
38  with documents and specifications produced by the EIA/IBIS Open Forum. */
39 
40 // forward declarations
41 namespace qucs {
42  class dataset;
43  class vector;
44  class strlist;
45 }
46 
50 
51 struct touchstone_t {
52  const char * unit;
53  char parameter;
54  const char * format;
55  double resistance;
56  double factor;
57  int ports;
58  int noise;
59  int lines;
60 };
61 
62 /* Externalize variables used by the scanner and parser. */
63 extern int touchstone_lineno;
64 extern FILE * touchstone_in;
65 void touchstone_restart (FILE *);
66 
67 __BEGIN_DECLS
68 
69 /* Externalize variables used by the scanner and parser. */
70 extern struct touchstone_t touchstone_options;
71 
72 /* Available functions of the checker. */
73 int touchstone_parse (void);
74 int touchstone_error (const char *);
75 int touchstone_lex (void);
76 int touchstone_lex_destroy (void);
77 int touchstone_check (void);
78 void touchstone_init (void);
79 void touchstone_destroy (void);
80 
81 __END_DECLS
82 
83 #endif /* __CHECK_TOUCHSTONE_H__ */
FILE * touchstone_in
void touchstone_destroy(void)
void touchstone_init(void)
int touchstone_lineno
int touchstone_lex(void)
__BEGIN_DECLS struct touchstone_t touchstone_options
int touchstone_lex_destroy(void)
const char * format
int touchstone_parse(void)
int touchstone_error(const char *)
qucs::strlist * touchstone_idents
qucs::vector * touchstone_vector
const char * unit
int touchstone_check(void)
void touchstone_restart(FILE *)
qucs::dataset * touchstone_result