26 #ifndef NETLIST_EXPORTER_PSPICE_H 27 #define NETLIST_EXPORTER_PSPICE_H 140 bool WriteNetlist(
const wxString& aOutFileName,
unsigned aNetlistOptions )
override;
217 char c = tolower( aStr[0] );
220 return !( c ==
'n' || c ==
'f' || c ==
'0' );
NETLIST_EXPORTER_PSPICE(SCHEMATIC *aSchematic)
bool Format(OUTPUTFORMATTER *aFormatter, unsigned aCtl)
const SPICE_ITEM_LIST & GetSpiceItems() const
Return list of items representing schematic components in the Spice world.
Container for project specific data.
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
std::set< wxString > m_libraries
Map circuit nodes to net names.
SCH_COMPONENT * m_parent
< Schematic component represented by this SPICE_ITEM.
Structure to represent a schematic component in the Spice simulation.
std::vector< wxString > m_pins
Numeric indices into m_SortedComponentPinList.
static const wxString & GetSpiceFieldName(SPICE_FIELD aField)
Return a string used for a particular component field related to Spice simulation.
const std::vector< wxString > GetDirectives() const
Return a vector of Spice directives found in the schematics.
bool m_enabled
Array containing Standard Pin Name.
std::vector< wxString > m_directives
Libraries used by the simulated circuit.
static bool StringToBool(const wxString &aStr)
Convert typical boolean string values (no/yes, true/false, 1/0) to a boolean value.
SPICE_ITEM_LIST m_spiceItems
wxString m_refName
Flag to indicate whether the component should be used in simulation.
static wxString GetSpiceFieldDefVal(SPICE_FIELD aField, SCH_COMPONENT *aComponent, unsigned aCtl)
Retrieve the default value for a given field.
wxString m_title
< Spice simulation title found in the processed schematic sheet
NET_INDEX_MAP m_netMap
List of items representing schematic components in the Spice world.
virtual void writeDirectives(OUTPUTFORMATTER *aFormatter, unsigned aCtl) const
Save the Spice directives.
void UpdateDirectives(unsigned aCtl)
Update the vector of Spice directives placed in the schematics.
const NET_INDEX_MAP & GetNetIndexMap() const
Return a map of circuit nodes to net names.
bool ProcessNetlist(unsigned aCtl)
Process the netlist to create net mapping and a list of SPICE_ITEMs.
std::list< SPICE_ITEM > SPICE_ITEM_LIST
Net name to circuit node number mapping.
static void ReplaceForbiddenChars(wxString &aNetName)
Replace illegal spice net name characters with an underscore.
virtual ~NETLIST_EXPORTER_PSPICE()
NETLIST_EXPORTER_BASE is a abstract class used for the netlist exporters that eeschema supports.
std::map< wxString, int > NET_INDEX_MAP
bool WriteNetlist(const wxString &aOutFileName, unsigned aNetlistOptions) override
Write to specified output file.
static wxString GetSpiceField(SPICE_FIELD aField, SCH_COMPONENT *aComponent, unsigned aCtl)
Retrieve either the requested field value or the default value.
Generate a PSPICE compatible netlist.
static const std::vector< wxString > m_spiceFields
wxChar m_primitive
Library model (for semiconductors and subcircuits), component value (for passive components) or volta...
wxString GetSpiceDevice(const wxString &aComponent) const
Return name of Spice device corresponding to a schematic component.
SPICE_NETLIST_OPTIONS
Flags for Spice netlist generation (can be combined)
static const std::vector< wxString > & GetSpiceFields()
Return a vector of component field names related to Spice simulation.
std::vector< int > m_pinSequence