%%============================================================================
%%
%%
%%
%%
%%Copyright1994-2014TheMathWorks,Inc.
%%
%%Abstract:
%%MasterTLCfileforoutputofSimulinkdatainASAP2format(model.a2l)
%%
%%============================================================================
%selectfile NULL_FILE
 
%%CreateemptyTemplatesRecordandadditto::CompiledModel
%assign tmpVar = Templates{ NumTemplates 0 }
%assign ::CompiledModel = ::CompiledModel + Templates
 
%%CreateemptyCompuMethodsRecordandadditto::CompiledModel
%assign tmpVar = CompuMethods{ NumCompuMethods 0 }
%assign ::CompiledModel = ::CompiledModel + CompuMethods
 
%%CreateemptyCompuMethodsHashRecordandadditto::CompiledModel.CompuMethods
%assign tmpVar = CompuMethodsHash { }
%assign ::CompiledModel.CompuMethods = ::CompiledModel.CompuMethods + CompuMethodsHash
 
%%CreateemptyASAP2GroupsRecordandadditto::CompiledModel
%assign tmpVar = ASAP2Groups{ NumASAP2Groups 0 }
%assign ::CompiledModel = ::CompiledModel + ASAP2Groups
 
%%CreateemptyASAP2RecordLayoutsRecordandadditto::CompiledModel
%assign tmpVar = ASAP2RecordLayouts{ NumRecordLayouts 0; RecordLayouts {} }
%assign ::CompiledModel = ::CompiledModel + ASAP2RecordLayouts
 
%%LoadTLCfunctionsforgeneratingASAP2file
%include "asap2lib.tlc"
%include "asap2grouplib.tlc"
%include "asap2lookuplib.tlc"
 
%%Loaduser-definedsetupfileforgeneratingASAP2file
%assign setupFileName = "asap2setup.tlc"
%assign setupFile = FEVAL("which", setupFileName)
%if TYPE(setupFile) == "String"
  %include setupFile
%else
  %% START_ASSERT
  %<SLibReportErrorWithIdAndArgs("RTW:tlc:NoASAP2Setup", setupFileName)>
  %% END_ASSERT
%endif
    
%assign ASAP2EnableTestPointSignals = ASAP2EnableTestPoints
%assign ASAP2EnableTestPointStateflow = ASAP2EnableTestPoints
 
%%Populatemodelrefcodevariantblock(inBHM)withsystemblockinformation
%<FcnUpdateBHMForModelRefCodeVariants()>
 
%%Addmodelargumentidentifiertocanonicalparameters
%<FcnAddModelArgIdentifierToCanParams()>
 
%%Generatecanonicaldependencylistfile
%<FcnGenerateCanonicalDependencyList()>
 
%selectfile STDOUT
%if RTWVerbose
### Creating ASAP2 file: %<ASAP2FileName>
%endif
%selectfile NULL_FILE
 
%%Creategroupsbasedongraphicalhierarchyofthemodel
%%-------------------------------------------------------
%<LibASAP2CreateGraphicalGroups()>
 
%assign ASAP2FullFileName = ASAP2FileName
%openfile ModelASAP2File = ASAP2FullFileName
%openfile ASAP2List = "asap2.lis"
%selectfile ModelASAP2File
%<ASAP2UserFcnWriteFileHead()>
%assign asap2Version = ASAP2UserFcnASAP2Version()
%assign VersionNo = asap2Version[0]
%assign UpgradeNo = asap2Version[1]
 ASAP2_VERSION %<VersionNo> %<UpgradeNo> /* Version %<VersionNo>.%<UpgradeNo> */
  
/begin PROJECT %<ASAP2ProjectName> "%<ASAP2ProjectComment>"
 
  %<ASAP2UserFcnWriteHeader()>
   
  /begin MODULE %<ASAP2ModuleName> "%<ASAP2ModuleComment>"
    %<ASAP2UserFcnWriteHardwareInterface()>/
    %<SLibASAP2WriteDynamicContents()>/
    %<SLibOutputGroups()>
  /end MODULE
   
 
/end PROJECT
%<ASAP2UserFcnWriteFileTail()>/
%closefile ASAP2List
%closefile ModelASAP2File
%<SLibAddGeneratedFileToList(ASAP2FileName,"interface","a2l","")>
 
%assign indentOutput = FEVAL("asap2indent", ASAP2FullFileName)
%selectfile STDOUT
%if RTWVerbose
%<indentOutput>/
%endif
%selectfile NULL_FILE
%%[EOF]asap2main.tlc