jitx/parts/component-types¶
Package name: jitx/parts/component-types
Summary¶
Data Types¶
Capacitor¶
TCR¶
Part¶
Sourcing¶
Functions¶
Function | Description |
---|---|
parse-sourcing |
Inductor¶
MinMaxRange¶
Constructors¶
Function | Description |
---|---|
MinMaxRange | Constructor for defstruct MinMaxRange |
SellerOfferPrice¶
Constructors¶
Function | Description |
---|---|
SellerOfferPrice | Constructor for defstruct SellerOfferPrice |
SellerOffer¶
Constructors¶
Function | Description |
---|---|
SellerOffer | Constructor for defstruct SellerOffer |
Resistor¶
Functions¶
Function | Description |
---|---|
get-resistance | Get the resistance value as a Toleranced |
compute-tcr-deviation | Compute the expected deviation window of a given resistor |
Resistor |
Component¶
Multis¶
Function | Description |
---|---|
sub-component | |
resolved-price | |
sellers | |
to-jitx | |
vendor-part-numbers | |
query-properties | |
x | |
y | |
component | |
area |
Functions¶
Function | Description |
---|---|
parse-component | |
to-jitx | |
make-model-3d-relative | Adjust model3d file paths to |
Seller¶
Functions¶
Function | Description |
---|---|
parse-sellers |
General Definitions¶
Function | Description |
---|---|
indented-list | |
parse-rated-temperature | |
compute-tcr-deviation | Compute the expected deviation window of a given temperature coefficient |
parse-query-properties | |
parse-dimensions | |
optional-double | |
VendorPartNumbers |
Definitions¶
Capacitor¶
public defstruct Capacitor <: Component :
anode: String|False
capacitance: Double
case: String|False
electrolyte: String|False
esr: ESR|False
manufacturer: String
metadata: Tuple<KeyValue>
mounting: String
mpn: String
rated-current-pk: Double|False
rated-current-rms: Double|False
rated-temperature: Toleranced|False
rated-voltage: Double|False
rated-voltage-ac: Double|False
sourcing: Sourcing
temperature-coefficient: String|False
tolerance: MinMaxRange|False
trust: String
type: String
z: Double|False
-
anode: String|False
-
capacitance: Double
-
case: String|False
-
electrolyte: String|False
-
esr: ESR|False
-
manufacturer: String
-
metadata: Tuple<KeyValue>
-
mounting: String
-
mpn: String
-
rated-current-pk: Double|False
-
rated-current-rms: Double|False
-
rated-temperature: Toleranced|False
-
rated-voltage: Double|False
-
rated-voltage-ac: Double|False
-
sourcing: Sourcing
-
temperature-coefficient: String|False
-
tolerance: MinMaxRange|False
-
trust: String
-
type: String
-
z: Double|False
Constructors¶
Capacitor¶
Constructor for defstruct Capacitor
public defn Capacitor (manufacturer:String, mpn:String, trust:String, x:Double, y:Double, z:Double|False, mounting:String, rated-temperature:Toleranced|False, case:String|False, sourcing:Sourcing, metadata:Tuple<KeyValue>, type:String, tolerance:MinMaxRange|False, capacitance:Double, anode:String|False, electrolyte:String|False, temperature-coefficient:String|False, esr:ESR|False, rated-voltage:Double|False, rated-voltage-ac:Double|False, rated-current-pk:Double|False, rated-current-rms:Double|False, sellers:Tuple<Seller>|False, query-properties:JObject|False, resolved-price:Double|False, component:ComponentCode, vendor-part-numbers:Tuple<KeyValue<String, String>>)
TCR¶
public defstruct TCR :
negative: Double
positive: Double
reference-temperature: Double
-
negative: Double
-
positive: Double
-
reference-temperature: Double
Constructors¶
TCR¶
Constructor for defstruct TCR
public defn TCR (reference-temperature:Double, positive:Double, negative:Double)
Part¶
public defstruct Part <: Component :
case: String|UNKNOWN
category: Category|UNKNOWN
description: String
dimensions: DimensionsCode
manufacturer: String
mounting: String|UNKNOWN
mpn: String
rated-power: Double|False
rated-temperature: Toleranced|False
sourcing: Sourcing
trust: String
-
case: String|UNKNOWN
-
category: Category|UNKNOWN
-
description: String
-
dimensions: DimensionsCode
-
manufacturer: String
-
mounting: String|UNKNOWN
-
mpn: String
-
rated-power: Double|False
-
rated-temperature: Toleranced|False
-
sourcing: Sourcing
-
trust: String
Constructors¶
Part¶
Constructor for defstruct Part
public defn Part (component:ComponentCode, description:String, manufacturer:String, mpn:String, vendor-part-numbers:Tuple<KeyValue<String, String>>, category:Category|UNKNOWN, trust:String, mounting:String|UNKNOWN, case:String|UNKNOWN, dimensions:DimensionsCode, sourcing:Sourcing, rated-temperature:Toleranced|False, rated-power:Double|False, sellers:Tuple<Seller>|False, query-properties:JObject|False, resolved-price:Double|False)
Sourcing¶
public defstruct Sourcing :
minimum-quantity: Int
price: Double|False
stock: Int
-
minimum-quantity: Int
-
price: Double|False
-
stock: Int
Constructors¶
Sourcing¶
Constructor for defstruct Sourcing
public defn Sourcing (price:Double|False, minimum-quantity:Int, stock:Int)
Inductor¶
public defstruct Inductor <: Component :
case: String|False
current-rating: Double|False
dc-resistance: Double|False
inductance: Double
manufacturer: String
material-core: String|False
metadata: Tuple<KeyValue>
mounting: String
mpn: String
quality-factor: Double|False
rated-temperature: Toleranced|False
saturation-current: Double|False
self-resonant-frequency: Double|False
shielding: String|False
sourcing: Sourcing
tolerance: MinMaxRange|False
trust: String
type: String
z: Double|False
-
case: String|False
-
current-rating: Double|False
-
dc-resistance: Double|False
-
inductance: Double
-
manufacturer: String
-
material-core: String|False
-
metadata: Tuple<KeyValue>
-
mounting: String
-
mpn: String
-
quality-factor: Double|False
-
rated-temperature: Toleranced|False
-
saturation-current: Double|False
-
self-resonant-frequency: Double|False
-
shielding: String|False
-
sourcing: Sourcing
-
tolerance: MinMaxRange|False
-
trust: String
-
type: String
-
z: Double|False
Constructors¶
Inductor¶
Constructor for defstruct Inductor
public defn Inductor (manufacturer:String, mpn:String, trust:String, x:Double, y:Double, z:Double|False, mounting:String, rated-temperature:Toleranced|False, case:String|False, sourcing:Sourcing, metadata:Tuple<KeyValue>, type:String, tolerance:MinMaxRange|False, inductance:Double, material-core:String|False, shielding:String|False, current-rating:Double|False, saturation-current:Double|False, dc-resistance:Double|False, quality-factor:Double|False, self-resonant-frequency:Double|False, sellers:Tuple<Seller>|False, query-properties:JObject|False, resolved-price:Double|False, component:ComponentCode, vendor-part-numbers:Tuple<KeyValue<String, String>>)
MinMaxRange¶
public defstruct MinMaxRange <: JITXValue & Equalable & Hashable :
max: Double
min: Double
-
max: Double
-
min: Double
Constructors¶
MinMaxRange¶
Constructor for defstruct MinMaxRange
public defn MinMaxRange (min:Double, max:Double)
Functions¶
tol¶
Create a Toleranced value from the MinMaxRange
public defn tol (v:Double, tolerance:MinMaxRange) -> Toleranced
v: Double
- The typical valuetolerance: MinMaxRange
- Min/Max Range- Returns
Toleranced
SellerOfferPrice¶
public defstruct SellerOfferPrice <: JITXValue & Equalable & Hashable :
converted-price: Double
quantity: Int
-
converted-price: Double
-
quantity: Int
Constructors¶
SellerOfferPrice¶
Constructor for defstruct SellerOfferPrice
public defn SellerOfferPrice (quantity:Int, converted-price:Double)
SellerOffer¶
public defstruct SellerOffer <: JITXValue & Equalable & Hashable :
inventory-level: Int
prices: Tuple<SellerOfferPrice>
-
inventory-level: Int
-
prices: Tuple<SellerOfferPrice>
Constructors¶
SellerOffer¶
Constructor for defstruct SellerOffer
public defn SellerOffer (inventory-level:Int, prices:Tuple<SellerOfferPrice>)
Resistor¶
public defstruct Resistor <: Component :
TCR: TCR|False
case: String|False
composition: String|False
manufacturer: String
metadata: Tuple<KeyValue>
mounting: String
mpn: String
rated-power: Double|False
rated-temperature: Toleranced|False
resistance: Double
sourcing: Sourcing
tolerance: MinMaxRange|False
trust: String
type: String
z: Double|False
-
TCR: TCR|False
-
case: String|False
-
composition: String|False
-
manufacturer: String
-
metadata: Tuple<KeyValue>
-
mounting: String
-
mpn: String
-
rated-power: Double|False
-
rated-temperature: Toleranced|False
-
resistance: Double
-
sourcing: Sourcing
-
tolerance: MinMaxRange|False
-
trust: String
-
type: String
-
z: Double|False
Constructors¶
Resistor¶
Constructor for defstruct Resistor
public defn Resistor (manufacturer:String, mpn:String, trust:String, x:Double, y:Double, z:Double|False, mounting:String, rated-temperature:Toleranced|False, case:String|False, sourcing:Sourcing, metadata:Tuple<KeyValue>, type:String, tolerance:MinMaxRange|False, resistance:Double, composition:String|False, rated-power:Double|False, TCR:TCR|False, sellers:Tuple<Seller>|False, query-properties:JObject|False, resolved-price:Double|False, component:ComponentCode, vendor-part-numbers:Tuple<KeyValue<String, String>>)
Functions¶
get-resistance¶
Get the resistance value as a Toleranced
public defn get-resistance (r:Resistor) -> Toleranced
r: Resistor
- Resistor Component as returned by a query.- Returns
Toleranced
- Converts the component fields to aToleranced
resistance value.
This function uses the internal information of the Resistor
component
object to construct the resistance value with tolerances.
compute-tcr-deviation¶
Compute the expected deviation window of a given resistor
public defn compute-tcr-deviation (resistor:Resistor, temperature:Double) -> Toleranced|False
resistor: Resistor
- Component model for this resistor including physical data.temperature: Double
- Temperature to evaluate the deviation coefficient. This temperature is in celsius and will be referenced from theTCR
reference temperature, typically 25.0 C.- Returns
Toleranced|False
- A window for the deviation of the resistance. This value is 1.0 when there is no deviation. Themin/max
values of the tolerance encode the window. These values will typically be in the neighborhood of 0.9 to 1.1, so that when we multiply against the nominal resistance, it will create the temperature adjusted resistance window.
Resistor¶
public defn Resistor (raw-json:JObject) -> Resistor
- Returns
Resistor
Component¶
public deftype Component
Multis¶
sub-component¶
public defmulti sub-component (component:Component, component-code:ComponentCode) -> Component
- Returns
Component
resolved-price¶
public defmulti resolved-price (component:Component) -> Double|False
- Returns
Double|False
sellers¶
public defmulti sellers (component:Component) -> Tuple<Seller>|False
- Returns
Tuple<Seller>|False
to-jitx¶
public defmulti to-jitx (component:Component -- component-name:String|False = ?) -> Instantiable
- Returns
Instantiable
vendor-part-numbers¶
public defmulti vendor-part-numbers (component:Component) -> Tuple<KeyValue<String, String>>
- Returns
Tuple<KeyValue<String, String>>
query-properties¶
public defmulti query-properties (component:Component) -> JObject|False
- Returns
JObject|False
x¶
public defmulti x (component:Component) -> Double
- Returns
Double
y¶
public defmulti y (component:Component) -> Double
- Returns
Double
component¶
public defmulti component (component:Component) -> ComponentCode
- Returns
ComponentCode
area¶
public defmulti area (component:Component) -> Double
- Returns
Double
Functions¶
parse-component¶
public defn parse-component (json:JObject) -> Component
- Returns
Component
to-jitx¶
public defn to-jitx (comp:Component, c:ComponentCode -- component-name:String|False = ?) -> Instantiable
- Returns
Instantiable
make-model-3d-relative¶
Adjust model3d file paths to <project-folder>/3d-models
public defn make-model-3d-relative (component:Component, relative-model3d-dir:String = ?) -> Component
- Returns
Component
Example: Step file under the project folder: 3d-models/jitx-64d1e771b789d8dc4b8d375d.stp
make-model-3d-relative(component, "../../3d-models") would change the filename in a Model3D statement from from "jitx-64d1e771b789d8dc4b8d375d.stp" to "../../jitx-64d1e771b789d8dc4b8d375d.stp"
Seller¶
public defstruct Seller <: JITXValue & Equalable & Hashable :
company-name: String
offers: Tuple<SellerOffer>
resolved-price: Double
updated-at: String|False
-
company-name: String
-
offers: Tuple<SellerOffer>
-
resolved-price: Double
-
updated-at: String|False
Constructors¶
Seller¶
Constructor for defstruct Seller
public defn Seller (updated-at:String|False, company-name:String, resolved-price:Double, offers:Tuple<SellerOffer>)
Multis¶
sellers¶
public defmulti sellers (component:Component) -> Tuple<Seller>|False
- Returns
Tuple<Seller>|False
Functions¶
parse-sellers¶
public defn parse-sellers (json:JObject) -> Tuple<Seller>|False
- Returns
Tuple<Seller>|False
General Definitions¶
indented-list¶
public defn indented-list (items:Seqable)
parse-rated-temperature¶
public defn parse-rated-temperature (json:JObject) -> Toleranced|False
- Returns
Toleranced|False
compute-tcr-deviation¶
Compute the expected deviation window of a given temperature coefficient
public defn compute-tcr-deviation (tcr:Toleranced, temperature:Double, ref-temp:Double = ?) -> Toleranced
tcr: Toleranced
- Temperature Coefficient as a Toleranced interval. This may be symmetric or biased either negative or positive. This value should be (1 / deg C). So a value of+/- 200ppm / C
would bemin-max(-0.0002, 0.0002)
temperature: Double
- Temperature to evaluate the deviation coefficient. This temperature is in celsius.ref-temp: Double
- Reference temperature in celsius. If not provided, 25.0C is assumed.- Returns
Toleranced
- Window for the deviation. A value of1.0
would indicate no deviation. This toleranced will typically be in the neighborhood of 0.9 to 1.1. A value less than 1.0 indicates that the resistance is getting smaller at this temperature and a value greater than 1.0 indicates the resistance is getting larger at this temperature.
parse-query-properties¶
public defn parse-query-properties (json:JObject) -> JObject|False
- Returns
JObject|False
parse-dimensions¶
public defn parse-dimensions (dimensions:JObject) -> [Double, Double, Double|False]
- Returns
[Double, Double, Double|False]
optional-double¶
public defn optional-double (json:JObject, field:String) -> Double|False
- Returns
Double|False
VendorPartNumbers¶
public defn VendorPartNumbers (json:JObject) -> Tuple<KeyValue<String, String>>
- Returns
Tuple<KeyValue<String, String>>
Related Packages¶
Forwarded by package: jitx/parts