Skip to content

jsl/landpatterns/introspection

Package name: jsl/landpatterns/introspection

Summary

PadInfo

Info about a Particular Pad of a LandPattern

Constructors

Function Description
PadInfo Constructor for defstruct PadInfo

Functions

Function Description
get-pad-info Helper functions to consolidate all of the introspection data related to a pad.

General Definitions

Function Description
get-pad-by-name Retrieve a pad from a landpattern by name
get-pad-by-name! Retrieve a pad from a landpattern by name

Definitions

PadInfo

Info about a Particular Pad of a LandPattern

public defstruct PadInfo <: JITXValue & Equalable & Hashable
    layer-data: Tuple<LayerShape>
    pose: Pose
    shape: Shape
    side: Side
    type: PadType

  • layer-data: Tuple<LayerShape>

  • pose: Pose

  • shape: Shape

  • side: Side

  • type: PadType

This type is primarily a helper function for working around limitations in the pcb-module and pcb-component hierarchy.

This type consolidates much of the meta-data associated with a particular pad so that it can be transmitted accross pcb-module definition boundaries.

It includes data from the following API calls:

  • pad-type()
  • pad-shape()
  • pose()
  • side()
  • layers()

Constructors

PadInfo

Constructor for defstruct PadInfo

public defn PadInfo (type:PadType, shape:Shape, pose:Pose, side:Side, layer-data:Tuple<LayerShape>)

Functions

get-pad-info

Helper functions to consolidate all of the introspection data related to a pad.

public defn get-pad-info (lp-pd:JITXObject) -> PadInfo

  • lp-pd: JITXObject - LandPatternPad object that we will inspect for data. Typically this accessed using the pads() API function or using the get-pads-from-port function.
  • Returns PadInfo - PadInfo object that captures all of the info related to this pad.

General Definitions

get-pad-by-name

Retrieve a pad from a landpattern by name

public defn get-pad-by-name (obj:LandPattern, name:String) -> Maybe<JITXObject>

  • obj: LandPattern - LandPattern object that we will interrogate
  • name: String - Name of the pad like p[1] or A[3], etc
  • Returns Maybe<JITXObject> - If we find a pad with that name, we will require a JITXObject of that pad. We we don't find a pad by that name, we return None()

get-pad-by-name!

Retrieve a pad from a landpattern by name

public defn get-pad-by-name! (obj:LandPattern, name:String) -> JITXObject

  • obj: LandPattern - LandPattern object that we will interrogate
  • name: String - Name of the pad like p[1] or A[3], etc
  • Returns JITXObject - A pad object by that name if one is present.
  • Throws ValueError - when no pad is found by the passed name

Related Packages

Forwarded by packages: jsl/landpatterns/framework, jsl/landpatterns