KiCad PCB EDA Suite
AVIA6 Struct Reference

#include <altium_parser_pcb.h>

Public Member Functions

 AVIA6 (ALTIUM_PARSER &aReader)
 

Public Attributes

bool is_locked
 
bool is_tent_top
 
bool is_tent_bottom
 
bool is_test_fab_top
 
bool is_test_fab_bottom
 
uint16_t net
 
wxPoint position
 
uint32_t diameter
 
uint32_t holesize
 
ALTIUM_LAYER layer_start
 
ALTIUM_LAYER layer_end
 
ALTIUM_PAD_MODE viamode
 

Detailed Description

Definition at line 602 of file altium_parser_pcb.h.

Constructor & Destructor Documentation

◆ AVIA6()

AVIA6::AVIA6 ( ALTIUM_PARSER aReader)
explicit

Definition at line 703 of file altium_parser_pcb.cpp.

704 {
705  ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
706 
707  if( recordtype != ALTIUM_RECORD::VIA )
708  THROW_IO_ERROR( "Vias6 stream has invalid recordtype" );
709 
710  // Subrecord 1
711  size_t subrecord1 = aReader.ReadAndSetSubrecordLength();
712 
713  aReader.Skip( 1 );
714 
715  uint8_t flags1 = aReader.Read<uint8_t>();
716  is_test_fab_top = ( flags1 & 0x80 ) != 0;
717  is_tent_bottom = ( flags1 & 0x40 ) != 0;
718  is_tent_top = ( flags1 & 0x20 ) != 0;
719  is_locked = ( flags1 & 0x04 ) == 0;
720 
721  uint8_t flags2 = aReader.Read<uint8_t>();
722  is_test_fab_bottom = ( flags2 & 0x01 ) != 0;
723 
724  net = aReader.Read<uint16_t>();
725  aReader.Skip( 8 );
726  position = aReader.ReadWxPoint();
727  diameter = aReader.ReadKicadUnit();
728  holesize = aReader.ReadKicadUnit();
729 
730  layer_start = static_cast<ALTIUM_LAYER>( aReader.Read<uint8_t>() );
731  layer_end = static_cast<ALTIUM_LAYER>( aReader.Read<uint8_t>() );
732 
733  if( subrecord1 <= 74 )
734  {
736  }
737  else
738  {
739  aReader.Skip( 43 );
740  viamode = static_cast<ALTIUM_PAD_MODE>( aReader.Read<uint8_t>() );
741  }
742 
743  aReader.SkipSubrecord();
744 
745  if( aReader.HasParsingError() )
746  THROW_IO_ERROR( "Vias6 stream was not parsed correctly" );
747 }
uint32_t holesize
wxPoint position
ALTIUM_RECORD
ALTIUM_LAYER layer_end
uint16_t net
bool is_tent_bottom
void Skip(size_t aLength)
size_t ReadAndSetSubrecordLength()
wxPoint ReadWxPoint()
int32_t ReadKicadUnit()
bool is_test_fab_bottom
ALTIUM_LAYER layer_start
bool is_test_fab_top
bool is_tent_top
ALTIUM_PAD_MODE viamode
void SkipSubrecord()
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:38
bool HasParsingError()
uint32_t diameter
bool is_locked

References diameter, ALTIUM_PARSER::HasParsingError(), holesize, is_locked, is_tent_bottom, is_tent_top, is_test_fab_bottom, is_test_fab_top, layer_end, layer_start, net, position, ALTIUM_PARSER::Read(), ALTIUM_PARSER::ReadAndSetSubrecordLength(), ALTIUM_PARSER::ReadKicadUnit(), ALTIUM_PARSER::ReadWxPoint(), SIMPLE, ALTIUM_PARSER::Skip(), ALTIUM_PARSER::SkipSubrecord(), THROW_IO_ERROR, VIA, and viamode.

Member Data Documentation

◆ diameter

uint32_t AVIA6::diameter

Definition at line 613 of file altium_parser_pcb.h.

Referenced by AVIA6(), and ALTIUM_PCB::ParseVias6Data().

◆ holesize

uint32_t AVIA6::holesize

Definition at line 614 of file altium_parser_pcb.h.

Referenced by AVIA6(), and ALTIUM_PCB::ParseVias6Data().

◆ is_locked

bool AVIA6::is_locked

Definition at line 604 of file altium_parser_pcb.h.

Referenced by AVIA6(), and ALTIUM_PCB::ParseVias6Data().

◆ is_tent_bottom

bool AVIA6::is_tent_bottom

Definition at line 606 of file altium_parser_pcb.h.

Referenced by AVIA6().

◆ is_tent_top

bool AVIA6::is_tent_top

Definition at line 605 of file altium_parser_pcb.h.

Referenced by AVIA6().

◆ is_test_fab_bottom

bool AVIA6::is_test_fab_bottom

Definition at line 608 of file altium_parser_pcb.h.

Referenced by AVIA6().

◆ is_test_fab_top

bool AVIA6::is_test_fab_top

Definition at line 607 of file altium_parser_pcb.h.

Referenced by AVIA6().

◆ layer_end

ALTIUM_LAYER AVIA6::layer_end

Definition at line 617 of file altium_parser_pcb.h.

Referenced by AVIA6(), and ALTIUM_PCB::ParseVias6Data().

◆ layer_start

ALTIUM_LAYER AVIA6::layer_start

Definition at line 616 of file altium_parser_pcb.h.

Referenced by AVIA6(), and ALTIUM_PCB::ParseVias6Data().

◆ net

uint16_t AVIA6::net

Definition at line 610 of file altium_parser_pcb.h.

Referenced by AVIA6(), and ALTIUM_PCB::ParseVias6Data().

◆ position

wxPoint AVIA6::position

Definition at line 612 of file altium_parser_pcb.h.

Referenced by AVIA6(), and ALTIUM_PCB::ParseVias6Data().

◆ viamode

ALTIUM_PAD_MODE AVIA6::viamode

Definition at line 618 of file altium_parser_pcb.h.

Referenced by AVIA6().


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