Table of Contents

Interface IRunningStation

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

Represents a running station.

public interface IRunningStation : INotifyPropertyChanged
Inherited Members
Extension Methods

Remarks

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

Properties

IsStopped

Gets whether this IRunningStation instance has been stopped. When the station be restarted, a new instance will be created and should be obtained via RunningStation.

bool IsStopped { get; }

Property Value

bool

LineName

Gets the line name.

string LineName { get; }

Property Value

string

ProductionCounts

Gets the latest production count information for the line, or null if the production counts are not available.

ProductionCounts? ProductionCounts { get; }

Property Value

ProductionCounts

StationName

Gets the station name.

string StationName { get; }

Property Value

string

StationSettings

Gets the station settings.

StationSettings StationSettings { get; }

Property Value

StationSettings

StationTypeName

Gets the station type name.

string StationTypeName { get; }

Property Value

string

WorkerAtStation

Gets the IWorkerAtStation representing the worker logged on at the station (including for stations with an automatic worker logon configured), or null if no worker is logged on at the station.

IWorkerAtStation? WorkerAtStation { get; }

Property Value

IWorkerAtStation

WorkstationState

Gets the associated workstation state.

IWorkstationState WorkstationState { get; }

Property Value

IWorkstationState

Methods

AuthenticateWorker(string?, string?)

Authenticates a worker.

AuthenticateWorkerStatus AuthenticateWorker(string? badgeNumber, string? password)

Parameters

badgeNumber string

The worker's badge number, or null to validate using password only.

password string

The worker's password, or null to validate using badgeNumber only.

Returns

AuthenticateWorkerStatus

An AuthenticateWorkerStatus object representing the status.

Remarks

Either badgeNumber or password can be null or empty to only validate using the other parameter, but both cannot be null or empty.

Exceptions

InvalidOperationException

This station is no longer running.

Exception

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

AuthenticateWorkerAsync(string?, string?)

Authenticates a worker.

Task<AuthenticateWorkerStatus> AuthenticateWorkerAsync(string? badgeNumber, string? password)

Parameters

badgeNumber string

The worker's badge number, or null to validate using password only.

password string

The worker's password, or null to validate using badgeNumber only.

Returns

Task<AuthenticateWorkerStatus>

The task object representing the asynchronous operation.

Remarks

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

Either badgeNumber or password can be null or empty to only validate using the other parameter, but both cannot be null or empty.

Exceptions

InvalidOperationException

This station is no longer running.

Exception

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

GetComponentScanSettings(string)

Gets the item scan settings for a component type, as configured for this station type.

ItemScanSettings GetComponentScanSettings(string componentTypeName)

Parameters

componentTypeName string

The component type name.

Returns

ItemScanSettings

A new ItemScanSettings with the item scan settings.

Remarks

These settings can be used with StartScanningItem(ItemScanSettings).

Exceptions

ArgumentNullException

componentTypeName is null.

ArgumentException

The componentTypeName component type is not configured to be scanned at this station.

GetUnitScanSettings()

Gets the item scan settings for units, as configured for this station type.

ItemScanSettings GetUnitScanSettings()

Returns

ItemScanSettings

A new ItemScanSettings with the item scan settings.

Remarks

These settings can be used with StartScanningItem(ItemScanSettings).

ShowAlert(Alert)

Shows an alert at the station.

void ShowAlert(Alert alert)

Parameters

alert Alert

The alert.

Remarks

If the station is automated, the message is shown as an alarm. Otherwise, the message is shown via a warning message box.

Exceptions

ArgumentNullException

alert is null.

InvalidOperationException

This station is no longer running.

ShowAuthenticateWorkerDialog(string?, string?)

Prompts for worker credentials via a dialog box.

Worker? ShowAuthenticateWorkerDialog(string? title = null, string? message = null)

Parameters

title string

The title to use for the dialog box title, or null to use the default "Not Authorized".

message string

The message to use in the dialog box title, or null to use the default "You are not authorization to perform this action. Please enter alternate credentials with sufficient authorization."

Returns

Worker

A Worker for the authenticated worker, or null if the worker authentication prompt was canceled by the user. When connecting to Acuit Pinpoint versions older than 6.200, Groups will not be populated.

Exceptions

InvalidOperationException

This station is no longer running.

Exception

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

TryAuthorizeAcknowledgeAlert(int, out AuthorizedWorker?)

Tries to get authorization to acknowledge an alert, prompting for alternate credentials if necessary.

bool TryAuthorizeAcknowledgeAlert(int alertId, out AuthorizedWorker? authorizedWorker)

Parameters

alertId int

The alert id.

authorizedWorker AuthorizedWorker

On return, will contain information about the authorized worker if successful, or null if not.

Returns

bool

true if the worker (or another via alternate credentials) is authorized for the station permission, or false if the user canceled or an error occurred.

Remarks

If there is a worker logged onto the station, this will first attempt to authorize that worker. If that authorization fails, then a prompt for alternate worker credentials will appear.

A "please wait" window with a cancel button will be shown while the authorization check is being performed. If a communication error occurs when checking authorization, an error message box will be displayed and the method will return false.

Exceptions

InvalidOperationException

This station is no longer running.

Exception

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

TryAuthorizeComponentTypePermission(string, string, out AuthorizedWorker?)

Tries to get authorization for a component type permission, prompting for alternate credentials if necessary.

bool TryAuthorizeComponentTypePermission(string componentTypeName, string permission, out AuthorizedWorker? authorizedWorker)

Parameters

componentTypeName string

The component type name.

permission string

The permission to check.

authorizedWorker AuthorizedWorker

On return, will contain information about the authorized worker if successful, or null if not.

Returns

bool

true if the worker (or another via alternate credentials) is authorized for the station permission, or false if the user canceled or an error occurred.

Remarks

If there is a worker logged onto the station, this will first attempt to authorize that worker. If that authorization fails, then a prompt for alternate worker credentials will appear.

A "please wait" window with a cancel button will be shown while the authorization check is being performed. If a communication error occurs when checking authorization, an error message box will be displayed and the method will return false.

Exceptions

ArgumentNullException

componentTypeName is null.

ArgumentNullException

permission is null.

InvalidOperationException

This station is no longer running.

Exception

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

TryAuthorizeOverrideTest(int, out AuthorizedWorker?)

Tries to get authorization to override a failed test result, prompting for alternate credentials if necessary.

bool TryAuthorizeOverrideTest(int unitTestId, out AuthorizedWorker? authorizedWorker)

Parameters

unitTestId int

The id of the test to override.

authorizedWorker AuthorizedWorker

On return, will contain information about the authorized worker if successful, or null if not.

Returns

bool

true if the worker (or another via alternate credentials) is authorized for the station permission, or false if the user canceled or an error occurred.

Remarks

If there is a worker logged onto the station, this will first attempt to authorize that worker. If that authorization fails, then a prompt for alternate worker credentials will appear.

A "please wait" window with a cancel button will be shown while the authorization check is being performed. If a communication error occurs when checking authorization, an error message box will be displayed and the method will return false.

Exceptions

InvalidOperationException

This station is no longer running.

Exception

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

TryAuthorizeStationPermission(string, out AuthorizedWorker?)

Tries to get authorization for a station permission, prompting for alternate credentials if necessary.

bool TryAuthorizeStationPermission(string permission, out AuthorizedWorker? authorizedWorker)

Parameters

permission string

The station permission to check.

authorizedWorker AuthorizedWorker

On return, will contain information about the authorized worker if successful, or null if not.

Returns

bool

true if the worker (or another via alternate credentials) is authorized for the station permission, or false if the user canceled or an error occurred.

Remarks

If there is a worker logged onto the station, this will first attempt to authorize that worker. If that authorization fails, then a prompt for alternate worker credentials will appear.

A "please wait" window with a cancel button will be shown while the authorization check is being performed. If a communication error occurs when checking authorization, an error message box will be displayed and the method will return false.

Exceptions

ArgumentNullException

permission is null.

InvalidOperationException

This station is no longer running.

Exception

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

TryLogOnWorkerAsync(string?, string?, CancellationToken)

Tries to log a worker on to the station.

Task<bool> TryLogOnWorkerAsync(string? badgeNumber, string? password, CancellationToken cancellationToken = default)

Parameters

badgeNumber string

The worker's badge number, or null to validate using password only or when the station is configured for automatic worker logon.

password string

The worker's password, or null to validate using badgeNumber only or when the station is configured for automatic worker logon.

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 authenticated and logged on to the station, or false if the worker was not authenticated or the log on 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).

Exceptions

ArgumentException

badgeNumber was provided, but the station is configured for automatic worker logon.

ArgumentException

password was provided, but the station is configured for automatic worker logon.

InvalidOperationException

This station is no longer running.

InvalidOperationException

A worker is already logged on to the station.

Exception

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

TryStopStationAsync(CancellationToken)

Tries to stop the station.

Task<bool> TryStopStationAsync(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 station was successfully stopped; otherwise, false (e.g., a plug-in canceled a unit release that would occur as part of the station stop process).

Exceptions

InvalidOperationException

This station is no longer running.