2007-09-20 21:06:49 +00:00
|
|
|
/**********************************************/
|
|
|
|
/* Module de calcul de la Netliste: netlist.h */
|
|
|
|
/**********************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#ifndef _NETLIST_H_
|
|
|
|
#define _NETLIST_H_
|
|
|
|
|
|
|
|
#ifndef eda_global
|
|
|
|
#define eda_global extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define NETLIST_HEAD_STRING "EESchema Netlist Version 1.1"
|
|
|
|
|
|
|
|
#define ISBUS 1
|
|
|
|
|
|
|
|
|
|
|
|
/* Indicateurs de type de netliste generee */
|
2007-09-20 21:06:49 +00:00
|
|
|
typedef enum {
|
|
|
|
NET_TYPE_NOT_INIT = 0,
|
|
|
|
NET_TYPE_PCBNEW,
|
|
|
|
NET_TYPE_ORCADPCB2,
|
|
|
|
NET_TYPE_CADSTAR,
|
|
|
|
NET_TYPE_SPICE,
|
|
|
|
NET_TYPE_CUSTOM1,
|
|
|
|
NET_TYPE_CUSTOM2,
|
|
|
|
NET_TYPE_CUSTOM3,
|
|
|
|
NET_TYPE_CUSTOM4,
|
|
|
|
NET_TYPE_CUSTOM5,
|
|
|
|
NET_TYPE_CUSTOM6,
|
|
|
|
NET_TYPE_CUSTOM7,
|
|
|
|
NET_TYPE_CUSTOM8,
|
|
|
|
NET_TYPE_MAX
|
|
|
|
} TypeNetForm;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Max pin number per component and footprint */
|
|
|
|
#define MAXPIN 5000
|
|
|
|
|
2007-09-21 04:40:12 +00:00
|
|
|
enum NetObjetType { /* Type des objets de Net */
|
2007-09-20 21:06:49 +00:00
|
|
|
NET_SEGMENT,
|
|
|
|
NET_BUS,
|
|
|
|
NET_JONCTION,
|
|
|
|
NET_LABEL,
|
|
|
|
NET_GLOBLABEL,
|
|
|
|
NET_BUSLABELMEMBER,
|
|
|
|
NET_GLOBBUSLABELMEMBER,
|
|
|
|
NET_SHEETBUSLABELMEMBER,
|
|
|
|
NET_SHEETLABEL,
|
|
|
|
NET_PINLABEL,
|
|
|
|
NET_PIN,
|
|
|
|
NET_NOCONNECT
|
2007-09-21 04:40:12 +00:00
|
|
|
};
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-21 04:40:12 +00:00
|
|
|
enum IsConnectType { /* Valeur du Flag de connection */
|
2007-09-20 21:06:49 +00:00
|
|
|
UNCONNECT, /* Pin ou Label non connecte */
|
|
|
|
NOCONNECT, /* Pin volontairement non connectee (Symb. NoConnect utilise) */
|
|
|
|
CONNECT /* connexion normale */
|
2007-09-21 04:40:12 +00:00
|
|
|
};
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-20 21:06:49 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* Structure decrivant 1 element de connexion (pour netlist ) */
|
|
|
|
class ObjetNetListStruct
|
|
|
|
{
|
|
|
|
public:
|
2007-09-21 04:40:12 +00:00
|
|
|
EDA_BaseStruct* m_Comp; /* Pointeur sur la definition de l'objet */
|
2007-09-20 21:06:49 +00:00
|
|
|
void* m_Link; /* Pour SheetLabelStruct: Pointeur sur la feuille de hierarchie
|
|
|
|
* Pour les Pins: pointeur sur le composant */
|
|
|
|
int m_Flag; /* flag pour calculs internes */
|
|
|
|
SCH_SCREEN* m_Screen; /* Ecran d'appartenance */
|
|
|
|
NetObjetType m_Type;
|
|
|
|
int m_ElectricalType; /* Pour Pins et sheet labels: type electrique */
|
|
|
|
int m_NetCode; /* pour elements simples */
|
|
|
|
int m_BusNetCode; /* pour connexions type bus */
|
|
|
|
int m_Member; /* pour les labels type BUSWIRE ( labels de bus eclate )
|
|
|
|
* numero de membre */
|
|
|
|
IsConnectType m_FlagOfConnection;
|
|
|
|
int m_SheetNumber; /* Sheet number for this item */
|
|
|
|
int m_NumInclude; /* Numero de sous schema correpondant a la sheet (Gestion des GLabels et Pin Sheet)*/
|
|
|
|
long m_PinNum; /* numero de pin( 4 octets -> 4 codes ascii) */
|
|
|
|
const wxString* m_Label; /* Tous types Labels:pointeur sur la wxString definissant le label */
|
|
|
|
wxPoint m_Start, m_End;
|
2007-09-21 04:40:12 +00:00
|
|
|
|
|
|
|
#if defined(DEBUG)
|
|
|
|
void Show( std::ostream& out, int ndx );
|
|
|
|
#endif
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
2007-09-20 21:06:49 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* Structure decrivant 1 composant de la schematique (pour annotation ) */
|
|
|
|
struct CmpListStruct
|
|
|
|
{
|
|
|
|
public:
|
2007-09-20 21:06:49 +00:00
|
|
|
EDA_SchComponentStruct* m_Cmp; /* Pointeur sur le composant */
|
|
|
|
int m_NbParts; /* Nombre de parts par boitier */
|
|
|
|
bool m_PartsLocked; // For multi part components: True if the part cannot be changed
|
|
|
|
int m_Unit; /* Numero de part */
|
|
|
|
int m_Sheet; /* Numero de hierarchie */
|
|
|
|
unsigned long m_TimeStamp; /* Signature temporelle */
|
|
|
|
int m_IsNew; /* != 0 pour composants non annotes */
|
|
|
|
char m_TextValue[32]; /* Valeur */
|
|
|
|
char m_TextRef[32]; /* Reference ( hors numero ) */
|
|
|
|
int m_NumRef; /* Numero de reference */
|
|
|
|
int m_Flag; /* flag pour calculs internes */
|
|
|
|
wxPoint m_Pos; /* position components */
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* Global Variables */
|
|
|
|
eda_global int g_NbrObjNet;
|
2007-09-20 21:06:49 +00:00
|
|
|
eda_global ObjetNetListStruct* g_TabObjNet;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* Prototypes: */
|
2007-09-20 21:06:49 +00:00
|
|
|
void WriteNetList( WinEDA_SchematicFrame* frame, const wxString& FileNameNL, bool use_netnames );
|
|
|
|
void FreeTabNetList( ObjetNetListStruct* TabNetItems, int NbrNetItems );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|