Class ProjectScriptDiagnostic
java.lang.Object
com.inductiveautomation.ignition.common.script.ProjectScriptDiagnostic
A snapshot of one gateway-run project script: what it is, whether it is enabled, whatever
configuration is specific to its kind, and the report from its most recent execution only. There
is no run history behind any of it.
ProjectScriptDiagnostic.GsonEncoder is the wire contract for the gateway status routes. It flattens ProjectScriptDiagnostic.Details into a details object whose keys depend on the script kind, and always emits
that object even when there is nothing to report.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe configuration specific to one kind of script, as reported alongside its diagnostic.static enumstatic class -
Constructor Summary
ConstructorsConstructorDescriptionProjectScriptDiagnostic(ProjectScriptDiagnostic.DiagnosticType type, String name, String projectName, boolean enabled, ScriptExecutionReport executionReport) Creates a diagnostic for a script kind that has no configuration of its own to report.ProjectScriptDiagnostic(ProjectScriptDiagnostic.DiagnosticType type, String name, String projectName, boolean enabled, ScriptExecutionReport executionReport, @Nullable ProjectScriptDiagnostic.Details details) Creates a diagnostic for a script kind that has configuration of its own to report. -
Method Summary
Modifier and TypeMethodDescription@Nullable ProjectScriptDiagnostic.DetailsThe configuration specific to this script's kind.The duration of the last execution of this script, in ms.The last error message produced when this script was executed.The timestamp when this script last executed, in ms.getName()intgetType()boolean
-
Constructor Details
-
ProjectScriptDiagnostic
public ProjectScriptDiagnostic(ProjectScriptDiagnostic.DiagnosticType type, String name, String projectName, boolean enabled, ScriptExecutionReport executionReport) Creates a diagnostic for a script kind that has no configuration of its own to report. -
ProjectScriptDiagnostic
public ProjectScriptDiagnostic(ProjectScriptDiagnostic.DiagnosticType type, String name, String projectName, boolean enabled, ScriptExecutionReport executionReport, @Nullable ProjectScriptDiagnostic.Details details) Creates a diagnostic for a script kind that has configuration of its own to report.- Parameters:
details- the configuration specific to this script's kind, or null when its kind has none.
-
-
Method Details
-
getType
public int getType() -
getName
-
getDetails
The configuration specific to this script's kind.- Returns:
- null when its kind has none.
-
getProjectName
-
getLastExecution
The timestamp when this script last executed, in ms. -
getDuration
The duration of the last execution of this script, in ms.- Returns:
- null if the script has not run.
-
getErrorMessage
The last error message produced when this script was executed.- Returns:
- null if the script has not run, or if there was no error.
-
getStacktrace
-
isEnabled
public boolean isEnabled()
-