122 void Load( std::vector<uint8_t> aBytes );
125 static bool HasMagic(
const std::vector<uint8_t>& aBytes );
Bounds-checked little-endian read cursor over a PADS binary buffer.
const SDB_COORDS & Coords() const
const BINARY_CURSOR & Cursor() const
const SDB_SECTION * Section(int aIndex) const
static constexpr int HEADER_SIZE
PADS_SDB & operator=(const PADS_SDB &)=delete
PADS_SDB(const PADS_SDB &)=delete
static constexpr int FOOTER_SIZE
static constexpr int VIEW_STATE_RECORD_BYTES
Stride of the section 2 view-state records that precede the board-setup block.
const std::vector< uint8_t > & Bytes() const
std::vector< uint8_t > m_data
std::vector< SDB_SECTION > m_sections
size_t SectionCount() const
static bool HasMagic(const std::vector< uint8_t > &aBytes)
True if the first two bytes match the PADS binary magic.
static constexpr uint8_t MAGIC1
static constexpr uint8_t MAGIC0
void parsePhysicalFraming()
static constexpr int DIR_ENTRY_SIZE
void Load(std::vector< uint8_t > aBytes)
Validate the header and footer, parse the section directory, and derive the coordinate origin.
static bool IsSupportedVersion(uint16_t aVersion)
SDB_RECORD RecordAt(uint32_t aBase) const
A reader positioned at an absolute file offset, for walking a pool or byte region rather than a secti...
int directoryEntryCount() const
void verifyFooter() const
The per-axis coordinate origin and the design <-> raw transform.
int32_t DesignY(int32_t aRaw) const
uint32_t HeaderBase() const
Absolute file offset of the PCB board-setup parameter block read by PADS_SDB (the origin sits at Head...
int32_t DesignX(int32_t aRaw) const
A bounds-checked reader positioned at one record inside a buffer.
The PADS PowerPCB .pcb file is a serialized snapshot of PADS' in-memory SDB (System DataBase) object ...
uint32_t physicalLiveCount