|
KiCad PCB EDA Suite
|
#include <pns_log_file.h>
Classes | |
| struct | COMMIT_STATE |
Public Member Functions | |
| PNS_LOG_FILE () | |
| ~PNS_LOG_FILE () | |
| bool | SaveLog (const wxFileName &logFileName, REPORTER *aRpt) |
| bool | Load (const wxFileName &logFileName, REPORTER *aRpt, const wxString boardFileName=wxT("")) |
| const std::optional< wxString > | GetLogBoardHash (const wxString &logFileName) |
| std::vector< BOARD_CONNECTED_ITEM * > | ItemsById (const PNS::LOGGER::EVENT_ENTRY &evt) |
| BOARD_CONNECTED_ITEM * | ItemById (const PNS::LOGGER::EVENT_ENTRY &evt) |
| std::vector< PNS::LOGGER::EVENT_ENTRY > & | Events () |
| void | SetBoard (std::shared_ptr< BOARD > brd) |
| std::shared_ptr< BOARD > | GetBoard () const |
| PNS::ROUTING_SETTINGS * | GetRoutingSettings () const |
| const COMMIT_STATE & | GetExpectedResult () const |
| void | SetExpectedResult (const COMMIT_STATE &aCommitState, std::vector< std::unique_ptr< PNS::ITEM > > aParsedItems) |
| PNS::ROUTER_MODE | GetMode () const |
| void | SetMode (PNS::ROUTER_MODE aMode) |
| void | SetTestCaseType (PNS::LOGGER::TEST_CASE_TYPE aType) |
| std::optional< PNS::LOGGER::TEST_CASE_TYPE > | GetTestCaseType () const |
Private Member Functions | |
| bool | parseLegacyCommonPnsProps (PNS::ITEM *aItem, const wxString &cmd, wxStringTokenizer &aTokens) |
| std::unique_ptr< PNS::SEGMENT > | parseLegacyPnsSegmentFromString (wxStringTokenizer &aTokens) |
| std::unique_ptr< PNS::VIA > | parseLegacyPnsViaFromString (wxStringTokenizer &aTokens) |
| std::unique_ptr< PNS::ITEM > | parseLegacyItemFromString (wxStringTokenizer &aTokens) |
| std::shared_ptr< SHAPE > | parseLegacyShape (SHAPE_TYPE expectedType, wxStringTokenizer &aTokens) |
| std::shared_ptr< SHAPE > | parseShape (const nlohmann::json &aJSON) |
| bool | parseCommonPnsProps (const nlohmann::json &aJSON, PNS::ITEM *aItem) |
| std::unique_ptr< PNS::ITEM > | parseItem (const nlohmann::json &aJSON) |
| bool | loadJsonLog (const wxString &aFilename, REPORTER *aRpt, bool aHashOnly=false) |
| bool | loadLegacyLog (const wxString &aFilename, REPORTER *aRpt) |
Private Attributes | |
| std::optional< wxString > | m_boardHash |
| std::shared_ptr< SETTINGS_MANAGER > | m_settingsMgr |
| std::unique_ptr< PNS::ROUTING_SETTINGS > | m_routerSettings |
| std::vector< PNS::LOGGER::EVENT_ENTRY > | m_events |
| std::shared_ptr< BOARD > | m_board |
| COMMIT_STATE | m_commitState |
| std::vector< std::unique_ptr< PNS::ITEM > > | m_parsed_items |
| PNS::ROUTER_MODE | m_mode |
| std::optional< PNS::LOGGER::TEST_CASE_TYPE > | m_testCaseType |
Definition at line 50 of file pns_log_file.h.
| PNS_LOG_FILE::PNS_LOG_FILE | ( | ) |
Definition at line 87 of file pns_log_file.cpp.
References m_mode, and m_routerSettings.
|
inline |
Definition at line 54 of file pns_log_file.h.
|
inline |
Definition at line 82 of file pns_log_file.h.
References m_events.
Referenced by PNS_LOG_PLAYER::ReplayLog().
|
inline |
Definition at line 85 of file pns_log_file.h.
References m_board.
Referenced by PNS_LOG_PLAYER::ReplayLog().
|
inline |
Definition at line 89 of file pns_log_file.h.
References m_commitState.
Referenced by PNS_LOG_PLAYER::CompareResults(), and PNS_TEST_FIXTURE::RunTest().
| const std::optional< wxString > PNS_LOG_FILE::GetLogBoardHash | ( | const wxString & | logFileName | ) |
Definition at line 659 of file pns_log_file.cpp.
References loadJsonLog(), and m_boardHash.
Referenced by PNS_TEST_FIXTURE::RunTest().
|
inline |
Definition at line 98 of file pns_log_file.h.
References m_mode.
Referenced by PNS_LOG_PLAYER::ReplayLog().
|
inline |
Definition at line 87 of file pns_log_file.h.
References m_routerSettings.
Referenced by PNS_LOG_PLAYER::ReplayLog().
|
inline |
Definition at line 102 of file pns_log_file.h.
References m_testCaseType.
| BOARD_CONNECTED_ITEM * PNS_LOG_FILE::ItemById | ( | const PNS::LOGGER::EVENT_ENTRY & | evt | ) |
Definition at line 69 of file pns_log_file.cpp.
References ItemsById().
| std::vector< BOARD_CONNECTED_ITEM * > PNS_LOG_FILE::ItemsById | ( | const PNS::LOGGER::EVENT_ENTRY & | evt | ) |
Definition at line 48 of file pns_log_file.cpp.
References m_board, and PNS::LOGGER::EVENT_ENTRY::uuids.
Referenced by ItemById(), and PNS_LOG_PLAYER::ReplayLog().
| bool PNS_LOG_FILE::Load | ( | const wxFileName & | logFileName, |
| REPORTER * | aRpt, | ||
| const wxString | boardFileName = wxT("") ) |
Definition at line 445 of file pns_log_file.cpp.
References PCB_IO_KICAD_SEXPR::LoadBoard(), loadJsonLog(), loadLegacyLog(), m_board, BOARD_DESIGN_SETTINGS::m_DRCEngine, m_routerSettings, m_settingsMgr, BOARD_DESIGN_SETTINGS::m_UseConnectedTrackWidth, IO_ERROR::Problem(), project, REPORTER::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_WARNING, and IO_ERROR::What().
Referenced by PNS_TEST_FIXTURE::RunTest().
|
private |
Definition at line 529 of file pns_log_file.cpp.
References m_boardHash, m_commitState, m_events, m_mode, m_parsed_items, m_testCaseType, PNS::LOGGER::ParseEventFromJSON(), parseItem(), REPORTER::Report(), RPT_SEVERITY_ERROR, and RPT_SEVERITY_INFO.
Referenced by GetLogBoardHash(), and Load().
|
private |
Definition at line 607 of file pns_log_file.cpp.
References m_commitState, m_events, m_mode, m_parsed_items, PNS::LOGGER::ParseEvent(), parseLegacyItemFromString(), readLine(), REPORTER::Report(), and RPT_SEVERITY_ERROR.
Referenced by Load().
|
private |
Definition at line 178 of file pns_log_file.cpp.
References m_board, PNS::ITEM::SetLayers(), and PNS::ITEM::SetNet().
Referenced by parseItem().
|
private |
Definition at line 245 of file pns_log_file.cpp.
References parseCommonPnsProps(), parseShape(), and via.
Referenced by loadJsonLog().
|
private |
Definition at line 159 of file pns_log_file.cpp.
References end, m_board, PNS::ITEM::SetLayers(), and PNS::ITEM::SetNet().
Referenced by parseLegacyPnsSegmentFromString(), and parseLegacyPnsViaFromString().
|
private |
Definition at line 293 of file pns_log_file.cpp.
References parseLegacyPnsSegmentFromString(), and parseLegacyPnsViaFromString().
Referenced by loadLegacyLog().
|
private |
Definition at line 187 of file pns_log_file.cpp.
References parseLegacyCommonPnsProps(), parseLegacyShape(), and SH_SEGMENT.
Referenced by parseLegacyItemFromString().
|
private |
Definition at line 213 of file pns_log_file.cpp.
References PNS::VIA::ALL_LAYERS, SHAPE_CIRCLE::GetCenter(), SHAPE_CIRCLE::GetRadius(), parseLegacyCommonPnsProps(), parseLegacyShape(), SH_CIRCLE, and via.
Referenced by parseLegacyItemFromString().
|
private |
Definition at line 127 of file pns_log_file.cpp.
References radius, SH_CIRCLE, SH_SEGMENT, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseLegacyPnsSegmentFromString(), and parseLegacyPnsViaFromString().
|
private |
| bool PNS_LOG_FILE::SaveLog | ( | const wxFileName & | logFileName, |
| REPORTER * | aRpt ) |
Definition at line 412 of file pns_log_file.cpp.
References PNS::LOGGER::FormatLogFileAsJSON(), PNS::LOGGER::LOG_DATA::m_AddedItems, PNS::LOGGER::LOG_DATA::m_BoardHash, m_boardHash, m_commitState, PNS::LOGGER::LOG_DATA::m_Events, m_events, PNS::LOGGER::LOG_DATA::m_Heads, PNS::LOGGER::LOG_DATA::m_Mode, m_mode, PNS::LOGGER::LOG_DATA::m_RemovedItems, PNS::LOGGER::LOG_DATA::m_TestCaseType, m_testCaseType, REPORTER::Report(), and RPT_SEVERITY_ERROR.
|
inline |
Definition at line 84 of file pns_log_file.h.
References m_board.
|
inline |
Definition at line 91 of file pns_log_file.h.
References m_commitState, and m_parsed_items.
Referenced by PNS_LOG_PLAYER::ReplayLog().
|
inline |
Definition at line 100 of file pns_log_file.h.
References m_mode.
|
inline |
Definition at line 101 of file pns_log_file.h.
References m_testCaseType.
|
private |
Definition at line 122 of file pns_log_file.h.
Referenced by GetBoard(), ItemsById(), Load(), parseCommonPnsProps(), parseLegacyCommonPnsProps(), and SetBoard().
|
private |
Definition at line 118 of file pns_log_file.h.
Referenced by GetLogBoardHash(), loadJsonLog(), and SaveLog().
|
private |
Definition at line 123 of file pns_log_file.h.
Referenced by GetExpectedResult(), loadJsonLog(), loadLegacyLog(), SaveLog(), and SetExpectedResult().
|
private |
Definition at line 121 of file pns_log_file.h.
Referenced by Events(), loadJsonLog(), loadLegacyLog(), and SaveLog().
|
private |
Definition at line 125 of file pns_log_file.h.
Referenced by GetMode(), loadJsonLog(), loadLegacyLog(), PNS_LOG_FILE(), SaveLog(), and SetMode().
|
private |
Definition at line 124 of file pns_log_file.h.
Referenced by loadJsonLog(), loadLegacyLog(), and SetExpectedResult().
|
private |
Definition at line 120 of file pns_log_file.h.
Referenced by GetRoutingSettings(), Load(), and PNS_LOG_FILE().
|
private |
Definition at line 119 of file pns_log_file.h.
Referenced by Load().
|
private |
Definition at line 126 of file pns_log_file.h.
Referenced by GetTestCaseType(), loadJsonLog(), SaveLog(), and SetTestCaseType().