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
runningStationIRunningStationmessagestringThe 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
messageis 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
runningStationIRunningStationalertsIEnumerable<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
alertsis 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
runningStationIRunningStationcancellationTokenCancellationTokenA token that can request cancellation.
Returns
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
runningStationIRunningStation
Returns
get_IsWorkerAtStation(IRunningStation)
Gets whether a worker is logged on at the station.
public static bool get_IsWorkerAtStation(IRunningStation runningStation)
Parameters
runningStationIRunningStation
Returns
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
runningStationIRunningStation
Returns
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
runningStationIRunningStation
Returns
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
runningStationIRunningStation