KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN Struct Reference

< "PARTDEFINITIONPIN" node name More...

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Types

enum  POSITION { POSITION::TOP_RIGHT = 0, POSITION::TOP_LEFT = 1, POSITION::BOTTOM_LEFT = 2, POSITION::BOTTOM_RIGHT = 3 }
 Positioning of pin names can be in one of four quadrants. More...
 

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 

Public Attributes

PART_DEFINITION_PIN_ID ID = UNDEFINED_VALUE
 
wxString Identifier = wxEmptyString
 This should match a pad identifier in the component footprint subnode="PINIDENTIFIER". More...
 
wxString Name = wxEmptyString
 Can be empty. More...
 
wxString Label = wxEmptyString
 This Can be empty (subnode= "PINLABEL") From CADSTAR Help: "Pin Labels are an optional replacement for the free text sometimes placed in schematic symbols. More...
 
wxString Signal = wxEmptyString
 Usually for Power/Ground pins, (subnode="PINSIGNAL") More...
 
GATE_ID TerminalGate
 (subnode="PINTERM", param0) More...
 
TERMINAL_ID TerminalPin
 (subnode="PINTERM", param1) More...
 
PIN_TYPE Type = PIN_TYPE::UNCOMMITTED
 subnode="PINTYPE" More...
 
long Load = UNDEFINED_VALUE
 The electrical current expected on the pin (It is unclear what the units are, but only accepted values are integers) subnode ="PINLOAD". More...
 
POSITION Position
 The pin names will use these positions when the symbol is added to a schematic design subnode="PINPOSITION". More...
 

Detailed Description

< "PARTDEFINITIONPIN" node name

Definition at line 958 of file cadstar_archive_parser.h.

Member Enumeration Documentation

◆ POSITION

Positioning of pin names can be in one of four quadrants.

Enumerator
TOP_RIGHT 

Default.

TOP_LEFT 
BOTTOM_LEFT 
BOTTOM_RIGHT 

Definition at line 963 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1680 of file cadstar_archive_parser.cpp.

1681 {
1682  wxASSERT( aNode->GetName() == wxT( "PARTDEFINITIONPIN" ) );
1683 
1684  ID = GetXmlAttributeIDLong( aNode, 0 );
1685 
1686  XNODE* cNode = aNode->GetChildren();
1687 
1688  for( ; cNode; cNode = cNode->GetNext() )
1689  {
1690  wxString cNodeName = cNode->GetName();
1691 
1692  if( cNodeName == wxT( "PINNAME" ) )
1693  {
1694  Name = GetXmlAttributeIDString( cNode, 0 );
1695  }
1696  else if( cNodeName == wxT( "PINLABEL" ) )
1697  {
1698  Label = GetXmlAttributeIDString( cNode, 0 );
1699  }
1700  else if( cNodeName == wxT( "PINSIGNAL" ) )
1701  {
1702  Signal = GetXmlAttributeIDString( cNode, 0 );
1703  }
1704  else if( cNodeName == wxT( "PINTERM" ) )
1705  {
1706  TerminalGate = GetXmlAttributeIDString( cNode, 0 );
1707  TerminalPin = GetXmlAttributeIDLong( cNode, 1 );
1708  }
1709  else if( cNodeName == wxT( "PINTYPE" ) )
1710  {
1711  Type = GetPinType( cNode );
1712  }
1713  else if( cNodeName == wxT( "PINLOAD" ) )
1714  {
1715  Load = GetXmlAttributeIDLong( cNode, 0 );
1716  }
1717  else if( cNodeName == wxT( "PINPOSITION" ) )
1718  {
1719  Position = (POSITION) GetXmlAttributeIDLong( cNode, 0 );
1720  }
1721  else if( cNodeName == wxT( "PINIDENTIFIER" ) )
1722  {
1723  Identifier = GetXmlAttributeIDString( cNode, 0 );
1724  }
1725  else
1726  {
1727  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1728  }
1729  }
1730 }
wxString Label
This Can be empty (subnode= "PINLABEL") From CADSTAR Help: "Pin Labels are an optional replacement fo...
long Load
The electrical current expected on the pin (It is unclear what the units are, but only accepted value...
static PIN_TYPE GetPinType(XNODE *aNode)
TERMINAL_ID TerminalPin
(subnode="PINTERM", param1)
POSITION
Positioning of pin names can be in one of four quadrants.
POSITION Position
The pin names will use these positions when the symbol is added to a schematic design subnode="PINPOS...
XNODE * GetChildren() const
Definition: xnode.h:62
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
wxString Identifier
This should match a pad identifier in the component footprint subnode="PINIDENTIFIER".
Hold an XML or S-expression element.
Definition: xnode.h:43
XNODE * GetNext() const
Definition: xnode.h:67
wxString Signal
Usually for Power/Ground pins, (subnode="PINSIGNAL")
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
GATE_ID TerminalGate
(subnode="PINTERM", param0)

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), Load(), and THROW_UNKNOWN_NODE_IO_ERROR.

Member Data Documentation

◆ ID

PART_DEFINITION_PIN_ID CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::ID = UNDEFINED_VALUE

Definition at line 971 of file cadstar_archive_parser.h.

◆ Identifier

wxString CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Identifier = wxEmptyString

This should match a pad identifier in the component footprint subnode="PINIDENTIFIER".

It is assumed that this could be empty in earlier versions of CADSTAR

Definition at line 973 of file cadstar_archive_parser.h.

◆ Label

wxString CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Label = wxEmptyString

This Can be empty (subnode= "PINLABEL") From CADSTAR Help: "Pin Labels are an optional replacement for the free text sometimes placed in schematic symbols.

Using Pin Labels instead has the advantage of associating each piece of label text with a particular pin. This means that the text remains correctly placed after any Gate and Pin Swaps are Back Annotated to the Schematic design." This seems to be equivalent to "Pin Name" in KiCad.

Definition at line 983 of file cadstar_archive_parser.h.

◆ Load

long CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Load = UNDEFINED_VALUE

The electrical current expected on the pin (It is unclear what the units are, but only accepted values are integers) subnode ="PINLOAD".

Definition at line 1003 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Name = wxEmptyString

Can be empty.

If empty the pin name displayed wil be Identifier (subnode="PINNAME") This seems to be equivalent to "Pin Number" in KiCad.

Definition at line 978 of file cadstar_archive_parser.h.

◆ Position

POSITION CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Position
Initial value:

The pin names will use these positions when the symbol is added to a schematic design subnode="PINPOSITION".

Definition at line 1007 of file cadstar_archive_parser.h.

◆ Signal

wxString CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Signal = wxEmptyString

Usually for Power/Ground pins, (subnode="PINSIGNAL")

Definition at line 998 of file cadstar_archive_parser.h.

◆ TerminalGate

GATE_ID CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::TerminalGate

(subnode="PINTERM", param0)

Definition at line 1000 of file cadstar_archive_parser.h.

◆ TerminalPin

TERMINAL_ID CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::TerminalPin

(subnode="PINTERM", param1)

Definition at line 1001 of file cadstar_archive_parser.h.

◆ Type

PIN_TYPE CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Type = PIN_TYPE::UNCOMMITTED

subnode="PINTYPE"

Definition at line 1002 of file cadstar_archive_parser.h.


The documentation for this struct was generated from the following files: