Class ScanComponentMessage
- Namespace
- Acuit.Pinpoint.Workstation.Messaging
- Assembly
- Acuit.Pinpoint.Workstation.Abstractions.dll
The message raised by the IMessenger service when a component scan is initiated for the unit at the station. This can happen due to the unit workflow automatically prompting for a component scan, or due to the operator initiating a component scan.
public class ScanComponentMessage : WorkstationRequestMessage<ScanComponentResult?>, IWorkstationRequestMessage
- Inheritance
-
ScanComponentMessage
- Implements
- Inherited Members
Remarks
By default, Acuit Pinpoint Workstation will handle this message when a unit is at the station and ComponentTypeName matches a component that can be scanned at the station by doing the following:
- If a component scan is already underway, it will reply with null.
- Otherwise, if an invalid component is already installed for the component type, obtain authorization as necessary to rescan the component. If authorization is not obtained, it will reply with null.
- Otherwise, show the component scan prompt, collect the component number(s), and submit the component scan to Acuit Pinpoint for verification and recording, according to ScanOptions and the component type configuration in the Acuit Pinpoint line. If the line is configured to not allow invalid components, then if the component scan is rejected as invalid, the component scan will not be recorded and the component scan window will continue to prompt for a valid component scan. Otherwise, the component scan is recorded (whether invalid or not), and the component scan window is dismissed. If a communication error occurs when submitting the component scan to Acuit Pinpoint, the error will be shown in the component scan window and it will continue to prompt, allowing the scan to be retried.
If the component scan was recorded, the message Response will contain a ScanComponentResult with UnitComponent set to the unit component result; if the component scan was canceled, it will contain a ScanComponentResult with IsCanceled set to true.
A plug-in can customize the default behavior by registering a recipient for this message. To suppress the default behavior, the plug-in should use Reply(T) to set the response to the message.
A plug-in can emulate the operator action that this message represents by sending this message.
Constructors
ScanComponentMessage(string, ScanComponentOptions)
Initializes a new instance of the ScanComponentMessage class.
public ScanComponentMessage(string componentTypeName, ScanComponentOptions scanOptions)
Parameters
componentTypeNamestringThe component type name.
scanOptionsScanComponentOptionsThe component scan options.
Exceptions
- ArgumentNullException
componentTypeNameis null.- ArgumentNullException
scanOptionsis null.
Properties
ComponentTypeName
Gets the component type name.
public string ComponentTypeName { get; }
Property Value
ScanOptions
Gets the component scan options.
public ScanComponentOptions ScanOptions { get; }