11#include <nlohmann/json.hpp>
24 std::vector<model::NetId>
nets;
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
Component-rule catalogue (design doc 15 §6.1): categories of components with their detectors,...
constexpr int kPossibleMin
Instances below this confidence are not even listed as "possible" (they would list every J* and U*).
constexpr int kNoPinNameCap
Confidence cap when the board carries no pad pin names (KiCad 5 files): doc 15 §3....
Detection detect(const model::Board &b, const Catalogue &cat, const Overrides *ov=nullptr)
With ov (the user override file, doc 15 §3.5 level 1): references are checked against the board (thro...
const nlohmann::ordered_json & rule_params(const Instance &in, const RuleSpec &r)
The parameters of rule r for instance in: the catalogue's, or the user's after set entries (doc 15 §6...
The user override file (design doc 15 §3.5 level 1, §6.3): the user disables rules,...
std::vector< std::string > override_entries
std::string override_source
User override file: its name, its entries (as text) and the entries that matched no instance on this ...
std::vector< Instance > possible
below the suggest threshold (or superseded): reported only
std::vector< std::string > override_unused
std::vector< Instance > instances
confidence >= suggest threshold, not superseded
int category
index into Catalogue::categories
const RuleOverride * override_for(std::string_view rule) const
std::vector< RuleOverride > overrides
from disable and set entries, one per rule id
std::string superseded_by
set when a conflicting category won the same anchor (doc 15 §3.4)
const Role * role(std::string_view name) const
bool disabled(std::string_view rule) const
int anchor
footprint index
bool asserted
forced by the user override file (assert)
bool capped
confidence capped because the board has no pin names (doc 15 §3.6)
std::vector< std::string > evidence
matched detectors, e.g. "lib_id +60"
std::vector< Role > roles
bound roles, binding order
std::vector< int > pads
pad indices (pins playing the role, e.g. an IC's XTAL pins)
std::vector< int > parts
footprint indices
std::vector< model::NetId > nets
What the user override file (doc 15 §6.3) changed for one rule of one instance.
std::vector< std::string > notes
"disabled (disable XTAL-04\@Y1)", "max_mm = 5 (catalogue 2; set XTAL-02 ...)"
nlohmann::ordered_json params
the rule's parameters after set entries (valid when has_params)
Netlist views of a board for component recognition (doc 15 §3.1 "Topology", §8.0 topology detectors):...