pcb 4.1.1
An interactive printed circuit board layout editor.
|
IPC-D-356 Netlist export. More...
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "data.h"
#include "config.h"
#include "global.h"
#include "rats.h"
#include "error.h"
#include "find.h"
#include "misc.h"
#include "pcb-printf.h"
#include "hid.h"
#include "hid/common/hidnogui.h"
#include "../hidint.h"
Go to the source code of this file.
Data Structures | |
struct | IPCD356_Alias |
struct | IPCD356_AliasList |
Functions | |
void | IPCD356_WriteNet (FILE *fd, char *net) |
Writes a net to the file provided. | |
void | IPCD356_WriteHeader (FILE *fd) |
Writes the IPC-D-356 Header to the file provided. | |
void | IPCD356_End (FILE *) |
int | IPCD356_Netlist (void) |
The main IPC-D-356 function. | |
int | IPCD356_WriteAliases (FILE *, IPCD356_AliasList *) |
void | ResetVisitPinsViasAndPads (void) |
void | CheckNetLength (char *, IPCD356_AliasList *) |
IPCD356_AliasList * | CreateAliasList (void) |
IPCD356_AliasList * | AddAliasToList (IPCD356_AliasList *) |
int | IPCD356_SanityCheck (void) |
static HID_Attribute * | IPCD356_get_export_options (int *n) |
static void | IPCD356_do_export (HID_Attr_Val *options) |
static void | IPCD356_parse_arguments (int *argc, char ***argv) |
void | hid_ipcd356_init () |
Variables | |
static HID_Attribute | IPCD356_options [] |
static HID_Attr_Val | IPCD356_values [NUM_OPTIONS] |
const char * | IPCD356_filename |
HID | IPCD356_hid |
IPC-D-356 Netlist export.
PCB, interactive printed circuit board design
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Contact addresses for paper mail and Email:
Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
Definition in file ipcd356.c.
IPCD356_AliasList * AddAliasToList | ( | IPCD356_AliasList * | aliaslist | ) |
Definition at line 622 of file ipcd356.c.
References IPCD356_AliasList::Alias, IPCD356_AliasList::AliasN, and realloc().
Referenced by IPCD356_WriteAliases().
void CheckNetLength | ( | char * | net, |
IPCD356_AliasList * | aliaslist | ||
) |
Definition at line 635 of file ipcd356.c.
References IPCD356_AliasList::Alias, IPCD356_AliasList::AliasN, IPCD356_Alias::NetName, and IPCD356_Alias::NName.
Referenced by IPCD356_Netlist().
IPCD356_AliasList * CreateAliasList | ( | void | ) |
Definition at line 612 of file ipcd356.c.
References IPCD356_AliasList::AliasN, and malloc().
Referenced by IPCD356_Netlist().
void hid_ipcd356_init | ( | ) |
Definition at line 697 of file ipcd356.c.
References common_nogui_init(), hid_st::description, hid_st::do_export, hid_st::exporter, hid_st::get_export_options, hid_register_hid(), IPCD356_do_export(), IPCD356_get_export_options(), IPCD356_parse_arguments(), hid_st::name, hid_st::parse_arguments, and hid_st::struct_size.
static void IPCD356_do_export | ( | HID_Attr_Val * | options | ) | [static] |
Definition at line 665 of file ipcd356.c.
References IPCD356_filename, IPCD356_get_export_options(), IPCD356_Netlist(), IPCD356_values, and HID_Attr_Val::str_value.
Referenced by hid_ipcd356_init().
void IPCD356_End | ( | FILE * | fd | ) |
Definition at line 554 of file ipcd356.c.
Referenced by IPCD356_Netlist().
static HID_Attribute* IPCD356_get_export_options | ( | int * | n | ) | [static] |
Definition at line 111 of file ipcd356.c.
References derive_default_filename(), PCBType::Filename, IPCD356_options, and PCB.
Referenced by hid_ipcd356_init(), and IPCD356_do_export().
int IPCD356_Netlist | ( | void | ) |
The main IPC-D-356 function.
Gets the filename for the netlist from the dialog.
Definition at line 444 of file ipcd356.c.
References CheckNetLength(), ClearFlagOnLinesAndPolygons(), ClearFlagOnPinsViasAndPads(), CreateAliasList(), PCBType::Data, ELEMENT_LOOP, END_LOOP, fp, IPCD356_End(), IPCD356_filename, IPCD356_SanityCheck(), IPCD356_WriteAliases(), IPCD356_WriteHeader(), IPCD356_WriteNet(), LookupConnectionByPin(), Message(), LibraryMenuType::Name, PCBType::Name, netnode_to_netname(), pin_st::Number, PAD_LOOP, PCB, pin, PIN_LOOP, ResetVisitPinsViasAndPads(), TEST_FLAG, and VIA_LOOP.
Referenced by IPCD356_do_export().
static void IPCD356_parse_arguments | ( | int * | argc, |
char *** | argv | ||
) | [static] |
Definition at line 687 of file ipcd356.c.
References hid_parse_command_line(), and hid_register_attributes().
Referenced by hid_ipcd356_init().
int IPCD356_SanityCheck | ( | void | ) |
Definition at line 652 of file ipcd356.c.
References PCBType::Data, ELEMENT_LOOP, END_LOOP, Message(), and PCB.
Referenced by IPCD356_Netlist().
int IPCD356_WriteAliases | ( | FILE * | fd, |
IPCD356_AliasList * | aliaslist | ||
) |
Definition at line 576 of file ipcd356.c.
References AddAliasToList(), IPCD356_AliasList::Alias, LibraryType::Menu, LibraryType::MenuN, LibraryMenuType::Name, PCBType::NetlistLib, IPCD356_Alias::NetName, IPCD356_Alias::NName, and PCB.
Referenced by IPCD356_Netlist().
void IPCD356_WriteHeader | ( | FILE * | fd | ) |
Writes the IPC-D-356 Header to the file provided.
The JOB name is the PCB Name (if set), otherwise the filename (including the path) is used.
The units used for the netlist depends on what is set (mils or mm).
Definition at line 135 of file ipcd356.c.
References PCBType::Filename, SettingType::grid_unit, PCBType::Name, PCB, Settings, and unit::suffix.
Referenced by IPCD356_Netlist().
void IPCD356_WriteNet | ( | FILE * | fd, |
char * | net | ||
) |
Writes a net to the file provided.
The net name is passed through the "net" and should be 14 characters max.
The function scans through pads, pins and vias and looks for the FOUNDFLAG
.
Once the object has been added to the net list the VISITFLAG
is set on that object.
Definition at line 189 of file ipcd356.c.
References PCBType::Data, pin_st::DrillingHole, ELEMENT_LOOP, END_LOOP, SettingType::grid_unit, pin_st::Mask, PCBType::MaxHeight, pin_st::Number, PAD_LOOP, PCB, pin, PIN_LOOP, SET_FLAG, Settings, unit::suffix, TEST_FLAG, pin_st::Thickness, VIA_LOOP, pin_st::X, and pin_st::Y.
Referenced by IPCD356_Netlist().
void ResetVisitPinsViasAndPads | ( | void | ) |
Definition at line 560 of file ipcd356.c.
References CLEAR_FLAG, PCBType::Data, ELEMENT_LOOP, END_LOOP, PAD_LOOP, PCB, pin, PIN_LOOP, and VIA_LOOP.
Referenced by IPCD356_Netlist().
const char* IPCD356_filename |
Definition at line 85 of file ipcd356.c.
Referenced by IPCD356_do_export(), and IPCD356_Netlist().
HID_Attribute IPCD356_options[] [static] |
{ { "netlistfile", "Name of the IPC-D-356 Netlist output file", HID_String, 0, 0, {0, 0, 0}, 0, 0 }, #define HA_IPCD356_filename 0 }
Definition at line 62 of file ipcd356.c.
Referenced by IPCD356_get_export_options().
HID_Attr_Val IPCD356_values[NUM_OPTIONS] [static] |
Definition at line 83 of file ipcd356.c.
Referenced by IPCD356_do_export().