getElements function

Requirements.Internal.getElements  ยท source

Icon of getElements

Extract the elements from a log line

Extends Modelica.Icons.Function

Extracts the fields of one verdict line of the log file, after its leading verdict has been removed by removeFirstElement. The line is <checkedComponentName>,<requirement>,<firstFailureTime>,<attempts>,<text> for a violated requirement (violated = true) and <checkedComponentName>,<requirement>,<attempts>,<text> otherwise (the format written by printViolationsToLogFile). For a requirement that is not violated, firstFailureTime is returned as "???". The requirement text is the rest of the line, so it may contain commas. requirementName is the logged full path name without its first name (the root model), as removeFirstName would give it. All outputs are strings, printed as they are by printViolationsToOutput, the only caller.

Inputs

NameTypeDescription
line inputStringLine of the log file without its leading verdict
violated inputBoolean=true, if violated requirement

Outputs

NameTypeDescription
checkedComponentName outputStringFull path name of checked component
requirementName outputStringLast name of requirement model
requirementText outputStringText of requirement
firstFailureTime outputStringTime instant of first failure (if violated=true; otherwise dummy
attempts outputStringNumber of phases in which the property was applicable