Working with callbacks
There are three different callback functions:
- Pre code generation callback function: Callback before the model is converted to C++ code.
- Post code generation callback function: Callback after the model has been converted to C++ code.
- Post publish callback function: Callback after the created C++ project has been built for the configured platforms.
- Post deploy callback function: Callback will be executed after the project specified in “Deployment Project” is updated.
Enter the name of your created MATLAB® function here to call it.
Your MATLAB® function is passed the ProjectExporter object as a transfer parameter:
function MyCallback(obj)
…
return
The object contains the current configuration of the build in its properties.
ProjectExporter with properties:
ProjectGenerator: [1×1 TwinCAT.ModuleGenerator.ProjectGenerator]
Configuration: [1×1 TwinCAT.ModuleGenerator.ProjectExportConfig]
Project: [1×1 TwinCAT.ModuleGenerator.Project]
State: [1×1 struct]
ClassExporters: {[1×1 TwinCAT.ModuleGenerator.Simulink.ModelExporter]}
AdditionalExports: [1×1 containers.Map]
Sample code in MATLAB® Open the appropriate sample with: |