Skip to content

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

TestContainer.addDateTimeTest

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

TestContainer.addProcessTest

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

AllTestEventsApi

An object which allows access to test event bindings.

Implementation of

TestContainer.allTestEvents

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

ButtonTestApi

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

ChartTestApi

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

DataCanvasTestApi<T>

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

DateTimeTestApi

Implementation of

TestContainer.dateTime

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

DefectListTestApi

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

FileTestApi

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

TestContainer.getTests

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

InputTestApi

Implementation of

TestContainer.input

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

LabelTestApi

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

OEETestApi

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

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

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

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

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

PartTestApi

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

PassFailTestApi

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

ProcessTestApi

Implementation of

TestContainer.process

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

RatingTestApi

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

TestContainer.removeTest

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

SPCTestApi

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

TaskTestApi

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

TraceabilityTestApi

Implementation of

TestContainer.traceability

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>