/*
 * Go2Part.h
 * 
 * Gocator system communication library
 * Copyright (C) 2010 by LMI Technologies Inc.
 * 
 * Licensed under The MIT License.
 * Redistributions of files must retain the above copyright notice.
 */
#ifndef LMITECH_GO2_PART_H_INCLUDED
#define LMITECH_GO2_PART_H_INCLUDED

#include <Go2Object.h>
#include <Go2PartTypes.h>
#include <Go2Measurement.h>
#include <Go2ApiBegin.h>

typedef Go2Object Go2Part;              // Represents part measurement configuration.

GO2_EXPORT(Go2Double) Go2Part_HeightThresholdLimitMin(Go2Part part); //
//
//  Description:
//      Gets the minimum valid value for the HeightThreshold setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Minimum valid value for HeightThreshold (mm).

GO2_EXPORT(Go2Double) Go2Part_HeightThresholdLimitMax(Go2Part part); //
//
//  Description:
//      Gets the maximum valid value for the HeightThreshold setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Maximum valid value for HeightThreshold (mm).

GO2_EXPORT(Go2Status) Go2Part_SetHeightThreshold(Go2Part part, Go2Double height); //
//
//  Description:
//      Set the minimum height threshold for part detection. 
//  Arguments:
//      part - Go2Part object.
//      height - Minimum height threshold (mm). 
//  Returns:
//      Operation status.

GO2_EXPORT(Go2Double) Go2Part_HeightThreshold(Go2Part part); //
//
//  Description:
//      Gets the minimum height threshold for part detection. 
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Minimum height threshold (mm).

GO2_EXPORT(Go2Status) Go2Part_SetHeightThresholdDirection(Go2Part part, Go2PartHeightThresholdDirection direction); //
//
//  Description:
//      Set the height threshold direction for part detection. 
//  Arguments:
//      part - Go2Part object.
//      direction - The direction of the height threshold.
//  Returns:
//      Operation status.

GO2_EXPORT(Go2PartHeightThresholdDirection) Go2Part_HeightThresholdDirection(Go2Part part); //
//
//  Description:
//      Gets the direction of the height threshold.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Height threshold direction.

GO2_EXPORT(Go2Status) Go2Part_SetFrameOfReference(Go2Part part, Go2PartFrameOfReference frameOfReference); //
//
//  Description:
//      Set the frame of reference for detected parts. 
//  Arguments:
//      part - Go2Part object.
//      type - The frame of reference type.
//  Returns:
//      Operation status.

GO2_EXPORT(Go2PartFrameOfReference) Go2Part_FrameOfReference(Go2Part part); //
//
//  Description:
//      Gets the frame of reference type.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      The frame of reference type.

GO2_EXPORT(Go2Double) Go2Part_GapThresholdLimitMin(Go2Part part); //
//
//  Description:
//      Gets the minimum valid value for the Gap Threshold setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Minimum valid value for Gap Threshold (mm).

GO2_EXPORT(Go2Double) Go2Part_GapThresholdLimitMax(Go2Part part); //
//
//  Description:
//      Gets the maximum valid value for the Gap Threshold setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Maximum valid value for Gap Threshold (mm).

GO2_EXPORT(Go2Status) Go2Part_SetGapThreshold(Go2Part part, Go2Double gap); //
//
//  Description:
//      Sets the Gap Threshold for part detection. 
//  Arguments:
//      part - Go2Part object.
//      gap - Minimum distance between parts (mm). 
//  Returns:
//      Operation status.

GO2_EXPORT(Go2Double) Go2Part_GapThreshold(Go2Part part); //
//
//  Description:
//      Gets the Gap Threshold for part detection. 
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Part detection Gap Threshold (mm).

GO2_EXPORT(Go2Double) Go2Part_LengthMaxLimitMin(Go2Part part); //
//
//  Description:
//      Gets the minimum valid value for the LengthMax setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Minimum valid value for LengthMax (mm).

GO2_EXPORT(Go2Double) Go2Part_LengthMaxLimitMax(Go2Part part); //
//
//  Description:
//      Gets the maximum valid value for the LengthMax setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Maximum valid value for LengthMax (mm).

GO2_EXPORT(Go2Status) Go2Part_SetLengthMax(Go2Part part, Go2Double length); //
//
//  Description:
//      Sets the maximum length for part detection. 
//  Arguments:
//      part - Go2Part object.
//      length - Maximum length of a detected part (mm). 
//  Returns:
//      Operation status.

GO2_EXPORT(Go2Double) Go2Part_LengthMax(Go2Part part); //
//
//  Description:
//      Gets the maximum length for part detection. 
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Maximum length of a detected part (mm).

GO2_EXPORT(Go2Double) Go2Part_AreaThresholdLimitMin(Go2Part part); //
//
//  Description:
//      Gets the minimum valid value for the AreaMin setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Minimum valid value for AreaMin (mm^2).

GO2_EXPORT(Go2Double) Go2Part_AreaThresholdLimitMax(Go2Part part); //
//
//  Description:
//      Gets the maximum valid value for the AreaMin setting.
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Maximum valid value for AreaMin (mm^2).

GO2_EXPORT(Go2Status) Go2Part_SetAreaThreshold(Go2Part part, Go2Double area); //
//
//  Description:
//      Sets the minimum area threshold for part detection. 
//  Arguments:
//      part - Go2Part object.
//      area - Minimum part area in the XY plane (mm^2). 
//  Returns:
//      Operation status.

GO2_EXPORT(Go2Double) Go2Part_AreaThreshold(Go2Part part); //
//
//  Description:
//      Gets the minimum area threshold for part detection. 
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Minimum area threshold (mm^2).

GO2_EXPORT(Go2UInt32) Go2Part_MeasurementCount(Go2Part part); //
//
//  Description:
//      Gets the current count of part measurements. 
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Count of part measurements.

GO2_EXPORT(Go2Measurement) Go2Part_MeasurementAt(Go2Part part, Go2UInt32 index); //
//
//  Description:
//      Gets the part measurement at the specified index; 
//  Arguments:
//      part - Go2Part object.
//      index - Part measurement index. 
//  Returns:
//      Measurement configuration object.

GO2_EXPORT(Go2Status) Go2Part_AddMeasurement(Go2Part part, Go2Type type, Go2UInt32 id, Go2Measurement* measurement); //
//
//  Description:
//      Creates a new part measurement and adds it to the list of measurements. 
//  Arguments:
//      part - Go2Part object.
//      type - Part measurement type. 
//      id - Unique measurement identifier. 
//      measurement - Receives the new measurement object. 
//  Returns:
//      Operation status.

GO2_EXPORT(Go2Status) Go2Part_RemoveMeasurement(Go2Part part, Go2UInt32 index); //
//
//  Description:
//      Removes the part measurement at the specified index.
//  Arguments:
//      part - Go2Part object.
//      index - Index of part measurement to be removed.
//  Returns:
//      Operation status.

GO2_EXPORT(Go2Status) Go2Part_ClearMeasurements(Go2Part part); //
//
//  Description:
//      Removes all part measurements. 
//  Arguments:
//      part - Go2Part object.
//  Returns:
//      Operation status.

#include <Go2ApiEnd.h>

#endif      /* #ifndef LMITECH_GO2_PART_H_INCLUDED */
