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 |
---|---|
property IEnumerable< Camera > | Cameras Gets an IEnumerable<T> that can be used to iterate over all valid cameras. |
property ScanHeadCapabilities | Capabilities Gets the object that defines the various physical limits and features of a scan head. |
property IPAddress | ClientIpAddress Gets the IPAddress of the client machine's NIC that received the broadcast. |
property uint | ID Gets the unique ID of the scan head. |
property IPAddress | IpAddress Gets the IPAddress of the scan head. |
property bool | IsConnected Gets a value indicating whether the network connection to the scan head is established. |
property bool | IsScanning Gets a value indicating whether the scan head is actively scanning. |
property IEnumerable< Laser > | Lasers Gets an IEnumerable<T> that can be used to iterate over all valid lasers. |
property string | Name Gets the product name of the scan head. |
property int | NumberOfProfilesAvailable Gets the number of IProfile s available in the local buffer for the scan head. |
property ScanHeadOrientation | Orientation Gets or sets the value indicating the orientation of the scan head. |
property bool | ProfileBufferOverflowed Gets a value indicating whether the scan head profile buffer overflowed. |
property uint | SerialNumber Gets the serial number of the scan head. |
property ProductType | Type Gets the product type of the scan head. |
property 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. UseConfigure to set theScanHeadConfiguration . |
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 forScanHeadConfiguration.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 toConfigure(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 toConfigure(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 Cameras. |
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 andNumberOfProfilesAvailable 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 andNumberOfProfilesAvailable . |
bool | WaitUntilProfilesAvailable (int count, TimeSpan timeout, CancellationToken token=default) Blocks until the number of requested IProfile s are avilable to be read out. |
async Task< bool > | WaitUntilProfilesAvailableAsync (int count, TimeSpan timeout, CancellationToken token=default) Blocks until the number of requested IProfile s are avilable 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¶
property 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.
property 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.
property 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.
property ID¶
Gets the unique ID of the scan head.
uint ID;
The unique ID of the scan head.
property IpAddress¶
Gets the IPAddress of the scan head.
IPAddress IpAddress;
The IPAddress of the scan head.
property 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.
property IsScanning¶
Gets a value indicating whether the scan head is actively scanning.
bool IsScanning;
A value indicating whether the scan head is actively scanning.
property 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.
property Name¶
Gets the product name of the scan head.
string Name;
The product name of the scan head.
property 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.
property Orientation¶
Gets or sets the value indicating the orientation of the scan head.
ScanHeadOrientation Orientation;
The ScanHeadOrientation of the scan head.
property 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.
property SerialNumber¶
Gets the serial number of the scan head.
uint SerialNumber;
The serial number of the scan head.
property Type¶
Gets the product type of the scan head.
ProductType Type;
The product type of the scan head.
property 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¶
function ClearProfiles¶
Empties the internal client side software buffers used to store profiles received from a given scan head.
inline void JoeScan::Pinchot::ScanHead::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.
function Configure¶
Configures the scan head.
inline void JoeScan::Pinchot::ScanHead::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:
configuration
The ScanHeadConfiguration to use for configuration of the scan head.
Exception:
InvalidOperationException
IsScanning istrue
.ArgumentNullException
configuration isnull
.ArgumentOutOfRangeException
If any of the exposure or laser on time values are out of the minimum or maximum ranges for the scan head.
function CreateExclusionMask¶
Creates a new ExclusionMask with the dimensions of the camera(s) of the scan head.
inline ExclusionMask JoeScan::Pinchot::ScanHead::CreateExclusionMask ()
Returns:
A clear ExclusionMask.
function Dispose [1/2]¶
inline void JoeScan::Pinchot::ScanHead::Dispose ()
function GetConfigurationClone¶
Gets a clone of the ScanHeadConfiguration used to configure the scan head. UseConfigure to set theScanHeadConfiguration .
inline ScanHeadConfiguration JoeScan::Pinchot::ScanHead::GetConfigurationClone ()
A clone of the ScanHeadConfiguration used to configure the scan head.
function GetDiagnosticCameraImage [1/5]¶
Captures an image from the specified Camera without turning on the laser. Exposes the camera for ScanHeadConfiguration.DefaultCameraExposureTimeUs .
inline CameraImage JoeScan::Pinchot::ScanHead::GetDiagnosticCameraImage (
Camera camera,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
camera
The Camera from which to capture the image.imageDataType
The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
camera isn't valid.
function GetDiagnosticCameraImage [2/5]¶
Captures an image from the specified Camera without turning on the laser.
inline CameraImage JoeScan::Pinchot::ScanHead::GetDiagnosticCameraImage (
Camera camera,
uint cameraExposureUs,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
camera
The Camera from which to capture the image.cameraExposureUs
How long the camera should expose for in microseconds.imageDataType
The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
camera isn't valid.ArgumentOutOfRangeException
cameraExposureUs is too long or too short.
function 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 forScanHeadConfiguration.DefaultLaserOnTimeUs .
inline CameraImage JoeScan::Pinchot::ScanHead::GetDiagnosticCameraImage (
Camera camera,
Laser laser,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
camera
The Camera from which to capture the image.laser
The Laser that should be on during the image capture.imageDataType
The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
camera isn't valid. -or- laser isn't valid.
function 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.
inline CameraImage JoeScan::Pinchot::ScanHead::GetDiagnosticCameraImage (
Camera camera,
Laser laser,
uint laserOnTimeUs,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
camera
The Camera from which to capture the image.laser
The Laser that should be on during the image capture.laserOnTimeUs
How long the laser should be on for during the image capture in microseconds.imageDataType
The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
camera isn't valid. -or- laser isn't valid.ArgumentOutOfRangeException
laserOnTimeUs is too long or too short.
function GetDiagnosticCameraImage [5/5]¶
Captures an image from the specified Camera while a Laser is on.
inline CameraImage JoeScan::Pinchot::ScanHead::GetDiagnosticCameraImage (
Camera camera,
uint cameraExposureUs,
Laser laser,
uint laserOnTimeUs,
DiagnosticImageType imageDataType=DiagnosticImageType.Masked
)
Parameters:
camera
The Camera from which to capture the image.cameraExposureUs
How long the camera should expose for in microseconds.laser
The Laser that should be on during the image capture.laserOnTimeUs
How long the laser should be on for during the image capture in microseconds.imageDataType
The DiagnosticImageType determines whether the returned image should contain raw pixel data or pixels merged with the mask.
Returns:
The CameraImage.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
camera isn't valid. -or- laser isn't valid.ArgumentOutOfRangeException
cameraExposureUs is too long or too short. -or- laserOnTimeUs is too long or too short.
function 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 toConfigure(ScanHeadConfiguration) .
inline IProfile JoeScan::Pinchot::ScanHead::GetDiagnosticProfile (
Camera camera
)
Parameters:
camera
The 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 and laser on time will be set to ScanHeadConfiguration.DefaultLaserOnTimeUs.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
Trying to use a camera-driven function with a laser-driven scan head. Use GetDiagnosticProfile(Laser) instead.
function GetDiagnosticProfile [3/5]¶
Obtains a single profile from a scan head to be used for diagnostic purposes.
inline IProfile JoeScan::Pinchot::ScanHead::GetDiagnosticProfile (
Camera camera,
uint cameraExposureUs,
uint laserOnTimeUs
)
Parameters:
camera
The Camera used for the profile capture.cameraExposureUs
The exposure time for the camera in microseconds.laserOnTimeUs
The laser on time of the associated Laser in microseconds.
Returns:
An IProfile from camera and its associated Laser.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
Trying to use a camera-driven function with a laser-driven scan head. Use GetDiagnosticProfile(Laser, uint, uint) instead.
function 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 toConfigure(ScanHeadConfiguration) .
inline IProfile JoeScan::Pinchot::ScanHead::GetDiagnosticProfile (
Laser laser
)
Parameters:
laser
The 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:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
Trying to use a laser-driven function with a camera-driven scan head. Use GetDiagnosticProfile(Camera) instead.
function GetDiagnosticProfile [5/5]¶
Obtains a single profile from a scan head to be used for diagnostic purposes.
inline IProfile JoeScan::Pinchot::ScanHead::GetDiagnosticProfile (
Laser laser,
uint cameraExposureUs,
uint laserOnTimeUs
)
Parameters:
laser
The Laser used for the profile capture.cameraExposureUs
The exposure time for the associated Camera in microseconds.laserOnTimeUs
The laser on time of the laser in microseconds.
Returns:
An IProfile from laser and its associated Camera.
Exception:
InvalidOperationException
IsConnected isfalse
. -or- IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
Trying to use a laser-driven function with a camera-driven scan head. Use GetDiagnosticProfile(Camera, uint, uint) instead.
function Reboot [1/2]¶
Performs a remote soft power cycle of the scan head.
inline void JoeScan::Pinchot::ScanHead::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:
IOException
A loss of communication with the scan head occurred, usually caused by a network or power issue.
function RequestStatus¶
Requests a new status from the scan head.
inline ScanHeadStatus JoeScan::Pinchot::ScanHead::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:
InvalidOperationException
IsConnected isfalse
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.
function 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 Cameras.
inline void JoeScan::Pinchot::ScanHead::SetAlignment (
double rollDegrees,
double shiftX,
double shiftY
)
Parameters:
rollDegrees
The rotation around the Z axis in the mill coordinate system in degrees.shiftX
The shift along the X axis in the mill coordinate system in ScanSystemUnits.shiftY
The shift along the Y axis in the mill coordinate system in ScanSystemUnits.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.
function 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.
inline void JoeScan::Pinchot::ScanHead::SetAlignment (
Camera camera,
double rollDegrees,
double shiftX,
double shiftY
)
Parameters:
camera
The Camera which to set the alignment of.rollDegrees
The rotation around the Z axis in the mill coordinate system in degrees.shiftX
The shift along the X axis in the mill coordinate system in ScanSystemUnits.shiftY
The shift along the Y axis in the mill coordinate system in ScanSystemUnits.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
Trying to use a camera-driven function with a laser-driven scan head. Use SetAlignment(Laser, double, double, double) instead.
function 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.
inline void JoeScan::Pinchot::ScanHead::SetAlignment (
Laser laser,
double rollDegrees,
double shiftX,
double shiftY
)
Parameters:
laser
The Laser which to set the alignment of.rollDegrees
The rotation around the Z axis in the mill coordinate system in degrees.shiftX
The shift along the X axis in the mill coordinate system in ScanSystemUnits.shiftY
The shift along the Y axis in the mill coordinate system in ScanSystemUnits.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentException
Trying to use a laser-driven function with a camera-driven scan head. Use SetAlignment(Camera, double, double, double) instead.
function SetExclusionMask [1/2]¶
Sets the ExclusionMask for the__camera supplied.
inline void JoeScan::Pinchot::ScanHead::SetExclusionMask (
Camera camera,
ExclusionMask mask
)
Parameters:
camera
The Camera that the mask will be applied to.mask
The ExclusionMask to be applied.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullException
mask is null.ArgumentException
Trying to use a camera-driven function with a laser-driven scan head. Use SetExclusionMask(Laser, ExclusionMask) instead.
function SetExclusionMask [2/2]¶
Sets the ExclusionMask for the__laser supplied.
inline void JoeScan::Pinchot::ScanHead::SetExclusionMask (
Laser laser,
ExclusionMask mask
)
Parameters:
laser
The Laser that the mask will be applied to.mask
The ExclusionMask to be applied.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullException
mask is null.ArgumentException
Trying to use a camera-driven function with a laser-driven scan head. Use SetExclusionMask(Laser, ExclusionMask) instead.
function SetWindow [2/4]¶
Sets the ScanWindow for the scan head. The window restricts where the scan head looks for valid points in mill space.
inline void JoeScan::Pinchot::ScanHead::SetWindow (
ScanWindow window
)
Parameters:
window
The ScanWindow to use for the scan head.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullException
window is null.
function SetWindow [3/4]¶
Sets the ScanWindow for__camera . The window restricts where the scan head looks for valid points in mill space.
inline void JoeScan::Pinchot::ScanHead::SetWindow (
Camera camera,
ScanWindow window
)
Parameters:
camera
The Camera to apply the window to.window
The ScanWindow to use for the scan head.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullException
window is null.ArgumentException
Trying to use a camera-driven function with a laser-driven scan head. Use SetWindow(Laser, ScanWindow) instead.
function SetWindow [4/4]¶
Sets the ScanWindow for__laser . The window restricts where the scan head looks for valid points in mill space.
inline void JoeScan::Pinchot::ScanHead::SetWindow (
Laser laser,
ScanWindow window
)
Parameters:
laser
The Laser to apply the window to.window
The ScanWindow to use for the scan head.
Exception:
InvalidOperationException
IsScanning istrue
. -or- A loss of communication with the scan head occurred, usually caused by a network or power issue.ArgumentNullException
window is null.ArgumentException
Trying to use a laser-driven function with a camera-driven scan head. Use SetWindow(Camera, ScanWindow) instead.
function TakeNextProfile¶
Takes an IProfile from the queue, blocking if the queue is empty.
inline IProfile JoeScan::Pinchot::ScanHead::TakeNextProfile (
CancellationToken token=default
)
Parameters:
token
The CancellationToken to observe.
Returns:
The dequeued IProfile.
function TryTakeNextProfile¶
Tries to take an IProfile from the queue.
inline bool JoeScan::Pinchot::ScanHead::TryTakeNextProfile (
out IProfile profile,
TimeSpan timeout=default,
CancellationToken token=default
)
Parameters:
profile
The dequeued IProfile.timeout
The time to wait for a profile when the queue is empty.token
CancellationToken to observe.
Returns:
Whether a IProfile was successfully taken.
Exception:
InvalidOperationException
Thrown if IsConnected isfalse
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.
function TryTakeProfiles [1/2]¶
Takes a number of IProfile s from the queue. The IEnumerable<T> returned contains the lesser of__maxCount andNumberOfProfilesAvailable profiles.
inline IEnumerable< IProfile > JoeScan::Pinchot::ScanHead::TryTakeProfiles (
int maxCount,
TimeSpan timeout=default,
CancellationToken token=default
)
Parameters:
maxCount
The maximum number of profiles to read.timeout
The time to wait for a profile when the queue is empty. Use a TimeSpan that represents -1 milliseconds to wait indefinitely.token
CancellationToken to observe.
Returns:
An IEnumerable<T> of profiles.
Exception:
InvalidOperationException
Thrown if IsConnected isfalse
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.
function 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 andNumberOfProfilesAvailable .
inline int JoeScan::Pinchot::ScanHead::TryTakeProfiles (
Span< IProfile > profiles,
TimeSpan timeout=default,
CancellationToken token=default
)
Parameters:
profiles
The preallocated destination buffer.timeout
The time to wait for a profile when the queue is empty. Use a TimeSpan that represents -1 milliseconds to wait indefinitely.token
CancellationToken to observe.
Returns:
The number of profiles dequeued and placed in profiles .
Exception:
InvalidOperationException
Thrown if IsConnected isfalse
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.
function WaitUntilProfilesAvailable¶
Blocks until the number of requested IProfile s are avilable to be read out.
inline bool JoeScan::Pinchot::ScanHead::WaitUntilProfilesAvailable (
int count,
TimeSpan timeout,
CancellationToken token=default
)
Parameters:
count
Number of IProfiles to wait for.timeout
Maximum amount of time to wait.token
Token to observe.
Returns:
true
if the requested number of profiles are available or false
if the timeout elapses or the operation is canceled.
Exception:
ArgumentOutOfRangeException
count is greater than Globals.ProfileQueueSize.
See also: NumberOfProfilesAvailable, WaitUntilProfilesAvailableAsync(int, TimeSpan, CancellationToken)
function WaitUntilProfilesAvailableAsync¶
Blocks until the number of requested IProfile s are avilable to be read out.
inline async Task< bool > JoeScan::Pinchot::ScanHead::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:
count
Number of IProfiles to wait for.timeout
Maximum amount of time to wait.token
Token to observe.
Returns:
true
if the requested number of profiles are available or false
if the timeout elapses or the operation is canceled.
Exception:
ArgumentOutOfRangeException
count is greater than Globals.ProfileQueueSize.
See also: NumberOfProfilesAvailable, WaitUntilProfilesAvailable(int, TimeSpan, CancellationToken)
Public Static Functions Documentation¶
function Reboot [2/2]¶
Performs a remote soft power cycle of the scan head.
static inline void JoeScan::Pinchot::ScanHead::Reboot (
uint serial
)
Parameters:
serial
The 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:
IOException
A loss of communication with the scan head occurred, usually caused by a network or power issue.
Protected Functions Documentation¶
function Dispose [2/2]¶
Releases the unmanaged resources used by the scan head and optionally releases the managed resources.
inline virtual void JoeScan::Pinchot::ScanHead::Dispose (
bool disposing
)
Parameters:
disposing
Whether being disposed explicitly (true) or due to a finalizer (false).
The documentation for this class was generated from the following file C:/Users/michp/Documents/Projects/fawkes/client-net/Api/src/JoeScan.Pinchot/src/ScanHead.cs