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
Unit
Gets the unit.
Unit Unit { get; }
Property Value
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
UnitStation
Gets the UnitStation object representing the unit at the station.
UnitStation UnitStation { get; }
Property Value
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
Methods
AddDefect(string, string?)
Adds a defect for the unit.
UnitDefect AddDefect(string fullDefectName, string? notes)
Parameters
fullDefectNamestringThe full defect name, with the path parts delimited by backslashes.
notesstringAdditional 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
fullDefectNameis 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
fullDefectNamestringThe full defect name, with the path parts delimited by backslashes.
notesstringAdditional 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
fullDefectNameis 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
componentTypeNamestringThe component type name.
componentSerialNumberstringThe component serial number.
componentModelNumberstringThe 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
componentTypeNameis null.- ArgumentNullException
componentSerialNumberis 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
componentTypeNamestringThe component type name.
componentSerialNumberstringThe component serial number.
componentModelNumberstringThe 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
componentTypeNameis null.- ArgumentNullException
componentSerialNumberis 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
unitDefectIdintThe unit defect identifier for the defect that is being repaired.
fullRepairNamestringThe full repair name, with the path parts delimited by backslashes.
notesstringAdditional 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
unitDefectIdintThe unit defect identifier for the defect that is being repaired.
fullRepairNamestringThe full repair name, with the path parts delimited by backslashes.
notesstringAdditional 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
testTypeNamestringThe test type name.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOperator-entered notes about the test.
extendedDataIDictionary<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
testTypeNameis null.- ArgumentNullException
extendedDatais 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
testTypeNamestringThe test type name.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOperator-entered notes about the test.
dataXmlstringTest-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
testTypeNameis 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
testTypeNamestringThe test type name.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOperator-entered notes about the test.
extendedDataIDictionary<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
testTypeNameis null.- ArgumentNullException
extendedDatais 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
testTypeNamestringThe test type name.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOperator-entered notes about the test.
dataXmlstringTest-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
testTypeNameis 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
buyoffNamestringThe 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
buyoffNameis 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
buyoffNamestringThe 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
buyoffNameis 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
testTypeNamestringThe test type name.
cancellationTokenCancellationTokenThe cancellation token used to request canceling the test workflow.
Returns
- Task
The task object representing the asynchronous operation.
Exceptions
- ArgumentNullException
testTypeNameis null.- InvalidOperationException
This unit is no longer at the station.
- InvalidOperationException
There is no test workflow defined for
testTypeName.- InvalidOperationException
The test workflow for
testTypeNameis 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
unitTestIdintThe identifier of the test to override.
workerIdintThe identifier of the worker performing the override.
notesstringOptional 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
unitTestIdintThe identifier of the test to override.
workerIdintThe identifier of the worker performing the override.
notesstringOptional 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
componentTypeNamestringThe component type name.
Returns
- ComponentStatus
A ComponentStatus object representing the result.
Exceptions
- ArgumentNullException
componentTypeNameis 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
componentTypeNamestringThe 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
componentTypeNameis 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
componentTypeNamestringThe 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
componentTypeNameis 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
componentTypeNamestringThe 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
componentTypeNameis 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
buyoffNamestringThe 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
buyoffNameis 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
buyoffNamestringThe 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
buyoffNameis 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
componentTypeNamestringThe component type name.
componentSerialNumberstringThe component serial number to verify. This can be null or blank if no serial number was scanned for the component.
componentModelNumberstringThe 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
componentTypeNameis 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
componentTypeNamestringThe component type name.
componentSerialNumberstringThe component serial number to verify. This can be null or blank if no serial number was scanned for the component.
componentModelNumberstringThe 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
componentTypeNameis 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.