DataElement
XML tag |
<DATA-ELEMENT> |
Module |
autosar.element |
Inherits |
DataElements are commonly used in SenderReceiverInterface but they sometimes are used for other purposes.
Constructor
- DataElement(name, typeRef[, isQueued = False][, swAddressMethodRef = None][, swCalibrationAccess = None][, swImplPolicy = None][, category = None][, parent = None][, adminData = None])
- 参数
name (str) – Short-name identifer
typeRef (str) – Type reference
isQueued (bool) – Queued property
swAddressMethodRef (str) – Reference to SoftwareAddressMethod
swCalibrationAccess (str) – Calibration access setting
swImplPolicy (str) – Implementation policy
category (str) – Category string
parent – Only used internally (leave as None)
adminData – Optional AdminData object
swCalibrationAccess
Value |
Description |
---|---|
|
No calibration access set |
|
Create default calibration access value as set by Workspace.profile.swCalibrationAccessDefault |
|
The element will not be accessible by external tools |
|
Read only access |
|
Read-write access |
swImplPolicy
Value |
Description |
---|---|
|
No policy set |
|
Prevent implementation to modify the memory. Uses the “const” modifier in C. |
|
Data element is fixed and might be implemented as in place data such as a #define. |
|
Data element is created for measurement purposes only. |
|
Data element is queued and has event semantics. Data is processed in FIFO order. |
|
Data element is non-queued and uses the “last is best” semantics |
Attributes
For inherited attributes see autosar.element.Element.
Name |
Type |
Description |
---|---|---|
dataConstraintRef |
None or str |
<DATA-CONSTR-REF> |
isQueued |
bool |
<IS-QUEUED> |
swAddressMethodRef |
None or str |
<SW-DATA-DEF-PROPS><SW-ADDR-METHOD-REF> |
swCalibrationAccess |
None or str |
<SW-DATA-DEF-PROPS><SW-CALIBRATION-ACCESS> |
typeRef |
str |
<TYPE-TREF> |
注解
It might be better idea to change DataElement to have a single instance of autosar.base.SwDataDefPropsConditional. This will remove some duplicated attributes found in this class.
Properties
Name |
Type |
Access Type | Description |
|
---|---|---|---|
swImplPolicy |
None or str |
Get, Set |
<SW-DATA-DEF-PROPS><SW-IMPL-POLICY> |
Public Methods
Method Description
setProps
- DataElement.setProps(props)
- 参数
props (autosar.base.SwDataDefPropsConditional) – Properties object
Updates the following attributes/properties from the given props object
dataConstraintRef
swAddressMethodRef
swCalibrationAccess
swImplPolicy