getElements function
Requirements.Internal.getElements
ยท source
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
| Name | Type | Description |
|---|---|---|
line input | String | Line of the log file without its leading verdict |
violated input | Boolean | =true, if violated requirement |
Outputs
| Name | Type | Description |
|---|---|---|
checkedComponentName output | String | Full path name of checked component |
requirementName output | String | Last name of requirement model |
requirementText output | String | Text of requirement |
firstFailureTime output | String | Time instant of first failure (if violated=true; otherwise dummy |
attempts output | String | Number of phases in which the property was applicable |