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_COMPONENT
 
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_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 38 of file altium_parser_sch.h.

39 {
40  HEADER = 0,
41  COMPONENT = 1,
42  PIN = 2,
43  IEEE_SYMBOL = 3,
44  LABEL = 4,
45  BEZIER = 5,
46  POLYLINE = 6,
47  POLYGON = 7,
48  ELLIPSE = 8,
49  PIECHART = 9,
50  ROUND_RECTANGLE = 10,
51  ELLIPTICAL_ARC = 11,
52  ARC = 12,
53  LINE = 13,
54  RECTANGLE = 14,
55  SHEET_SYMBOL = 15,
56  SHEET_ENTRY = 16,
57  POWER_PORT = 17,
58  PORT = 18,
59  NO_ERC = 22,
60  NET_LABEL = 25,
61  BUS = 26,
62  WIRE = 27,
63  TEXT_FRAME = 28,
64  JUNCTION = 29,
65  IMAGE = 30,
66  SHEET = 31,
67  SHEET_NAME = 32,
68  FILE_NAME = 33,
69  DESIGNATOR = 34,
70  BUS_ENTRY = 37,
71  TEMPLATE = 39,
72  PARAMETER = 41,
73  WARNING_SIGN = 43,
75  IMPLEMENTATION = 45,
76  RECORD_46 = 46,
77  RECORD_47 = 47,
78  RECORD_48 = 48,
79  RECORD_209 = 209,
80  RECORD_215 = 215,
81  RECORD_216 = 216,
82  RECORD_217 = 217,
83  RECORD_218 = 218,
84  RECORD_226 = 226,
85 };
COMPONENT is used to store components and all of their related information found in a netlist.
Definition: pcb_netlist.h:85
Definition: track.h:262
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 211 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 165 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 129 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_INNEREDGE

Enumerator
UNKNOWN 
NO_SYMBOL 
CLOCK 

Definition at line 157 of file altium_parser_sch.h.

158 {
159  UNKNOWN = -1,
160  NO_SYMBOL = 0,
161  CLOCK = 3,
162 };
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 116 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_OUTEREDGE

Enumerator
UNKNOWN 
NO_SYMBOL 
NEGATED 
LOW_INPUT 
LOW_OUTPUT 

Definition at line 147 of file altium_parser_sch.h.

◆ ASCH_POLYLINE_LINESTYLE

Enumerator
SOLID 
DASHED 
DOTTED 
DASH_DOTTED 

Definition at line 259 of file altium_parser_sch.h.

◆ ASCH_PORT_IOTYPE

enum ASCH_PORT_IOTYPE
strong
Enumerator
UNSPECIFIED 
OUTPUT 
INPUT 
BIDI 

Definition at line 399 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 408 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 438 of file altium_parser_sch.h.

◆ ASCH_RECORD_ORIENTATION

Enumerator
RIGHTWARDS 
UPWARDS 
LEFTWARDS 
DOWNWARDS 

Definition at line 88 of file altium_parser_sch.h.

◆ ASCH_SHEET_ENTRY_SIDE

enum ASCH_SHEET_ENTRY_SIDE
strong
Enumerator
LEFT 
RIGHT 
TOP 
BOTTOM 

Definition at line 390 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 558 of file altium_parser_sch.h.

559 {
560  UNKNOWN = -1, // use A4
561 
562  A4 = 0, // 1150 × 760
563  A3 = 1, // 1550 × 1110
564  A2 = 2, // 2230 × 1570
565  A1 = 3, // 3150 × 2230
566  A0 = 4, // 4460 × 3150
567  A = 5, // 950 × 750
568  B = 6, // 1500 × 950
569  C = 7, // 2000 × 1500
570  D = 8, // 3200 × 2000
571  E = 9, // 4200 × 3200
572  LETTER = 10, // 1100 × 850
573  LEGAL = 11, // 1400 × 850
574  TABLOID = 12, // 1700 × 1100
575  ORCAD_A = 13, // 990 × 790
576  ORCAD_B = 14, // 1540 × 990
577  ORCAD_C = 15, // 2060 × 1560
578  ORCAD_D = 16, // 3260 × 2060
579  ORCAD_E = 17 // 4280 × 3280
580 };

◆ ASCH_SHEET_WORKSPACEORIENTATION

Enumerator
LANDSCAPE 
PORTRAIT 

Definition at line 585 of file altium_parser_sch.h.

Function Documentation

◆ ASchSheetGetSize()

wxPoint ASchSheetGetSize ( ASCH_SHEET_SIZE  aSheetSize)

Definition at line 560 of file altium_parser_sch.cpp.

561 {
562  // From: https://github.com/vadmium/python-altium/blob/master/format.md#sheet
563  switch( aSheetSize )
564  {
565  default:
566  case ASCH_SHEET_SIZE::A4:
567  return { 1150, 760 };
568  case ASCH_SHEET_SIZE::A3:
569  return { 1550, 1110 };
570  case ASCH_SHEET_SIZE::A2:
571  return { 2230, 1570 };
572  case ASCH_SHEET_SIZE::A1:
573  return { 3150, 2230 };
574  case ASCH_SHEET_SIZE::A0:
575  return { 4460, 3150 };
576  case ASCH_SHEET_SIZE::A:
577  return { 950, 750 };
578  case ASCH_SHEET_SIZE::B:
579  return { 1500, 950 };
580  case ASCH_SHEET_SIZE::C:
581  return { 2000, 1500 };
582  case ASCH_SHEET_SIZE::D:
583  return { 3200, 2000 };
584  case ASCH_SHEET_SIZE::E:
585  return { 4200, 3200 };
587  return { 1100, 850 };
589  return { 1400, 850 };
591  return { 1700, 1100 };
593  return { 990, 790 };
595  return { 1540, 990 };
597  return { 2060, 1560 };
599  return { 3260, 2060 };
601  return { 4280, 3280 };
602  }
603 }

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