TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::analysis Namespace Reference

Namespaces

namespace  detail

Classes

struct  FootprintIssue
struct  FootprintResult
struct  FootprintCheckOptions
struct  FootprintCheckReport
struct  RefPad
struct  FootprintRef
struct  TrustedBrands
 Brands whose datasheets are trusted. More...
struct  RefLibrary
struct  ReturnPathOptions
struct  ReturnVoid
struct  ReturnLayerChange
struct  ReturnEnd
struct  NetReturn
struct  ReturnPathReport

Enumerations

enum class  Severity { Info , Warning , Error }
enum class  FootprintStatus {
  Ok , Mismatch , Unverified , Untrusted ,
  Skipped
}

Functions

FootprintCheckReport check_footprints (const model::Board &b, const RefLibrary &lib, const FootprintCheckOptions &opt)
 Deterministic: board order, reference order, no hash iteration.
nlohmann::json footprint_check_json (const model::Board &b, const FootprintCheckReport &r)
 The report as JSON (millimetres), one footprint_check viewer message (docs/13-viewer-protocol.md), and the text lines (problems first; all adds the footprints that are fine or have no reference).
std::string footprint_check_message (const FootprintCheckReport &r)
std::vector< std::string > footprint_check_lines (const FootprintCheckReport &r, bool all)
RefLibrary load_references (const std::string &path, const std::string &trusted_brands_file="")
 path is a directory (every *.json below it, in path order; a trusted_brands.txt beside the references is the trusted list unless one is given) or one JSON file.
TrustedBrands load_trusted_brands (const std::string &file)
TrustedBrands parse_trusted_brands (const std::string &text, const std::string &source)
std::vector< RefPad > pads_from_kicad_mod (const std::string &text)
 The pads of a footprint file (.kicad_mod, or the text of one) in its own frame.
std::string normalise_brand (const std::string &brand)
 "Texas Instruments Inc." -> "texas instruments"
ReturnPathReport analyse_return_paths (const model::Board &b, const model::DesignRules &rules, const ReturnPathOptions &opt)
 Analyses the nets the options select on b as it stands (routed copper included). Deterministic.
nlohmann::json return_path_json (const model::Board &b, const ReturnPathReport &r)
 The report as JSON (nanometres converted to millimetres), and one return_path viewer message per net (docs/13-viewer-protocol.md).
std::string return_path_message (const model::Board &b, const NetReturn &n)
std::vector< std::string > return_path_lines (const model::Board &b, const ReturnPathReport &r)
 A one-line text form per net and the lines under it that explain a warning.

Enumeration Type Documentation

◆ FootprintStatus

enum class tmk::analysis::FootprintStatus
strong
Enumerator
Ok 
Mismatch 
Unverified 
Untrusted 
Skipped 

Definition at line 39 of file footprint_check.hpp.

◆ Severity

enum class tmk::analysis::Severity
strong
Enumerator
Info 
Warning 
Error 

Definition at line 26 of file footprint_check.hpp.

Function Documentation

◆ analyse_return_paths()

ReturnPathReport tmk::analysis::analyse_return_paths ( const model::Board & b,
const model::DesignRules & rules,
const ReturnPathOptions & opt )

Analyses the nets the options select on b as it stands (routed copper included). Deterministic.

◆ check_footprints()

FootprintCheckReport tmk::analysis::check_footprints ( const model::Board & b,
const RefLibrary & lib,
const FootprintCheckOptions & opt )

Deterministic: board order, reference order, no hash iteration.

◆ footprint_check_json()

nlohmann::json tmk::analysis::footprint_check_json ( const model::Board & b,
const FootprintCheckReport & r )

The report as JSON (millimetres), one footprint_check viewer message (docs/13-viewer-protocol.md), and the text lines (problems first; all adds the footprints that are fine or have no reference).

◆ footprint_check_lines()

std::vector< std::string > tmk::analysis::footprint_check_lines ( const FootprintCheckReport & r,
bool all )

◆ footprint_check_message()

std::string tmk::analysis::footprint_check_message ( const FootprintCheckReport & r)

◆ load_references()

RefLibrary tmk::analysis::load_references ( const std::string & path,
const std::string & trusted_brands_file = "" )

path is a directory (every *.json below it, in path order; a trusted_brands.txt beside the references is the trusted list unless one is given) or one JSON file.

Throws std::runtime_error with the file and the key on anything it cannot take.

◆ load_trusted_brands()

TrustedBrands tmk::analysis::load_trusted_brands ( const std::string & file)

◆ normalise_brand()

std::string tmk::analysis::normalise_brand ( const std::string & brand)

"Texas Instruments Inc." -> "texas instruments"

◆ pads_from_kicad_mod()

std::vector< RefPad > tmk::analysis::pads_from_kicad_mod ( const std::string & text)

The pads of a footprint file (.kicad_mod, or the text of one) in its own frame.

◆ parse_trusted_brands()

TrustedBrands tmk::analysis::parse_trusted_brands ( const std::string & text,
const std::string & source )

◆ return_path_json()

nlohmann::json tmk::analysis::return_path_json ( const model::Board & b,
const ReturnPathReport & r )

The report as JSON (nanometres converted to millimetres), and one return_path viewer message per net (docs/13-viewer-protocol.md).

◆ return_path_lines()

std::vector< std::string > tmk::analysis::return_path_lines ( const model::Board & b,
const ReturnPathReport & r )

A one-line text form per net and the lines under it that explain a warning.

◆ return_path_message()

std::string tmk::analysis::return_path_message ( const model::Board & b,
const NetReturn & n )