My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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: check_touchstone.h 1825 2011-03-11 20:42:14Z ela $
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 class dataset;
41 class vector;
42 class strlist;
43 
44 extern dataset * touchstone_result;
45 extern vector * touchstone_vector;
46 extern strlist * touchstone_idents;
47 
48 struct touchstone_t {
49  const char * unit;
50  char parameter;
51  const char * format;
52  double resistance;
53  double factor;
54  int ports;
55  int noise;
56  int lines;
57 };
58 
59 /* Externalize variables used by the scanner and parser. */
60 extern int touchstone_lineno;
61 extern FILE * touchstone_in;
62 void touchstone_restart (FILE *);
63 
64 __BEGIN_DECLS
65 
66 /* Externalize variables used by the scanner and parser. */
67 extern struct touchstone_t touchstone_options;
68 
69 /* Available functions of the checker. */
70 int touchstone_parse (void);
71 int touchstone_error (char *);
72 int touchstone_lex (void);
73 int touchstone_lex_destroy (void);
74 int touchstone_check (void);
75 void touchstone_init (void);
76 void touchstone_destroy (void);
77 
78 __END_DECLS
79 
80 #endif /* __CHECK_TOUCHSTONE_H__ */