oaModBusTermBit
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaModBusTermBit 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaModBusTermBit 当前在 oapy 中可用的 Python 接口。
详细说明
The oaModBusTermBit class implements an oaModBitNet that represents a single bit of an oaModBusTerm , a busTerm in the module domain。 When an oaModBusTerm is created, a corresponding set of oaModBusTermBit objects is automatically created。 When the busTerm is destroyed, the automatically created busTermBits are also destroyed。 An oaModBusTermBit can be explicitly created。 An explicitly created busTermBit must be explicitly destroyed。 oaModBusTermBit, oaOccBusTermBit , and oaBusTermBit each represent a bit of a busTerminal on a different kind of master, where in each case the master represents a level of hierarchy in the design。 For oaModBusTermBit, the master is a module, and each module in a design will have a set of zero or more oaModBusTermBits。 For oaOccBusTermBit , the master is an oaOccurrence 。 For oaBusTerm , the master is an oaBlock , and the top block for the design will have a set of zero or more modBusTermBits。 Typically, many of the oaBusTermBits on the top oaBlock have a corresponding oaModBusTermBit on the top oaModule 。 All of the oaBusTermBits on the top oaBlock have a corresponding oaOccBusTermBit on the top oaOccurrence 。 When oaBusTermBit objects are created in the block domain, the corresponding oaModBusTermBit objects are automatically created on the top oaModule 。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getDef() |
| ✅ | obj.getBitIndex() |
| ✅ | obj.getName(name) |
| ✅ | obj.setName(baseName, bitIndex) |
| ✅ | obj.getName(name) |
| ✅ | obj.getName(ns, name) |
| ✅ | _design.oaModBusTermBit.create(modNet, baseName, bitIndex, type=oacInputOutputTermType) |
| ✅ | _design.oaModBusTermBit.create(modNet, bitName, type=oacInputOutputTermType) |
| ✅ | _design.oaModBusTermBit.find(module, baseName, bitIndex) |
| ✅ | _design.oaModBusTermBit.isValidName(net, baseName, bitIndex) |
方法说明
obj.getDef()
绑定状态: 已绑定
Python 调用: obj.getDef()
This function returns the modBusTermDef associated with this terminal。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTermBit
obj.getDef()
obj.getBitIndex()
绑定状态: 已绑定
Python 调用: obj.getBitIndex()
This function returns the index for this busTermBit。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTermBit
obj.getBitIndex()
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
This function returns the name of this modBusTermBit。
参数
name: The name of the modBusTermBit to return。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTermBit
obj.getName(name)
obj.setName(baseName, bitIndex)
绑定状态: 已绑定
Python 调用: obj.setName(baseName, bitIndex)
This function changes the name of this busTermBit to that implied by the given baseName and bitIndex。
参数
baseName: The new base name for this net。bitIndex: The new bit index for this net。
异常
oacCannotSetNameOfImplicitTerm。oacCannotSetNameOfOverriddenTerm。oacBusTermBaseNameMatchesScalarName。oacTermExists。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTermBit
obj.setName(baseName, bitIndex)
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTermBit
obj.getName(name)
obj.getName(ns, name)
绑定状态: 已绑定
Python 调用: obj.getName(ns, name)
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTermBit
obj.getName(ns, name)
_design.oaModBusTermBit.create(modNet, baseName, bitIndex, type=oacInputOutputTermType)
绑定状态: 已绑定
Python 调用: _design.oaModBusTermBit.create(modNet, baseName, bitIndex, type=oacInputOutputTermType)
This function creates a busTermBit with the baseName as specified by bitName on the given modNet。
参数
modNet: The module net to create the terminal on。bitName: The name specifying the baseName and bitIndex to give the terminal。type: The terminal type to give the terminal。
异常
oacBusTermBaseNameMatchesScalarName。oacTermExists。oacTermMemberExists。oacCannotCreateTermWithImplicitNet。
Python 示例
from oapy._oa import _design
_design.oaModBusTermBit.create(modNet, baseName, bitIndex, type=oacInputOutputTermType)
_design.oaModBusTermBit.create(modNet, bitName, type=oacInputOutputTermType)
绑定状态: 已绑定
Python 调用: _design.oaModBusTermBit.create(modNet, bitName, type=oacInputOutputTermType)
This function creates a busTermBit with the specified baseName and bitIndex in the given module net。
参数
modNet: The module net to create the terminal on。baseName: The base name to give the terminal。bitIndex: The bit index to give the terminal。type: The terminal type to give the terminal。
异常
oacBusTermBaseNameMatchesScalarName。oacTermExists。oacTermMemberExists。oacCannotCreateTermWithImplicitNet。
Python 示例
from oapy._oa import _design
_design.oaModBusTermBit.create(modNet, bitName, type=oacInputOutputTermType)
_design.oaModBusTermBit.find(module, baseName, bitIndex)
绑定状态: 已绑定
Python 调用: _design.oaModBusTermBit.find(module, baseName, bitIndex)
This function searches the specified module for a busTermBit with the specified baseName and bitIndex。 The busTermBit is returned if found。 Otherwise, NULL is returned。 If the specified busTermBit is hidden, that is the term returned。 If the reflected term in the block domain is hidden and overridden, the busTermBit corresponding to the hidden term is always returned。
参数
module: The module to search for the busTermBit。baseName: The base name for the busTermBit。bitIndex: The bit index for the busTermBit。
返回
- A pointer to an oaModBusTermBit。
Python 示例
from oapy._oa import _design
_design.oaModBusTermBit.find(module, baseName, bitIndex)
_design.oaModBusTermBit.isValidName(net, baseName, bitIndex)
绑定状态: 已绑定
Python 调用: _design.oaModBusTermBit.isValidName(net, baseName, bitIndex)
This function returns a boolean value indicating whether the specified name is valid for a new oaBusTermBit in the specified module net。
参数
net: The module net to search。baseName: The base name of the bus bit。bitIndex: The bit index of the bus bit。
Python 示例
from oapy._oa import _design
_design.oaModBusTermBit.isValidName(net, baseName, bitIndex)