Class JoeScan::Pinchot::ScanHead¶
ClassList > JoeScan > Pinchot > ScanHead
An interface to a physical scan head.
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 ScanSystem.CreateScanHead.
Inherits the following classes: IDisposable
Public Properties¶
| Type | Name |
|---|---|
| IEnumerable< Camera > | Cameras Gets an IEnumerable<T> that can be used to iterate over all valid cameras. |
| ScanHeadCapabilities | Capabilities Gets the object that defines the various physical limits and features of a scan head. |
| IPAddress | ClientIpAddress Gets the IPAddress of the client machine's NIC that received the broadcast. |
| uint | ID Gets the unique ID of the scan head. |
| IPAddress | IpAddress Gets the IPAddress of the scan head. |
| bool | IsConnected Gets a value indicating whether the network connection to the scan head is established. |
| bool | IsScanning Gets a value indicating whether the scan head is actively scanning. |
| IEnumerable< Laser > | Lasers Gets an IEnumerable<T> that can be used to iterate over all valid lasers. |
| string | Name Gets the product name of the scan head. |
| int | NumberOfProfilesAvailable Gets the number of IProfile s available in the local buffer for the scan head. |
| ScanHeadOrientation | Orientation Gets or sets the value indicating the orientation of the scan head. |
| bool | ProfileBufferOverflowed Gets a value indicating whether the scan head profile buffer overflowed. |
| uint | SerialNumber Gets the serial number of the scan head. |
| ProductType | Type Gets the product type of the scan head. |
| ScanHeadVersionInformation | Version Gets the ScanHeadVersionInformation of the firmware on the scan head. |
Public Functions¶
| Type | Name |
|---|---|
| void | ClearProfiles () Empties the internal client side software buffers used to store profiles received from a given scan head. |
| void | Configure (ScanHeadConfiguration configuration) Configures the scan head. |
| ExclusionMask | CreateExclusionMask () Creates a new ExclusionMask with the dimensions of the camera(s) of the scan head. |
| void | Dispose () Releases the managed and unmanaged resources used by the scan head. |
| ScanHeadConfiguration | GetConfigurationClone () Gets a clone of the ScanHeadConfiguration used to configure the scan head. Use Configure to set the ScanHeadConfiguration . |
| CameraImage | GetDiagnosticCameraImage (Camera camera, DiagnosticImageType imageDataType=DiagnosticImageType.Masked) Captures an image from the specified Camera without turning on the laser. Exposes the camera for ScanHeadConfiguration.DefaultCameraExposureTimeUs . |
| CameraImage | GetDiagnosticCameraImage (Camera camera, uint cameraExposureUs, DiagnosticImageType imageDataType=DiagnosticImageType.Masked) Captures an image from the specified Camera without turning on the laser. |
| CameraImage | GetDiagnosticCameraImage (Camera camera, Laser laser, DiagnosticImageType imageDataType=DiagnosticImageType.Masked) Captures an image from the specified Camera while a Laser is on. Exposes the camera for ScanHeadConfiguration.DefaultLaserOnTimeUs and turns the laser on for ScanHeadConfiguration.DefaultLaserOnTimeUs . |
| CameraImage | GetDiagnosticCameraImage (Camera camera, Laser laser, uint laserOnTimeUs, DiagnosticImageType imageDataType=DiagnosticImageType.Masked) 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. |
| CameraImage | GetDiagnosticCameraImage (Camera camera, uint cameraExposureUs, Laser laser, uint laserOnTimeUs, DiagnosticImageType imageDataType=DiagnosticImageType.Masked) Captures an image from the specified Camera while a Laser is on. |
| IProfile | GetDiagnosticProfile (Camera 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) . |
| IProfile | GetDiagnosticProfile (Camera camera, uint cameraExposureUs, uint laserOnTimeUs) Obtains a single profile from a scan head to be used for diagnostic purposes. |
| IProfile | GetDiagnosticProfile (Laser 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) . |
| IProfile | GetDiagnosticProfile (Laser laser, uint cameraExposureUs, uint laserOnTimeUs) Obtains a single profile from a scan head to be used for diagnostic purposes. |
| void | Reboot () Performs a remote soft power cycle of the scan head. |
| ScanHeadStatus | RequestStatus () Requests a new status from the scan head. |
| void | SetAlignment (double rollDegrees, double shiftX, double shiftY) 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 Camera s. |
| void | SetAlignment (Camera camera, double rollDegrees, double shiftX, double shiftY) 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. |
| void | SetAlignment (Laser laser, double rollDegrees, double shiftX, double shiftY) 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. |
| void | SetExclusionMask (Camera camera, ExclusionMask mask) Sets the ExclusionMask for the__camera supplied. |
| void | SetExclusionMask (Laser laser, ExclusionMask mask) Sets the ExclusionMask for the__laser supplied. |
| void | SetWindow (ScanWindow window) Sets the ScanWindow for the scan head. The window restricts where the scan head looks for valid points in mill space. |
| void | SetWindow (Camera camera, ScanWindow window) Sets the ScanWindow for__camera . The window restricts where the scan head looks for valid points in mill space. |
| void | SetWindow (Laser laser, ScanWindow window) Sets the ScanWindow for__laser . The window restricts where the scan head looks for valid points in mill space. |
| IProfile | TakeNextProfile (CancellationToken token=default) Takes an IProfile from the queue, blocking if the queue is empty. |
| bool | TryTakeNextProfile (out IProfile profile, TimeSpan timeout=default, CancellationToken token=default) Tries to take an IProfile from the queue. |
| IEnumerable< IProfile > | TryTakeProfiles (int maxCount, TimeSpan timeout=default, CancellationToken token=default) Takes a number of IProfile s from the queue. The IEnumerable<T> returned contains the lesser of__maxCount and NumberOfProfilesAvailable profiles. |
| int | TryTakeProfiles (Span< IProfile > profiles, TimeSpan timeout=default, CancellationToken token=default) Takes a number of IProfile s from the queue and places them directly in__profiles . The number dequeued will be the lesser of Span<T>.Length of__profiles and NumberOfProfilesAvailable . |
| bool | WaitUntilProfilesAvailable (int count, TimeSpan timeout, CancellationToken token=default) Blocks until the number of requested IProfile s are available to be read out. |
| async Task< bool > | WaitUntilProfilesAvailableAsync (int count, TimeSpan timeout, CancellationToken token=default) Blocks until the number of requested IProfile s are available to be read out. |
Public Static Functions¶
| Type | Name |
|---|---|
| void | Reboot (uint serial) Performs a remote soft power cycle of the scan head. |
Protected Functions¶
| Type | Name |
|---|---|
| virtual void | Dispose (bool disposing) Releases the unmanaged resources used by the scan head and optionally releases the managed resources. |
Public Properties Documentation¶
Cameras¶
Gets an IEnumerable<T> that can be used to iterate over all valid cameras.
IEnumerable<Camera> Cameras;
An IEnumerable<T> that can be used to iterate over all valid cameras.
Capabilities¶
Gets the object that defines the various physical limits and features of a scan head.
ScanHeadCapabilities Capabilities;
The object that defines the various physical limits and features of a scan head.
ClientIpAddress¶
Gets the IPAddress of the client machine's NIC that received the broadcast.
IPAddress ClientIpAddress;
The client machine's IPAddress which discovered the scan head.
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.
uint ID;
The unique ID of the scan head.
IpAddress¶
Gets the IPAddress of the scan head.
IPAddress IpAddress;
The IPAddress of the scan head.
IsConnected¶
Gets a value indicating whether the network connection to the scan head is established.
bool IsConnected;
A value indicating whether the network connection to the scan head is established.
IsScanning¶
Gets a value indicating whether the scan head is actively scanning.
bool IsScanning;
A value indicating whether the scan head is actively scanning.
Lasers¶
Gets an IEnumerable<T> that can be used to iterate over all valid lasers.
IEnumerable<Laser> Lasers;
An IEnumerable<T> that can be used to iterate over all valid lasers.
Name¶
Gets the product name of the scan head.
string Name;
The product name of the scan head.
NumberOfProfilesAvailable¶
Gets the number of IProfile s available in the local buffer for the scan head.
int NumberOfProfilesAvailable;
All existing IProfiles are cleared from the local buffer when ScanSystem.StartScanning(uint, DataFormat, ScanningMode) is called successfully. This value means nothing when scanning with ScanningMode.Frame.
The number of IProfiles available in the local buffer for the scan head.
Orientation¶
Gets or sets the value indicating the orientation of the scan head.
ScanHeadOrientation Orientation;
The ScanHeadOrientation of the scan head.
ProfileBufferOverflowed¶
Gets a value indicating whether the scan head profile buffer overflowed.
bool ProfileBufferOverflowed;
Resets to false when ScanSystem.StartScanning(uint, DataFormat, ScanningMode) is called successfully.
A value indicating whether the scan head profile buffer overflowed.
SerialNumber¶
Gets the serial number of the scan head.
uint SerialNumber;
The serial number of the scan head.
Type¶
Gets the product type of the scan head.
ProductType Type;
The product type of the scan head.
Version¶
Gets the ScanHeadVersionInformation of the firmware on the scan head.
ScanHeadVersionInformation Version;
The ScanHeadVersionInformation of the firmware on the scan head.
Public Functions Documentation¶
ClearProfiles¶
Empties the internal client side software buffers used to store profiles received from a given scan head.
void ClearProfiles()
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 ScanSystem.ClearFrames instead.
Profiles are automatically cleared when ScanSystem.StartScanning(uint, DataFormat, ScanningMode) is called.
Configure¶
Configures the scan head.
void Configure(
ScanHeadConfiguration configuration
)
The ScanHeadConfiguration parameters are only sent to the scan head when ScanSystem.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.
Parameters:
configurationThe ScanHeadConfiguration to use for configuration of the scan head.
Exception:
InvalidOperationExceptionIsScanning istrue.ArgumentNullExceptionconfiguration isnull.ArgumentOutOfRangeExceptionIf 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.
ExclusionMask CreateExclusionMask()
Returns:
A clear ExclusionMask.
Dispose [1/2]¶
Releases the managed and unmanaged resources used by the scan head.
void Dispose()
GetConfigurationClone¶
Gets a clone of the ScanHeadConfiguration used to configure the scan head. Use Configure to set the ScanHeadConfiguration .
ScanHeadConfiguration GetConfigurationClone()
A clone of the ScanHeadConfiguration used to configure the scan head.
GetDiagnosticCameraImage [1/5]¶
Captures an image from the specified Camera without turning on the laser. Exposes the camera for ScanHeadConfiguration.DefaultCameraExposureTimeUs .
CameraImage GetDiagnosticCameraImage(
Camera camera,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
cameraThe Camera from which to capture the image.imageDataTypeThe DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptioncamera isn't valid.
GetDiagnosticCameraImage [2/5]¶
Captures an image from the specified Camera without turning on the laser.
CameraImage GetDiagnosticCameraImage(
Camera camera,
uint cameraExposureUs,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
cameraThe Camera from which to capture the image.cameraExposureUsHow long the camera should expose for in microseconds.imageDataTypeThe DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptioncamera isn't valid.ArgumentOutOfRangeExceptioncameraExposureUs is too long or too short.
GetDiagnosticCameraImage [3/5]¶
Captures an image from the specified Camera while a Laser is on. Exposes the camera for ScanHeadConfiguration.DefaultLaserOnTimeUs and turns the laser on for ScanHeadConfiguration.DefaultLaserOnTimeUs .
CameraImage GetDiagnosticCameraImage(
Camera camera,
Laser laser,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
cameraThe Camera from which to capture the image.laserThe Laser that should be on during the image capture.imageDataTypeThe DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptioncamera isn't valid. -or- laser isn't valid.
GetDiagnosticCameraImage [4/5]¶
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.
CameraImage GetDiagnosticCameraImage(
Camera camera,
Laser laser,
uint laserOnTimeUs,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
cameraThe Camera from which to capture the image.laserThe Laser that should be on during the image capture.laserOnTimeUsHow long the laser should be on for during the image capture in microseconds.imageDataTypeThe DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptioncamera isn't valid. -or- laser isn't valid.ArgumentOutOfRangeExceptionlaserOnTimeUs is too long or too short.
GetDiagnosticCameraImage [5/5]¶
Captures an image from the specified Camera while a Laser is on.
CameraImage GetDiagnosticCameraImage(
Camera camera,
uint cameraExposureUs,
Laser laser,
uint laserOnTimeUs,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
cameraThe Camera from which to capture the image.cameraExposureUsHow long the camera should expose for in microseconds.laserThe Laser that should be on during the image capture.laserOnTimeUsHow long the laser should be on for during the image capture in microseconds.imageDataTypeThe DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptioncamera isn't valid. -or- laser isn't valid.ArgumentOutOfRangeExceptioncameraExposureUs is too long or too short. -or- laserOnTimeUs is too long or too short.
GetDiagnosticProfile [2/5]¶
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) .
IProfile GetDiagnosticProfile(
Camera camera
)
Parameters:
cameraThe Camera used for the profile capture.
Returns:
An IProfile from camera and its associated Laser.
The auto-exposure mechanism is currently non-functional. The camera exposure will be set to ScanheadConfiguration.DefaultLaserOnTimeUs and laser on time will be set to ScanHeadConfiguration.DefaultLaserOnTimeUs.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptionTrying to use a camera-driven function with a laser-driven scan head. Use GetDiagnosticProfile(Laser) instead.
GetDiagnosticProfile [3/5]¶
Obtains a single profile from a scan head to be used for diagnostic purposes.
IProfile GetDiagnosticProfile(
Camera camera,
uint cameraExposureUs,
uint laserOnTimeUs
)
Parameters:
cameraThe Camera used for the profile capture.cameraExposureUsThe exposure time for the camera in microseconds.laserOnTimeUsThe laser on time of the associated Laser in microseconds.
Returns:
An IProfile from camera and its associated Laser.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptionTrying to use a camera-driven function with a laser-driven scan head. Use GetDiagnosticProfile(Laser, uint, uint) instead.
GetDiagnosticProfile [4/5]¶
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) .
IProfile GetDiagnosticProfile(
Laser laser
)
Parameters:
laserThe Laser used for the profile capture.
Returns:
An IProfile from laser and its associated Camera.
The auto-exposure mechanism is currently non-functional. The camera exposure and laser on time will be set to ScanHeadConfiguration.DefaultLaserOnTimeUs.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptionTrying to use a laser-driven function with a camera-driven scan head. Use GetDiagnosticProfile(Camera) instead.
GetDiagnosticProfile [5/5]¶
Obtains a single profile from a scan head to be used for diagnostic purposes.
IProfile GetDiagnosticProfile(
Laser laser,
uint cameraExposureUs,
uint laserOnTimeUs
)
Parameters:
laserThe Laser used for the profile capture.cameraExposureUsThe exposure time for the associated Camera in microseconds.laserOnTimeUsThe laser on time of the laser in microseconds.
Returns:
An IProfile from laser and its associated Camera.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- IsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptionTrying to use a laser-driven function with a camera-driven scan head. Use GetDiagnosticProfile(Camera, uint, uint) instead.
Reboot [1/2]¶
Performs a remote soft power cycle of the scan head.
void Reboot()
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.
Exception:
IOExceptionA 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.
ScanHeadStatus RequestStatus()
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.
Returns:
The updated ScanHeadStatus.
Exception:
InvalidOperationExceptionIsConnected isfalse. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.
SetAlignment [1/3]¶
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 Camera s.
void SetAlignment(
double rollDegrees,
double shiftX,
double shiftY
)
Parameters:
rollDegreesThe rotation around the Z axis in the mill coordinate system in degrees.shiftXThe shift along the X axis in the mill coordinate system in ScanSystemUnits.shiftYThe shift along the Y axis in the mill coordinate system in ScanSystemUnits.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.
SetAlignment [2/3]¶
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.
void SetAlignment(
Camera camera,
double rollDegrees,
double shiftX,
double shiftY
)
Parameters:
cameraThe Camera which to set the alignment of.rollDegreesThe rotation around the Z axis in the mill coordinate system in degrees.shiftXThe shift along the X axis in the mill coordinate system in ScanSystemUnits.shiftYThe shift along the Y axis in the mill coordinate system in ScanSystemUnits.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptionTrying to use a camera-driven function with a laser-driven scan head. Use SetAlignment(Laser, double, double, double) instead.
SetAlignment [3/3]¶
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.
void SetAlignment(
Laser laser,
double rollDegrees,
double shiftX,
double shiftY
)
Parameters:
laserThe Laser which to set the alignment of.rollDegreesThe rotation around the Z axis in the mill coordinate system in degrees.shiftXThe shift along the X axis in the mill coordinate system in ScanSystemUnits.shiftYThe shift along the Y axis in the mill coordinate system in ScanSystemUnits.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentExceptionTrying to use a laser-driven function with a camera-driven scan head. Use SetAlignment(Camera, double, double, double) instead.
SetExclusionMask [1/2]¶
Sets the ExclusionMask for the__camera supplied.
void SetExclusionMask(
Camera camera,
ExclusionMask mask
)
Parameters:
cameraThe Camera that the mask will be applied to.maskThe ExclusionMask to be applied.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullExceptionmask is null.ArgumentExceptionTrying to use a camera-driven function with a laser-driven scan head. Use SetExclusionMask(Laser, ExclusionMask) instead.
SetExclusionMask [2/2]¶
Sets the ExclusionMask for the__laser supplied.
void SetExclusionMask(
Laser laser,
ExclusionMask mask
)
Parameters:
laserThe Laser that the mask will be applied to.maskThe ExclusionMask to be applied.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullExceptionmask is null.ArgumentExceptionTrying to use a camera-driven function with a laser-driven scan head. Use SetExclusionMask(Laser, ExclusionMask) instead.
SetWindow [2/4]¶
Sets the ScanWindow for the scan head. The window restricts where the scan head looks for valid points in mill space.
void SetWindow(
ScanWindow window
)
Parameters:
windowThe ScanWindow to use for the scan head.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullExceptionwindow is null.
SetWindow [3/4]¶
Sets the ScanWindow for__camera . The window restricts where the scan head looks for valid points in mill space.
void SetWindow(
Camera camera,
ScanWindow window
)
Parameters:
cameraThe Camera to apply the window to.windowThe ScanWindow to use for the scan head.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullExceptionwindow is null.ArgumentExceptionTrying to use a camera-driven function with a laser-driven scan head. Use SetWindow(Laser, ScanWindow) instead.
SetWindow [4/4]¶
Sets the ScanWindow for__laser . The window restricts where the scan head looks for valid points in mill space.
void SetWindow(
Laser laser,
ScanWindow window
)
Parameters:
laserThe Laser to apply the window to.windowThe ScanWindow to use for the scan head.
Exception:
InvalidOperationExceptionIsScanning istrue. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullExceptionwindow is null.ArgumentExceptionTrying to use a laser-driven function with a camera-driven scan head. Use SetWindow(Camera, ScanWindow) instead.
TakeNextProfile¶
Takes an IProfile from the queue, blocking if the queue is empty.
IProfile TakeNextProfile(
CancellationToken token=default
)
Parameters:
tokenThe CancellationToken to observe.
Returns:
The dequeued IProfile.
TryTakeNextProfile¶
Tries to take an IProfile from the queue.
bool TryTakeNextProfile(
out IProfile profile,
TimeSpan timeout=default,
CancellationToken token=default
)
Parameters:
profileThe dequeued IProfile.timeoutThe time to wait for a profile when the queue is empty.tokenCancellationToken to observe.
Returns:
Whether a IProfile was successfully taken.
Exception:
InvalidOperationExceptionThrown if IsConnected isfalsewhen 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 [1/2]¶
Takes a number of IProfile s from the queue. The IEnumerable<T> returned contains the lesser of__maxCount and NumberOfProfilesAvailable profiles.
IEnumerable< IProfile > TryTakeProfiles(
int maxCount,
TimeSpan timeout=default,
CancellationToken token=default
)
Parameters:
maxCountThe maximum number of profiles to read.timeoutThe time to wait for a profile when the queue is empty. Use a TimeSpan that represents -1 milliseconds to wait indefinitely.tokenCancellationToken to observe.
Returns:
An IEnumerable<T> of profiles.
Exception:
InvalidOperationExceptionThrown if IsConnected isfalsewhen 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 [2/2]¶
Takes a number of IProfile s from the queue and places them directly in__profiles . The number dequeued will be the lesser of Span<T>.Length of__profiles and NumberOfProfilesAvailable .
int TryTakeProfiles(
Span< IProfile > profiles,
TimeSpan timeout=default,
CancellationToken token=default
)
Parameters:
profilesThe pre-allocated destination buffer.timeoutThe time to wait for a profile when the queue is empty. Use a TimeSpan that represents -1 milliseconds to wait indefinitely.tokenCancellationToken to observe.
Returns:
The number of profiles dequeued and placed in profiles .
Exception:
InvalidOperationExceptionThrown if IsConnected isfalsewhen 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¶
Blocks until the number of requested IProfile s are available to be read out.
bool WaitUntilProfilesAvailable(
int count,
TimeSpan timeout,
CancellationToken token=default
)
Parameters:
countNumber of IProfiles to wait for.timeoutMaximum amount of time to wait.tokenToken to observe.
Returns:
true if the requested number of profiles are available or false if the timeout elapses or the operation is canceled.
Exception:
ArgumentOutOfRangeExceptioncount is greater than Globals.ProfileQueueSize.
See also: NumberOfProfilesAvailable, WaitUntilProfilesAvailableAsync(int, TimeSpan, CancellationToken)
WaitUntilProfilesAvailableAsync¶
Blocks until the number of requested IProfile s are available to be read out.
async Task< bool > WaitUntilProfilesAvailableAsync(
int count,
TimeSpan timeout,
CancellationToken token=default
)
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.
Parameters:
countNumber of IProfiles to wait for.timeoutMaximum amount of time to wait.tokenToken to observe.
Returns:
true if the requested number of profiles are available or false if the timeout elapses or the operation is canceled.
Exception:
ArgumentOutOfRangeExceptioncount is greater than Globals.ProfileQueueSize.
See also: NumberOfProfilesAvailable, WaitUntilProfilesAvailable(int, TimeSpan, CancellationToken)
Public Static Functions Documentation¶
Reboot [2/2]¶
Performs a remote soft power cycle of the scan head.
static void Reboot(
uint serial
)
Parameters:
serialThe serial of the scan head to power cycle.
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.
Exception:
IOExceptionA loss of communication with the scan head occurred, usually caused by a network or power issue.
Protected Functions Documentation¶
Dispose [2/2]¶
Releases the unmanaged resources used by the scan head and optionally releases the managed resources.
virtual void Dispose(
bool disposing
)
Parameters:
disposingWhether being disposed explicitly (true) or due to a finalizer (false).