Main Content

coder.asap2.RecordLayout

Create record layout object

Since R2023a

    Description

    example

    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.

    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)

    Output Arguments

    collapse all

    Record layout object, specified as a coder.asap2.RecordLayout object. Use the object to add required information to an ASAP2 file.

    Example: Custom_RecordLayout = coder.asap2.RecordLayout

    Tips

    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

    Version History

    Introduced in R2023a