Scripting API / inspection/subinspections/SubInspectionApi
inspection/subinspections/SubInspectionApi
Modules
| Module | Description |
|---|---|
| External | - |
Classes
SubInspectionApi
Allows modification, retrieval, and event binding of a subinspection with the given id.
Implements
TestContainer
Extends
Type Parameters
| Type Parameter |
|---|
T extends string |
Implements
Methods
addButtonTest()
addButtonTest(
testProperties):Promise<void>
Adds a button test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<ButtonTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addChartTest()
addChartTest(
testProperties):Promise<void>
Adds a Chart test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<ChartTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addDataCanvasTest()
addDataCanvasTest(
testProperties):Promise<void>
Adds a Data Canvas test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<DataCanvasTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addDateTimeTest()
addDateTimeTest(
testProperties):Promise<void>
Adds a Date/Time test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
DateTimeTestWorkerCreate |
The properties with which the test will be initialized |
Returns
Promise<void>
Implementation of
addDefectListTest()
addDefectListTest(
testProperties):Promise<void>
Adds a Defect List test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<DefectListTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addFileTest()
addFileTest(
testProperties):Promise<void>
Adds a File/URL test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<FileTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addGroupTest()
addGroupTest(
testProperties):Promise<void>
Adds a Group test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<GroupTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addInputTest()
addInputTest(
testProperties):Promise<void>
Adds an Input test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<InputTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addLabelTest()
addLabelTest(
testProperties):Promise<void>
Adds a Label test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<LabelTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addOEETest()
addOEETest(
testProperties):Promise<void>
Adds an OEE test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<OEETestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addPartTest()
addPartTest(
testProperties):Promise<void>
Adds a Part test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
PartTestWorkerCreate |
The properties with which the test will be initialized |
Returns
Promise<void>
addPassFailTest()
addPassFailTest(
testProperties):Promise<void>
Adds a Pass/Fail test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<PassFailTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addProcessTest()
addProcessTest(
testProperties):Promise<void>
Adds a Process test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
ProcessTestWorkerCreate |
The properties with which the test will be initialized |
Returns
Promise<void>
Implementation of
addRatingTest()
addRatingTest(
testProperties):Promise<void>
Adds a Rating test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<RatingTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addSPCTest()
addSPCTest(
testProperties):Promise<void>
Adds an SPC test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<SPCTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addTaskTest()
addTaskTest(
testProperties):Promise<void>
Adds a Task test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<TaskTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
addTraceabilityTest()
addTraceabilityTest(
testProperties):Promise<void>
Adds a Traceability test with the given properties to this sub-inspection
Parameters
| Parameter | Type | Description |
|---|---|---|
testProperties |
CopyableCreate<TraceabilityTestWorkerCreate, string> |
The properties with which the test will be initialized |
Returns
Promise<void>
Implementation of
TestContainer.addTraceabilityTest
allTestEvents()
allTestEvents():
AllTestEventsApi
Allows event binding to all tests on this sub-inspection.
Returns
An object which allows access to test event bindings.
Implementation of
button()
button(
scriptId):ButtonTestApi
Allows modification, retrieval, and event binding of a Button test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
chart()
chart(
scriptId):ChartTestApi
Allows modification and retrieval of a Chart test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
dataCanvas()
dataCanvas(
scriptId):DataCanvasTestApi<T>
Allows modification, retrieval, and event binding of a data canvas test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
dateTime()
dateTime(
scriptId):DateTimeTestApi
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
Implementation of
defectList()
defectList(
scriptId):DefectListTestApi
Allows modification, retrieval, and event binding of a Defect List test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
file()
file(
scriptId):FileTestApi
Allows modification, retrieval, and event binding of a File/URL test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
getProperties()
getProperties():
Promise<SubInspectionWorkerGet>
Retrieves the properties from the given sub-inspection.
Returns
Promise<SubInspectionWorkerGet>
getTests()
getTests():
Promise<TestsInInspectionWorkerGet[]>
Gets a list of tests inside of this sub-inspection.
Returns
Promise<TestsInInspectionWorkerGet[]>
A list of all tests, including those in groups, in this sub-inspection.
Implementation of
group()
group(
scriptId):GroupTestApi<T>
Allows modification, retrieval, and event binding of a Group test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
GroupTestApi<T>
An object which allows access to the test methods
input()
input(
scriptId):InputTestApi
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
Implementation of
label()
label(
scriptId):LabelTestApi
Allows modification, retrieval, and event binding of a Label test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
oee()
oee(
scriptId):OEETestApi
Allows modification, retrieval, and event binding of an OEE test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
onAfterEnd()
onAfterEnd(
fn):ScriptEventSubscription
Bind a function to fire after a sub-inspection has ended.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
Inherited from
CoreSubInspectionApi.onAfterEnd
onAfterStart()
onAfterStart(
fn):ScriptEventSubscription
Bind a function to fire after a sub-inspection has begun.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
Inherited from
CoreSubInspectionApi.onAfterStart
onBeforeDataSubmit()
onBeforeDataSubmit(
fn):ScriptEventSubscription
Bind a function to fire before a sub-inspection submits data. The dataSet property may be modified to change the data being submitted. Note that Real-Time Failures will not be re-checked after the data is modified, and may no longer be valid.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
Inherited from
CoreSubInspectionApi.onBeforeDataSubmit
onBeforeEnd()
onBeforeEnd(
fn):ScriptEventSubscription
Bind a function to fire before a sub-inspection ends. preventDefault can be called on the event to prevent the sub inspection from ending.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
Inherited from
CoreSubInspectionApi.onBeforeEnd
part()
part(
scriptId):PartTestApi
Allows modification and retrieval of a Part test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
passFail()
passFail(
scriptId):PassFailTestApi
Allows modification, retrieval, and event binding of a Pass/Fail test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
process()
process(
scriptId):ProcessTestApi
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
Implementation of
rating()
rating(
scriptId):RatingTestApi
Allows modification, retrieval, and event binding of a Rating test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
removeTest()
removeTest(
scriptId):Promise<void>
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
The id of the test to remove. |
Returns
Promise<void>
Implementation of
spc()
spc(
scriptId):SPCTestApi
Allows modification, retrieval, and event binding of a SPC test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
task()
task(
scriptId):TaskTestApi
Allows modification, retrieval, and event binding of a Task test with the given id.
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
An object which allows access to the test methods
traceability()
traceability(
scriptId):TraceabilityTestApi
Parameters
| Parameter | Type | Description |
|---|---|---|
scriptId |
string |
Unique id of the test. |
Returns
Implementation of
updateProperties()
updateProperties(
newProps):Promise<void>
Updates the inspection with new values.
Parameters
| Parameter | Type | Description |
|---|---|---|
newProps |
SubInspectionWorkerUpdate |
Object with new properties to use |
Returns
Promise<void>