Qucs-core  0.0.19
check_touchstone.h
Go to the documentation of this file.
00001 /*
00002  * check_touchstone.h - checker definitions for Touchstone files
00003  *
00004  * Copyright (C) 2003, 2004, 2005, 2006 Stefan Jahn <stefan@lkcc.org>
00005  *
00006  * This is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2, or (at your option)
00009  * any later version.
00010  *
00011  * This software is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this package; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  * $Id$
00022  *
00023  */
00024 
00025 #ifndef __CHECK_TOUCHSTONE_H__
00026 #define __CHECK_TOUCHSTONE_H__
00027 
00028 /* Touchstone (R) File Format Specification Rev 1.1
00029 
00030    A Touchstone (R) file (also known as an SnP file) is an ASCII text file
00031    used for documenting the n-port network parameter data of an active
00032    device or passive interconnect network.  While Touchstone file have
00033    been accepted as a de-facto standard for the transfer of frequency
00034    dependent n-port network data, up till now there has been no formal
00035    documentation of the file format or syntax.  This document, base upon
00036    information from Agilent Corporation (the originator of Touchstone), is
00037    a formal specification of the Touchstone file format, intended for use
00038    with documents and specifications produced by the EIA/IBIS Open Forum. */
00039 
00040 // forward declarations
00041 namespace qucs {
00042   class dataset;
00043   class vector;
00044   class strlist;
00045 }
00046 
00047 extern qucs::dataset * touchstone_result;
00048 extern qucs::vector  * touchstone_vector;
00049 extern qucs::strlist * touchstone_idents;
00050 
00051 struct touchstone_t {
00052   const char * unit;
00053   char parameter;
00054   const char * format;
00055   double resistance;
00056   double factor;
00057   int ports;
00058   int noise;
00059   int lines;
00060 };
00061 
00062 /* Externalize variables used by the scanner and parser. */
00063 extern int touchstone_lineno;
00064 extern FILE * touchstone_in;
00065 void touchstone_restart (FILE *);
00066 
00067 __BEGIN_DECLS
00068 
00069 /* Externalize variables used by the scanner and parser. */
00070 extern struct touchstone_t touchstone_options;
00071 
00072 /* Available functions of the checker. */
00073 int touchstone_parse (void);
00074 int touchstone_error (const char *);
00075 int touchstone_lex (void);
00076 int touchstone_lex_destroy (void);
00077 int touchstone_check (void);
00078 void touchstone_init (void);
00079 void touchstone_destroy (void);
00080 
00081 __END_DECLS
00082 
00083 #endif /* __CHECK_TOUCHSTONE_H__ */