This Function gathers all the faults in the model modelName, sets the values of the faults and saves it into the modelica script scriptName. The Integer maxSearchSize is needed to preallocate the number of searched elements.

This function creates a package with name packageName. In this package a hierarchical bus is built to which all faults can be easily coupled in the model ConnectBusToFaults.


function createFaultPackage
  extends FaultTriggering.Utilities.Icons.FaultFunction;
  input String modelName = "FaultTriggering.Examples.ActuatorExample.Actuator" "Model name";
  input String scriptName = "SetFaults.mos" "Name of output script";
  input String packageName = "Faults.mo" "Name of the Fault package created by the function";
  input Boolean overWriteScripts = true "Replaces existing models without prompting" annotation(
    choices(checkBox = true));
  output FaultTriggering.Utilities.Records.Faults faults;
end createFaultPackage;


© 2012-2015, DLR Institute of System Dynamics and Control

Generated at 2021-02-24T01:59:16Z by OpenModelicaOpenModelica 1.18.0~dev-65-g9ac6586 using GenerateDoc.mos