Main Content

coder.asap2.RecordLayout

Create record layout object

Since R2023a

Description

Create a record layout object to define a record layout element and export it to an ASAP2 file.

Creation

rec = coder.asap2.RecordLayout creates a record layout object. You can use the object to define a record layout and export it to an ASAP2 file.

Properties

This table shows the fields of the record layout object.

ElementDescription
NameUnique identifier in the ECU program
Record

Description of the element in structure format. For example,

struct('Name','Record1',...
'Position',1,...
'DataType','int',...
'IndexMode','COLUMN_DIR',...
'IndexOrder','INDEX_INCR',...
'AddressType','DIRECT')

CustomDataAny ASAP2 (a2l) snippet provided by the user

Examples

collapse all

Open a model, build it, and create the ECU description object.

openExample("ASAP2Demo")
rtwbuild("ASAP2Demo")
descObj = coder.asap2.getEcuDescriptions("ASAP2Demo")

Create a custom record layout and add the necessary details.

userRecordLayout = coder.asap2.RecordLayout
userRecordLayout.Name = 'Custom_RecordLayout1'

Add and export the custom record layout.

add(descObj,userRecordLayout)
coder.asap2.export("ASAP2Demo",CustomEcuDescriptions=descObj)

Version History

Introduced in R2023a