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

Go to the source code of this file.

Classes

struct  ASCH_STORAGE_FILE
 
struct  ASCH_ADDITIONAL_FILE
 
struct  ASCH_SHAPE_INTERFACE
 
struct  ASCH_SYMBOL
 
struct  ASCH_PIN
 
struct  ASCH_LABEL
 
struct  ASCH_TEXT_FRAME
 
struct  ASCH_NOTE
 
struct  ASCH_BEZIER
 
struct  ASCH_POLYLINE
 
struct  ASCH_POLYGON
 
struct  ASCH_ROUND_RECTANGLE
 
struct  ASCH_ARC
 
struct  ASCH_ELLIPSE
 
struct  ASCH_LINE
 
struct  ASCH_SIGNAL_HARNESS
 
struct  ASCH_HARNESS_CONNECTOR
 
struct  ASCH_HARNESS_ENTRY
 
struct  ASCH_HARNESS_TYPE
 
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_IMPLEMENTATION
 
struct  ASCH_IMPLEMENTATION_LIST
 
struct  ASCH_BUS_ENTRY
 
struct  ASCH_PARAMETER
 

Enumerations

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

Functions

VECTOR2I ASchSheetGetSize (ASCH_SHEET_SIZE aSheetSize)
 

Variables

const int ALTIUM_COMPONENT_NONE = -1
 

Enumeration Type Documentation

◆ ALTIUM_SCH_RECORD

enum class 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 
NOTE 
COMPILE_MASK 
HARNESS_CONNECTOR 
HARNESS_ENTRY 
HARNESS_TYPE 
SIGNAL_HARNESS 
RECORD_226 

Definition at line 59 of file altium_parser_sch.h.

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

◆ ASCH_LABEL_JUSTIFICATION

enum class ASCH_LABEL_JUSTIFICATION
strong
Enumerator
UNKNOWN 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 
CENTER_LEFT 
CENTER_CENTER 
CENTER_RIGHT 
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 

Definition at line 248 of file altium_parser_sch.h.

◆ ASCH_PIN_ELECTRICAL

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

Definition at line 202 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_INNER

enum class 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 166 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_INNEREDGE

enum class ASCH_PIN_SYMBOL_INNEREDGE
strong
Enumerator
UNKNOWN 
NO_SYMBOL 
CLOCK 

Definition at line 194 of file altium_parser_sch.h.

195{
196 UNKNOWN = -1,
197 NO_SYMBOL = 0,
198 CLOCK = 3,
199};
std::chrono::steady_clock CLOCK

◆ ASCH_PIN_SYMBOL_OUTER

enum class 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 153 of file altium_parser_sch.h.

◆ ASCH_PIN_SYMBOL_OUTEREDGE

enum class ASCH_PIN_SYMBOL_OUTEREDGE
strong
Enumerator
UNKNOWN 
NO_SYMBOL 
NEGATED 
LOW_INPUT 
LOW_OUTPUT 

Definition at line 184 of file altium_parser_sch.h.

◆ ASCH_POLYLINE_LINESTYLE

enum class ASCH_POLYLINE_LINESTYLE
strong
Enumerator
SOLID 
DASHED 
DOTTED 
DASH_DOTTED 

Definition at line 339 of file altium_parser_sch.h.

◆ ASCH_PORT_IOTYPE

enum class ASCH_PORT_IOTYPE
strong
Enumerator
UNSPECIFIED 
OUTPUT 
INPUT 
BIDI 

Definition at line 553 of file altium_parser_sch.h.

554{
555 UNSPECIFIED = 0,
556 OUTPUT = 1,
557 INPUT = 2,
558 BIDI = 3,
559};

◆ ASCH_PORT_STYLE

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

Definition at line 562 of file altium_parser_sch.h.

◆ ASCH_POWER_PORT_STYLE

enum class 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 592 of file altium_parser_sch.h.

593{
594 UNKNOWN = -1,
595
596 CIRCLE = 0,
597 ARROW = 1,
598 BAR = 2,
599 WAVE = 3,
600 POWER_GROUND = 4,
601 SIGNAL_GROUND = 5,
602 EARTH = 6,
603 GOST_ARROW = 7,
605 GOST_EARTH = 9,
606 GOST_BAR = 10
607};
Represent basic circle geometry with utility geometry functions.
Definition: circle.h:33

◆ ASCH_RECORD_ORIENTATION

enum class ASCH_RECORD_ORIENTATION
strong
Enumerator
RIGHTWARDS 
UPWARDS 
LEFTWARDS 
DOWNWARDS 

Definition at line 110 of file altium_parser_sch.h.

111{
112 RIGHTWARDS = 0, // 0
113 UPWARDS = 1, // 90
114 LEFTWARDS = 2, // 180
115 DOWNWARDS = 3 // 270
116};

◆ ASCH_SHEET_ENTRY_SIDE

enum class ASCH_SHEET_ENTRY_SIDE
strong
Enumerator
LEFT 
RIGHT 
TOP 
BOTTOM 

Definition at line 348 of file altium_parser_sch.h.

349{
350 LEFT = 0,
351 RIGHT = 1,
352 TOP = 2,
353 BOTTOM = 3
354};

◆ ASCH_SHEET_SIZE

enum class 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 736 of file altium_parser_sch.h.

737{
738 UNKNOWN = -1, // use A4
739
740 A4 = 0, // 1150 × 760
741 A3 = 1, // 1550 × 1110
742 A2 = 2, // 2230 × 1570
743 A1 = 3, // 3150 × 2230
744 A0 = 4, // 4460 × 3150
745 A = 5, // 950 × 750
746 B = 6, // 1500 × 950
747 C = 7, // 2000 × 1500
748 D = 8, // 3200 × 2000
749 E = 9, // 4200 × 3200
750 LETTER = 10, // 1100 × 850
751 LEGAL = 11, // 1400 × 850
752 TABLOID = 12, // 1700 × 1100
753 ORCAD_A = 13, // 990 × 790
754 ORCAD_B = 14, // 1540 × 990
755 ORCAD_C = 15, // 2060 × 1560
756 ORCAD_D = 16, // 3260 × 2060
757 ORCAD_E = 17 // 4280 × 3280
758};

◆ ASCH_SHEET_WORKSPACEORIENTATION

Enumerator
LANDSCAPE 
PORTRAIT 

Definition at line 763 of file altium_parser_sch.h.

◆ ASCH_TEXT_FRAME_ALIGNMENT

enum class ASCH_TEXT_FRAME_ALIGNMENT
strong
Enumerator
LEFT 
CENTER 
RIGHT 

Definition at line 264 of file altium_parser_sch.h.

265{
266 LEFT = 1,
267 CENTER = 2,
268 RIGHT = 3
269};

Function Documentation

◆ ASchSheetGetSize()

VECTOR2I ASchSheetGetSize ( ASCH_SHEET_SIZE  aSheetSize)

Definition at line 762 of file altium_parser_sch.cpp.

763{
764 // From: https://github.com/vadmium/python-altium/blob/master/format.md#sheet
765 switch( aSheetSize )
766 {
767 default:
768 case ASCH_SHEET_SIZE::A4: return { 1150, 760 };
769 case ASCH_SHEET_SIZE::A3: return { 1550, 1110 };
770 case ASCH_SHEET_SIZE::A2: return { 2230, 1570 };
771 case ASCH_SHEET_SIZE::A1: return { 3150, 2230 };
772 case ASCH_SHEET_SIZE::A0: return { 4460, 3150 };
773 case ASCH_SHEET_SIZE::A: return { 950, 750 };
774 case ASCH_SHEET_SIZE::B: return { 1500, 950 };
775 case ASCH_SHEET_SIZE::C: return { 2000, 1500 };
776 case ASCH_SHEET_SIZE::D: return { 3200, 2000 };
777 case ASCH_SHEET_SIZE::E: return { 4200, 3200 };
778 case ASCH_SHEET_SIZE::LETTER: return { 1100, 850 };
779 case ASCH_SHEET_SIZE::LEGAL: return { 1400, 850 };
780 case ASCH_SHEET_SIZE::TABLOID: return { 1700, 1100 };
781 case ASCH_SHEET_SIZE::ORCAD_A: return { 990, 790 };
782 case ASCH_SHEET_SIZE::ORCAD_B: return { 1540, 990 };
783 case ASCH_SHEET_SIZE::ORCAD_C: return { 2060, 1560 };
784 case ASCH_SHEET_SIZE::ORCAD_D: return { 3260, 2060 };
785 case ASCH_SHEET_SIZE::ORCAD_E: return { 4280, 3280 };
786 }
787}

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