Class ClientScriptingFunctions
java.lang.Object
com.inductiveautomation.sfc.client.scripting.ClientScriptingFunctions
- All Implemented Interfaces:
SfcRpcFunctions
-
Field Summary
Fields inherited from interface com.inductiveautomation.sfc.rpc.SfcRpcFunctions
SERIALIZER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbrowseRecordings(Date start, Date end, String chartPathFilter, String instanceUuidFilter) Returns information about recordings that match the provided filters.voidcancelChart(UUID instanceId) Cancels the chart instance indicated byinstanceId.voiddebugResume(UUID instanceId) Sends a message to the chart instance stopped at a breakpoint to resume normal operations.voidSends a message to the chart instance stopped at a breakpoint to step to the next step.Returns information about the currently running charts.getChartStatus(UUID instanceId, boolean includeModel) Get theChartStatusfor a chart.getRunningChartsForId(ResourceId resourceId) Returns information about the currently running instances of a resource.getRunningChartsForPath(String chartPath) Returns information about the currently running instances of a given chart path.getVariables(UUID instanceId) Returns the chart scope for the specified instance.loadRecording(String file) voidpauseChart(UUID instanceId) Pause the chart instance indicated byinstanceId.voidredundantCheckpoint(UUID instanceId) For charts that have the "redundancy sync" setting enabled, this method synchronizes chart and step variables of the specified chart instance across the redundant cluster, allowing the instance to continue where it left off if a redundant failover occurs.voidresumeChart(UUID instanceId) Resume the chart instance indicated byinstanceId.voidsetStepVariables(UUID instanceId, UUID stepId, org.python.core.PyObject variablesMap) Updates the chart indicated byinstanceIdby copying all of the variables from the providedvariableMapinto the charts specified step scope.voidsetVariables(UUID instanceId, org.python.core.PyObject variablesMap) Updates the chart indicated byinstanceIdby copying all of the variables from the providedvariableMapinto the chart's scope.Start a Chart in ProjectprojectNamefrom the definition atchartPath.
-
Constructor Details
-
ClientScriptingFunctions
-
-
Method Details
-
startChart
public UUID startChart(String projectName, String username, String chartPath, Map<String, Object> parameters) throws ExceptionDescription copied from interface:SfcRpcFunctionsStart a Chart in ProjectprojectNamefrom the definition atchartPath.- Specified by:
startChartin interfaceSfcRpcFunctions- Parameters:
projectName- the name of the project the chart definition resides in.chartPath- the path to the chart definition.parameters- the parameters passed to the chart scope.- Returns:
- The
UUIDof the running chart instance. - Throws:
Exception
-
cancelChart
Description copied from interface:SfcRpcFunctionsCancels the chart instance indicated byinstanceId.- Specified by:
cancelChartin interfaceSfcRpcFunctions- Parameters:
instanceId- theUUIDof the chart instance to stop.
-
pauseChart
Description copied from interface:SfcRpcFunctionsPause the chart instance indicated byinstanceId.- Specified by:
pauseChartin interfaceSfcRpcFunctions- Parameters:
instanceId- theUUIDof the chart instance to pause.
-
resumeChart
Description copied from interface:SfcRpcFunctionsResume the chart instance indicated byinstanceId.- Specified by:
resumeChartin interfaceSfcRpcFunctions- Parameters:
instanceId- theUUIDof the chart instance to resume.
-
debugStep
Description copied from interface:SfcRpcFunctionsSends a message to the chart instance stopped at a breakpoint to step to the next step.- Specified by:
debugStepin interfaceSfcRpcFunctions
-
debugResume
Description copied from interface:SfcRpcFunctionsSends a message to the chart instance stopped at a breakpoint to resume normal operations.- Specified by:
debugResumein interfaceSfcRpcFunctions
-
setVariables
Description copied from interface:SfcRpcFunctionsUpdates the chart indicated byinstanceIdby copying all of the variables from the providedvariableMapinto the chart's scope.- Specified by:
setVariablesin interfaceSfcRpcFunctions- Parameters:
instanceId- the of the chart instance to update.variablesMap- a dictionary containing key-value pairs of serializable things to update in chart scope.
-
setStepVariables
Description copied from interface:SfcRpcFunctionsUpdates the chart indicated byinstanceIdby copying all of the variables from the providedvariableMapinto the charts specified step scope.- Specified by:
setStepVariablesin interfaceSfcRpcFunctions- Parameters:
instanceId- the of the chart instance to update.stepId- the of the running step to update.variablesMap- a dictionary containing key-value pairs of serializable things to update in chart scope.
-
getAllRunningCharts
Description copied from interface:SfcRpcFunctionsReturns information about the currently running charts.- Specified by:
getAllRunningChartsin interfaceSfcRpcFunctions- Returns:
- Chart information about all of the currently running charts.
-
getRunningChartsForId
Description copied from interface:SfcRpcFunctionsReturns information about the currently running instances of a resource.- Specified by:
getRunningChartsForIdin interfaceSfcRpcFunctions
-
getRunningChartsForPath
Description copied from interface:SfcRpcFunctionsReturns information about the currently running instances of a given chart path.- Specified by:
getRunningChartsForPathin interfaceSfcRpcFunctions- Throws:
Exception
-
getVariables
Description copied from interface:SfcRpcFunctionsReturns the chart scope for the specified instance. Step scopes for active steps are found under the "activeSteps" key.- Specified by:
getVariablesin interfaceSfcRpcFunctions- Throws:
Exception
-
getChartStatus
Description copied from interface:SfcRpcFunctionsGet theChartStatusfor a chart.- Specified by:
getChartStatusin interfaceSfcRpcFunctions- Parameters:
instanceId- the instance id of the chart.includeModel- iftrue, include theChartUIModelin theChartStatus.- Returns:
- the
ChartStatus, ornullif no chart forinstanceIdexists.
-
browseRecordings
public List<RecordingMeta> browseRecordings(Date start, Date end, String chartPathFilter, String instanceUuidFilter) Description copied from interface:SfcRpcFunctionsReturns information about recordings that match the provided filters. If a filter parameter is null it is not used.- Specified by:
browseRecordingsin interfaceSfcRpcFunctionschartPathFilter- a string that will be used to match the chart path of the recording.
-
loadRecording
- Specified by:
loadRecordingin interfaceSfcRpcFunctions- Throws:
Exception
-
redundantCheckpoint
Description copied from interface:SfcRpcFunctionsFor charts that have the "redundancy sync" setting enabled, this method synchronizes chart and step variables of the specified chart instance across the redundant cluster, allowing the instance to continue where it left off if a redundant failover occurs.- Specified by:
redundantCheckpointin interfaceSfcRpcFunctions- Parameters:
instanceId- the UUID of the chart instance to update.- Throws:
Exception- if the redundant peer is not set up or connected, or if the chart does not have redundancy sync enabled.
-