Classes for Board Files (.brd)¶
These classes are used only within Eagle board files (.brd).
BoardFile¶
-
class
Swoop.BoardFile[source]¶ Bases:
Swoop.Swoop.EagleFileClass representing the contents of a <eagle> tag in Eagle files.
Attributes:
version
Collections:
grid: SingletonGridobject.description: SingletonDescriptionobject.designrules: SingletonDesignrulesobject.compatibility: SingletonCompatibilityobject.setting: List ofSettingobjects.plain_element: List ofPolygon,Wire,Text,Dimension,Circle,Rectangle,FrameandHoleobjects.approved: List ofApprovedobjects.layer: Map ofLayerobjects indexed by theirnumber.library: Map ofLibraryobjects indexed by theirname.attribute: Map ofAttributeobjects indexed by theirname.variantdef: Map ofVariantdefobjects indexed by theirname.class: Map ofClassobjects indexed by theirname.pass: Map ofPassobjects indexed by theirname.element: Map ofElementobjects indexed by theirname.signal: Map ofSignalobjects indexed by theirname.
-
add_approved(s)[source]¶ Add a
Approvedto theapproved_errorsof thisBoardFile.Parameters: s – The Approvedto add.Return type: self
-
add_attribute(s)[source]¶ Add a
Attributeto theattributesof thisBoardFile.Parameters: s – The Attributeto add.Return type: self
-
add_class(s)[source]¶ Add a
Classto theclassesof thisBoardFile.Parameters: s – The Classto add.Return type: self
-
add_element(s)[source]¶ Add a
Elementto theelementsof thisBoardFile.Parameters: s – The Elementto add.Return type: self
-
add_library(s)[source]¶ Add a
Libraryto thelibrariesof thisBoardFile.Parameters: s – The Libraryto add.Return type: self
-
add_pass(s)[source]¶ Add a
Passto theautorouter_passesof thisBoardFile.Parameters: s – The Passto add.Return type: self
-
add_plain_element(s)[source]¶ Add a
Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameorHoleto theplain_elementsof thisBoardFile.Parameters: s – The Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameorHoleto add.Return type: self
-
add_setting(s)[source]¶ Add a
Settingto thesettingsof thisBoardFile.Parameters: s – The Settingto add.Return type: self
-
add_signal(s)[source]¶ Add a
Signalto thesignalsof thisBoardFile.Parameters: s – The Signalto add.Return type: self
-
add_variantdef(s)[source]¶ Add a
Variantdefto thevariantdefsof thisBoardFile.Parameters: s – The Variantdefto add.Return type: self
-
clear_approved_errors()[source]¶ Remove all the
Approvedobjects from theapproved_errorsof thisBoardFile.Return type: self
-
clear_attributes()[source]¶ Remove all the
Attributeobjects from theattributesof thisBoardFile.Return type: self
-
clear_autorouter_passes()[source]¶ Remove all the
Passobjects from theautorouter_passesof thisBoardFile.Return type: self
-
clear_classes()[source]¶ Remove all the
Classobjects from theclassesof thisBoardFile.Return type: self
-
clear_elements()[source]¶ Remove all the
Elementobjects from theelementsof thisBoardFile.Return type: self
-
clear_libraries()[source]¶ Remove all the
Libraryobjects from thelibrariesof thisBoardFile.Return type: self
-
clear_plain_elements()[source]¶ Remove all the
Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameandHoleobjects from theplain_elementsof thisBoardFile.Return type: self
-
clear_settings()[source]¶ Remove all the
Settingobjects from thesettingsof thisBoardFile.Return type: self
-
clear_signals()[source]¶ Remove all the
Signalobjects from thesignalsof thisBoardFile.Return type: self
-
clear_variantdefs()[source]¶ Remove all the
Variantdefobjects from thevariantdefsof thisBoardFile.Return type: self
-
clone()[source]¶ Recursively clone this
BoardFile. It will be identical to the original, but it’s parent will beNone.Return type: BoardFile
-
dump(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indenton recursive invocations.
Return type: None
-
get_approved_errors(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
approved_errorslist ofApprovedobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
ApprovedobjectsReturn type: List of
Approvedobjects
-
get_attribute(key)[source]¶ Lookup and return a
Attributefrom theattributesof thisBoardFile.Parameters: key – A strto use for the lookup. The lookup uses thenameof theAttributeobjects.Return type: A Attributeobject orNone, if there is no such item.
-
get_attributes(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
attributesmap ofAttributeobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
AttributeobjectsReturn type: List of
Attributeobjects
-
get_autorouter_passes(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
autorouter_passesmap ofPassobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
PassobjectsReturn type: List of
Passobjects
-
get_children()[source]¶ Get all the children of this
EagleFilePart.Return type: List of EagleFilePartobjects
-
get_class(key)[source]¶ Lookup and return a
Classfrom theclassesof thisBoardFile.Parameters: key – A strto use for the lookup. The lookup uses thenameof theClassobjects.Return type: A Classobject orNone, if there is no such item.
-
get_classes(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
classesmap ofClassobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
ClassobjectsReturn type: List of
Classobjects
-
get_compatibility()[source]¶ Get the compatibility from this
BoardFile.Return type: Compatibilityobject
-
get_description()[source]¶ Get the description from this
BoardFile.Return type: Descriptionobject
-
get_designrules()[source]¶ Get the designrules from this
BoardFile.Return type: Designrulesobject
-
get_element(key)[source]¶ Lookup and return a
Elementfrom theelementsof thisBoardFile.Parameters: key – A strto use for the lookup. The lookup uses thenameof theElementobjects.Return type: A Elementobject orNone, if there is no such item.
-
get_elements(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
elementsmap ofElementobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
ElementobjectsReturn type: List of
Elementobjects
-
get_libraries(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
librariesmap ofLibraryobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
LibraryobjectsReturn type: List of
Libraryobjects
-
get_library(key)[source]¶ Lookup and return a
Libraryfrom thelibrariesof thisBoardFile.Parameters: key – A strto use for the lookup. The lookup uses thenameof theLibraryobjects.Return type: A Libraryobject orNone, if there is no such item.
-
get_nth_approved(n)[source]¶ get then nth
Approvedobject from theapproved_errorsof thisBoardFile.Parameters: n – Index of the item to return. Return type: Approvedobject
-
get_nth_attribute(n)[source]¶ get then nth
Attributeobject from theattributesof thisBoardFile.Parameters: n – Index of the item to return. Return type: Attributeobject
-
get_nth_class(n)[source]¶ get then nth
Classobject from theclassesof thisBoardFile.Parameters: n – Index of the item to return. Return type: Classobject
-
get_nth_element(n)[source]¶ get then nth
Elementobject from theelementsof thisBoardFile.Parameters: n – Index of the item to return. Return type: Elementobject
-
get_nth_library(n)[source]¶ get then nth
Libraryobject from thelibrariesof thisBoardFile.Parameters: n – Index of the item to return. Return type: Libraryobject
-
get_nth_pass(n)[source]¶ get then nth
Passobject from theautorouter_passesof thisBoardFile.Parameters: n – Index of the item to return. Return type: Passobject
-
get_nth_plain_element(n)[source]¶ get then nth
Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameorHoleobject from theplain_elementsof thisBoardFile.Parameters: n – Index of the item to return. Return type: Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameorHoleobject
-
get_nth_setting(n)[source]¶ get then nth
Settingobject from thesettingsof thisBoardFile.Parameters: n – Index of the item to return. Return type: Settingobject
-
get_nth_signal(n)[source]¶ get then nth
Signalobject from thesignalsof thisBoardFile.Parameters: n – Index of the item to return. Return type: Signalobject
-
get_nth_variantdef(n)[source]¶ get then nth
Variantdefobject from thevariantdefsof thisBoardFile.Parameters: n – Index of the item to return. Return type: Variantdefobject
-
get_pass(key)[source]¶ Lookup and return a
Passfrom theautorouter_passesof thisBoardFile.Parameters: key – A strto use for the lookup. The lookup uses thenameof thePassobjects.Return type: A Passobject orNone, if there is no such item.
-
get_plain_elements(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
plain_elementslist ofPolygon,Wire,Text,Dimension,Circle,Rectangle,FrameorHoleobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameandHoleobjectsReturn type: List of
Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameandHoleobjects
-
get_settings(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
settingslist ofSettingobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
SettingobjectsReturn type: List of
Settingobjects
-
get_signal(key)[source]¶ Lookup and return a
Signalfrom thesignalsof thisBoardFile.Parameters: key – A strto use for the lookup. The lookup uses thenameof theSignalobjects.Return type: A Signalobject orNone, if there is no such item.
-
get_signals(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
signalsmap ofSignalobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
SignalobjectsReturn type: List of
Signalobjects
-
get_variantdef(key)[source]¶ Lookup and return a
Variantdeffrom thevariantdefsof thisBoardFile.Parameters: key – A strto use for the lookup. The lookup uses thenameof theVariantdefobjects.Return type: A Variantdefobject orNone, if there is no such item.
-
get_variantdefs(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
variantdefsmap ofVariantdefobjects for thisBoardFile.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
VariantdefobjectsReturn type: List of
Variantdefobjects
-
get_version()[source]¶ Return the value of
versionfor thisBoardFile. This corresponds to theversionattribute of a<eagle>in an Eagle file.Return type: str
-
remove_approved(efp)[source]¶ Remove a
Approvedfrom theapproved_errorsof thisBoardFile.Parameters: efp – The Approvedobject to remove.Return type: self
-
remove_attribute(efp)[source]¶ Remove a
Attributefrom theattributesof thisBoardFile.Parameters: efp – The Attributeobject to remove.Return type: self
-
remove_child(efp)[source]¶ Remove a child
EagleFilePartobject.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
remove_class(efp)[source]¶ Remove a
Classfrom theclassesof thisBoardFile.Parameters: efp – The Classobject to remove.Return type: self
-
remove_element(efp)[source]¶ Remove a
Elementfrom theelementsof thisBoardFile.Parameters: efp – The Elementobject to remove.Return type: self
-
remove_library(efp)[source]¶ Remove a
Libraryfrom thelibrariesof thisBoardFile.Parameters: efp – The Libraryobject to remove.Return type: self
-
remove_pass(efp)[source]¶ Remove a
Passfrom theautorouter_passesof thisBoardFile.Parameters: efp – The Passobject to remove.Return type: self
-
remove_plain_element(efp)[source]¶ Remove a
Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameorHolefrom theplain_elementsof thisBoardFile.Parameters: efp – The Polygon,Wire,Text,Dimension,Circle,Rectangle,FrameorHoleobject to remove.Return type: self
-
remove_setting(efp)[source]¶ Remove a
Settingfrom thesettingsof thisBoardFile.Parameters: efp – The Settingobject to remove.Return type: self
-
remove_signal(efp)[source]¶ Remove a
Signalfrom thesignalsof thisBoardFile.Parameters: efp – The Signalobject to remove.Return type: self
-
remove_variantdef(efp)[source]¶ Remove a
Variantdeffrom thevariantdefsof thisBoardFile.Parameters: efp – The Variantdefobject to remove.Return type: self
-
set_compatibility(s)[source]¶ Set the
Compatibilityfor thisBoardFile.Parameters: s – Compatibilityto set.Return type: self
-
set_description(s)[source]¶ Set the
Descriptionfor thisBoardFile.Parameters: s – Descriptionto set.Return type: self
-
set_designrules(s)[source]¶ Set the
Designrulesfor thisBoardFile.Parameters: s – Designrulesto set.Return type: self
-
set_version(v)[source]¶ Set the value of
versionfor thisBoardFile. This corresponds to theversionattribute of a<eagle>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
with_version(v)[source]¶ Filter this
EagleFilePartobject based on the value ofversion. For use in combination withFromobjects.Return
selfif one of the following is true:versionequalsvvis callable andv(self.get_version()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
Element¶
-
class
Swoop.Element[source]¶ Bases:
Swoop.Swoop.EagleFilePartClass representing the contents of a <element> tag in Eagle files.
Attributes:
namelibrarypackagevaluexylockedpopulatesmashedrot
Collections:
attribute: Map ofAttributeobjects indexed by theirname.
-
add_attribute(s)[source]¶ Add a
Attributeto theattributesof thisElement.Parameters: s – The Attributeto add.Return type: self
-
clear_attributes()[source]¶ Remove all the
Attributeobjects from theattributesof thisElement.Return type: self
-
clone()[source]¶ Recursively clone this
Element. It will be identical to the original, but it’s parent will beNone.Return type: Element
-
dump(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indenton recursive invocations.
Return type: None
-
find_library()[source]¶ Find the
Libraryobject refered to by thelibraryattribute of this object. This is likeget_library(), except it returns theLibraryobject instead of its name.Returns: The object Return type: Library
-
find_package()[source]¶ Find the
Packageobject refered to by thepackageattribute of this object. This is likeget_package(), except it returns thePackageobject instead of its name.Returns: The object Return type: Package
-
get_attribute(key)[source]¶ Lookup and return a
Attributefrom theattributesof thisElement.Parameters: key – A strto use for the lookup. The lookup uses thenameof theAttributeobjects.Return type: A Attributeobject orNone, if there is no such item.
-
get_attributes(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
attributesmap ofAttributeobjects for thisElement.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
AttributeobjectsReturn type: List of
Attributeobjects
-
get_children()[source]¶ Get all the children of this
EagleFilePart.Return type: List of EagleFilePartobjects
-
get_library()[source]¶ Return the value of
libraryfor thisElement. This corresponds to thelibraryattribute of a<element>in an Eagle file.Return type: str
-
get_locked()[source]¶ Return the value of
lockedfor thisElement. This corresponds to thelockedattribute of a<element>in an Eagle file.Return type: bool
-
get_name()[source]¶ Return the value of
namefor thisElement. This corresponds to thenameattribute of a<element>in an Eagle file.Return type: str
-
get_nth_attribute(n)[source]¶ get then nth
Attributeobject from theattributesof thisElement.Parameters: n – Index of the item to return. Return type: Attributeobject
-
get_package()[source]¶ Return the value of
packagefor thisElement. This corresponds to thepackageattribute of a<element>in an Eagle file.Return type: str
-
get_populate()[source]¶ Return the value of
populatefor thisElement. This corresponds to thepopulateattribute of a<element>in an Eagle file.Return type: bool
-
get_rot()[source]¶ Return the value of
rotfor thisElement. This corresponds to therotattribute of a<element>in an Eagle file.Return type: str
-
get_smashed()[source]¶ Return the value of
smashedfor thisElement. This corresponds to thesmashedattribute of a<element>in an Eagle file.Return type: str
-
get_value()[source]¶ Return the value of
valuefor thisElement. This corresponds to thevalueattribute of a<element>in an Eagle file.Return type: str
-
get_x()[source]¶ Return the value of
xfor thisElement. This corresponds to thexattribute of a<element>in an Eagle file.Return type: float
-
get_y()[source]¶ Return the value of
yfor thisElement. This corresponds to theyattribute of a<element>in an Eagle file.Return type: float
-
remove_attribute(efp)[source]¶ Remove a
Attributefrom theattributesof thisElement.Parameters: efp – The Attributeobject to remove.Return type: self
-
remove_child(efp)[source]¶ Remove a child
EagleFilePartobject.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
set_library(v)[source]¶ Set the value of
libraryfor thisElement. This corresponds to thelibraryattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_locked(v)[source]¶ Set the value of
lockedfor thisElement. This corresponds to thelockedattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_name(v)[source]¶ Set the value of
namefor thisElement. This corresponds to thenameattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_package(v)[source]¶ Set the value of
packagefor thisElement. This corresponds to thepackageattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_populate(v)[source]¶ Set the value of
populatefor thisElement. This corresponds to thepopulateattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_rot(v)[source]¶ Set the value of
rotfor thisElement. This corresponds to therotattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_smashed(v)[source]¶ Set the value of
smashedfor thisElement. This corresponds to thesmashedattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_value(v)[source]¶ Set the value of
valuefor thisElement. This corresponds to thevalueattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_x(v)[source]¶ Set the value of
xfor thisElement. This corresponds to thexattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_y(v)[source]¶ Set the value of
yfor thisElement. This corresponds to theyattribute of a<element>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
with_library(v)[source]¶ Filter this
EagleFilePartobject based on the value oflibrary. For use in combination withFromobjects.Return
selfif one of the following is true:libraryequalsvvis callable andv(self.get_library()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_locked(v)[source]¶ Filter this
EagleFilePartobject based on the value oflocked. For use in combination withFromobjects.Return
selfif one of the following is true:lockedequalsvvis callable andv(self.get_locked()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_name(v)[source]¶ Filter this
EagleFilePartobject based on the value ofname. For use in combination withFromobjects.Return
selfif one of the following is true:nameequalsvvis callable andv(self.get_name()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_package(v)[source]¶ Filter this
EagleFilePartobject based on the value ofpackage. For use in combination withFromobjects.Return
selfif one of the following is true:packageequalsvvis callable andv(self.get_package()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_populate(v)[source]¶ Filter this
EagleFilePartobject based on the value ofpopulate. For use in combination withFromobjects.Return
selfif one of the following is true:populateequalsvvis callable andv(self.get_populate()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_rot(v)[source]¶ Filter this
EagleFilePartobject based on the value ofrot. For use in combination withFromobjects.Return
selfif one of the following is true:rotequalsvvis callable andv(self.get_rot()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_smashed(v)[source]¶ Filter this
EagleFilePartobject based on the value ofsmashed. For use in combination withFromobjects.Return
selfif one of the following is true:smashedequalsvvis callable andv(self.get_smashed()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_value(v)[source]¶ Filter this
EagleFilePartobject based on the value ofvalue. For use in combination withFromobjects.Return
selfif one of the following is true:valueequalsvvis callable andv(self.get_value()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_x(v)[source]¶ Filter this
EagleFilePartobject based on the value ofx. For use in combination withFromobjects.Return
selfif one of the following is true:xequalsvvis callable andv(self.get_x()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_y(v)[source]¶ Filter this
EagleFilePartobject based on the value ofy. For use in combination withFromobjects.Return
selfif one of the following is true:yequalsvvis callable andv(self.get_y()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
Contactref¶
-
class
Swoop.Contactref[source]¶ Bases:
Swoop.Swoop.EagleFilePartClass representing the contents of a <contactref> tag in Eagle files.
Attributes:
elementpadrouteroutetag
-
clone()[source]¶ Recursively clone this
Contactref. It will be identical to the original, but it’s parent will beNone.Return type: Contactref
-
dump(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indenton recursive invocations.
Return type: None
-
find_element()[source]¶ Find the
Elementobject refered to by theelementattribute of this object. This is likeget_element(), except it returns theElementobject instead of its name.Returns: The object Return type: Element
-
find_pad()[source]¶ Find the
Padobject refered to by thepadattribute of this object. This is likeget_pad(), except it returns thePadobject instead of its name.Returns: The object Return type: Pad
-
get_children()[source]¶ Get all the children of this
EagleFilePart.Return type: List of EagleFilePartobjects
-
get_element()[source]¶ Return the value of
elementfor thisContactref. This corresponds to theelementattribute of a<contactref>in an Eagle file.Return type: str
-
get_et()[source]¶ Generate a <contactref> element tree for a
Contactref.Return type: ElementTree.
-
get_pad()[source]¶ Return the value of
padfor thisContactref. This corresponds to thepadattribute of a<contactref>in an Eagle file.Return type: str
-
get_route()[source]¶ Return the value of
routefor thisContactref. This corresponds to therouteattribute of a<contactref>in an Eagle file.Return type: str
-
get_routetag()[source]¶ Return the value of
routetagfor thisContactref. This corresponds to theroutetagattribute of a<contactref>in an Eagle file.Return type: str
-
remove_child(efp)[source]¶ Remove a child
EagleFilePartobject.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
set_element(v)[source]¶ Set the value of
elementfor thisContactref. This corresponds to theelementattribute of a<contactref>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_pad(v)[source]¶ Set the value of
padfor thisContactref. This corresponds to thepadattribute of a<contactref>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_route(v)[source]¶ Set the value of
routefor thisContactref. This corresponds to therouteattribute of a<contactref>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_routetag(v)[source]¶ Set the value of
routetagfor thisContactref. This corresponds to theroutetagattribute of a<contactref>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
with_element(v)[source]¶ Filter this
EagleFilePartobject based on the value ofelement. For use in combination withFromobjects.Return
selfif one of the following is true:elementequalsvvis callable andv(self.get_element()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_pad(v)[source]¶ Filter this
EagleFilePartobject based on the value ofpad. For use in combination withFromobjects.Return
selfif one of the following is true:padequalsvvis callable andv(self.get_pad()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_route(v)[source]¶ Filter this
EagleFilePartobject based on the value ofroute. For use in combination withFromobjects.Return
selfif one of the following is true:routeequalsvvis callable andv(self.get_route()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_routetag(v)[source]¶ Filter this
EagleFilePartobject based on the value ofroutetag. For use in combination withFromobjects.Return
selfif one of the following is true:routetagequalsvvis callable andv(self.get_routetag()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
Pass¶
-
class
Swoop.Pass[source]¶ Bases:
Swoop.Swoop.EagleFilePartClass representing the contents of a <pass> tag in Eagle files.
Attributes:
namereferactive
Collections:
param: Map ofParamobjects indexed by theirname.
-
add_param(s)[source]¶ Add a
Paramto theparamsof thisPass.Parameters: s – The Paramto add.Return type: self
-
clone()[source]¶ Recursively clone this
Pass. It will be identical to the original, but it’s parent will beNone.Return type: Pass
-
dump(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indenton recursive invocations.
Return type: None
-
get_active()[source]¶ Return the value of
activefor thisPass. This corresponds to theactiveattribute of a<pass>in an Eagle file.Return type: str
-
get_children()[source]¶ Get all the children of this
EagleFilePart.Return type: List of EagleFilePartobjects
-
get_name()[source]¶ Return the value of
namefor thisPass. This corresponds to thenameattribute of a<pass>in an Eagle file.Return type: str
-
get_nth_param(n)[source]¶ get then nth
Paramobject from theparamsof thisPass.Parameters: n – Index of the item to return. Return type: Paramobject
-
get_param(key)[source]¶ Lookup and return a
Paramfrom theparamsof thisPass.Parameters: key – A strto use for the lookup. The lookup uses thenameof theParamobjects.Return type: A Paramobject orNone, if there is no such item.
-
get_params(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
paramsmap ofParamobjects for thisPass.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
ParamobjectsReturn type: List of
Paramobjects
-
get_refer()[source]¶ Return the value of
referfor thisPass. This corresponds to thereferattribute of a<pass>in an Eagle file.Return type: str
-
remove_child(efp)[source]¶ Remove a child
EagleFilePartobject.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
remove_param(efp)[source]¶ Remove a
Paramfrom theparamsof thisPass.Parameters: efp – The Paramobject to remove.Return type: self
-
set_active(v)[source]¶ Set the value of
activefor thisPass. This corresponds to theactiveattribute of a<pass>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_name(v)[source]¶ Set the value of
namefor thisPass. This corresponds to thenameattribute of a<pass>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_refer(v)[source]¶ Set the value of
referfor thisPass. This corresponds to thereferattribute of a<pass>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
with_active(v)[source]¶ Filter this
EagleFilePartobject based on the value ofactive. For use in combination withFromobjects.Return
selfif one of the following is true:activeequalsvvis callable andv(self.get_active()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_name(v)[source]¶ Filter this
EagleFilePartobject based on the value ofname. For use in combination withFromobjects.Return
selfif one of the following is true:nameequalsvvis callable andv(self.get_name()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_refer(v)[source]¶ Filter this
EagleFilePartobject based on the value ofrefer. For use in combination withFromobjects.Return
selfif one of the following is true:referequalsvvis callable andv(self.get_refer()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
Signal¶
-
class
Swoop.Signal[source]¶ Bases:
Swoop.Swoop.EagleFilePartClass representing the contents of a <signal> tag in Eagle files.
Attributes:
nameclassairwireshidden
Collections:
contactref: List ofContactrefobjects.polygon: List ofPolygonobjects.wire: List ofWireobjects.via: List ofViaobjects.
-
add_contactref(s)[source]¶ Add a
Contactrefto thecontactrefsof thisSignal.Parameters: s – The Contactrefto add.Return type: self
-
add_polygon(s)[source]¶ Add a
Polygonto thepolygonsof thisSignal.Parameters: s – The Polygonto add.Return type: self
-
add_via(s)[source]¶ Add a
Viato theviasof thisSignal.Parameters: s – The Viato add.Return type: self
-
add_wire(s)[source]¶ Add a
Wireto thewiresof thisSignal.Parameters: s – The Wireto add.Return type: self
-
clear_contactrefs()[source]¶ Remove all the
Contactrefobjects from thecontactrefsof thisSignal.Return type: self
-
clear_polygons()[source]¶ Remove all the
Polygonobjects from thepolygonsof thisSignal.Return type: self
-
clone()[source]¶ Recursively clone this
Signal. It will be identical to the original, but it’s parent will beNone.Return type: Signal
-
dump(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indenton recursive invocations.
Return type: None
-
find_class()[source]¶ Find the
Classobject refered to by thenetclassattribute of this object. This is likeget_netclass(), except it returns theClassobject instead of its name.Returns: The object Return type: Class
Return the value of
airwireshiddenfor thisSignal. This corresponds to theairwireshiddenattribute of a<signal>in an Eagle file.Return type: bool
-
get_children()[source]¶ Get all the children of this
EagleFilePart.Return type: List of EagleFilePartobjects
-
get_class()[source]¶ Return the value of
netclassfor thisSignal. This corresponds to thenetclassattribute of a<signal>in an Eagle file.Return type: str
-
get_contactrefs(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
contactrefslist ofContactrefobjects for thisSignal.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
ContactrefobjectsReturn type: List of
Contactrefobjects
-
get_name()[source]¶ Return the value of
namefor thisSignal. This corresponds to thenameattribute of a<signal>in an Eagle file.Return type: str
-
get_nth_contactref(n)[source]¶ get then nth
Contactrefobject from thecontactrefsof thisSignal.Parameters: n – Index of the item to return. Return type: Contactrefobject
-
get_nth_polygon(n)[source]¶ get then nth
Polygonobject from thepolygonsof thisSignal.Parameters: n – Index of the item to return. Return type: Polygonobject
-
get_nth_via(n)[source]¶ get then nth
Viaobject from theviasof thisSignal.Parameters: n – Index of the item to return. Return type: Viaobject
-
get_nth_wire(n)[source]¶ get then nth
Wireobject from thewiresof thisSignal.Parameters: n – Index of the item to return. Return type: Wireobject
-
get_polygons(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
polygonslist ofPolygonobjects for thisSignal.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
PolygonobjectsReturn type: List of
Polygonobjects
-
get_vias(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
viaslist ofViaobjects for thisSignal.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
ViaobjectsReturn type: List of
Viaobjects
-
get_wires(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
wireslist ofWireobjects for thisSignal.This functions provides a mechanism for filtering the items as well. The keys in
attrsare taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
typeis notNone, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
WireobjectsReturn type: List of
Wireobjects
-
remove_child(efp)[source]¶ Remove a child
EagleFilePartobject.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
remove_contactref(efp)[source]¶ Remove a
Contactreffrom thecontactrefsof thisSignal.Parameters: efp – The Contactrefobject to remove.Return type: self
-
remove_polygon(efp)[source]¶ Remove a
Polygonfrom thepolygonsof thisSignal.Parameters: efp – The Polygonobject to remove.Return type: self
-
remove_via(efp)[source]¶ Remove a
Viafrom theviasof thisSignal.Parameters: efp – The Viaobject to remove.Return type: self
-
remove_wire(efp)[source]¶ Remove a
Wirefrom thewiresof thisSignal.Parameters: efp – The Wireobject to remove.Return type: self
Set the value of
airwireshiddenfor thisSignal. This corresponds to theairwireshiddenattribute of a<signal>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_class(v)[source]¶ Set the value of
netclassfor thisSignal. This corresponds to thenetclassattribute of a<signal>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_name(v)[source]¶ Set the value of
namefor thisSignal. This corresponds to thenameattribute of a<signal>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
Filter this
EagleFilePartobject based on the value ofairwireshidden. For use in combination withFromobjects.Return
selfif one of the following is true:airwireshiddenequalsvvis callable andv(self.get_airwireshidden()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_class(v)[source]¶ Filter this
EagleFilePartobject based on the value ofnetclass. For use in combination withFromobjects.Return
selfif one of the following is true:netclassequalsvvis callable andv(self.get_class()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_name(v)[source]¶ Filter this
EagleFilePartobject based on the value ofname. For use in combination withFromobjects.Return
selfif one of the following is true:nameequalsvvis callable andv(self.get_name()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
Via¶
-
class
Swoop.Via[source]¶ Bases:
Swoop.Swoop.EagleFilePartClass representing the contents of a <via> tag in Eagle files.
Attributes:
xyextentdrilldiametershapealwaysstop
-
clone()[source]¶ Recursively clone this
Via. It will be identical to the original, but it’s parent will beNone.Return type: Via
-
dump(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indenton recursive invocations.
Return type: None
-
get_alwaysstop()[source]¶ Return the value of
alwaysstopfor thisVia. This corresponds to thealwaysstopattribute of a<via>in an Eagle file.Return type: bool
-
get_children()[source]¶ Get all the children of this
EagleFilePart.Return type: List of EagleFilePartobjects
-
get_diameter()[source]¶ Return the value of
diameterfor thisVia. This corresponds to thediameterattribute of a<via>in an Eagle file.Return type: float
-
get_drill()[source]¶ Return the value of
drillfor thisVia. This corresponds to thedrillattribute of a<via>in an Eagle file.Return type: float
-
get_extent()[source]¶ Return the value of
extentfor thisVia. This corresponds to theextentattribute of a<via>in an Eagle file.Return type: str
-
get_shape()[source]¶ Return the value of
shapefor thisVia. This corresponds to theshapeattribute of a<via>in an Eagle file.Return type: str
-
get_x()[source]¶ Return the value of
xfor thisVia. This corresponds to thexattribute of a<via>in an Eagle file.Return type: float
-
get_y()[source]¶ Return the value of
yfor thisVia. This corresponds to theyattribute of a<via>in an Eagle file.Return type: float
-
remove_child(efp)[source]¶ Remove a child
EagleFilePartobject.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
set_alwaysstop(v)[source]¶ Set the value of
alwaysstopfor thisVia. This corresponds to thealwaysstopattribute of a<via>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_diameter(v)[source]¶ Set the value of
diameterfor thisVia. This corresponds to thediameterattribute of a<via>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_drill(v)[source]¶ Set the value of
drillfor thisVia. This corresponds to thedrillattribute of a<via>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_extent(v)[source]¶ Set the value of
extentfor thisVia. This corresponds to theextentattribute of a<via>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_shape(v)[source]¶ Set the value of
shapefor thisVia. This corresponds to theshapeattribute of a<via>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_x(v)[source]¶ Set the value of
xfor thisVia. This corresponds to thexattribute of a<via>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
set_y(v)[source]¶ Set the value of
yfor thisVia. This corresponds to theyattribute of a<via>in an Eagle file.Parameters: v – EagleFilePartto set.Return type: self
-
with_alwaysstop(v)[source]¶ Filter this
EagleFilePartobject based on the value ofalwaysstop. For use in combination withFromobjects.Return
selfif one of the following is true:alwaysstopequalsvvis callable andv(self.get_alwaysstop()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_diameter(v)[source]¶ Filter this
EagleFilePartobject based on the value ofdiameter. For use in combination withFromobjects.Return
selfif one of the following is true:diameterequalsvvis callable andv(self.get_diameter()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_drill(v)[source]¶ Filter this
EagleFilePartobject based on the value ofdrill. For use in combination withFromobjects.Return
selfif one of the following is true:drillequalsvvis callable andv(self.get_drill()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_extent(v)[source]¶ Filter this
EagleFilePartobject based on the value ofextent. For use in combination withFromobjects.Return
selfif one of the following is true:extentequalsvvis callable andv(self.get_extent()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_shape(v)[source]¶ Filter this
EagleFilePartobject based on the value ofshape. For use in combination withFromobjects.Return
selfif one of the following is true:shapeequalsvvis callable andv(self.get_shape()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_x(v)[source]¶ Filter this
EagleFilePartobject based on the value ofx. For use in combination withFromobjects.Return
selfif one of the following is true:xequalsvvis callable andv(self.get_x()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone
-
with_y(v)[source]¶ Filter this
EagleFilePartobject based on the value ofy. For use in combination withFromobjects.Return
selfif one of the following is true:yequalsvvis callable andv(self.get_y()isTrue
This is useful in combination with
Fromobject.Parameters: t – The value to check for or a callable object. Returns: selfif the criteria above are met andNoneotherwise.Return type: EagelFilePartorNone