DataElement

XML tag <DATA-ELEMENT>
Module autosar.element
Inherits autosar.element.Element

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])
Parameters:
  • 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
None No calibration access set
"" (Empty string) Create default calibration access value as set by Workspace.profile.swCalibrationAccessDefault
"NOT-ACCESSIBLE" The element will not be accessible by external tools
"READ-ONLY" Read only access
"READ-WRITE" Read-write access

swImplPolicy

Value Description
None No policy set
"CONST" Prevent implementation to modify the memory. Uses the “const” modifier in C.
"FIXED" Data element is fixed and might be implemented as in place data such as a #define.
"MEASUREMENT-POINT" Data element is created for measurement purposes only.
"QUEUED" Data element is queued and has event semantics. Data is processed in FIFO order.
"STANDARD" 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>

Note

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)
Parameters:props (autosar.base.SwDataDefPropsConditional) – Properties object

Updates the following attributes/properties from the given props object

  • dataConstraintRef
  • swAddressMethodRef
  • swCalibrationAccess
  • swImplPolicy