KiCad PCB EDA Suite
altium_parser_sch.h File Reference
#include <cstdint>
#include <cstring>
#include <map>
#include <vector>
#include <wx/gdicmn.h>
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  ASCH_STORAGE_FILE
 
struct  ASCH_SYMBOL
 
struct  ASCH_PIN
 
struct  ASCH_LABEL
 
struct  ASCH_BEZIER
 
struct  ASCH_POLYLINE
 
struct  ASCH_POLYGON
 
struct  ASCH_ROUND_RECTANGLE
 
struct  ASCH_ARC
 
struct  ASCH_LINE
 
struct  ASCH_RECTANGLE
 
struct  ASCH_SHEET_SYMBOL
 
struct  ASCH_SHEET_ENTRY
 
struct  ASCH_POWER_PORT
 
struct  ASCH_PORT
 
struct  ASCH_NO_ERC
 
struct  ASCH_NET_LABEL
 
struct  ASCH_BUS
 
struct  ASCH_WIRE
 
struct  ASCH_JUNCTION
 
struct  ASCH_IMAGE
 
struct  ASCH_SHEET_FONT
 
struct  ASCH_SHEET
 
struct  ASCH_SHEET_NAME
 
struct  ASCH_FILE_NAME
 
struct  ASCH_DESIGNATOR
 
struct  ASCH_BUS_ENTRY
 
struct  ASCH_PARAMETER
 

Enumerations

enum  ALTIUM_SCH_RECORD {
  ALTIUM_SCH_RECORD::HEADER = 0, ALTIUM_SCH_RECORD::COMPONENT = 1, ALTIUM_SCH_RECORD::PIN = 2, ALTIUM_SCH_RECORD::IEEE_SYMBOL = 3,
  ALTIUM_SCH_RECORD::LABEL = 4, ALTIUM_SCH_RECORD::BEZIER = 5, ALTIUM_SCH_RECORD::POLYLINE = 6, ALTIUM_SCH_RECORD::POLYGON = 7,
  ALTIUM_SCH_RECORD::ELLIPSE = 8, ALTIUM_SCH_RECORD::PIECHART = 9, ALTIUM_SCH_RECORD::ROUND_RECTANGLE = 10, ALTIUM_SCH_RECORD::ELLIPTICAL_ARC = 11,
  ALTIUM_SCH_RECORD::ARC = 12, ALTIUM_SCH_RECORD::LINE = 13, ALTIUM_SCH_RECORD::RECTANGLE = 14, ALTIUM_SCH_RECORD::SHEET_SYMBOL = 15,
  ALTIUM_SCH_RECORD::SHEET_ENTRY = 16, ALTIUM_SCH_RECORD::POWER_PORT = 17, ALTIUM_SCH_RECORD::PORT = 18, ALTIUM_SCH_RECORD::NO_ERC = 22,
  ALTIUM_SCH_RECORD::NET_LABEL = 25, ALTIUM_SCH_RECORD::BUS = 26, ALTIUM_SCH_RECORD::WIRE = 27, ALTIUM_SCH_RECORD::TEXT_FRAME = 28,
  ALTIUM_SCH_RECORD::JUNCTION = 29, ALTIUM_SCH_RECORD::IMAGE = 30, ALTIUM_SCH_RECORD::SHEET = 31, ALTIUM_SCH_RECORD::SHEET_NAME = 32,
  ALTIUM_SCH_RECORD::FILE_NAME = 33, ALTIUM_SCH_RECORD::DESIGNATOR = 34, ALTIUM_SCH_RECORD::BUS_ENTRY = 37, ALTIUM_SCH_RECORD::TEMPLATE = 39,
  ALTIUM_SCH_RECORD::PARAMETER = 41, ALTIUM_SCH_RECORD::WARNING_SIGN = 43, ALTIUM_SCH_RECORD::IMPLEMENTATION_LIST = 44, ALTIUM_SCH_RECORD::IMPLEMENTATION = 45,
  ALTIUM_SCH_RECORD::RECORD_46 = 46, ALTIUM_SCH_RECORD::RECORD_47 = 47, ALTIUM_SCH_RECORD::RECORD_48 = 48, ALTIUM_SCH_RECORD::RECORD_209 = 209,
  ALTIUM_SCH_RECORD::RECORD_215 = 215, ALTIUM_SCH_RECORD::RECORD_216 = 216, ALTIUM_SCH_RECORD::RECORD_217 = 217, ALTIUM_SCH_RECORD::RECORD_218 = 218,
  ALTIUM_SCH_RECORD::RECORD_226 = 226
}
 
enum  ASCH_RECORD_ORIENTATION { ASCH_RECORD_ORIENTATION::RIGHTWARDS = 0, ASCH_RECORD_ORIENTATION::UPWARDS = 1, ASCH_RECORD_ORIENTATION::LEFTWARDS = 2, ASCH_RECORD_ORIENTATION::DOWNWARDS = 3 }
 
enum  ASCH_PIN_SYMBOL_OUTER {
  ASCH_PIN_SYMBOL_OUTER::UNKNOWN = -1, ASCH_PIN_SYMBOL_OUTER::NO_SYMBOL = 0, ASCH_PIN_SYMBOL_OUTER::RIGHT_LEFT_SIGNAL_FLOW = 2, ASCH_PIN_SYMBOL_OUTER::ANALOG_SIGNAL_IN = 5,
  ASCH_PIN_SYMBOL_OUTER::NOT_LOGIC_CONNECTION = 6, ASCH_PIN_SYMBOL_OUTER::DIGITAL_SIGNAL_IN = 25, ASCH_PIN_SYMBOL_OUTER::LEFT_RIGHT_SIGNAL_FLOW = 33, ASCH_PIN_SYMBOL_OUTER::BIDI_SIGNAL_FLOW = 34
}
 
enum  ASCH_PIN_SYMBOL_INNER {
  ASCH_PIN_SYMBOL_INNER::UNKNOWN = -1, ASCH_PIN_SYMBOL_INNER::NO_SYMBOL = 0, ASCH_PIN_SYMBOL_INNER::POSPONED_OUTPUT = 8, ASCH_PIN_SYMBOL_INNER::OPEN_COLLECTOR = 9,
  ASCH_PIN_SYMBOL_INNER::HIZ = 10, ASCH_PIN_SYMBOL_INNER::HIGH_CURRENT = 11, ASCH_PIN_SYMBOL_INNER::PULSE = 12, ASCH_PIN_SYMBOL_INNER::SCHMITT = 13,
  ASCH_PIN_SYMBOL_INNER::OPEN_COLLECTOR_PULL_UP = 22, ASCH_PIN_SYMBOL_INNER::OPEN_EMITTER = 23, ASCH_PIN_SYMBOL_INNER::OPEN_EMITTER_PULL_UP = 24, ASCH_PIN_SYMBOL_INNER::SHIFT_LEFT = 30,
  ASCH_PIN_SYMBOL_INNER::OPEN_OUTPUT = 32
}
 
enum  ASCH_PIN_SYMBOL_OUTEREDGE {
  ASCH_PIN_SYMBOL_OUTEREDGE::UNKNOWN = -1, ASCH_PIN_SYMBOL_OUTEREDGE::NO_SYMBOL = 0, ASCH_PIN_SYMBOL_OUTEREDGE::NEGATED = 1, ASCH_PIN_SYMBOL_OUTEREDGE::LOW_INPUT = 4,
  ASCH_PIN_SYMBOL_OUTEREDGE::LOW_OUTPUT = 17
}
 
enum  ASCH_PIN_SYMBOL_INNEREDGE { ASCH_PIN_SYMBOL_INNEREDGE::UNKNOWN = -1, ASCH_PIN_SYMBOL_INNEREDGE::NO_SYMBOL = 0, ASCH_PIN_SYMBOL_INNEREDGE::CLOCK = 3 }
 
enum  ASCH_PIN_ELECTRICAL {
  ASCH_PIN_ELECTRICAL::UNKNOWN = -1, ASCH_PIN_ELECTRICAL::INPUT = 0, ASCH_PIN_ELECTRICAL::BIDI = 1, ASCH_PIN_ELECTRICAL::OUTPUT = 2,
  ASCH_PIN_ELECTRICAL::OPEN_COLLECTOR = 3, ASCH_PIN_ELECTRICAL::PASSIVE = 4, ASCH_PIN_ELECTRICAL::TRISTATE = 5, ASCH_PIN_ELECTRICAL::OPEN_EMITTER = 6,
  ASCH_PIN_ELECTRICAL::POWER = 7
}
 
enum  ASCH_LABEL_JUSTIFICATION {
  ASCH_LABEL_JUSTIFICATION::UNKNOWN = -1, ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT = 0, ASCH_LABEL_JUSTIFICATION::BOTTOM_CENTER = 1, ASCH_LABEL_JUSTIFICATION::BOTTOM_RIGHT = 2,
  ASCH_LABEL_JUSTIFICATION::CENTER_LEFT = 3, ASCH_LABEL_JUSTIFICATION::CENTER_CENTER = 4, ASCH_LABEL_JUSTIFICATION::CENTER_RIGHT = 5, ASCH_LABEL_JUSTIFICATION::TOP_LEFT = 6,
  ASCH_LABEL_JUSTIFICATION::TOP_CENTER = 7, ASCH_LABEL_JUSTIFICATION::TOP_RIGHT = 8
}
 
enum  ASCH_POLYLINE_LINESTYLE { ASCH_POLYLINE_LINESTYLE::SOLID = 0, ASCH_POLYLINE_LINESTYLE::DASHED = 1, ASCH_POLYLINE_LINESTYLE::DOTTED = 2, ASCH_POLYLINE_LINESTYLE::DASH_DOTTED = 3 }
 
enum  ASCH_SHEET_ENTRY_SIDE { ASCH_SHEET_ENTRY_SIDE::LEFT = 0, ASCH_SHEET_ENTRY_SIDE::RIGHT = 1, ASCH_SHEET_ENTRY_SIDE::TOP = 2, ASCH_SHEET_ENTRY_SIDE::BOTTOM = 3 }
 
enum  ASCH_PORT_IOTYPE { ASCH_PORT_IOTYPE::UNSPECIFIED = 0, ASCH_PORT_IOTYPE::OUTPUT = 1, ASCH_PORT_IOTYPE::INPUT = 2, ASCH_PORT_IOTYPE::BIDI = 3 }
 
enum  ASCH_PORT_STYLE {
  ASCH_PORT_STYLE::NONE_HORIZONTAL = 0, ASCH_PORT_STYLE::LEFT = 1, ASCH_PORT_STYLE::RIGHT = 2, ASCH_PORT_STYLE::LEFT_RIGHT = 3,
  ASCH_PORT_STYLE::NONE_VERTICAL = 4, ASCH_PORT_STYLE::TOP = 5, ASCH_PORT_STYLE::BOTTOM = 6, ASCH_PORT_STYLE::TOP_BOTTOM = 7
}
 
enum  ASCH_POWER_PORT_STYLE {
  ASCH_POWER_PORT_STYLE::UNKNOWN = -1, ASCH_POWER_PORT_STYLE::CIRCLE = 0, ASCH_POWER_PORT_STYLE::ARROW = 1, ASCH_POWER_PORT_STYLE::BAR = 2,
  ASCH_POWER_PORT_STYLE::WAVE = 3, ASCH_POWER_PORT_STYLE::POWER_GROUND = 4, ASCH_POWER_PORT_STYLE::SIGNAL_GROUND = 5, ASCH_POWER_PORT_STYLE::EARTH = 6,
  ASCH_POWER_PORT_STYLE::GOST_ARROW = 7, ASCH_POWER_PORT_STYLE::GOST_POWER_GROUND = 8, ASCH_POWER_PORT_STYLE::GOST_EARTH = 9, ASCH_POWER_PORT_STYLE::GOST_BAR = 10
}
 
enum  ASCH_SHEET_SIZE {
  ASCH_SHEET_SIZE::UNKNOWN = -1, ASCH_SHEET_SIZE::A4 = 0, ASCH_SHEET_SIZE::A3 = 1, ASCH_SHEET_SIZE::A2 = 2,
  ASCH_SHEET_SIZE::A1 = 3, ASCH_SHEET_SIZE::A0 = 4, ASCH_SHEET_SIZE::A = 5, ASCH_SHEET_SIZE::B = 6,
  ASCH_SHEET_SIZE::C = 7, ASCH_SHEET_SIZE::D = 8, ASCH_SHEET_SIZE::E = 9, ASCH_SHEET_SIZE::LETTER = 10,
  ASCH_SHEET_SIZE::LEGAL = 11, ASCH_SHEET_SIZE::TABLOID = 12, ASCH_SHEET_SIZE::ORCAD_A = 13, ASCH_SHEET_SIZE::ORCAD_B = 14,
  ASCH_SHEET_SIZE::ORCAD_C = 15, ASCH_SHEET_SIZE::ORCAD_D = 16, ASCH_SHEET_SIZE::ORCAD_E = 17
}
 
enum  ASCH_SHEET_WORKSPACEORIENTATION { ASCH_SHEET_WORKSPACEORIENTATION::LANDSCAPE = 0, ASCH_SHEET_WORKSPACEORIENTATION::PORTRAIT = 1 }
 

Functions

wxPoint ASchSheetGetSize (ASCH_SHEET_SIZE aSheetSize)
 

Variables

const int ALTIUM_COMPONENT_NONE = -1
 

Enumeration Type Documentation

◆ ALTIUM_SCH_RECORD

enum ALTIUM_SCH_RECORD
strong
Enumerator
HEADER 
COMPONENT 
PIN 
IEEE_SYMBOL 
LABEL 
BEZIER 
POLYLINE 
POLYGON 
ELLIPSE 
PIECHART 
ROUND_RECTANGLE 
ELLIPTICAL_ARC 
ARC 
LINE 
RECTANGLE 
SHEET_SYMBOL 
SHEET_ENTRY 
POWER_PORT 
PORT 
NO_ERC 
NET_LABEL 
BUS 
WIRE 
TEXT_FRAME 
JUNCTION 
IMAGE 
SHEET 
SHEET_NAME 
FILE_NAME 
DESIGNATOR 
BUS_ENTRY 
TEMPLATE 
PARAMETER 
WARNING_SIGN 
IMPLEMENTATION_LIST 
IMPLEMENTATION 
RECORD_46 
RECORD_47 
RECORD_48 
RECORD_209 
RECORD_215 
RECORD_216 
RECORD_217 
RECORD_218 
RECORD_226 

Definition at line 50 of file altium_parser_sch.h.

51 {
52  HEADER = 0,
53  COMPONENT = 1,
54  PIN = 2,
55  IEEE_SYMBOL = 3,
56  LABEL = 4,
57  BEZIER = 5,
58  POLYLINE = 6,
59  POLYGON = 7,
60  ELLIPSE = 8,
61  PIECHART = 9,
62  ROUND_RECTANGLE = 10,
63  ELLIPTICAL_ARC = 11,
64  ARC = 12,
65  LINE = 13,
66  RECTANGLE = 14,
67  SHEET_SYMBOL = 15,
68  SHEET_ENTRY = 16,
69  POWER_PORT = 17,
70  PORT = 18,
71  NO_ERC = 22,
72  NET_LABEL = 25,
73  BUS = 26,
74  WIRE = 27,
75  TEXT_FRAME = 28,
76  JUNCTION = 29,
77  IMAGE = 30,
78  SHEET = 31,
79  SHEET_NAME = 32,
80  FILE_NAME = 33,
81  DESIGNATOR = 34,
82  BUS_ENTRY = 37,
83  TEMPLATE = 39,
84  PARAMETER = 41,
85  WARNING_SIGN = 43,
87  IMPLEMENTATION = 45,
88  RECORD_46 = 46,
89  RECORD_47 = 47,
90  RECORD_48 = 48,
91  RECORD_209 = 209,
92  RECORD_215 = 215,
93  RECORD_216 = 216,
94  RECORD_217 = 217,
95  RECORD_218 = 218,
96  RECORD_226 = 226,
97 };
Store all of the related footprint information found in a netlist.
Definition: pcb_netlist.h:84
Manage an 8-bit channel image.
Definition: image.h:89
This item represents a bus vector.

◆ ASCH_LABEL_JUSTIFICATION

Enumerator
UNKNOWN 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 
CENTER_LEFT 
CENTER_CENTER 
CENTER_RIGHT 
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 

Definition at line 223 of file altium_parser_sch.h.

◆ ASCH_PIN_ELECTRICAL

enum ASCH_PIN_ELECTRICAL
strong
Enumerator
UNKNOWN 
INPUT 
BIDI 
OUTPUT 
OPEN_COLLECTOR 
PASSIVE 
TRISTATE 
OPEN_EMITTER 
POWER 

Definition at line 177 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_INNER

enum ASCH_PIN_SYMBOL_INNER
strong
Enumerator
UNKNOWN 
NO_SYMBOL 
POSPONED_OUTPUT 
OPEN_COLLECTOR 
HIZ 
HIGH_CURRENT 
PULSE 
SCHMITT 
OPEN_COLLECTOR_PULL_UP 
OPEN_EMITTER 
OPEN_EMITTER_PULL_UP 
SHIFT_LEFT 
OPEN_OUTPUT 

Definition at line 141 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_INNEREDGE

Enumerator
UNKNOWN 
NO_SYMBOL 
CLOCK 

Definition at line 169 of file altium_parser_sch.h.

170 {
171  UNKNOWN = -1,
172  NO_SYMBOL = 0,
173  CLOCK = 3,
174 };
std::chrono::steady_clock CLOCK

◆ ASCH_PIN_SYMBOL_OUTER

enum ASCH_PIN_SYMBOL_OUTER
strong
Enumerator
UNKNOWN 
NO_SYMBOL 
RIGHT_LEFT_SIGNAL_FLOW 
ANALOG_SIGNAL_IN 
NOT_LOGIC_CONNECTION 
DIGITAL_SIGNAL_IN 
LEFT_RIGHT_SIGNAL_FLOW 
BIDI_SIGNAL_FLOW 

Definition at line 128 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_OUTEREDGE

Enumerator
UNKNOWN 
NO_SYMBOL 
NEGATED 
LOW_INPUT 
LOW_OUTPUT 

Definition at line 159 of file altium_parser_sch.h.

◆ ASCH_POLYLINE_LINESTYLE

Enumerator
SOLID 
DASHED 
DOTTED 
DASH_DOTTED 

Definition at line 271 of file altium_parser_sch.h.

◆ ASCH_PORT_IOTYPE

enum ASCH_PORT_IOTYPE
strong
Enumerator
UNSPECIFIED 
OUTPUT 
INPUT 
BIDI 

Definition at line 411 of file altium_parser_sch.h.

◆ ASCH_PORT_STYLE

enum ASCH_PORT_STYLE
strong
Enumerator
NONE_HORIZONTAL 
LEFT 
RIGHT 
LEFT_RIGHT 
NONE_VERTICAL 
TOP 
BOTTOM 
TOP_BOTTOM 

Definition at line 420 of file altium_parser_sch.h.

◆ ASCH_POWER_PORT_STYLE

enum ASCH_POWER_PORT_STYLE
strong
Enumerator
UNKNOWN 
CIRCLE 
ARROW 
BAR 
WAVE 
POWER_GROUND 
SIGNAL_GROUND 
EARTH 
GOST_ARROW 
GOST_POWER_GROUND 
GOST_EARTH 
GOST_BAR 

Definition at line 450 of file altium_parser_sch.h.

◆ ASCH_RECORD_ORIENTATION

Enumerator
RIGHTWARDS 
UPWARDS 
LEFTWARDS 
DOWNWARDS 

Definition at line 100 of file altium_parser_sch.h.

◆ ASCH_SHEET_ENTRY_SIDE

enum ASCH_SHEET_ENTRY_SIDE
strong
Enumerator
LEFT 
RIGHT 
TOP 
BOTTOM 

Definition at line 402 of file altium_parser_sch.h.

◆ ASCH_SHEET_SIZE

enum ASCH_SHEET_SIZE
strong
Enumerator
UNKNOWN 
A4 
A3 
A2 
A1 
A0 
LETTER 
LEGAL 
TABLOID 
ORCAD_A 
ORCAD_B 
ORCAD_C 
ORCAD_D 
ORCAD_E 

Definition at line 586 of file altium_parser_sch.h.

587 {
588  UNKNOWN = -1, // use A4
589 
590  A4 = 0, // 1150 × 760
591  A3 = 1, // 1550 × 1110
592  A2 = 2, // 2230 × 1570
593  A1 = 3, // 3150 × 2230
594  A0 = 4, // 4460 × 3150
595  A = 5, // 950 × 750
596  B = 6, // 1500 × 950
597  C = 7, // 2000 × 1500
598  D = 8, // 3200 × 2000
599  E = 9, // 4200 × 3200
600  LETTER = 10, // 1100 × 850
601  LEGAL = 11, // 1400 × 850
602  TABLOID = 12, // 1700 × 1100
603  ORCAD_A = 13, // 990 × 790
604  ORCAD_B = 14, // 1540 × 990
605  ORCAD_C = 15, // 2060 × 1560
606  ORCAD_D = 16, // 3260 × 2060
607  ORCAD_E = 17 // 4280 × 3280
608 };

◆ ASCH_SHEET_WORKSPACEORIENTATION

Enumerator
LANDSCAPE 
PORTRAIT 

Definition at line 613 of file altium_parser_sch.h.

Function Documentation

◆ ASchSheetGetSize()

wxPoint ASchSheetGetSize ( ASCH_SHEET_SIZE  aSheetSize)

Definition at line 597 of file altium_parser_sch.cpp.

598 {
599  // From: https://github.com/vadmium/python-altium/blob/master/format.md#sheet
600  switch( aSheetSize )
601  {
602  default:
603  case ASCH_SHEET_SIZE::A4:
604  return { 1150, 760 };
605  case ASCH_SHEET_SIZE::A3:
606  return { 1550, 1110 };
607  case ASCH_SHEET_SIZE::A2:
608  return { 2230, 1570 };
609  case ASCH_SHEET_SIZE::A1:
610  return { 3150, 2230 };
611  case ASCH_SHEET_SIZE::A0:
612  return { 4460, 3150 };
613  case ASCH_SHEET_SIZE::A:
614  return { 950, 750 };
615  case ASCH_SHEET_SIZE::B:
616  return { 1500, 950 };
617  case ASCH_SHEET_SIZE::C:
618  return { 2000, 1500 };
619  case ASCH_SHEET_SIZE::D:
620  return { 3200, 2000 };
621  case ASCH_SHEET_SIZE::E:
622  return { 4200, 3200 };
624  return { 1100, 850 };
626  return { 1400, 850 };
628  return { 1700, 1100 };
630  return { 990, 790 };
632  return { 1540, 990 };
634  return { 2060, 1560 };
636  return { 3260, 2060 };
638  return { 4280, 3280 };
639  }
640 }

References A, A0, A1, A2, A3, A4, B, C, D, E, LEGAL, LETTER, ORCAD_A, ORCAD_B, ORCAD_C, ORCAD_D, ORCAD_E, and TABLOID.

Variable Documentation

◆ ALTIUM_COMPONENT_NONE