Table of Contents

Interface IUnitAtStation

Namespace
Acuit.Pinpoint.Workstation
Assembly
Acuit.Pinpoint.Workstation.Abstractions.dll

Represents a unit at the station.

public interface IUnitAtStation : INotifyPropertyChanged
Inherited Members

Remarks

This should always be used to make changes to the unit, as opposed to obtaining an IPinpointServiceClient from IPinpointClientFactory and calling service methods directly to update the unit, as this service ensures that the unit status at the station is updated.

This is not thread-safe. All access should occur from the main application thread.

Properties

IsReleased

Gets whether the unit has been released from the station. Once this is true, no further changes can be made to the unit via this IUnitAtStation instance. If the same unit is scanned back into the station, a new IUnitAtStation instance must be obtained.

bool IsReleased { get; }

Property Value

bool

Unit

Gets the unit.

Unit Unit { get; }

Property Value

Unit

Remarks

This not kept updated on the workstation as changes are made from other stations.

This property value will never change.

UnitScanStatus

Gets the status returned from Acuit Pinpoint when the unit was scanned.

UnitScanStatus UnitScanStatus { get; }

Property Value

UnitScanStatus

UnitStation

Gets the UnitStation object representing the unit at the station.

UnitStation UnitStation { get; }

Property Value

UnitStation

WorkerAtStation

Gets the IWorkerAtStation representing the worker logged on at the station (including for stations with an automatic worker logon configured).

IWorkerAtStation WorkerAtStation { get; }

Property Value

IWorkerAtStation

Methods

AddDefect(string, string?)

Adds a defect for the unit.

UnitDefect AddDefect(string fullDefectName, string? notes)

Parameters

fullDefectName string

The full defect name, with the path parts delimited by backslashes.

notes string

Additional notes about the defect. This can be null or blank.

Returns

UnitDefect

Status information.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

fullDefectName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddDefect3(string, int, string, string?) for the specific errors that can occur.

AddDefectAsync(string, string?)

Adds a defect for the unit.

Task<UnitDefect> AddDefectAsync(string fullDefectName, string? notes)

Parameters

fullDefectName string

The full defect name, with the path parts delimited by backslashes.

notes string

Additional notes about the defect. This can be null or blank.

Returns

Task<UnitDefect>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains status information.

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

fullDefectName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddDefect3Async(string, int, string, string?) for the specific errors that can occur.

AddPreassembly(string, string, string?)

Records a preassembly into the unit.

ScanPreassemblyStatus AddPreassembly(string componentTypeName, string componentSerialNumber, string? componentModelNumber)

Parameters

componentTypeName string

The component type name.

componentSerialNumber string

The component serial number.

componentModelNumber string

The component model number. This must be specified if the component type is configured for uniqueSerialNumbersPerPartNumber; otherwise, it can be null or an empty string.

Returns

ScanPreassemblyStatus

A ScanPreassemblyStatus object representing the result.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

componentTypeName is null.

ArgumentNullException

componentSerialNumber is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See ScanPreassembly2(string, int, string, string, string?) for the specific errors that can occur.

AddPreassemblyAsync(string, string, string?)

Records a preassembly into the unit.

Task<ScanPreassemblyStatus> AddPreassemblyAsync(string componentTypeName, string componentSerialNumber, string? componentModelNumber)

Parameters

componentTypeName string

The component type name.

componentSerialNumber string

The component serial number.

componentModelNumber string

The component model number. This must be specified if the component type is configured for uniqueSerialNumbersPerPartNumber; otherwise, it can be null or an empty string.

Returns

Task<ScanPreassemblyStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains a ScanPreassemblyStatus object representing the result.

Exceptions

ArgumentNullException

componentTypeName is null.

ArgumentNullException

componentSerialNumber is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See ScanPreassembly2Async(string, int, string, string, string?) for the specific errors that can occur.

AddRepair(int, string, string?)

Adds a repair to a defect for the unit.

UnitDefectRepair AddRepair(int unitDefectId, string fullRepairName, string? notes)

Parameters

unitDefectId int

The unit defect identifier for the defect that is being repaired.

fullRepairName string

The full repair name, with the path parts delimited by backslashes.

notes string

Additional notes about the repair. This can be null or blank.

Returns

UnitDefectRepair

Status information.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddRepair(string, int, int, string, string?) for the specific errors that can occur.

AddRepairAsync(int, string, string?)

Adds a repair to a defect for the unit.

Task<UnitDefectRepair> AddRepairAsync(int unitDefectId, string fullRepairName, string? notes)

Parameters

unitDefectId int

The unit defect identifier for the defect that is being repaired.

fullRepairName string

The full repair name, with the path parts delimited by backslashes.

notes string

Additional notes about the repair. This can be null or blank.

Returns

Task<UnitDefectRepair>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains status information.

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddRepairAsync(string, int, int, string, string?) for the specific errors that can occur.

AddTestResult(string, bool, string?, string?, IDictionary<string, string?>?)

Adds a test result for the unit.

AddTestResultStatus AddTestResult(string testTypeName, bool passed, string? reason, string? notes, IDictionary<string, string?>? extendedData)

Parameters

testTypeName string

The test type name.

passed bool

Whether the test passed.

reason string

The reason for a failed test. This can be null if the test passed.

notes string

Operator-entered notes about the test.

extendedData IDictionary<string, string>

Optional extended data associated with the test result. This should be null when not used. This data is for use by plug-ins. Note that Acuit Pinpoint will not save this data with the unit record; plug-ins must handle saving and retrieving this data if needed.

Returns

AddTestResultStatus

Status information.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

testTypeName is null.

ArgumentNullException

extendedData is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddTestResult(string, int, string, bool, string?, string?, IDictionary<string, string?>?) for the specific errors that can occur.

AddTestResult(string, bool, string?, string?, string?)

Adds a test result for the unit.

AddTestResultStatus AddTestResult(string testTypeName, bool passed, string? reason, string? notes, string? dataXml)

Parameters

testTypeName string

The test type name.

passed bool

Whether the test passed.

reason string

The reason for a failed test. This can be null if the test passed.

notes string

Operator-entered notes about the test.

dataXml string

Test-specific data, formatted as XML, or null. This data will be saved with the test result within Acuit Pinpoint. EncodeTestDataAsXml(IEnumerable<CustomTestDataItem>?) can be used to properly format test data as XML, so that Acuit Pinpoint can interpret and nicely display the data.

Returns

AddTestResultStatus

Status information.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

testTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddTestResult2(string, int, string, bool, string?, string?, string?) for the specific errors that can occur.

AddTestResultAsync(string, bool, string?, string?, IDictionary<string, string?>?)

Adds a test result for the unit.

Task<AddTestResultStatus> AddTestResultAsync(string testTypeName, bool passed, string? reason, string? notes, IDictionary<string, string?>? extendedData)

Parameters

testTypeName string

The test type name.

passed bool

Whether the test passed.

reason string

The reason for a failed test. This can be null if the test passed.

notes string

Operator-entered notes about the test.

extendedData IDictionary<string, string>

Optional extended data associated with the test result. This should be null when not used. This data is for use by plug-ins. Note that Acuit Pinpoint will not save this data with the unit record; plug-ins must handle saving and retrieving this data if needed.

Returns

Task<AddTestResultStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains status information.

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

testTypeName is null.

ArgumentNullException

extendedData is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddTestResultAsync(string, int, string, bool, string?, string?, IDictionary<string, string?>?) for the specific errors that can occur.

AddTestResultAsync(string, bool, string?, string?, string?)

Adds a test result for the unit.

Task<AddTestResultStatus> AddTestResultAsync(string testTypeName, bool passed, string? reason, string? notes, string? dataXml)

Parameters

testTypeName string

The test type name.

passed bool

Whether the test passed.

reason string

The reason for a failed test. This can be null if the test passed.

notes string

Operator-entered notes about the test.

dataXml string

Test-specific data, formatted as XML, or null. This data will be saved with the test result within Acuit Pinpoint. EncodeTestDataAsXml(IEnumerable<CustomTestDataItem>?) can be used to properly format test data as XML, so that Acuit Pinpoint can interpret and nicely display the data.

Returns

Task<AddTestResultStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains status information.

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

testTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See AddTestResult2Async(string, int, string, bool, string?, string?, string?) for the specific errors that can occur.

ClearBuyoff(string)

Clears a buyoff for the unit.

BuyoffStatus ClearBuyoff(string buyoffName)

Parameters

buyoffName string

The buyoff name.

Returns

BuyoffStatus

Status information.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

buyoffName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See ClearBuyoff2(string, int, string) for the specific errors that can occur.

ClearBuyoffAsync(string)

Clears a buyoff for the unit.

Task<BuyoffStatus> ClearBuyoffAsync(string buyoffName)

Parameters

buyoffName string

The buyoff name.

Returns

Task<BuyoffStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains status information.

Exceptions

ArgumentNullException

buyoffName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See ClearBuyoff2Async(string, int, string) for the specific errors that can occur.

ExecuteTestWorkflowAsync(string, CancellationToken)

Executes a test workflow.

Task ExecuteTestWorkflowAsync(string testTypeName, CancellationToken cancellationToken = default)

Parameters

testTypeName string

The test type name.

cancellationToken CancellationToken

The cancellation token used to request canceling the test workflow.

Returns

Task

The task object representing the asynchronous operation.

Exceptions

ArgumentNullException

testTypeName is null.

InvalidOperationException

This unit is no longer at the station.

InvalidOperationException

There is no test workflow defined for testTypeName.

InvalidOperationException

The test workflow for testTypeName is already running.

WorkflowParameterException

An error occurred initializing parameter values within the workflow.

Exception

An error occurred while executing the workflow.

RecordTestOverride(int, int, string?)

Records an override for a failed unit test.

OverrideTestStatus RecordTestOverride(int unitTestId, int workerId, string? notes)

Parameters

unitTestId int

The identifier of the test to override.

workerId int

The identifier of the worker performing the override.

notes string

Optional additional notes about the test. This can be null or empty.

Returns

OverrideTestStatus

An OverrideTestStatus object representing the status.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See OverrideTest(string, int, int, int, string?) for the specific errors that can occur.

RecordTestOverrideAsync(int, int, string?)

Records an override for a failed unit test.

Task<OverrideTestStatus> RecordTestOverrideAsync(int unitTestId, int workerId, string? notes)

Parameters

unitTestId int

The identifier of the test to override.

workerId int

The identifier of the worker performing the override.

notes string

Optional additional notes about the test. This can be null or empty.

Returns

Task<OverrideTestStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains an OverrideTestStatus object representing the status.

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See OverrideTestAsync(string, int, int, int, string?) for the specific errors that can occur.

RemoveComponent(string)

Removes a component from the unit.

ComponentStatus RemoveComponent(string componentTypeName)

Parameters

componentTypeName string

The component type name.

Returns

ComponentStatus

A ComponentStatus object representing the result.

Exceptions

ArgumentNullException

componentTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See RemoveComponent2(string, int, string) for the specific errors that can occur.

RemoveComponentAsync(string)

Removes a component from the unit.

Task<ComponentStatus> RemoveComponentAsync(string componentTypeName)

Parameters

componentTypeName string

The component type name.

Returns

Task<ComponentStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains a ComponentStatus object representing the result.

Exceptions

ArgumentNullException

componentTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See RemoveComponent2Async(string, int, string) for the specific errors that can occur.

RemovePreassembly(string)

Removes a preassembly from the unit, causing a new preassembly to be created containing the removed components and other associated history.

RemovePreassemblyStatus RemovePreassembly(string componentTypeName)

Parameters

componentTypeName string

The component type name.

Returns

RemovePreassemblyStatus

A RemovePreassemblyStatus object representing the result.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

componentTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See RemovePreassembly(string, int, string) for the specific errors that can occur.

RemovePreassemblyAsync(string)

Removes a preassembly from the unit, causing a new preassembly to be created containing the removed components and other associated history.

Task<RemovePreassemblyStatus> RemovePreassemblyAsync(string componentTypeName)

Parameters

componentTypeName string

The component type name.

Returns

Task<RemovePreassemblyStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains a RemovePreassemblyStatus object representing the result.

Exceptions

ArgumentNullException

componentTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See RemovePreassemblyAsync(string, int, string) for the specific errors that can occur.

SetBuyoff(string)

Sets a buyoff for the unit.

BuyoffStatus SetBuyoff(string buyoffName)

Parameters

buyoffName string

The buyoff name.

Returns

BuyoffStatus

Status information.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

Exceptions

ArgumentNullException

buyoffName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See SetBuyoff2(string, int, string) for the specific errors that can occur.

SetBuyoffAsync(string)

Sets a buyoff for the unit.

Task<BuyoffStatus> SetBuyoffAsync(string buyoffName)

Parameters

buyoffName string

The buyoff name.

Returns

Task<BuyoffStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains status information.

Exceptions

ArgumentNullException

buyoffName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See SetBuyoff2Async(string, int, string) for the specific errors that can occur.

VerifyAndAddComponentScan(string, string?, string?)

Verifies and records a component scan for the unit.

ComponentStatus VerifyAndAddComponentScan(string componentTypeName, string? componentSerialNumber, string? componentModelNumber)

Parameters

componentTypeName string

The component type name.

componentSerialNumber string

The component serial number to verify. This can be null or blank if no serial number was scanned for the component.

componentModelNumber string

The component model number to verify. This can be null or blank if no model number was scanned for the component. See remarks for "checkInstalledOnly" components.

Returns

ComponentStatus

A ComponentStatus object representing the result.

Remarks

This can take some time since it must contact Acuit Pinpoint, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.

For component types marked "checkInstalledOnly", componentModelNumber indicates whether the component is installed or not. Any non-null, non-blank value means that the component is installed; a null or blank value means that the component is not installed.

Exceptions

ArgumentNullException

componentTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See ComponentScanned3(string, int, string, string?, string?) for the specific errors that can occur.

VerifyAndAddComponentScanAsync(string, string?, string?)

Verifies and records a component scan for the unit.

Task<ComponentStatus> VerifyAndAddComponentScanAsync(string componentTypeName, string? componentSerialNumber, string? componentModelNumber)

Parameters

componentTypeName string

The component type name.

componentSerialNumber string

The component serial number to verify. This can be null or blank if no serial number was scanned for the component.

componentModelNumber string

The component model number to verify. This can be null or blank if no model number was scanned for the component. See remarks for "checkInstalledOnly" components.

Returns

Task<ComponentStatus>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains a ComponentStatus object representing the result.

For component types marked "checkInstalledOnly", componentModelNumber indicates whether the component is installed or not. Any non-null, non-blank value means that the component is installed; a null or blank value means that the component is not installed.

Exceptions

ArgumentNullException

componentTypeName is null.

InvalidOperationException

This unit is no longer at the station.

Exception

Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See ComponentScanned3Async(string, int, string, string?, string?) for the specific errors that can occur.