Table of Contents

Class RunningStationExtensions

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

Extension members for IRunningStation.

public static class RunningStationExtensions
Inheritance
RunningStationExtensions
Inherited Members

Methods

ShowAlert(IRunningStation, string)

Shows an alert at the station.

public static void ShowAlert(this IRunningStation runningStation, string message)

Parameters

runningStation IRunningStation
message string

The alert message.

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

message is null.

InvalidOperationException

This station is no longer running.

ShowAlerts(IRunningStation, IEnumerable<Alert>)

Shows multiple alerts at the station.

public static void ShowAlerts(this IRunningStation runningStation, IEnumerable<Alert> alerts)

Parameters

runningStation IRunningStation
alerts IEnumerable<Alert>

The alerts to show.

Remarks

If the station is automated, the alerts will be shown as separate alarm. Otherwise, the alerts will be shown via separate warning message boxes.

Exceptions

ArgumentNullException

alerts is null.

InvalidOperationException

This station is no longer running.

TryLogOnAutomaticWorkerAsync(IRunningStation, CancellationToken)

Tries to perform an automatic worker log on to the station.

public static Task<bool> TryLogOnAutomaticWorkerAsync(this IRunningStation runningStation, CancellationToken cancellationToken = default)

Parameters

runningStation IRunningStation
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 automatic worker was logged on to the station, or false if 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

InvalidOperationException

This station is no longer running.

InvalidOperationException

A worker is already logged on to the station.

InvalidOperationException

The station is not configured for automatic worker logon.

Exception

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

get_IsUnitAtStation(IRunningStation)

Gets whether a unit is at the station.

public static bool get_IsUnitAtStation(IRunningStation runningStation)

Parameters

runningStation IRunningStation

Returns

bool

get_IsWorkerAtStation(IRunningStation)

Gets whether a worker is logged on at the station.

public static bool get_IsWorkerAtStation(IRunningStation runningStation)

Parameters

runningStation IRunningStation

Returns

bool

get_RequiredUnitAtStation(IRunningStation)

Gets the IUnitAtStation representing the unit currently at the station, or throws an exception if no unit is currently at the station.

public static IUnitAtStation get_RequiredUnitAtStation(IRunningStation runningStation)

Parameters

runningStation IRunningStation

Returns

IUnitAtStation

Exceptions

InvalidOperationException

There is no worker logged on at the station.

InvalidOperationException

There is no unit at the station.

get_RequiredWorkerAtStation(IRunningStation)

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

public static IWorkerAtStation get_RequiredWorkerAtStation(IRunningStation runningStation)

Parameters

runningStation IRunningStation

Returns

IWorkerAtStation

Exceptions

InvalidOperationException

There is no worker logged on at the station.

get_UnitAtStation(IRunningStation)

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

public static IUnitAtStation? get_UnitAtStation(IRunningStation runningStation)

Parameters

runningStation IRunningStation

Returns

IUnitAtStation