Class ScanHead
An interface to a physical scan head.
Implements
Inherited Members
Namespace: JoeScan.Pinchot
Assembly: JoeScan.Pinchot.dll
Syntax
public class ScanHead : IDisposable
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Properties
| Improve this Doc View SourceCameras
Gets an IEnumerable<T> that can be used to iterate over all valid cameras.
Declaration
public IEnumerable<Camera> Cameras { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Camera> | An IEnumerable<T> that can be used to iterate over all valid cameras. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Capabilities
Gets the object that defines the various physical limits and features of a scan head.
Declaration
public ScanHeadCapabilities Capabilities { get; }
Property Value
Type | Description |
---|---|
ScanHeadCapabilities | The object that defines the various physical limits and features of a scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
ClientIpAddress
Gets the IPAddress of the client machine's NIC that received the broadcast.
Declaration
public IPAddress ClientIpAddress { get; }
Property Value
Type | Description |
---|---|
IPAddress | The client machine's IPAddress which discovered the scan head. |
Remarks
The property is used when making a TCP connection between the client machine and a scan head. This is particularly important on computers that have multiple NICs or a NIC with dual ports. Whichever NIC discovered the scan head should be responsible for making the connection.
ID
Gets the unique ID of the scan head.
Declaration
public uint ID { get; }
Property Value
Type | Description |
---|---|
uint | The unique ID of the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
IpAddress
Gets the IPAddress of the scan head.
Declaration
public IPAddress IpAddress { get; }
Property Value
Type | Description |
---|---|
IPAddress | The IPAddress of the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
IsConnected
Gets a value indicating whether the network connection to the scan head is established.
Declaration
public bool IsConnected { get; }
Property Value
Type | Description |
---|---|
bool | A value indicating whether the network connection to the scan head is established. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
IsScanning
Gets a value indicating whether the scan head is actively scanning.
Declaration
public bool IsScanning { get; }
Property Value
Type | Description |
---|---|
bool | A value indicating whether the scan head is actively scanning. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Lasers
Gets an IEnumerable<T> that can be used to iterate over all valid lasers.
Declaration
public IEnumerable<Laser> Lasers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Laser> | An IEnumerable<T> that can be used to iterate over all valid lasers. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Name
Gets the product name of the scan head.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string | The product name of the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
NumberOfProfilesAvailable
Gets the number of IProfiles available in the local buffer for the scan head.
Declaration
public int NumberOfProfilesAvailable { get; }
Property Value
Type | Description |
---|---|
int | The number of IProfiles available in the local buffer for the scan head. |
Remarks
All existing IProfiles are cleared from the local buffer when StartScanning(uint, DataFormat, ScanningMode)
is called successfully.
This value means nothing when scanning with Frame.
Orientation
Gets or sets the value indicating the orientation of the scan head.
Declaration
public ScanHeadOrientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
ScanHeadOrientation | The ScanHeadOrientation of the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
ProfileBufferOverflowed
Gets a value indicating whether the scan head profile buffer overflowed.
Declaration
public bool ProfileBufferOverflowed { get; }
Property Value
Type | Description |
---|---|
bool | A value indicating whether the scan head profile buffer overflowed. |
Remarks
Resets to false when StartScanning(uint, DataFormat, ScanningMode) is called successfully.
SerialNumber
Gets the serial number of the scan head.
Declaration
public uint SerialNumber { get; }
Property Value
Type | Description |
---|---|
uint | The serial number of the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Type
Gets the product type of the scan head.
Declaration
public ProductType Type { get; }
Property Value
Type | Description |
---|---|
ProductType | The product type of the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Version
Gets the ScanHeadVersionInformation of the firmware on the scan head.
Declaration
public ScanHeadVersionInformation Version { get; }
Property Value
Type | Description |
---|---|
ScanHeadVersionInformation | The ScanHeadVersionInformation of the firmware on the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Methods
| Improve this Doc View SourceClearProfiles()
Empties the internal client side software buffers used to store profiles received from a given scan head.
Under normal scanning conditions where the application consumes profiles as they become available, this function will not be needed. Its use is to be found in cases where the application fails to consume profiles after some time and the number of buffered profiles, as indicated by the NumberOfProfilesAvailable property, becomes more than the application can consume and only the most recent scan data is desired.
When operating in frame scanning mode, use ClearFrames() instead.
Declaration
public void ClearProfiles()
Remarks
Profiles are automatically cleared when StartScanning(uint, DataFormat, ScanningMode) is called.
Configure(ScanHeadConfiguration)
Configures the scan head.
Declaration
public void Configure(ScanHeadConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ScanHeadConfiguration | configuration | The ScanHeadConfiguration to use for configuration of the scan head. |
Remarks
The ScanHeadConfiguration parameters are only sent to the scan head when
StartScanning(uint, DataFormat, ScanningMode) is called.
A clone of configuration
is created internally. This means that changing the
ScanHeadConfiguration object passed in after this function is called will not change
the internal configuration.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentNullException |
|
ArgumentOutOfRangeException | If any of the exposure or laser on time values are out of the minimum or maximum ranges for the scan head. |
CreateExclusionMask()
Creates a new ExclusionMask with the dimensions of the camera(s) of the scan head.
Declaration
public ExclusionMask CreateExclusionMask()
Returns
Type | Description |
---|---|
ExclusionMask | A clear ExclusionMask. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Dispose()
Releases the managed and unmanaged resources used by the scan head
Declaration
public void Dispose()
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Dispose(bool)
Releases the unmanaged resources used by the scan head and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Whether being disposed explicitly (true) or due to a finalizer (false). |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
~ScanHead()
The scan head finalizer.
Declaration
protected ~ScanHead()
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
GetConfigurationClone()
Gets a clone of the ScanHeadConfiguration used to configure the scan head. Use Configure(ScanHeadConfiguration) to set the ScanHeadConfiguration.
Declaration
public ScanHeadConfiguration GetConfigurationClone()
Returns
Type | Description |
---|---|
ScanHeadConfiguration | A clone of the ScanHeadConfiguration used to configure the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
GetDiagnosticCameraImage(Camera, DiagnosticImageType)
Captures an image from the specified Camera without turning on the laser. Exposes the camera for DefaultCameraExposureTimeUs.
Declaration
[Obsolete("Use GetDiagnosticCameraImage(Camera, uint, DiagnosticImageType) instead.")]
public CameraImage GetDiagnosticCameraImage(Camera camera, DiagnosticImageType imageDataType = DiagnosticImageType.Masked)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera from which to capture the image. |
DiagnosticImageType | imageDataType | The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask. |
Returns
Type | Description |
---|---|
CameraImage | The CameraImage. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException |
|
GetDiagnosticCameraImage(Camera, Laser, DiagnosticImageType)
Captures an image from the specified Camera while a Laser is on. Exposes the camera for DefaultLaserOnTimeUs and turns the laser on for DefaultLaserOnTimeUs.
Declaration
[Obsolete("Use GetDiagnosticCameraImage(Camera, uint, Laser, uint, DiagnosticImageType) instead.")]
public CameraImage GetDiagnosticCameraImage(Camera camera, Laser laser, DiagnosticImageType imageDataType = DiagnosticImageType.Masked)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera from which to capture the image. |
Laser | laser | The Laser that should be on during the image capture. |
DiagnosticImageType | imageDataType | The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask. |
Returns
Type | Description |
---|---|
CameraImage | The CameraImage. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException |
|
GetDiagnosticCameraImage(Camera, Laser, uint, DiagnosticImageType)
Captures an image from the specified Camera while a Laser is on. Exposes the camera for the same amount of time as the laserOnTimeUs parameter.
Declaration
[Obsolete("Use GetDiagnosticCameraImage(Camera, uint, Laser, uint, DiagnosticImageType) instead.")]
public CameraImage GetDiagnosticCameraImage(Camera camera, Laser laser, uint laserOnTimeUs, DiagnosticImageType imageDataType = DiagnosticImageType.Masked)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera from which to capture the image. |
Laser | laser | The Laser that should be on during the image capture. |
uint | laserOnTimeUs | How long the laser should be on for during the image capture in microseconds. |
DiagnosticImageType | imageDataType | The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask. |
Returns
Type | Description |
---|---|
CameraImage | The CameraImage. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException |
|
ArgumentOutOfRangeException |
|
GetDiagnosticCameraImage(Camera, uint, DiagnosticImageType)
Captures an image from the specified Camera without turning on the laser.
Declaration
public CameraImage GetDiagnosticCameraImage(Camera camera, uint cameraExposureUs, DiagnosticImageType imageDataType = DiagnosticImageType.Masked)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera from which to capture the image. |
uint | cameraExposureUs | How long the camera should expose for in microseconds. |
DiagnosticImageType | imageDataType | The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask. |
Returns
Type | Description |
---|---|
CameraImage | The CameraImage. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException |
|
ArgumentOutOfRangeException |
|
GetDiagnosticCameraImage(Camera, uint, Laser, uint, DiagnosticImageType)
Declaration
public CameraImage GetDiagnosticCameraImage(Camera camera, uint cameraExposureUs, Laser laser, uint laserOnTimeUs, DiagnosticImageType imageDataType = DiagnosticImageType.Masked)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera from which to capture the image. |
uint | cameraExposureUs | How long the camera should expose for in microseconds. |
Laser | laser | The Laser that should be on during the image capture. |
uint | laserOnTimeUs | How long the laser should be on for during the image capture in microseconds. |
DiagnosticImageType | imageDataType | The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask. |
Returns
Type | Description |
---|---|
CameraImage | The CameraImage. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException |
|
ArgumentOutOfRangeException |
|
GetDiagnosticProfile(Camera)
Obtains a single profile from a scan head to be used for diagnostic purposes. Each subsequent call to this function will trigger the auto-exposure mechanism to automatically adjust the camera and laser according to the ScanHeadConfiguration provided to Configure(ScanHeadConfiguration).
Declaration
public IProfile GetDiagnosticProfile(Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera used for the profile capture. |
Returns
Type | Description |
---|---|
IProfile |
Remarks
The auto-exposure mechanism is currently non-functional. The camera exposure and laser on time will be set to DefaultLaserOnTimeUs.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException | Trying to use a camera-driven function with a laser-driven scan head. Use GetDiagnosticProfile(Laser) instead. |
GetDiagnosticProfile(Camera, uint, uint)
Obtains a single profile from a scan head to be used for diagnostic purposes.
Declaration
public IProfile GetDiagnosticProfile(Camera camera, uint cameraExposureUs, uint laserOnTimeUs)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera used for the profile capture. |
uint | cameraExposureUs | The exposure time for the |
uint | laserOnTimeUs | The laser on time of the associated Laser in microseconds. |
Returns
Type | Description |
---|---|
IProfile |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException | Trying to use a camera-driven function with a laser-driven scan head. Use GetDiagnosticProfile(Laser, uint, uint) instead. |
GetDiagnosticProfile(Laser)
Obtains a single profile from a scan head to be used for diagnostic purposes. Each subsequent call to this function will trigger the auto-exposure mechanism to automatically adjust the camera and laser according to the ScanHeadConfiguration provided to Configure(ScanHeadConfiguration).
Declaration
public IProfile GetDiagnosticProfile(Laser laser)
Parameters
Type | Name | Description |
---|---|---|
Laser | laser | The Laser used for the profile capture. |
Returns
Type | Description |
---|---|
IProfile |
Remarks
The auto-exposure mechanism is currently non-functional. The camera exposure and laser on time will be set to DefaultLaserOnTimeUs.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException | Trying to use a laser-driven function with a camera-driven scan head. Use GetDiagnosticProfile(Camera) instead. |
GetDiagnosticProfile(Laser, uint, uint)
Obtains a single profile from a scan head to be used for diagnostic purposes.
Declaration
public IProfile GetDiagnosticProfile(Laser laser, uint cameraExposureUs, uint laserOnTimeUs)
Parameters
Type | Name | Description |
---|---|---|
Laser | laser | The Laser used for the profile capture. |
uint | cameraExposureUs | The exposure time for the associated Camera in microseconds. |
uint | laserOnTimeUs | The laser on time of the |
Returns
Type | Description |
---|---|
IProfile |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
ArgumentException | Trying to use a laser-driven function with a camera-driven scan head. Use GetDiagnosticProfile(Camera, uint, uint) instead. |
Reboot()
Performs a remote soft power cycle of the scan head.
Declaration
public void Reboot()
Remarks
After this function successfully completes, it will take several seconds before the scan head will appear on the network and be available for use. On average, the scan head will take 30 seconds to reboot.
Exceptions
Type | Condition |
---|---|
IOException | A loss of communication with the scan head occurred, usually caused by a network or power issue. |
Reboot(uint)
Performs a remote soft power cycle of the scan head.
Declaration
public static void Reboot(uint serial)
Parameters
Type | Name | Description |
---|---|---|
uint | serial | The serial of the scan head to power cycle. |
Remarks
After this function successfully completes, it will take several seconds before the scan head will appear on the network and be available for use. On average, the scan head will take 30 seconds to reboot.
Exceptions
Type | Condition |
---|---|
IOException | A loss of communication with the scan head occurred, usually caused by a network or power issue. |
RequestStatus()
Requests a new status from the scan head.
Declaration
public ScanHeadStatus RequestStatus()
Returns
Type | Description |
---|---|
ScanHeadStatus | The updated ScanHeadStatus. |
Remarks
Use this function to get the status of the scan head. Applications concerned with scan speed and data throughput should call this function sparingly as to not over task a given scan head while it is scanning.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsConnected is false. |
SetAlignment(Camera, double, double, double)
Sets the spatial transform parameters of the scan head in order to properly transform the data from a scan head based coordinate system to one based on mill placement. Parameters are applied only to specified Camera. In most cases SetAlignment(double, double, double) should be used instead.
Declaration
public void SetAlignment(Camera camera, double rollDegrees, double shiftX, double shiftY)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera which to set the alignment of. |
double | rollDegrees | The rotation around the Z axis in the mill coordinate system in degrees. |
double | shiftX | The shift along the X axis in the mill coordinate system in ScanSystemUnits. |
double | shiftY | The shift along the Y axis in the mill coordinate system in ScanSystemUnits. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentException | Trying to use a camera-driven function with a laser-driven scan head. Use SetAlignment(Laser, double, double, double) instead. |
SetAlignment(Laser, double, double, double)
Sets the spatial transform parameters of the scan head in order to properly transform the data from a scan head based coordinate system to one based on mill placement. Parameters are applied only to the specified Laser. This method should be used only on models with multiple lasers. On single laser models, the factory calibration already provides a good fit between data from both cameras. In this case, SetAlignment(double, double, double) should be used.
Declaration
public void SetAlignment(Laser laser, double rollDegrees, double shiftX, double shiftY)
Parameters
Type | Name | Description |
---|---|---|
Laser | laser | The Laser which to set the alignment of. |
double | rollDegrees | The rotation around the Z axis in the mill coordinate system in degrees. |
double | shiftX | The shift along the X axis in the mill coordinate system in ScanSystemUnits. |
double | shiftY | The shift along the Y axis in the mill coordinate system in ScanSystemUnits. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentException | Trying to use a laser-driven function with a camera-driven scan head. Use SetAlignment(Camera, double, double, double) instead. |
SetAlignment(double, double, double)
Sets the spatial transform parameters of the scan head in order to properly transform the data from a scan head based coordinate system to one based on mill placement. Parameters are applied to all Cameras.
Declaration
public void SetAlignment(double rollDegrees, double shiftX, double shiftY)
Parameters
Type | Name | Description |
---|---|---|
double | rollDegrees | The rotation around the Z axis in the mill coordinate system in degrees. |
double | shiftX | The shift along the X axis in the mill coordinate system in ScanSystemUnits. |
double | shiftY | The shift along the Y axis in the mill coordinate system in ScanSystemUnits. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
SetExclusionMask(Camera, ExclusionMask)
Sets the ExclusionMask for the camera
supplied.
Declaration
public void SetExclusionMask(Camera camera, ExclusionMask mask)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera that the mask will be applied to. |
ExclusionMask | mask | The ExclusionMask to be applied. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentNullException |
|
ArgumentException | Trying to use a camera-driven function with a laser-driven scan head. Use SetExclusionMask(Laser, ExclusionMask) instead. |
SetExclusionMask(Laser, ExclusionMask)
Sets the ExclusionMask for the laser
supplied.
Declaration
public void SetExclusionMask(Laser laser, ExclusionMask mask)
Parameters
Type | Name | Description |
---|---|---|
Laser | laser | The Laser that the mask will be applied to. |
ExclusionMask | mask | The ExclusionMask to be applied. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentNullException |
|
ArgumentException | Trying to use a camera-driven function with a laser-driven scan head. Use SetExclusionMask(Laser, ExclusionMask) instead. |
SetWindow(Camera, ScanWindow)
Sets the ScanWindow for camera
. The window
restricts where the scan head looks for valid points in mill space.
Declaration
public void SetWindow(Camera camera, ScanWindow window)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The Camera to apply the window to. |
ScanWindow | window | The ScanWindow to use for the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentNullException |
|
ArgumentException | Trying to use a camera-driven function with a laser-driven scan head. Use SetWindow(Laser, ScanWindow) instead. |
SetWindow(Laser, ScanWindow)
Sets the ScanWindow for laser
. The window
restricts where the scan head looks for valid points in mill space.
Declaration
public void SetWindow(Laser laser, ScanWindow window)
Parameters
Type | Name | Description |
---|---|---|
Laser | laser | The Laser to apply the window to. |
ScanWindow | window | The ScanWindow to use for the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentNullException |
|
ArgumentException | Trying to use a laser-driven function with a camera-driven scan head. Use SetWindow(Camera, ScanWindow) instead. |
SetWindow(ScanWindow)
Sets the ScanWindow for the scan head. The window restricts where the scan head looks for valid points in mill space.
Declaration
public void SetWindow(ScanWindow window)
Parameters
Type | Name | Description |
---|---|---|
ScanWindow | window | The ScanWindow to use for the scan head. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | IsScanning is true. |
ArgumentNullException |
|
TakeNextProfile(CancellationToken)
Takes an IProfile from the queue, blocking if the queue is empty.
Declaration
public IProfile TakeNextProfile(CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | The CancellationToken to observe. |
Returns
Type | Description |
---|---|
IProfile | The dequeued IProfile. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
TryTakeNextProfile(out IProfile, TimeSpan, CancellationToken)
Tries to take an IProfile from the queue.
Declaration
public bool TryTakeNextProfile(out IProfile profile, TimeSpan timeout = default, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
IProfile | profile | The dequeued IProfile. |
TimeSpan | timeout | The time to wait for a profile when the queue is empty. |
CancellationToken | token | CancellationToken to observe. |
Returns
Type | Description |
---|---|
bool | Whether a IProfile was successfully taken. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown if IsConnected is false when timeout occurs while waiting for a profile. This indicates a loss of communication with the scan head, either by a possible network or power issue. |
TryTakeProfiles(int, TimeSpan, CancellationToken)
Takes a number of IProfiles from the queue. The IEnumerable<T>
returned contains the lesser of maxCount
and
NumberOfProfilesAvailable profiles.
Declaration
public IEnumerable<IProfile> TryTakeProfiles(int maxCount, TimeSpan timeout = default, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
int | maxCount | The maximum number of profiles to read. |
TimeSpan | timeout | The time to wait for a profile when the queue is empty. Use a TimeSpan that represents -1 milliseconds to wait indefinitely. |
CancellationToken | token | CancellationToken to observe. |
Returns
Type | Description |
---|---|
IEnumerable<IProfile> | An IEnumerable<T> of profiles. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown if IsConnected is false when timeout occurs while waiting for a profile. This indicates a loss of communication with the scan head, either by a possible network or power issue. |
TryTakeProfiles(Span<IProfile>, TimeSpan, CancellationToken)
Takes a number of IProfiles from the queue and places
them directly in profiles
. The number dequeued
will be the lesser of Length of profiles
and NumberOfProfilesAvailable.
Declaration
public int TryTakeProfiles(Span<IProfile> profiles, TimeSpan timeout = default, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
Span<IProfile> | profiles | The preallocated destination buffer. |
TimeSpan | timeout | The time to wait for a profile when the queue is empty. Use a TimeSpan that represents -1 milliseconds to wait indefinitely. |
CancellationToken | token | CancellationToken to observe. |
Returns
Type | Description |
---|---|
int | The number of profiles dequeued and placed in |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown if IsConnected is false when timeout occurs while waiting for a profile. This indicates a loss of communication with the scan head, either by a possible network or power issue. |
WaitUntilProfilesAvailable(int, TimeSpan, CancellationToken)
Blocks until the number of requested IProfiles are avilable to be read out.
Declaration
public bool WaitUntilProfilesAvailable(int count, TimeSpan timeout, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
int | count | Number of IProfiles to wait for. |
TimeSpan | timeout | Maximum amount of time to wait. |
CancellationToken | token | Token to observe. |
Returns
Type | Description |
---|---|
bool | true if the requested number of profiles are available or false if the timeout elapses or the operation is canceled. |
Remarks
The scan head class provides an interface to a physical scan head by providing properties and methods for configuration, status retrieval, and profile data retrieval. A scan head must belong to a ScanSystem and is created using CreateScanHead(uint, uint).
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
See Also
| Improve this Doc View SourceWaitUntilProfilesAvailableAsync(int, TimeSpan, CancellationToken)
Blocks until the number of requested IProfiles are avilable to be read out.
Declaration
public Task<bool> WaitUntilProfilesAvailableAsync(int count, TimeSpan timeout, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
int | count | Number of IProfiles to wait for. |
TimeSpan | timeout | Maximum amount of time to wait. |
CancellationToken | token | Token to observe. |
Returns
Type | Description |
---|---|
Task<bool> | true if the requested number of profiles are available or false if the timeout elapses or the operation is canceled. |
Remarks
This function periodically checks the number of available profiles as fast as the system clock allows. This is system dependent but is typically ~15 milliseconds.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|