This function gets the fault mode of a certain fault model. The function needs a translated model. Therefore a translate command is issued in the model. it can be deactivated by setting translatefirst to false.
function getVariableMode
input String[:] faultNames = {"FaultTriggering.Examples.ActuatorExample.Actuator.driveline.friction.externalRealFault"};
input String modelName = "FaultTriggering.Examples.ActuatorExample.Actuator";
input Boolean translateFirst = true "translate model if flag is true";
output Real[size(faultNames, 1)] outputValues "Values of the Mode selector";
end getVariableMode;