oaDevice
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaDevice 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaDevice 当前在 oapy 中可用的 Python 接口。
详细说明
The oaDevice class is an abstract base class for parasitic devices contained within an oaParasiticNetwork 。 A device represents an instance of a particular type of parasitic element, such as a resistor, capacitor, or inductor。 Devices are managed objects, but they can be loaded from disk into memory (and unloaded from memory back to disk) on request as part of the parasitic network to which they belong。 Therefore, database clients must be careful not to dereference a pointer to a device after the parasitic network to which it belongs has been unloaded。 There are a variety of different device types, many of which have two endpoints。 Each endpoint connects directly to an oaNode object。 This is in contrast to connections between instances and nets, where an additional object ( oaInstTerm ) is used to represent the connection。 Most parasitic devices are symmetrical and do not have distinct information associated with each endpoint。 Because devices are among the most numerous of database objects, there is a substantial capacity improvement by using a different connectivity model for devices than for instances。 Two types of devices do not have two endpoints connected to nodes。 An oaMutualInductor represents an electromagnetic relationship between two inductors (between devices rather than nodes)。 An oaCouplingCap that couples between two different parasitic networks can connect directly to an instTerm or term in the other network, rather than to a node。 Most parasitic devices have one value for each analysis point that the parasitic network represents。 Each value reflects the parasitic effect applicable to the operating points associated with the corresponding analysis point。 The oaSeriesRL device has two values for each analysis point, one resistance and one capacitance。 The oaSeriesRL device can be used to improve capacity when a resistor and an inductor are connected in series and the node between them is not of interest。 From an electrical standpoint, a coupling capacitor can connect two different nodes in the same parasitic network, or it can connect two nodes in different networks。 In OpenAccess, a particular coupling relationship between two different networks is represented separately for each of the networks, with an oaCouplingCap device in each network。 This allows each network to be loaded independently and efficiently。 Applications must explicitly create and destroy each oaCouplingCap in the pair for a given coupling relationship。 Mutual inductors are handled in a similar fashion。 A mutual inductor relates two different inductors, which can be in the same network or in different networks。 When the inductors are in different networks, each network has its own mutual inductor device。 Applications must explicitly create and destroy each mutual inductor in the pair for a given coupling relationship。 Devices can have an integer ID that is chosen by the client that creates them。 The ID is usually optional, but IDs are required for inductors that are referenced by a mutual inductor, as well as for coupling caps and mutual inductors。 For coupling caps and mutual inductors that connect two different parasitic networks, the same ID can be specified when creating each device in the pair, which allows applications to match up the devices。 Any ID specified for local devices contained within a single network must be unique across all local devices in that network, regardless of type。 Similarly, any ID specified for couplingCaps and mutual inductors that couple from a given network to a different network must be unique across all non-local devices in the given network。 The getUniqueId() functions can be called to obtain consecutive IDs for local devices and non-local devices。 Devices can also have a name, which is an optional string chosen by the client that creates them。 This is primarily useful for small custom designs, as assigning a separate name to every parasitic device in large digital designs is prohibitively expensive。 Device names must be unique within the same network, Undo, properties, and groups are not supported for oaDevice。 Extensions on oaDevice (and interPointer extensions that refer to an oaDevice) are only accessible while the oaDevice is loaded。 The oaDevice class can be observed by deriving from oaObserver
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.destroy() |
| ✅ | obj.hasId() |
| ✅ | obj.getId() |
| ✅ | obj.setName(name) |
| ✅ | obj.getName(name) |
| ✅ | obj.getParasiticNetwork() |
| ✅ | obj.addToSubNetwork(subNetwork) |
| ✅ | obj.removeFromSubNetwork(subNetwork) |
| ✅ | obj.getSubNetworks() |
| ✅ | _design.oaDevice.find(network, id, local) |
| ✅ | _design.oaDevice.find(network, name) |
| ✅ | _design.oaDevice.isValidName(network, name) |
| ✅ | _design.oaDevice.getUniqueId(network) |
| ✅ | _design.oaDevice.getUniqueId(design) |
方法说明
obj.destroy()
绑定状态: 已绑定
Python 调用: obj.destroy()
This function destroys this device。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.destroy()
obj.hasId()
绑定状态: 已绑定
Python 调用: obj.hasId()
This function returns a boolean indicating whether or not this device has a user-specified ID associated with it。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.hasId()
obj.getId()
绑定状态: 已绑定
Python 调用: obj.getId()
This function returns the optional ID if one was assigned to the device when it was created。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.getId()
obj.setName(name)
绑定状态: 已绑定
Python 调用: obj.setName(name)
This function sets the name of this device。
参数
name: A reference to an oaString object that holds the new name for this device。
异常
oacDeviceNameExists。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.setName(name)
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
This function returns the name of this device。 If no name has been set, an empty string is returned。
参数
name: A reference to an oaString object to be populated with the name of this device。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.getName(name)
obj.getParasiticNetwork()
绑定状态: 已绑定
Python 调用: obj.getParasiticNetwork()
This function returns the parasiticNetwork to which this device belongs。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.getParasiticNetwork()
obj.addToSubNetwork(subNetwork)
绑定状态: 已绑定
Python 调用: obj.addToSubNetwork(subNetwork)
This function adds this device to the specified subNetwork。
参数
subNetwork: The sub-network to which this device is to be added。
异常
oacSubNetworkDeviceNotSameDesign。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.addToSubNetwork(subNetwork)
obj.removeFromSubNetwork(subNetwork)
绑定状态: 已绑定
Python 调用: obj.removeFromSubNetwork(subNetwork)
This function removes this node from the specified subNetwork。
参数
subNetwork: The sub-network from which this node is to be removed。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.removeFromSubNetwork(subNetwork)
obj.getSubNetworks()
绑定状态: 已绑定
Python 调用: obj.getSubNetworks()
This function returns a collection of the subNetworks to which this device belongs。
Python 示例
from oapy._oa import _design
# assume obj is a oaDevice
obj.getSubNetworks()
_design.oaDevice.find(network, id, local)
绑定状态: 已绑定
Python 调用: _design.oaDevice.find(network, id, local)
This function finds and returns the device with the specified name。
参数
network: The parasitic network to search for the device。name: The name of the device to look for。
Python 示例
from oapy._oa import _design
_design.oaDevice.find(network, id, local)
_design.oaDevice.find(network, name)
绑定状态: 已绑定
Python 调用: _design.oaDevice.find(network, name)
This function finds and returns the device with the specified id within network。 Local devices contained with network will be considered when local is true。 CouplingCaps and mutual inductors in network that couple to other networks will be considered when local is false。
参数
network: The parasitic network to search for the device。id: The id of the device to look for。local: A boolean indicating if the search is to be restricted to devices local to the network。
Python 示例
from oapy._oa import _design
_design.oaDevice.find(network, name)
_design.oaDevice.isValidName(network, name)
绑定状态: 已绑定
Python 调用: _design.oaDevice.isValidName(network, name)
This function returns a boolean value that indicates if the specified name is valid for a new oaDevice in the specified network。
参数
network: The parasitic network in whose domain the name is to be validated。name: A reference to an oaString object holding the name to be validated。
Python 示例
from oapy._oa import _design
_design.oaDevice.isValidName(network, name)
_design.oaDevice.getUniqueId(network)
绑定状态: 已绑定
Python 调用: _design.oaDevice.getUniqueId(network)
This function returns a unique integer ID for a coupling cap or mutual inductor that couples between two different networks in the specified design。
参数
design: The design to use。
Python 示例
from oapy._oa import _design
_design.oaDevice.getUniqueId(network)
_design.oaDevice.getUniqueId(design)
绑定状态: 已绑定
Python 调用: _design.oaDevice.getUniqueId(design)
This function returns a unique integer ID for a local device in the specified network。
参数
network: The parasitic network to determine the potential unique ID for this device。
Python 示例
from oapy._oa import _design
_design.oaDevice.getUniqueId(design)