oaModBusTerm
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaModBusTerm 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaModBusTerm 当前在 oapy 中可用的 Python 接口。
详细说明
The oaModBusTerm class implements a terminal in the module domain that represents one or more bits that are associated by a common baseName and vector-range specification。 An oaModBusTerm object has a corresponding oaModBusTermDef object that manages all oaModBusTerm objects that share the same baseName。 oaModBusTerm, oaOccBusTerm , and oaBusTerm each represent bus terminals in a different hierarchy domain, where in each case the terminal's master represents a level of hierarchy in the design。 For oaModBusTerm, the master is an oaModule , and each module in a design will have a set of zero or more modBusTerms。 For oaOccBusTerm , 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 busTerms。 Typically, all of the oaModBusTerms on the top oaModule have a corresponding oaBusTerm on the top oaBlock 。 All of the oaModBusTerms have a corresponding oaOccBusTerm in the occurrence domain。 When oaBusTerm objects are created in the block domain, the corresponding oaModBusTerm objects are automatically created on the top oaModule unless this visibility is suppressed by the create call。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getDef() |
| ✅ | obj.getStart() |
| ✅ | obj.getStop() |
| ✅ | obj.getStep() |
| ✅ | obj.getName(name) |
| ✅ | obj.setBaseName(name) |
| ✅ | obj.setRange(start, stop) |
| ✅ | obj.getName(name) |
| ✅ | obj.getName(ns, name) |
| ✅ | _design.oaModBusTerm.create(modNet, name, start, stop, step, termType=oacInputOutputTermType) |
| ✅ | _design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType) |
| ✅ | _design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType) |
| ✅ | _design.oaModBusTerm.find(module, name, start, stop, step) |
| ✅ | _design.oaModBusTerm.isValidName(module, net, name, start, stop, step) |
方法说明
obj.getDef()
绑定状态: 已绑定
Python 调用: obj.getDef()
This function returns the oaModBusTermDef for this oaModBusTerm object。
返回
- A pointer to an oaModBusTermDef。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.getDef()
obj.getStart()
绑定状态: 已绑定
Python 调用: obj.getStart()
This function returns the starting index for this oaModBusTerm object。
返回
- The starting index for this oaModBusTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.getStart()
obj.getStop()
绑定状态: 已绑定
Python 调用: obj.getStop()
This function returns the ending index for this oaModBusTerm object。
返回
- The ending index for this oaModBusTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.getStop()
obj.getStep()
绑定状态: 已绑定
Python 调用: obj.getStep()
This function returns the stepping index for this oaModBusTerm object。
返回
- The step value for this oaModBusTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.getStep()
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
This function returns the name of this modBusTerm。
参数
name: The name of the modBusTerm to return。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.getName(name)
obj.setBaseName(name)
绑定状态: 已绑定
Python 调用: obj.setBaseName(name)
This function changes the name of this oaModBusTerm object。 The name is also updated for each occurrence that the term appears in。 An exception is thrown if the new name is the name of an existing oaScalarNet , if another oaModBusTerm with the same name and indices already exist, or if the new name contains invalid hierarchical delimiters。
参数
name: The new name to be set for the term。
异常
oacCannotSetNameOfImplicitTerm。oacCannotSetNameOfTermInBundleTerm。oacBusTermBaseNameMatchesScalarName。oacNetTermWidthMismatch。oacInvalidVectorValue。oacTermExists。oacTermMemberExists。oacInvalidHierTermName。oacCannotSetNameOfOverriddenTerm。oacCannotRenameToImplicitBusTerm。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.setBaseName(name)
obj.setRange(start, stop)
绑定状态: 已绑定
Python 调用: obj.setRange(start, stop)
This function changes the vector range for this modBusTerm。 The new number of bits implied by the specified start and stop bits must match the current number of bits。 This restriction is necessary so that any terminals or instance terminals that are associated with this busTerm are not affected。
参数
start: The starting index of the net。stop: The stopping index of the net。
异常
oacCannotSetNameOfImplicitTerm。oacCannotEditOverriddenTerm。oacInvalidBusStartStopRange。oacTermExists。
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.setRange(start, stop)
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.getName(name)
obj.getName(ns, name)
绑定状态: 已绑定
Python 调用: obj.getName(ns, name)
Python 示例
from oapy._oa import _design
# assume obj is a oaModBusTerm
obj.getName(ns, name)
_design.oaModBusTerm.create(modNet, name, start, stop, step, termType=oacInputOutputTermType)
绑定状态: 已绑定
Python 调用: _design.oaModBusTerm.create(modNet, name, start, stop, step, termType=oacInputOutputTermType)
This function creates a one-bit wide oaModBusTerm with a vectorBitName。 If the module is visible in the block domain this will create an oaBusTerm in the block domain as well。 Exceptions are thrown if the number of bits in the net doesn't match the number of bits implied by the terminal name, if the baseName matches the name of an existing scalarTerm (in any domain), or if the member busTermBits already exist。
参数
modNet: The net to use to create the oaModBusTerm。name: The name to use to create the oaModBusTerm。termType: The type of terminal to create。
异常
oacTermExists。oacInvalidHierTermName。oacTermMemberExists。oacInvalidVectorValue。oacNetTermWidthMismatch。oacBusTermBaseNameMatchesScalarName。oacBusDefIsBlockDomainSpecific。oacCannotCreateTermWithImplicitNet。
Python 示例
from oapy._oa import _design
_design.oaModBusTerm.create(modNet, name, start, stop, step, termType=oacInputOutputTermType)
_design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType)
绑定状态: 已绑定
Python 调用: _design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType)
This function creates a bus terminal on the specified module net using the specified oaVectorName that incorporates the base name and indexes。 If the module is visible in the block domain this will create an oaBusTerm in the block domain as well。 Exceptions are thrown if the number of bits in the net doesn't match the number of bits implied by the terminal name, if the baseName matches the name of an existing scalarTerm (in any domain), or if the member busTermBits already exist。
参数
modNet: The net to use to create the oaModBusTerm。name: The name to use to create the oaModBusTerm。termType: The type of terminal to create。
异常
oacTermExists。oacInvalidHierTermName。oacTermMemberExists。oacInvalidVectorValue。oacNetTermWidthMismatch。oacBusTermBaseNameMatchesScalarName。oacBusDefIsBlockDomainSpecific。oacCannotCreateTermWithImplicitNet。
Python 示例
from oapy._oa import _design
_design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType)
_design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType)
绑定状态: 已绑定
Python 调用: _design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType)
This function creates a bus terminal on the specified module net by separately specifying the base name and the index values。 If the module is visible in the block domain this will create an oaBusTerm in the block domain as well。 Exceptions are thrown if the number of bits in the net doesn't match the number of bits implied by the terminal name, if the baseName matches the name of an existing scalarTerm (in any domain), or if the member busTermBits already exist。 In this form of the create function, an exception is thrown if the start value is equal to the stop value but the step is greater than 0。
参数
modNet: The net to use to create the oaModBusTerm。name: The baseName for the oaModBusTerm。start: The starting index of the oaModBusTerm。stop: The stopping index of the oaModBusTerm。step: The step value of the oaModBusTerm。termType: The type of terminal to create。
异常
oacTermExists。oacInvalidHierTermName。oacTermMemberExists。oacInvalidVectorValue。oacNetTermWidthMismatch。oacBusTermBaseNameMatchesScalarName。oacBusDefIsBlockDomainSpecific。oacCannotCreateTermWithImplicitNet。
Python 示例
from oapy._oa import _design
_design.oaModBusTerm.create(modNet, name, termType=oacInputOutputTermType)
_design.oaModBusTerm.find(module, name, start, stop, step)
绑定状态: 已绑定
Python 调用: _design.oaModBusTerm.find(module, name, start, stop, step)
This function searches the specified module for an oaModBusTerm object with the specified baseName and start, stop, and step indices。 The oaModBusTerm object is returned if found。 Otherwise, NULL is returned。
参数
module: The module to search for the oaModBusTerm。baseName: The baseName for the oaModBusTerm。start: The starting index of the oaModBusTerm。stop: The stopping index of the oaModBusTerm。step: The step value of the oaModBusTerm。
返回
- A pointer to an oaModBusTerm。
Python 示例
from oapy._oa import _design
_design.oaModBusTerm.find(module, name, start, stop, step)
_design.oaModBusTerm.isValidName(module, net, name, start, stop, step)
绑定状态: 已绑定
Python 调用: _design.oaModBusTerm.isValidName(module, net, name, start, stop, step)
This function returns a boolean value indicating whether the specified name is valid for a new oaModBusTerm object that is associated with the specified net。
参数
module: The module to search for the oaModBusTerm。net: The net to use to create the oaModBusTerm。name: The name for the new oaModBusTerm。start: The starting index of the oaModBusTerm。stop: The stopping index of the oaModBusTerm。step: The step value of the oaModBusTerm。
Python 示例
from oapy._oa import _design
_design.oaModBusTerm.isValidName(module, net, name, start, stop, step)