Table of Contents

Interface IWorkerAtStation

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

Represents a worker at the station.

public interface IWorkerAtStation : INotifyPropertyChanged
Inherited Members

Remarks

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

Properties

IsLoggedOff

Gets whether the worker has logged off from the worker session represented by this instance.

bool IsLoggedOff { get; }

Property Value

bool

RunningStation

Gets the IRunningStation representing the running station.

IRunningStation RunningStation { get; }

Property Value

IRunningStation

UnitAtStation

Gets the IUnitAtStation representing the unit currently at the station, or null if no unit is currently at the station.

IUnitAtStation? UnitAtStation { get; }

Property Value

IUnitAtStation

Worker

Gets the worker.

Worker Worker { get; }

Property Value

Worker

WorkerLogOnStatus

Gets the status returned from Acuit Pinpoint when the worker logged on.

WorkerLogOnStatus WorkerLogOnStatus { get; }

Property Value

WorkerLogOnStatus

Methods

TryLogOffWorkerAsync(CancellationToken)

Tries to log off the worker from the station.

Task<bool> TryLogOffWorkerAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token that can request cancellation.

Returns

Task<bool>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains true if the worker was logged off from the station, or false if the log off was canceled (e.g., by a plug-in requesting cancellation of the logon process; not due to cancellationToken being signaled, which would result in this asynchronous task completing as canceled).

If an error occurs reporting the worker log off to Acuit Pinpoint, the error will be reported at the station via a new alarm, but the worker will still be logged off locally.

Exceptions

InvalidOperationException

The worker is no longer logged on at the station.

TrySelectNewAutoGenerateSerialPreassemblyAsync(string, string?, CancellationToken)

Tries to select a new preassembly with an auto-generated serial number.

Task<IUnitAtStation?> TrySelectNewAutoGenerateSerialPreassemblyAsync(string componentModelNumber, string? unitModelNumber, CancellationToken cancellationToken = default)

Parameters

componentModelNumber string

The component model number.

unitModelNumber string

The model number of the unit. This may be null or an empty string if the station type is configured to automatically assign a unit model number.

cancellationToken CancellationToken

A token that can request cancellation.

Returns

Task<IUnitAtStation>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains an IUnitAtStation representing the selected unit if the unit was selected, or null if the unit selection was canceled (e.g., by a plug-in requesting cancellation; not due to cancellationToken being signaled, which would result in this asynchronous task completing as canceled). Note that, depending on the logic configured for the station, the unit could potentially already be released from the station.

Exceptions

ArgumentNullException

componentModelNumber is null.

InvalidOperationException

The worker is no longer logged on at the station.

InvalidOperationException

There is already a unit at the station.

ArgumentException

The unit model number does not match the model number defined for this station type.

Exception

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

TrySelectNewAutoGenerateSerialUnitAsync(string, CancellationToken)

Tries to select a new unit with an auto-generated serial number.

Task<IUnitAtStation?> TrySelectNewAutoGenerateSerialUnitAsync(string modelNumber, CancellationToken cancellationToken = default)

Parameters

modelNumber string

The unit model number.

cancellationToken CancellationToken

A token that can request cancellation.

Returns

Task<IUnitAtStation>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains an IUnitAtStation representing the selected unit if the unit was selected, or null if the workstation is being restarted due to a line-switch fault from Acuit Pinpoint Server or if the unit selection was canceled (e.g., by a plug-in requesting cancellation; not due to cancellationToken being signaled, which would result in this asynchronous task completing as canceled). Note that, depending on the logic configured for the station, the unit could potentially already be released from the station.

Exceptions

ArgumentNullException

modelNumber is null.

InvalidOperationException

The worker is no longer logged on at the station.

InvalidOperationException

There is already a unit at the station.

ArgumentException

The model number does not match the model number defined for this station type.

Exception

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

TrySelectPreassemblyAsync(string, string?, string?, string?, int?, CancellationToken)

Tries to select a preassembly.

Task<IUnitAtStation?> TrySelectPreassemblyAsync(string componentSerialNumber, string? componentModelNumber, string? unitModelNumber, string? productionGroupName = null, int? sequenceNumber = null, CancellationToken cancellationToken = default)

Parameters

componentSerialNumber string

The component serial number.

componentModelNumber string

The component model number. This may be null or an empty string if the unit record already exists or if the component type does not scan component model numbers. This must be specified if the component type is configured for uniqueSerialNumbersPerPartNumber.

unitModelNumber string

The model number of the unit. This may be null or an empty string if the unit record already exists or if the station type is configured to automatically assign a unit model number. If this is provided and the unit record already exists, this must match the value for the existing unit.

productionGroupName string

The optional production group name to assign to a new unit. If this is provided and the unit record already exists, this must match the value for the existing unit.

sequenceNumber int?

The optional production sequence number to assign to a new unit. If this is provided and the unit record already exists, this must match the value for the existing unit.

cancellationToken CancellationToken

A token that can request cancellation.

Returns

Task<IUnitAtStation>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains an IUnitAtStation representing the selected unit if the unit was selected, or null if the unit selection was canceled (e.g., by a plug-in requesting cancellation; not due to cancellationToken being signaled, which would result in this asynchronous task completing as canceled). Note that, depending on the logic configured for the station, the unit could potentially already be released from the station.

Note that if this is used to create a new preassembly, any productionGroupName or sequenceNumber values provided to this method will be discarded when the preassembly is later merged into a unit, but these values can be useful for providing to label templates when the preassembly is created.

Exceptions

ArgumentNullException

componentSerialNumber is null.

InvalidOperationException

The worker is no longer logged on at the station.

InvalidOperationException

There is already a unit at the station.

ArgumentException

The unit model number does not match the model number defined for this station type.

Exception

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

TrySelectUnitAsync(string, string?, CancellationToken)

Tries to select a unit.

Task<IUnitAtStation?> TrySelectUnitAsync(string serialNumber, string? modelNumber, CancellationToken cancellationToken = default)

Parameters

serialNumber string

The unit serial number.

modelNumber string

The unit model number. This can be null or an empty string if the unit record already exists.

cancellationToken CancellationToken

A token that can request cancellation.

Returns

Task<IUnitAtStation>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains an IUnitAtStation representing the selected unit if the unit was selected, or null if the workstation is being restarted due to a line-switch fault from Acuit Pinpoint Server or if the unit selection was canceled (e.g., by a plug-in requesting cancellation; not due to cancellationToken being signaled, which would result in this asynchronous task completing as canceled). Note that, depending on the logic configured for the station, the unit could potentially already be released from the station.

Exceptions

ArgumentNullException

serialNumber is null.

InvalidOperationException

The worker is no longer logged on at the station.

InvalidOperationException

There is already a unit at the station.

ArgumentException

The model number does not match the model number defined for this station type.

Exception

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

TrySelectUnitModelAsync(string, CancellationToken)

Tries to select a unit model, for non-serialized stations.

Task<IUnitAtStation?> TrySelectUnitModelAsync(string modelNumber, CancellationToken cancellationToken = default)

Parameters

modelNumber string

The unit model number.

cancellationToken CancellationToken

A token that can request cancellation.

Returns

Task<IUnitAtStation>

The task object representing the asynchronous operation.

Remarks

Once the operation completes, the Result property on the returned task object contains an IUnitAtStation representing the selected unit if the unit was selected, or null if the workstation is being restarted due to a line-switch fault from Acuit Pinpoint Server or if the unit selection was canceled (e.g., by a plug-in requesting cancellation; not due to cancellationToken being signaled, which would result in this asynchronous task completing as canceled). Note that, depending on the logic configured for the station, the unit could potentially already be released from the station.

Note that the returned unit will not represent a unit in the database; it will simply reflect the unit model number.

Exceptions

ArgumentNullException

modelNumber is null.

InvalidOperationException

The worker is no longer logged on at the station.

InvalidOperationException

There is already a unit at the station.

ArgumentException

The model number does not match the model number defined for this station type.

Exception

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