ParameterInterface¶
| XML tag | <PARAMETER-INTERFACE> |
| Module | autosar.portinterface |
| Inherits | autosar.portinterface.PortInteface |
Represents a parameter interface.
Usage¶
import autosar
def create_workspace_and_datatypes():
ws = autosar.workspace(version="4.2.2")
package = ws.createPackage('DataTypes')
package.createSubPackage('CompuMethods', role='CompuMethod')
package.createSubPackage('DataConstrs', role='DataConstraint')
baseTypes = package.createSubPackage('BaseTypes')
baseTypes.createSwBaseType('uint8', 8, nativeDeclaration='uint8')
implTypes = package.createSubPackage('ImplementationTypes', role="DataType")
implTypes.createImplementationDataType('uint8', lowerLimit=0, upperLimit=255,
baseTypeRef='/DataTypes/BaseTypes/uint8', typeEmitter='Platform_Type')
ws.createPackage('PortInterfaces', role='PortInterface')
return ws
ws = create_workspace_and_datatypes()
package = ws.findRolePackage('PortInterface')
package.createParameterInterface('ButtonDebounceTime_I', autosar.element.ParameterDataPrototype('v', "uint8"))
ws.saveXML("ParameterInterface.arxml")
Factory Methods¶
Attributes¶
For inherited attributes see autosar.portinterface.PortInteface.
| Name | Type | Description |
|---|---|---|
| parameters | list(ParameterDataPrototype) | Parameters in this interface |
Method Description¶
append¶
-
ParameterInterface.append(elem)¶ Adds element to the self.parameters list.
Parameters: elem (ParameterDataPrototype) – parameter