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

expand all

Specify a name for the custom record layout.

Example: "CustomRecordLayout_1"

Specify details for the record layout such as Position, DataType, IndexMode, IndexOrder, and AddressType.

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

Specify any additional description that needs to be populated in the record layout.

Example: "additional information"

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