Structures in MODEL are represented as lists in ASL. The number of items in the list in the ASL is equal to the number of fields in the corresponding structure of the MODEL. The first item in the list will correspond to the first field defined within the structure, and so on for each subsequent item.

For example, if the following structure is defined in Example.mdl, the following ASL code, Example.asl, shows how to reference the structure.

interface Example_Struct:MR_ManagedObject
 struct model_struct
  int  valueType;
  string  Value;
 attribute model_struct asl_list;
  // create an instance, ‘example’, of Example_struct
  example = create (“Example_Struct”, “Example-Struct”);
  // put values into a ‘model_struct’ structure:
  // structure element ‘valueType’ is list element [0]
  // structure element ‘value’ is list element [1]
  struct_value = list();
  struct_value[0] = 1;
  struct_value[1] = “Structure Example”;
  // set the value in the Example_struct instance
  example->asl_list = struct_value;
  // get values from a ‘model_struct’ structure
  accessed_struct = list();
  accessed_struct = example->asl_list;
  // display the retrieved structure elements
  print (accessed_struct);

The output of the example is the following:

$sm_adapter -M Example Example.asl
{1, Structure Example }