28#ifndef __PNS_LOG_VIEWER_FRAME_H 
   29#define __PNS_LOG_VIEWER_FRAME_H 
   45#define ID_LIST_COPY 10001 
   46#define ID_LIST_SHOW_ALL 10002 
   47#define ID_LIST_SHOW_NONE 10003 
   48#define ID_LIST_DISPLAY_LINE 10004 
   67                      int aFlags = 0 )
 override {}
 
 
   76    int StackupHeight( 
int aFirstLayer, 
int aSecondLayer )
 const override { 
return 0; }
 
   92        if( aLayer == 
m_board->GetCopperLayerCount() - 1 )
 
 
  105            return m_board->GetCopperLayerCount() - 1;
 
  107        return ( aLayer / 2 ) - 1;
 
 
  115        const PAD* startPad = 
nullptr;
 
  116        const PAD* endPad = 
nullptr;
 
  119            startPad = 
static_cast<PAD*
>( aStartPad->
Parent() );
 
  122            endPad = 
static_cast<PAD*
>( aEndPad->
Parent() );
 
  125            .OptimiseViaLayers = 
false, .MergeTracks = 
false, .OptimiseTracesInPads = 
false, .InferViaInPad = 
true 
  128        return m_board->GetLengthCalculation()->CalculateLength( lengthItems, opts, startPad, endPad );
 
 
  136        const PAD* startPad = 
nullptr;
 
  137        const PAD* endPad = 
nullptr;
 
  140            startPad = 
static_cast<PAD*
>( aStartPad->
Parent() );
 
  143            endPad = 
static_cast<PAD*
>( aEndPad->
Parent() );
 
  146            .OptimiseViaLayers = 
false, .MergeTracks = 
false, .OptimiseTracesInPads = 
false, .InferViaInPad = 
true 
  149        return m_board->GetLengthCalculation()->CalculateDelay( lengthItems, opts, startPad, endPad );
 
 
  155        std::vector<LENGTH_DELAY_CALCULATION_ITEM> lengthItems;
 
  157        for( 
int idx = 0; idx < aLine.
Size(); idx++ )
 
  170                lengthItems.emplace_back( std::move( item ) );
 
  174                const int          layerPrev = aLine[idx - 1]->Layer();
 
  175                const int          layerNext = aLine[idx + 1]->Layer();
 
  179                if( layerPrev != layerNext )
 
  183                    item.
SetLayers( pcbLayerPrev, pcbLayerNext );
 
  185                    lengthItems.emplace_back( std::move( item ) );
 
 
  194                                     const int aDiffPairCouplingGap, 
const int aPNSLayer,
 
  195                                     const NETCLASS* aNetClass )
 override 
  204        return m_board->GetLengthCalculation()->CalculateLengthForDelay( aDesiredDelay, ctx );
 
 
  208                                             int aDiffPairCouplingGap, 
int aPNSLayer,
 
  209                                             const NETCLASS* aNetClass )
 override 
  218        return m_board->GetLengthCalculation()->CalculatePropagationDelayForShapeLineChain( aShape, ctx );
 
 
 
  233    void SetBoard2( std::shared_ptr<BOARD> aBoard );
 
  249    virtual void onOpen( wxCommandEvent& event ) 
override;
 
  250    virtual void onSaveAs( wxCommandEvent& event ) 
override;
 
  251    virtual void onExit( wxCommandEvent& event ) 
override;
 
  262    virtual void onFilterText( wxCommandEvent& event ) 
override;
 
 
  289                           bool aShowVertexNumbers = 
false );
 
  291                            bool aShowVertexNumbers = 
false );
 
  293                         bool aShowVertexNumbers = 
false );
 
 
Abstract interface for drawing on a 2D-surface.
 
Lightweight class which holds a pad, via, or a routed trace outline.
 
void SetLine(const SHAPE_LINE_CHAIN &aLine)
Sets the source SHAPE_LINE_CHAIN of this item.
 
void SetVia(const PCB_VIA *aVia)
Sets the VIA associated with this item.
 
void SetEffectiveNetClass(const NETCLASS *aNetClass)
Sets the effective net class for the item.
 
void SetLayers(const PCB_LAYER_ID aStart, const PCB_LAYER_ID aEnd=PCB_LAYER_ID::UNDEFINED_LAYER)
Sets the first and last layers associated with this item.
 
A collection of nets and the parameters used to route or test these nets.
 
Base class for PNS router board items.
 
BOARD_ITEM * Parent() const
 
BOARD_ITEM * GetSourceItem() const
 
virtual int Layer() const
 
bool OfKind(int aKindMask) const
 
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
 
Keep the router "world" - i.e.
 
Represent a contiguous set of PCB layers.
 
PNS_LOG_VIEWER_FRAME_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxT("P&S Log Viewer"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(1045, 574), long style=wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL)
 
std::shared_ptr< WX_TEXT_CTRL_REPORTER > m_reporter
 
std::shared_ptr< PNS_LOG_FILE > m_logFile
 
virtual void onListRightClick(wxMouseEvent &event)
 
std::shared_ptr< PNS_LOG_PLAYER > m_logPlayer
 
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > GetOverlay() const
 
std::map< wxString, wxString > m_filenameToPathMap
 
void drawSimpleShape(SHAPE *aShape, bool aIsSelected, const std::string &aName)
 
virtual void onRewindCountText(wxCommandEvent &event) override
 
std::shared_ptr< KIGFX::VIEW_GROUP > m_previewItems
 
PNS_DEBUG_STAGE * getCurrentStage()
 
bool filterStringMatches(PNS_DEBUG_SHAPE *ent)
 
void SetBoard2(std::shared_ptr< BOARD > aBoard)
 
void updateDumpPanel(int iter)
 
virtual void createUserTools() override
 
virtual ~PNS_LOG_VIEWER_FRAME()
 
void buildListTree(wxTreeListItem item, PNS_DEBUG_SHAPE *ent, int depth=0)
 
virtual void onShowVerticesChecked(wxCommandEvent &event) override
 
void SetLogFile(PNS_LOG_FILE *aLog)
 
virtual void onShowThinLinesChecked(wxCommandEvent &event) override
 
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > m_overlay
 
void LoadLogFile(const wxString &aFile)
 
virtual void onListChecked(wxCommandEvent &event)
 
std::shared_ptr< PNS_VIEWER_IFACE > m_viewerIface
 
virtual void onListSelect(wxCommandEvent &event)
 
virtual void onSaveAs(wxCommandEvent &event) override
 
virtual void onRewindScroll(wxScrollEvent &event) override
 
REPORTER * GetConsoleReporter()
 
virtual void onShowRPIsChecked(wxCommandEvent &event) override
 
void updatePnsPreviewItems(int iter)
 
virtual void onBtnRewindRight(wxCommandEvent &event) override
 
virtual void onFilterText(wxCommandEvent &event) override
 
void drawLoggedItems(int iter)
 
PNS_LOG_VIEWER_FRAME(wxFrame *frame)
 
virtual void onOpen(wxCommandEvent &event) override
 
virtual void onBtnRewindLeft(wxCommandEvent &event) override
 
virtual void onExit(wxCommandEvent &event) override
 
void AnnotatedPoint(const VECTOR2I p, int size, std::string name="", bool aShowVertexNumbers=false)
 
void AnnotatedPolyset(const SHAPE_POLY_SET &aL, std::string name="", bool aShowVertexNumbers=false)
 
void AnnotatedPolyline(const SHAPE_LINE_CHAIN &aL, std::string name, bool aShowVertexNumbers=false)
 
PNS_LOG_VIEWER_OVERLAY(KIGFX::GAL *aGal)
 
std::unique_ptr< LABEL_MANAGER > m_labelMgr
 
void Arc(const SHAPE_ARC &arc)
 
int StackupHeight(int aFirstLayer, int aSecondLayer) const override
 
int64_t CalculateRoutedPathDelay(const PNS::ITEM_SET &aLine, const PNS::SOLID *aStartPad, const PNS::SOLID *aEndPad, const NETCLASS *aNetClass) override
 
void RemoveItem(PNS::ITEM *aItem) override
 
int64_t CalculateLengthForDelay(int64_t aDesiredDelay, const int aWidth, const bool aIsDiffPairCoupled, const int aDiffPairCouplingGap, const int aPNSLayer, const NETCLASS *aNetClass) override
 
void AddItem(PNS::ITEM *aItem) override
 
int GetPNSLayerFromBoardLayer(PCB_LAYER_ID aLayer) const override
 
PNS::DEBUG_DECORATOR * GetDebugDecorator() override
 
bool IsFlashedOnLayer(const PNS::ITEM *aItem, int aLayer) const override
 
int GetNetCode(PNS::NET_HANDLE aNet) const override
 
PNS_VIEWER_IFACE(std::shared_ptr< BOARD > aBoard)
 
void DisplayPathLine(const SHAPE_LINE_CHAIN &aLine, int aImportance) override
 
PCB_LAYER_ID GetBoardLayerFromPNSLayer(int aLayer) const override
 
void SyncWorld(PNS::NODE *aWorld) override
 
bool IsPNSCopperLayer(int aLayer) const override
 
bool IsAnyLayerVisible(const PNS_LAYER_RANGE &aLayer) const override
 
void UpdateItem(PNS::ITEM *aItem) override
 
bool IsFlashedOnLayer(const PNS::ITEM *aItem, const PNS_LAYER_RANGE &aLayer) const override
 
long long int CalculateRoutedPathLength(const PNS::ITEM_SET &aLine, const PNS::SOLID *aStartPad, const PNS::SOLID *aEndPad, const NETCLASS *aNetClass) override
 
void UpdateNet(PNS::NET_HANDLE aNet) override
 
bool ImportSizes(PNS::SIZES_SETTINGS &aSizes, PNS::ITEM *aStartItem, PNS::NET_HANDLE aNet, VECTOR2D aStartPosition) override
 
int64_t CalculateDelayForShapeLineChain(const SHAPE_LINE_CHAIN &aShape, int aWidth, bool aIsDiffPairCoupled, int aDiffPairCouplingGap, int aPNSLayer, const NETCLASS *aNetClass) override
 
wxString GetNetName(PNS::NET_HANDLE aNet) const override
 
PNS::NET_HANDLE GetOrphanedNetHandle() override
 
~PNS_VIEWER_IFACE() override
 
void DisplayRatline(const SHAPE_LINE_CHAIN &aRatline, PNS::NET_HANDLE aNet) override
 
bool IsItemVisible(const PNS::ITEM *aItem) const override
 
std::vector< LENGTH_DELAY_CALCULATION_ITEM > getLengthDelayCalculationItems(const PNS::ITEM_SET &aLine, const NETCLASS *aNetClass) const
 
virtual PNS::NODE * GetWorld() const override
 
PNS::RULE_RESOLVER * GetRuleResolver() override
 
std::shared_ptr< BOARD > m_board
 
void HideItem(PNS::ITEM *aItem) override
 
void EraseView() override
 
void DisplayItem(const PNS::ITEM *aItem, int aClearance, bool aEdit=false, int aFlags=0) override
 
A pure virtual class used to derive REPORTER objects from.
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
Represent a set of closed polygons.
 
An abstract shape on 2D plane.
 
PCB_LAYER_ID
A quick note on layer IDs:
 
PCB_LAYER_ID ToLAYER_ID(int aLayer)
 
Struct to control which optimisations the length calculation code runs on the given path objects.
 
A data structure to contain basic geometry data which can affect signal propagation calculations.
 
int64_t DiffPairCouplingGap
The gap between coupled tracks.
 
const NETCLASS * NetClass
The net class this track belongs to.
 
int64_t Width
The width (in internal units) of the track.
 
bool IsDiffPairCoupled
Whether this track or via is a member of a coupled differential pair.
 
PCB_LAYER_ID Layer
The layer this track is on.
 
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D