|
KiCad PCB EDA Suite
|
#include <pns_logger.h>
Classes | |
| struct | EVENT_ENTRY |
| struct | LOG_DATA |
Public Types | |
| enum | TEST_CASE_TYPE { TCT_STRICT_GEOMETRY = 0 , TCT_CONNECTIVITY_ONLY , TCT_EXPECTED_FAIL , TCT_KNOWN_BUG } |
| enum | EVENT_TYPE { EVT_START_ROUTE = 0 , EVT_START_DRAG , EVT_FIX , EVT_MOVE , EVT_ABORT , EVT_TOGGLE_VIA , EVT_UNFIX , EVT_START_MULTIDRAG } |
Public Member Functions | |
| LOGGER () | |
| ~LOGGER () | |
| void | Clear () |
| void | LogM (EVENT_TYPE evt, const VECTOR2I &pos=VECTOR2I(), std::vector< ITEM * > items={}, const SIZES_SETTINGS *sizes=nullptr, int aLayer=0) |
| void | Log (EVENT_TYPE evt, const VECTOR2I &pos=VECTOR2I(), const ITEM *item=nullptr, const SIZES_SETTINGS *sizes=nullptr, int aLayer=0) |
| const std::vector< EVENT_ENTRY > & | GetEvents () |
Static Public Member Functions | |
| static nlohmann::json | FormatEventAsJSON (const EVENT_ENTRY &aEvent) |
| static EVENT_ENTRY | ParseEvent (const wxString &aLine) |
| static EVENT_ENTRY | ParseEventFromJSON (const nlohmann::json &aJSON) |
| static wxString | FormatLogFileAsJSON (const LOG_DATA &aLogData) |
Static Private Member Functions | |
| static nlohmann::json | formatSizesAsJSON (const SIZES_SETTINGS &aEvent) |
| static nlohmann::json | formatRouterItemAsJSON (const PNS::ITEM *aItem) |
| static nlohmann::json | formatShapeAsJSON (const SHAPE *aShape) |
Private Attributes | |
| std::vector< EVENT_ENTRY > | m_events |
| std::optional< TEST_CASE_TYPE > | m_testCaseType |
Definition at line 48 of file pns_logger.h.
| Enumerator | |
|---|---|
| EVT_START_ROUTE | |
| EVT_START_DRAG | |
| EVT_FIX | |
| EVT_MOVE | |
| EVT_ABORT | |
| EVT_TOGGLE_VIA | |
| EVT_UNFIX | |
| EVT_START_MULTIDRAG | |
Definition at line 60 of file pns_logger.h.
| Enumerator | |
|---|---|
| TCT_STRICT_GEOMETRY | |
| TCT_CONNECTIVITY_ONLY | |
| TCT_EXPECTED_FAIL | |
| TCT_KNOWN_BUG | |
Definition at line 52 of file pns_logger.h.
| PNS::LOGGER::LOGGER | ( | ) |
Definition at line 58 of file pns_logger.cpp.
| PNS::LOGGER::~LOGGER | ( | ) |
Definition at line 63 of file pns_logger.cpp.
| void PNS::LOGGER::Clear | ( | ) |
Definition at line 68 of file pns_logger.cpp.
References m_events.
|
static |
Definition at line 152 of file pns_logger.cpp.
References formatSizesAsJSON(), PNS::LOGGER::EVENT_ENTRY::layer, PNS::LOGGER::EVENT_ENTRY::p, PNS::LOGGER::EVENT_ENTRY::sizes, PNS::LOGGER::EVENT_ENTRY::type, and PNS::LOGGER::EVENT_ENTRY::uuids.
Referenced by FormatLogFileAsJSON().
|
static |
Definition at line 106 of file pns_logger.cpp.
References dummy, FormatEventAsJSON(), formatRouterItemAsJSON(), PNS::LOGGER::LOG_DATA::m_AddedItems, PNS::LOGGER::LOG_DATA::m_BoardHash, PNS::LOGGER::LOG_DATA::m_Events, PNS::LOGGER::LOG_DATA::m_Heads, PNS::LOGGER::LOG_DATA::m_Mode, PNS::LOGGER::LOG_DATA::m_RemovedItems, and PNS::LOGGER::LOG_DATA::m_TestCaseType.
Referenced by PNS_LOG_FILE::SaveLog(), and ROUTER_TOOL::saveRouterDebugLog().
|
staticprivate |
Definition at line 172 of file pns_logger.cpp.
References PNS::ITEM::ARC_T, PNS_LAYER_RANGE::End(), formatShapeAsJSON(), PNS::ROUTER::GetInstance(), PNS::ROUTER::GetInterface(), PNS::ROUTER_IFACE::GetNetName(), PNS::ITEM::Kind(), PNS::ITEM::KindStr(), PNS::ITEM::Layer(), PNS::ITEM::Layers(), PNS::ITEM::Net(), PNS::ITEM::SEGMENT_T, PNS::ITEM::Shape(), PNS_LAYER_RANGE::Start(), via, and PNS::ITEM::VIA_T.
Referenced by FormatLogFileAsJSON().
|
staticprivate |
Definition at line 224 of file pns_logger.cpp.
References circle(), SH_ARC, SH_CIRCLE, SH_SEGMENT, and SHAPE_BASE::Type().
Referenced by formatRouterItemAsJSON().
|
staticprivate |
Definition at line 210 of file pns_logger.cpp.
References PNS::SIZES_SETTINGS::GetLayerBottom(), PNS::SIZES_SETTINGS::GetLayerTop(), PNS::SIZES_SETTINGS::TrackWidth(), PNS::SIZES_SETTINGS::TrackWidthIsExplicit(), PNS::SIZES_SETTINGS::ViaDiameter(), PNS::SIZES_SETTINGS::ViaDrill(), and PNS::SIZES_SETTINGS::ViaType().
Referenced by FormatEventAsJSON().
|
inline |
Definition at line 118 of file pns_logger.h.
References m_events.
| void PNS::LOGGER::Log | ( | LOGGER::EVENT_TYPE | evt, |
| const VECTOR2I & | pos = VECTOR2I(), | ||
| const ITEM * | item = nullptr, | ||
| const SIZES_SETTINGS * | sizes = nullptr, | ||
| int | aLayer = 0 ) |
Definition at line 98 of file pns_logger.cpp.
References LogM().
| void PNS::LOGGER::LogM | ( | LOGGER::EVENT_TYPE | evt, |
| const VECTOR2I & | pos = VECTOR2I(), | ||
| std::vector< ITEM * > | items = {}, | ||
| const SIZES_SETTINGS * | sizes = nullptr, | ||
| int | aLayer = 0 ) |
Definition at line 74 of file pns_logger.cpp.
References PNS::LOGGER::EVENT_ENTRY::layer, m_events, PNS::LOGGER::EVENT_ENTRY::p, PNS::LOGGER::EVENT_ENTRY::sizes, PNS::LOGGER::EVENT_ENTRY::type, and PNS::LOGGER::EVENT_ENTRY::uuids.
Referenced by Log().
|
static |
Definition at line 267 of file pns_logger.cpp.
References PNS::LOGGER::EVENT_ENTRY::layer, PNS::LOGGER::EVENT_ENTRY::p, PNS::LOGGER::EVENT_ENTRY::type, PNS::LOGGER::EVENT_ENTRY::uuids, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PNS_LOG_FILE::loadLegacyLog().
|
static |
Definition at line 290 of file pns_logger.cpp.
References PNS::LOGGER::EVENT_ENTRY::layer, PNS::LOGGER::EVENT_ENTRY::p, PNS::LOGGER::EVENT_ENTRY::type, and PNS::LOGGER::EVENT_ENTRY::uuids.
Referenced by PNS_LOG_FILE::loadJsonLog().
|
private |
Definition at line 135 of file pns_logger.h.
Referenced by Clear(), GetEvents(), and LogM().
|
private |
Definition at line 136 of file pns_logger.h.