Interface IUnitAtStationService
- Namespace
- Acuit.Pinpoint.Workstation
- Assembly
- Acuit.Pinpoint.Workstation.Interfaces.dll
A service that provides information about the unit at the station.
public interface IUnitAtStationService : INotifyPropertyChanged
- Inherited Members
Properties
Unit
Gets the unit at the station, or null if there is no unit at the station.
Unit Unit { get; }
Property Value
Remarks
This will only be set while a unit is being processed (i.e., while the scan is being processed or while the unit is at the station). Once the unit is released, this will be set to null.
This not kept updated on the workstation as changes are made from other stations.
UnitScannedStatus
Gets the status returned from Acuit Pinpoint Server when the unit was scanned, or null if there is no unit at the station.
UnitScanStatus UnitScannedStatus { get; }
Property Value
UnitStation
Gets the UnitStation object representing the unit at the station, or null if no unit is at the station.
UnitStation UnitStation { get; }
Property Value
Remarks
When a unit is scanned, this will not be set until after UnitScanned is raised, and then only if the unit is not immediately released from the station due to business logic. When a unit is released, this will not change to null until after UnitReleased is raised. While handling UnitScanned, the UnitStation value can be obtained via UnitScannedStatus.UnitStation.
Methods
AddDefect(string, string)
Adds a defect for the unit at the station.
UnitDefect AddDefect(string fullDefectName, string notes)
Parameters
fullDefectName
stringThe full defect name, with the path parts delimited by backslashes.
notes
stringAdditional 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 Server, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.
Exceptions
- ArgumentNullException
fullDefectName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
AddPreassembly(string, string, string)
Records a preassembly into the unit at the station.
ScanPreassemblyStatus AddPreassembly(string componentTypeName, string componentSerialNumber, string componentModelNumber)
Parameters
componentTypeName
stringThe component type name.
componentSerialNumber
stringThe component serial number.
componentModelNumber
stringThe 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. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Remarks
This can take some time since it must contact Acuit Pinpoint Server, 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
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
AddPreassemblyAsync(string, string, string)
Records a preassembly into the unit at the station.
Task<ScanPreassemblyStatus> AddPreassemblyAsync(string componentTypeName, string componentSerialNumber, string componentModelNumber)
Parameters
componentTypeName
stringThe component type name.
componentSerialNumber
stringThe component serial number.
componentModelNumber
stringThe 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>
A task that represents the asynchronous operation. The value of its Result property contains a ScanPreassemblyStatus object representing the result. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Exceptions
- ArgumentNullException
componentTypeName
is null.- ArgumentNullException
componentSerialNumber
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
AddRepair(int, string, string)
Adds a repair to a defect for the unit at the station.
UnitDefectRepair AddRepair(int unitDefectId, string fullRepairName, string notes)
Parameters
unitDefectId
intThe unit defect identifier for the defect that is being repaired.
fullRepairName
stringThe full repair name, with the path parts delimited by backslashes.
notes
stringAdditional 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 Server, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.
Exceptions
- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
AddTestResult(string, bool, string, string, IDictionary<string, string>)
Adds a test result for the unit at the station.
AddTestResultStatus AddTestResult(string testTypeName, bool passed, string reason, string notes, IDictionary<string, string> extendedData)
Parameters
testTypeName
stringThe test type name.
passed
boolWhether the test passed.
reason
stringThe reason for a failed test. This can be null if the test passed.
notes
stringOperator-entered notes about the test.
extendedData
IDictionary<string, string>Extended data associated with the test result. This data is not automatically saved with the test result; a server plug-in is expected to process this information.
Returns
- AddTestResultStatus
Status information. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Remarks
This can take some time since it must contact Acuit Pinpoint Server, 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
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
AddTestResult(string, bool, string, string, string)
Adds a test result for the unit at the station.
AddTestResultStatus AddTestResult(string testTypeName, bool passed, string reason, string notes, string dataXml)
Parameters
testTypeName
stringThe test type name.
passed
boolWhether the test passed.
reason
stringThe reason for a failed test. This can be null if the test passed.
notes
stringOperator-entered notes about the test.
dataXml
stringTest-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. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Remarks
This can take some time since it must contact Acuit Pinpoint Server, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.
Exceptions
- ArgumentNullException
testTypeName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
ClearBuyoff(string)
Clears a buyoff for the unit at the station.
UnitBuyoff ClearBuyoff(string buyoffName)
Parameters
buyoffName
stringThe buyoff name.
Returns
- UnitBuyoff
Status information.
Remarks
This can take some time since it must contact Acuit Pinpoint Server, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.
Exceptions
- ArgumentNullException
buyoffName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
ClearBuyoffAsync(string)
Clears a buyoff for the unit at the station.
Task<UnitBuyoff> ClearBuyoffAsync(string buyoffName)
Parameters
buyoffName
stringThe buyoff name.
Returns
- Task<UnitBuyoff>
A task that represents the asynchronous operation. The value of its Result property contains status information.
Exceptions
- ArgumentNullException
buyoffName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
ExecuteTestWorkflowAsync(string, CancellationToken)
Executes a test workflow.
Task ExecuteTestWorkflowAsync(string testTypeName, CancellationToken cancellationToken = default)
Parameters
testTypeName
stringThe test type name.
cancellationToken
CancellationTokenThe cancellation token used to request canceling the test workflow.
Returns
- Task
A task that represents the asynchronous operation.
Exceptions
- ArgumentNullException
testTypeName
is null.- InvalidOperationException
There is no unit 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.
InitiateComponentScan(string, ComponentScanOptions)
Initiates collecting a component scan, and verifying and recording the component scan for the unit at the station.
void InitiateComponentScan(string componentTypeName, ComponentScanOptions options)
Parameters
componentTypeName
stringThe component type name.
options
ComponentScanOptionsScan component option settings.
Remarks
This will show the component scan window to collect the component numbers, and then once the numbers are collected, submit the component scan to Acuit Pinpoint Server for verification and recording. If the line is configured to not allow invalid components, then if the component scan is rejected as invalid, the component scan will not be recorded and the component scan window will continue to prompt for a valid component scan. Otherwise, the component scan is recorded (whether invalid or not), and the component scan window is dismissed. If a communication error occurs when submitting the component scan to Acuit Pinpoint Server, the error will be shown in the component scan window and it will continue to prompt, allowing the scan to be retried.
Exceptions
- InvalidOperationException
There is no unit at the station.
- InvalidOperationException
The workstation is busy (e.g., it is prompting for a component scan or is displaying a message or dialog box).
- ArgumentNullException
componentTypeName
is null.- ArgumentNullException
options
is null.- InvalidOperationException
There is no unit at the station.
- InvalidOperationException
The workstation is busy (e.g., it is prompting for a component scan or is displaying a message or dialog box).
PerformComponentScanAsync(string, ComponentScanOptions, CancellationToken)
Collects a component scan, and verifies and records the component scan for the unit at the station.
Task<ComponentScanResult> PerformComponentScanAsync(string componentTypeName, ComponentScanOptions options, CancellationToken cancellationToken = default)
Parameters
componentTypeName
stringThe component type name.
options
ComponentScanOptionsScan component option settings.
cancellationToken
CancellationTokenA CancellationToken that can be used to cancel the component scan. This will cancel and dismiss the component scan window; it will not cancel a pending communication with Acuit Pinpoint Server.
Returns
- Task<ComponentScanResult>
A task that represents the asynchronous operation. The value of its Result property contains the result.
Remarks
This will show the component scan window to collect the component numbers, and then once the numbers are collected, submit the component scan to Acuit Pinpoint Server for verification and recording. If the line is configured to not allow invalid components, then if the component scan is rejected as invalid, the component scan will not be recorded and the component scan window will continue to prompt for a valid component scan. Otherwise, the component scan is recorded (whether invalid or not), and the component scan window is dismissed. If a communication error occurs when submitting the component scan to Acuit Pinpoint Server, the error will be shown in the component scan window and it will continue to prompt, allowing the scan to be retried.
Exceptions
- ArgumentNullException
componentTypeName
is null.- ArgumentNullException
options
is null.- ArgumentException
The
componentTypeName
component type is not configured to be scanned at this station.- InvalidOperationException
There is no unit at the station.
- InvalidOperationException
The workstation is busy (e.g., it is prompting for a component scan or is displaying a message or dialog box).
PerformTestOverride(int)
Performs a test override operation for the unit at the station, prompting the operator for confirmation and allowing notes to be entered, and recording the test override.
Override PerformTestOverride(int unitTestId)
Parameters
unitTestId
intThe id of the test to override.
Returns
Remarks
If the operator does not have authorization to override the specified test, then an authentication dialog will first appear so that a different worker who has authorization can provide credentials.
Exceptions
- InvalidOperationException
There is no unit at the station.
ReleaseUnit()
Releases the unit at the station.
bool ReleaseUnit()
Returns
- bool
true if the unit was released, or false if something prevented the unit from being released, such as a running test that could not be canceled.
Exceptions
- InvalidOperationException
There is no unit at the station.
- InvalidOperationException
The workstation is busy (e.g., it is prompting for a component scan or is displaying a message or dialog box).
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
RemoveComponentAsync(string)
Removes a component from the unit at the station.
Task<ComponentStatus> RemoveComponentAsync(string componentTypeName)
Parameters
componentTypeName
stringThe component type name.
Returns
- Task<ComponentStatus>
A task that represents the asynchronous operation. The value of its Result property contains a ComponentStatus object representing the result. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Exceptions
- ArgumentNullException
componentTypeName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
RemovePreassembly(string)
Removes a preassembly from the unit at the station, causing a new preassembly to be created containing the removed components and other associated history.
RemovePreassemblyStatus RemovePreassembly(string componentTypeName)
Parameters
componentTypeName
stringThe component type name.
Returns
- RemovePreassemblyStatus
A RemovePreassemblyStatus object representing the result. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Remarks
This can take some time since it must contact Acuit Pinpoint Server, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.
Exceptions
- ArgumentNullException
componentTypeName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
RemovePreassemblyAsync(string)
Removes a preassembly from the unit at the station, causing a new preassembly to be created containing the removed components and other associated history.
Task<RemovePreassemblyStatus> RemovePreassemblyAsync(string componentTypeName)
Parameters
componentTypeName
stringThe component type name.
Returns
- Task<RemovePreassemblyStatus>
A task that represents the asynchronous operation. The value of its Result property contains a RemovePreassemblyStatus object representing the result. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Exceptions
- ArgumentNullException
componentTypeName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
SetBuyoff(string)
Sets a buyoff for the unit at the station.
UnitBuyoff SetBuyoff(string buyoffName)
Parameters
buyoffName
stringThe buyoff name.
Returns
- UnitBuyoff
Status information.
Remarks
This can take some time since it must contact Acuit Pinpoint Server, so it is recommended to show a wait indication (e.g., via WaitCursor()) while doing this.
Exceptions
- ArgumentNullException
buyoffName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
SetBuyoffAsync(string)
Sets a buyoff for the unit at the station.
Task<UnitBuyoff> SetBuyoffAsync(string buyoffName)
Parameters
buyoffName
stringThe buyoff name.
Returns
- Task<UnitBuyoff>
A task that represents the asynchronous operation. The value of its Result property contains status information.
Exceptions
- ArgumentNullException
buyoffName
is null.- InvalidOperationException
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
VerifyAndAddComponentScan(string, string, string)
Verifies and records a component scan for the unit at the station.
ComponentStatus VerifyAndAddComponentScan(string componentTypeName, string componentSerialNumber, string componentModelNumber)
Parameters
componentTypeName
stringThe component type name.
componentSerialNumber
stringThe component serial number to verify. This can be null or blank if no serial number was scanned for the component.
componentModelNumber
stringThe 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. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Remarks
This can take some time since it must contact Acuit Pinpoint Server, 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
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
VerifyAndAddComponentScanAsync(string, string, string)
Verifies and records a component scan for the unit at the station.
Task<ComponentStatus> VerifyAndAddComponentScanAsync(string componentTypeName, string componentSerialNumber, string componentModelNumber)
Parameters
componentTypeName
stringThe component type name.
componentSerialNumber
stringThe component serial number to verify. This can be null or blank if no serial number was scanned for the component.
componentModelNumber
stringThe 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>
A task that represents the asynchronous operation. The value of its Result property contains a ComponentStatus object representing the result. The UnitStationChanges member of the returned status will not contain any children; they will have already been integrated with the active unit tracked at the station.
Remarks
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
There is no unit at the station.
- CommunicationException
An Acuit Pinpoint Server communication error occurred, or Acuit Pinpoint Server returned a fault.
- TimeoutException
Communication with Acuit Pinpoint Server timed out.
Events
UnitReleased
Occurs when a unit is released.
event EventHandler<UnitReleaseEventArgs> UnitReleased
Event Type
Remarks
This event will only be raised for manned workstations, as automated workstations never enter this state. This event is raised after workflow errors have been processed (i.e., displayed).
Because this executes synchronously, any event subscribers that perform any work that might take some time should show a wait cursor. Acuit Pinpoint Workstation itself does not show one while raising this event.
UnitReleasing
Occurs when a unit is about to be released.
event EventHandler<UnitReleasingEventArgs> UnitReleasing
Event Type
Remarks
This event will only be raised for manned workstations, as automated workstations never enter this state. This event is raised before the unit is actually released (i.e., the unit release is sent to Acuit Pinpoint Server). Note that after receiving this event, the unit release could be canceled for some other reason. The UnitReleased should be used to determine when the unit is actually released.
Because this executes synchronously, any event subscribers that perform any work that might take some time should show a wait cursor. Acuit Pinpoint Workstation itself does not show one while raising this event.
UnitScanError
Occurs when a unit scan error occurs.
event EventHandler<UnitScanErrorEventArgs> UnitScanError
Event Type
UnitScanned
Occurs when a unit is scanned.
event EventHandler<UnitScanEventArgs> UnitScanned
Event Type
Remarks
This event is raised before workflow errors and alerts are processed (i.e., displayed).
When this event is raised, the UnitStation property will still be null. If the unit scan sequence will result in the unit remaining scanned into the station (i.e., it's not an automated station that immediately releases it, and there weren't any workflow errors that cause the unit scan to be aborted), then UnitStation will be set immediately after this event is raised. To access a UnitStation object while handing this event, use the UnitStation property of the Status property of the event arguments--this is the value that UnitStation will be set to. Note that since alerts might be shown via a message box as part of the unit scan sequence, there could be a delay before UnitStation gets set.
Because this executes synchronously, any event subscribers that perform any work that might take some time should show a wait cursor. Acuit Pinpoint Workstation itself does not show one while raising this event.
UnitScanning
Occurs when a unit is being scanned.
event EventHandler<UnitScanningEventArgs> UnitScanning
Event Type
Remarks
A plug-in can use this event to prevent a unit to be inducted into the workstation.
Because this executes synchronously, any event subscribers that perform any work that might take some time should show a wait cursor. Acuit Pinpoint Workstation itself does not show one while raising this event.