Class SimpleStation
A station helper that simplifies recording unit operations in Acuit Pinpoint.
public class SimpleStation : IDisposable
- Inheritance
-
SimpleStation
- Implements
- Inherited Members
Remarks
Each action performed by this class is standalone and independent of any other action, so that clients can easily record things like test results or component scans again units without having to maintain any state between actions. Each action is recorded as part of a separate unit scan at the simple station. This is not appropriate when multiple actions need to be recorded as part of a single unit scan, or when accurate history about when a unit enters and leaves a station is desired.
The lifetime of this object is up to the client; a new instance can be created for each action, or a single instance can be reused for multiple actions. However, station settings are retrieved from Acuit Pinpoint only once, so to force a refresh of station settings (e.g., should the station type configuration be changed in Acuit Pinpoint), a new instance must be created. Normally, it is more efficient to create a single instance of this class and reuse it for multiple actions, to avoid retrieving station settings multiple times (which is a relatively expensive operation). Requiring users to close and restart the client application when station settings change is usually acceptable.
This class is thread-safe; operations are serialized (actions initiated while a previous action is still operating wait until the previous action completes). This helps ensure that unit histories in Acuit Pinpoint are sensible.
Constructors
SimpleStation(SimpleStationOptions)
Initializes a new instance of the SimpleStation class.
public SimpleStation(SimpleStationOptions options)
Parameters
optionsSimpleStationOptionsThe options.
Exceptions
- ArgumentNullException
optionsis null.
Methods
AddTestResult(string, string?, string, bool, string?, string?, IEnumerable<CustomTestDataItem>?)
Adds a unit test result.
public AddTestResultStatus AddTestResult(string serialNumber, string? modelNumber, string testName, bool passed, string? reason, string? notes, IEnumerable<CustomTestDataItem>? testDataItems)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
testNamestringThe name of the test.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOptional additional notes about the test. This can be null or empty.
testDataItemsIEnumerable<CustomTestDataItem>The optional test data items, as a sequence of CustomTestDataItem objects. This can be null if there are no test data items.
Returns
- AddTestResultStatus
An AddTestResultStatus object representing the status.
Remarks
This will perform a unit scan at the station, add the test result, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
If releasing the unit fails, an exception will be thrown but the test result will still have been added to the unit record.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
testNameis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
testNamedoes not refer to a configured test name.- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
AddTestResult(string, string?, string, bool, string?, string?, IDictionary)
Adds a unit test result, getting the test data items from a dictionary.
public AddTestResultStatus AddTestResult(string serialNumber, string? modelNumber, string testName, bool passed, string? reason, string? notes, IDictionary testDataItems)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
testNamestringThe name of the test.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOptional additional notes about the test. This can be null or empty.
testDataItemsIDictionaryA dictionary containing the test data items. For each item in the dictionary, the key, converted to a string using the invariant culture, will be used as the test data item name, and the value, converted to a string using the invariant culture, will be used as the test data item value.
Returns
- AddTestResultStatus
An AddTestResultStatus object representing the status.
Remarks
This will perform a unit scan at the station, add the test result, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
If releasing the unit fails, an exception will be thrown but the test result will still have been added to the unit record.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
testNameis null.- ArgumentNullException
testDataItemsis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
testNamedoes not refer to a configured test name.- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
AddTestResultAsync(string, string?, string, bool, string?, string?, IEnumerable<CustomTestDataItem>?, CancellationToken)
Adds a unit test result.
public Task<AddTestResultStatus> AddTestResultAsync(string serialNumber, string? modelNumber, string testName, bool passed, string? reason, string? notes, IEnumerable<CustomTestDataItem>? testDataItems, CancellationToken cancellationToken)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
testNamestringThe name of the test.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOptional additional notes about the test. This can be null or empty.
testDataItemsIEnumerable<CustomTestDataItem>The optional test data items, as a sequence of CustomTestDataItem objects. This can be null if there are no test data items.
cancellationTokenCancellationTokenA token that can request cancellation.
Returns
- Task<AddTestResultStatus>
The task object representing the asynchronous operation.
Remarks
Once the operation completes, the Result property on the returned task object contains an AddTestResultStatus object representing the status.
This will perform a unit scan at the station, add the test result, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
If releasing the unit fails, an exception will be thrown but the test result will still have been added to the unit record.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
testNameis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
testNamedoes not refer to a configured test name.- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
AddTestResultAsync(string, string?, string, bool, string?, string?, IDictionary, CancellationToken)
Adds a unit test result, getting the test data items from a dictionary.
public Task<AddTestResultStatus> AddTestResultAsync(string serialNumber, string? modelNumber, string testName, bool passed, string? reason, string? notes, IDictionary testDataItems, CancellationToken cancellationToken)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
testNamestringThe name of the test.
passedboolWhether the test passed.
reasonstringThe reason for a failed test. This can be null if the test passed.
notesstringOptional additional notes about the test. This can be null or empty.
testDataItemsIDictionaryA dictionary containing the test data items. For each item in the dictionary, the key, converted to a string using the invariant culture, will be used as the test data item name, and the value, converted to a string using the invariant culture, will be used as the test data item value.
cancellationTokenCancellationTokenA token that can request cancellation.
Returns
- Task<AddTestResultStatus>
The task object representing the asynchronous operation.
Remarks
Once the operation completes, the Result property on the returned task object contains an AddTestResultStatus object representing the status.
This will perform a unit scan at the station, add the test result, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
If releasing the unit fails, an exception will be thrown but the test result will still have been added to the unit record.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
testNameis null.- ArgumentNullException
testDataItemsis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
testNamedoes not refer to a configured test name.- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
ComponentScanned(string, string?, string, string?, string?)
Indicates that a unit component was scanned at a station, and checks whether the component is acceptable.
public ComponentStatus ComponentScanned(string serialNumber, string? modelNumber, string componentTypeName, string? componentSerialNumber, string? componentModelNumber)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
componentTypeNamestringThe component type name.
componentSerialNumberstringThe component serial number to verify. This can be null or empty if no serial number was scanned for the component.
componentModelNumberstringThe component model number to verify. This can be null or empty if no model number was scanned for the component. See remarks for "checkInstalledOnly" components.
Returns
- ComponentStatus
A ComponentStatus object representing the results.
Remarks
This will perform a unit scan at the station, perform the component scan and verification, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
If releasing the unit fails, an exception will be thrown but the component scan will still have been performed against the unit.
See the remarks for ComponentScanned3(string, int, string, string?, string?) for additional information.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
componentTypeNameis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
componentSerialNumbercontains one or more invalid characters.- FaultException<TDetail>
componentModelNumbercontains one or more invalid characters.- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
ComponentScannedAsync(string, string?, string, string?, string?, CancellationToken)
Indicates that a unit component was scanned at a station, and checks whether the component is acceptable.
public Task<ComponentStatus> ComponentScannedAsync(string serialNumber, string? modelNumber, string componentTypeName, string? componentSerialNumber, string? componentModelNumber, CancellationToken cancellationToken)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
componentTypeNamestringThe component type name.
componentSerialNumberstringThe component serial number to verify. This can be null or empty if no serial number was scanned for the component.
componentModelNumberstringThe component model number to verify. This can be null or empty if no model number was scanned for the component. See remarks for "checkInstalledOnly" components.
cancellationTokenCancellationTokenA token that can request cancellation.
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 results.
This will perform a unit scan at the station, perform the component scan and verification, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
If releasing the unit fails, an exception will be thrown but the component scan will still have been performed against the unit.
See the remarks for ComponentScanned3(string, int, string, string?, string?) for additional information.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
componentTypeNameis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
componentSerialNumbercontains one or more invalid characters.- FaultException<TDetail>
componentModelNumbercontains one or more invalid characters.- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Closes and releases all resources used by the object.
protected virtual void Dispose(bool disposing)
Parameters
Remarks
Derived classes should override this when they have any resources that should be disposed.
When Dispose() is called on the object, Dispose(bool) will be called with true for the parameter value.
PerformUnitAction(string, string?, Action<SimpleStationUnit, IPinpointService>)
Performs one or more actions on a unit. This can be used to perform actions not supported by other methods of this class, or to perform multiple actions at once within the context of a single unit scan.
public void PerformUnitAction(string serialNumber, string? modelNumber, Action<SimpleStationUnit, IPinpointService> action)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
actionAction<SimpleStationUnit, IPinpointService>A delegate for the action to perform. The parameters supplied to the delegate are (1) a SimpleStationUnit with information about an active unit, and (2) an IPinpointService that can be used to access the Acuit Pinpoint service.
Remarks
This will perform a unit scan at the station, invoke action, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
actionis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
- Exception
Any exception thrown by
action.
PerformUnitActionAsync(string, string?, Func<SimpleStationUnit, IPinpointService, CancellationToken, Task>, CancellationToken)
Performs one or more actions on a unit. This can be used to perform actions not supported by other methods of this class, or to perform multiple actions at once within the context of a single unit scan.
public Task PerformUnitActionAsync(string serialNumber, string? modelNumber, Func<SimpleStationUnit, IPinpointService, CancellationToken, Task> action, CancellationToken cancellationToken)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
actionFunc<SimpleStationUnit, IPinpointService, CancellationToken, Task>A delegate for the asynchronous action to perform. The parameters supplied to the delegate are (1) a SimpleStationUnit with information about an active unit, and (2) an IPinpointService that can be used to access the Acuit Pinpoint service, and (3) the cancellation token provided by
cancellationToken, and it should return a task object representing the asynchronous operation.cancellationTokenCancellationTokenA token that can request cancellation.
Returns
- Task
The task object representing the asynchronous operation.
Remarks
This will perform a unit scan at the station, invoke action, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
actionis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
- Exception
Any exception thrown by
action.
PerformUnitActionAsync<TResult>(string, string?, Func<SimpleStationUnit, IPinpointService, CancellationToken, Task<TResult>>, CancellationToken)
Performs one or more actions on a unit. This can be used to perform actions not supported by other methods of this class, or to perform multiple actions at once within the context of a single unit scan.
public Task<TResult> PerformUnitActionAsync<TResult>(string serialNumber, string? modelNumber, Func<SimpleStationUnit, IPinpointService, CancellationToken, Task<TResult>> action, CancellationToken cancellationToken)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
actionFunc<SimpleStationUnit, IPinpointService, CancellationToken, Task<TResult>>A delegate for the asynchronous action to perform. The parameters supplied to the delegate are (1) a SimpleStationUnit with information about an active unit, and (2) an IPinpointService that can be used to access the Acuit Pinpoint service, and (3) the cancellation token provided by
cancellationToken, and it should return a task object representing the asynchronous operation which will produce a result value of typeTResult.cancellationTokenCancellationTokenA token that can request cancellation.
Returns
- Task<TResult>
The task object representing the asynchronous operation.
Type Parameters
TResultThe type of the returned value.
Remarks
Once the operation completes, the Result property on the returned task object contains the result value produced by
action.
This will perform a unit scan at the station, invoke action, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
actionis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
- Exception
Any exception thrown by
action.
PerformUnitAction<TResult>(string, string?, Func<SimpleStationUnit, IPinpointService, TResult>)
Performs one or more actions on a unit. This can be used to perform actions not supported by other methods of this class, or to perform multiple actions at once within the context of a single unit scan.
public TResult PerformUnitAction<TResult>(string serialNumber, string? modelNumber, Func<SimpleStationUnit, IPinpointService, TResult> action)
Parameters
serialNumberstringThe serial number of the unit.
modelNumberstringThe model number of the unit. This may be null (with Acuit Pinpoint versions 6.229.27 and later) or empty if the unit record already exists.
actionFunc<SimpleStationUnit, IPinpointService, TResult>A delegate for the action to perform. The parameters supplied to the delegate are (1) a SimpleStationUnit with information about an active unit, and (2) an IPinpointService that can be used to access the Acuit Pinpoint service, and it should return a value of type
TResult.
Returns
- TResult
The value returned by
action.
Type Parameters
TResultThe type of the returned value.
Remarks
This will perform a unit scan at the station, invoke action, and then release the unit from the station.
For stations configured as preassembly stations in Acuit Pinpoint, serialNumber will be used as the preassembly component serial
number, and modelNumber will be used as the preassembly component model number and as the unit model number.
Exceptions
- ArgumentNullException
serialNumberis null.- ArgumentNullException
actionis null.- InvalidOperationException
The station options are invalid.
- FaultException<TDetail>
The LineName station option does not refer to an existing line.
- FaultException<TDetail>
The StationTypeName station option does not refer to an existing station type.
- FaultException<TDetail>
The station is not configured for automatic worker logon, but neither WorkerBadgeNumber nor WorkerPassword were specified.
- AuthenticationException
Worker authentication failed.
- FaultException<TDetail>
serialNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbercontains one or more invalid characters.- FaultException<TDetail>
modelNumbermust be null or empty whenserialNumbercontains wildcards.- FaultException<TDetail>
A line switch must occur to scan the unit.
- FaultException<TDetail>
A business logic error occurred.
- UnitWorkflowErrorsException
One or more workflow errors occurred during the unit scan.
- CommunicationException
A communication error occurred.
- TimeoutException
A communication timeout error occurred.
- ObjectDisposedException
The object has been disposed.
- Exception
Any exception thrown by
action.