/*
 * Go2DataTypes.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_DATA_TYPES_H_INCLUDED
#define LMITECH_GO2_DATA_TYPES_H_INCLUDED

#include <Go2Measurement.h>
#include <Go2ProfileTypes.h>
#include <Go2ApiBegin.h>

/*
 * Go2VideoData Class 
 */

typedef Go2Object Go2VideoData;          // Represents video content within a data message.

GO2_EXPORT(Go2UInt32) Go2VideoData_Source(Go2VideoData data); //
//
//  Description:
//      Gets the source identifier for the video data. 
//  Arguments:
//      data - Go2VideoData object. 
//  Returns: 
//      Source id. 

GO2_EXPORT(Go2UInt32) Go2VideoData_Height(Go2VideoData data); //
//
//  Description:
//      Gets the height of the video image. 
//  Arguments:
//      data - Go2VideoData object. 
//  Returns: 
//      Number of rows in the image.

GO2_EXPORT(Go2UInt32) Go2VideoData_Width(Go2VideoData data); //
//
//  Description:
//      Gets the width of the video image. 
//  Arguments:
//      data - Go2VideoData object. 
//  Returns: 
//      Number of columns in the image.

GO2_EXPORT(Go2UInt32) Go2VideoData_CameraIndex(Go2VideoData data); //
//
//  Description:
//      Gets the camera index for the video data. 
//  Arguments:
//      data - Go2VideoData object. 
//  Returns: 
//      Source id.
//  Remarks:
//      The function will always return 0 for single camera sensors.

GO2_EXPORT(Go2UInt32) Go2VideoData_ExposureIndex(Go2VideoData data); //
//
//  Description:
//      Gets the exposure index of the video data. Relevant when using multiple exposures.
//  Arguments:
//      data - Go2VideoData object. 
//  Returns: 
//      Exposure time (ms). 
//  Remarks:
//      The function will always return 0 in single exposure mode.

GO2_EXPORT(Go2Double) Go2VideoData_Exposure(Go2VideoData data); //
//
//  Description:
//      Gets the exposure time of the video data.
//  Arguments:
//      data - Go2VideoData object. 
//  Returns: 
//      Exposure time (ms). 

GO2_EXPORT(Go2UInt8*) Go2VideoData_PixelsAt(Go2VideoData data, Go2UInt32 rowIndex);  //
//
//  Description:
//      Gets a pointer to the video row at the specified index. 
//  Arguments:
//      data - Go2VideoData object. 
//      rowIndex - Index of the desired row.
//  Returns: 
//      Pointer to the first pixel in the video row.


/*
 * Go2RangeData Class 
 */

typedef Go2Object Go2RangeData;       // Represents profile content within a data message.

GO2_EXPORT(Go2DataSource) Go2RangeData_Source(Go2RangeData data); //
//
//  Description:
//      Gets the source for the profile data. 
//  Arguments:
//      data - Go2RangeData object. 
//  Returns: 
//      Range source type.

GO2_EXPORT(Go2Double) Go2RangeData_ZResolution(Go2RangeData data); //
//
//  Description:
//      Gets the z resolution of the profile data.  
//      This is a scaling factor used to convert profile data into actual units (mm).
//      This value does not bear any relationship to the configured system Z resolution.
//  Arguments:
//      data - Go2RangeData object. 
//  Returns: 
//      Z resolution (mm). 

GO2_EXPORT(Go2Double) Go2RangeData_ZOffset(Go2RangeData data); //
//
//  Description:
//      Gets the z offset of the profile data. 
//      Will always be zero as range data is returned from the sensor with offsets applied. 
//      This value does not bear any relationship to the configured active area.
//  Arguments:
//      data - Go2RangeData object. 
//  Returns: 
//      Z offset (mm). 

GO2_EXPORT(Go2Double) Go2RangeData_Exposure(Go2RangeData data); //
//
//  Description:
//      Gets the exposure time of the profile data. Set to 0 if from multiple exposures 
//      or sensors are used.
//  Arguments:
//      data - Go2RangeData object. 
//  Returns: 
//      Exposure time (ms). 

GO2_EXPORT(Go2Int16) Go2RangeData_Range(Go2RangeData data); //
//
//  Description:
//      Gets the range data in system units.
//      The calculation for each point is: 
//          X: 0 
//          Z: ZOffset + range * ZResolution
//      Invalid ranges are equal to GO2_INVALID_RANGE
//  Arguments:
//      data - Go2RangeData object. 
//  Returns: 
//      Range value.


/*
 * Go2RangeIntensityData Class 
 */

typedef Go2Object Go2RangeIntensityData;       // Represents the intensity of a profile data message.

GO2_EXPORT(Go2DataSource) Go2RangeIntensityData_Source(Go2RangeIntensityData data); //
//
//  Description:
//      Gets the source for the profile intensity data. 
//  Arguments:
//      data - Go2RangeIntensityData object. 
//  Returns: 
//      Range intensity source type.

GO2_EXPORT(Go2UInt8) Go2RangeIntensityData_Value(Go2RangeIntensityData data); //
//
//  Description:
//      Gets a the intensity value. This is intended to be paired with the matching
//      source range data
//  Arguments:
//      data - Go2RangeIntensityData object. 
//  Returns: 
//      Intensity value.


/*
 * Go2ProfileData Class 
 */

typedef Go2Object Go2ProfileData;       // Represents profile content within a data message.

GO2_EXPORT(Go2ProfileSource) Go2ProfileData_Source(Go2ProfileData data); //
//
//  Description:
//      Gets the source for the profile data. 
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      Profile source type.

GO2_EXPORT(Go2Double) Go2ProfileData_XResolution(Go2ProfileData data); //
//
//  Description:
//      Gets the x resolution of the profile data.  
//      This is a scaling factor used to convert profile data into actual units (mm).
//      This value does not bear any relationship to the configured system X resolution.
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      X resolution (mm). 

GO2_EXPORT(Go2Double) Go2ProfileData_ZResolution(Go2ProfileData data); //
//
//  Description:
//      Gets the z resolution of the profile data.  
//      This is a scaling factor used to convert profile data into actual units (mm).
//      This value does not bear any relationship to the configured system Z resolution.
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      Z resolution (mm). 

GO2_EXPORT(Go2Double) Go2ProfileData_XOffset(Go2ProfileData data); //
//
//  Description:
//      Gets the x offset of the profile data.  
//      This value does not bear any relationship to the configured active area.
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      X offset (mm). 

GO2_EXPORT(Go2Double) Go2ProfileData_ZOffset(Go2ProfileData data); //
//
//  Description:
//      Gets the z offset of the profile data. 
//      Will always be zero as range data is returned from the sensor with offsets applied. 
//      This value does not bear any relationship to the configured active area.
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      Z offset (mm). 

GO2_EXPORT(Go2Double) Go2ProfileData_Exposure(Go2ProfileData data); //
//
//  Description:
//      Gets the exposure time of the profile data. Set to 0 if from multiple exposures 
//      or sensors are used.
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      Exposure time (ms). 

GO2_EXPORT(Go2UInt32) Go2ProfileData_Width(Go2ProfileData data); //
//
//  Description:
//      Gets the width of the profile data.  
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      Number of data values in the range array.

GO2_EXPORT(Go2Int16*) Go2ProfileData_Ranges(Go2ProfileData data); //
//
//  Description:
//      Gets a pointer to the profile data.
//      Profile data is a 1-dimensional array of z-data, spaced XResolution steps apart.
//      The calculation for each point is: 
//          X: XOffset + index * XResolution 
//          Z: ZOffset + ranges[index] * ZResolution
//      Invalid ranges are equal to GO2_INVALID_RANGE
//  Arguments:
//      data - Go2ProfileData object. 
//  Returns: 
//      Pointer to the first range value in the profile array.


/*
 * Go2RawProfileData Class 
 */

typedef Go2Object Go2RawProfileData;       // Represents profile content within a data message.

GO2_EXPORT(Go2ProfileSource) Go2RawProfileData_Source(Go2RawProfileData data); //
//
//  Description:
//      Gets the source for the raw profile data. 
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      Profile source type.

GO2_EXPORT(Go2Double) Go2RawProfileData_XResolution(Go2RawProfileData data); //
//
//  Description:
//      Gets the x resolution of the raw profile data.  
//      This is a scaling factor used to convert profile data into actual units (mm).
//      This value does not bear any relationship to the configured system X resolution.
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      X resolution (mm). 

GO2_EXPORT(Go2Double) Go2RawProfileData_ZResolution(Go2RawProfileData data); //
//
//  Description:
//      Gets the z resolution of the raw profile data.  
//      This is a scaling factor used to convert profile data into actual units (mm).
//      This value does not bear any relationship to the configured system Z resolution.
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      Z resolution (mm). 

GO2_EXPORT(Go2Double) Go2RawProfileData_XOffset(Go2RawProfileData data); //
//
//  Description:
//      Gets the x offset of the raw profile data.  
//      Will always be zero as range data is returned from the sensor with offsets applied. 
//      This value does not bear any relationship to the configured active area.
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      X offset (mm). 

GO2_EXPORT(Go2Double) Go2RawProfileData_ZOffset(Go2RawProfileData data); //
//
//  Description:
//      Gets the z offset of the raw profile data.  
//      Will always be zero as range data is returned from the sensor with offsets applied. 
//      This value does not bear any relationship to the configured active area.
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      Z offset (mm). 

GO2_EXPORT(Go2Double) Go2RawProfileData_Exposure(Go2RawProfileData data); //
//
//  Description:
//      Gets the exposure time of the raw profile data. Set to 0 if from multiple exposures 
//      or sensors are used.
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      Exposure time (ms). 

GO2_EXPORT(Go2UInt32) Go2RawProfileData_Width(Go2RawProfileData data); //
//
//  Description:
//      Gets the width of the raw profile data.  
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      Number of data values in the range array.

GO2_EXPORT(Go2Int16*) Go2RawProfileData_Ranges(Go2RawProfileData data); //
//
//  Description:
//      Gets a pointer to the raw profile data. 
//      Raw data is a 2-dimensional array of [x,z] data, with XResolution and ZResolution units.
//      The calculation for each point is: 
//          X: XOffset + ranges[index][0] * XResolution 
//          Z: ZOffset + ranges[index][1] * ZResolution
//      Invalid ranges are equal to GO2_INVALID_RANGE
//  Arguments:
//      data - Go2RawProfileData object. 
//  Returns: 
//      Pointer to the first range value in the profile array.


/*
 * Go2ProfileIntensityData Class 
 */

typedef Go2Object Go2ProfileIntensityData;       // Represents the intensity of a profile data message.

GO2_EXPORT(Go2ProfileSource) Go2ProfileIntensityData_Source(Go2ProfileIntensityData data); //
//
//  Description:
//      Gets the source for the profile intensity data. 
//  Arguments:
//      data - Go2ProfileIntensityData object. 
//  Returns: 
//      Profile intensity source type.

GO2_EXPORT(Go2UInt32) Go2ProfileIntensityData_Width(Go2ProfileIntensityData data); //
//
//  Description:
//      Gets the width of the profile intensity data.  
//  Arguments:
//      data - Go2ProfileIntensityData object. 
//  Returns: 
//      Number of data values in the profile intensity array.

GO2_EXPORT(Go2UInt8*) Go2ProfileIntensityData_Values(Go2ProfileIntensityData data); //
//
//  Description:
//      Gets a pointer to the profile data.This is intended to be paired with the matching
//      source profile data
//  Arguments:
//      data - Go2ProfileIntensityData object. 
//  Returns: 
//      Pointer to the first value in the profile intensity array.


/*
 * Go2RawProfileIntensityData Class 
 */

typedef Go2Object Go2RawProfileIntensityData;       // Represents the intensity of a raw profile data message.

GO2_EXPORT(Go2ProfileSource) Go2RawProfileIntensityData_Source(Go2RawProfileIntensityData data); //
//
//  Description:
//      Gets the source for the raw profile intensity data. 
//  Arguments:
//      data - Go2RawProfileIntensityData object. 
//  Returns: 
//      Raw profile intensity source type.

GO2_EXPORT(Go2UInt32) Go2RawProfileIntensityData_Width(Go2RawProfileIntensityData data); //
//
//  Description:
//      Gets the width of the raw profile intensity data.  
//  Arguments:
//      data - Go2RawProfileIntensityData object. 
//  Returns: 
//      Number of data values in the raw profile intensity array.

GO2_EXPORT(Go2UInt8*) Go2RawProfileIntensityData_Values(Go2RawProfileIntensityData data); //
//
//  Description:
//      Gets a pointer to the raw profile intensity data. This is intended to be paired with the matching
//      source raw profile data
//  Arguments:
//      data - Go2RawProfileIntensityData object. 
//  Returns: 
//      Pointer to the first range value in the raw profile intensity array.


/*
 * Go2PartData Class 
 */

typedef Go2Object Go2PartData;       // Represents part profile content within a data message.

GO2_EXPORT(Go2PartSource) Go2PartData_Source(Go2PartData data); //
//
//  Description:
//      Gets the source for the part data. 
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      Profile source type.

GO2_EXPORT(Go2Double) Go2PartData_XResolution(Go2PartData data); //
//
//  Description:
//      Gets the x resolution of the profile data.  
//      This is a scaling factor used to convert profile data into actual units (mm).
//      This value does not bear any relationship to the configured system X resolution.
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      X resolution (mm). 

GO2_EXPORT(Go2Double) Go2PartData_YResolution(Go2PartData data); //
//
//  Description:
//      Gets the y resolution of the profile data.  
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      Y resolution (mm). 

GO2_EXPORT(Go2Double) Go2PartData_ZResolution(Go2PartData data); //
//
//  Description:
//      Gets the z resolution of the profile data.  
//      This is a scaling factor used to convert profile data into actual units (mm).
//      This value does not bear any relationship to the configured system Z resolution.
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      Z resolution (mm). 

GO2_EXPORT(Go2Double) Go2PartData_XOffset(Go2PartData data); //
//
//  Description:
//      Gets the x offset of the part data.  
//      This value does not bear any relationship to the configured active area.
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      X offset (mm). 

GO2_EXPORT(Go2Double) Go2PartData_YOffset(Go2PartData data); //
//
//  Description:
//      Gets the y offset of the part data. This is a measure of distance traveled since the last 
//      system start.
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      Y offset (mm). 

GO2_EXPORT(Go2Double) Go2PartData_ZOffset(Go2PartData data); //
//
//  Description:
//      Gets the z offset of the part data.  
//      Will always be zero as range data is returned from the sensor with offsets applied. 
//      This value does not bear any relationship to the configured active area.
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      Z offset (mm). 

GO2_EXPORT(Go2UInt32) Go2PartData_Length(Go2PartData data); //
//
//  Description:
//      Gets the number of rows in the part data.
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      Length of the part data.
 
GO2_EXPORT(Go2UInt32) Go2PartData_Width(Go2PartData data); //
//
//  Description:
//      Gets the number of columns in the part data.
//  Arguments:
//      data - Go2PartData object. 
//  Returns: 
//      Width of the part data.
 
GO2_EXPORT(Go2Int16*) Go2PartData_RangesAt(Go2PartData data, Go2UInt32 rowIndex); //
//
//  Description:
//      Gets a pointer to the part profile data at the specified row index.
//      Each row data is a 1-dimensional array of z-data, spaced XResolution steps apart.
//      The calculation for each point is: 
//          X: XOffset + index * XResolution 
//          Z: ZOffset + ranges[index] * ZResolution
//          Y: YOffset + rowIndex * YResolution
//      Invalid ranges are equal to GO2_INVALID_RANGE
//  Arguments:
//      data - Go2ProfileData object. 
//      rowIndex - Index of the desired row.
//  Returns: 
//      Pointer to the first range value in the specified row.


/*
 * Go2PartIntensityData Class 
 */

typedef Go2Object Go2PartIntensityData;       // Represents the intensity of a part data message.

GO2_EXPORT(Go2PartSource) Go2PartIntensityData_Source(Go2PartIntensityData data); //
//
//  Description:
//      Gets the source for the part intensity data. 
//  Arguments:
//      data - Go2PartIntensityData object. 
//  Returns: 
//      Part intensity source type.

GO2_EXPORT(Go2UInt32) Go2PartIntensityData_Width(Go2PartIntensityData data); //
//
//  Description:
//      Gets the number of columns in the part intensity data.
//  Arguments:
//      data - Go2PartIntensityData object. 
//  Returns: 
//      Width of the part intensity data.

GO2_EXPORT(Go2UInt32) Go2PartIntensityData_Length(Go2PartIntensityData data); //
//
//  Description:
//      Gets the number of rows in the part intensity data.
//  Arguments:
//      data - Go2PartIntensityData object. 
//  Returns: 
//      Length of the part intensity data.

GO2_EXPORT(Go2UInt8*) Go2PartIntensityData_ValuesAt(Go2PartIntensityData data, Go2UInt32 rowIndex); //
//
//  Description:
//      Gets a pointer to the part intensity data. This is intended to be paired with the matching
//      source part data.
//  Arguments:
//      data - Go2PartIntensityData object. 
//      rowIndex - Index of the desired row.
//  Returns: 
//      Pointer to the first range value in the part intensity array.


/*
 * Go2AlignmentData Class 
 */

typedef Go2Object Go2AlignmentData;       // Represents alignment calibration data within a data message.

GO2_EXPORT(Go2Status) Go2AlignmentData_Status(Go2AlignmentData data); //
//
//  Description:
//      Gets the outcome of the alignment calibration process. 
//  Arguments:
//      data - Go2AlignmentData object. 
//  Returns: 
//      Calibration outcome.


/*
 * Go2TravelData Class 
 */

typedef Go2Object Go2TravelData;        // Represents travel calibration data within a data message.

GO2_EXPORT(Go2Status) Go2TravelData_Status(Go2TravelData data); //
//
//  Description:
//      Gets the outcome of the travel calibration process. 
//  Arguments:
//      data - Go2TravelData object. 
//  Returns: 
//      Calibration outcome.

/*
 * Go2ReferenceImageData Class 
 */

typedef Go2Object Go2ReferenceImageData;       // Represents reference image data within a data message.

GO2_EXPORT(Go2Status) Go2ReferenceImage_State(Go2ReferenceImageData data); //
//
//  Description:
//      Gets the state of the background suppression reference image set command. 
//  Arguments:
//      data - Go2ReferenceImageData object. 
//  Returns: 
//      Calibration outcome.


/*
 * Go2ProfileTemplateData Class 
 */

typedef Go2Object Go2ProfileTemplateData;        // Represents profile template registration data within a data message.

GO2_EXPORT(Go2Status) Go2ProfileTemplateData_Status(Go2ProfileTemplateData data); //
//
//  Description:
//      Gets the outcome of the profile template registration process. 
//  Arguments:
//      data - Go2ProfileTemplateData object. 
//  Returns: 
//      Profile template registration outcome.


/*
 * Go2ExposureData Class 
 */

typedef Go2Object Go2ExposureData;       // Represents exposure calibration data within a data message.

GO2_EXPORT(Go2Status) Go2ExposureData_Status(Go2ExposureData data); //
//
//  Description:
//      Gets the outcome of the exposure calibration process. 
//  Arguments:
//      data - Go2ExposureData object. 
//  Returns: 
//      Calibration outcome.

GO2_EXPORT(Go2Double) Go2ExposureData_Value(Go2ExposureData data); //
//
//  Description:
//      Gets the value of the exposure calibration process. 
//  Arguments:
//      data - Go2ExposureData object. 
//  Returns: 
//      Exposure calibration value (microseconds).


/*
 * Go2MeasurementData Class 
 */

typedef Go2Object Go2MeasurementData;    // Represents measurement data within a data message.

GO2_EXPORT(Go2MeasurementType) Go2MeasurementData_Type(Go2MeasurementData data); //
//
//  Description:
//      Gets an identifier that reports the measurement type.
//  Arguments:
//      data - Go2MeasurementData object. 
//  Returns: 
//      Measurement type identifier. 

GO2_EXPORT(Go2UInt32) Go2MeasurementData_Source(Go2MeasurementData data); //
//
//  Description:
//      Gets the measurement source identifier.
//  Arguments:
//      data - Go2MeasurementData object. 
//  Returns: 
//      Source identifier.
//  Remarks: 
//      The measurement source identifier corresponds to the unique id that was given 
//      to measurement when it was configured.

GO2_EXPORT(Go2Bool) Go2MeasurementData_IsValid(Go2MeasurementData data); //
//
//  Description:
//      Reports whether the measurement value/decision were correctly computed from valid data.
//  Arguments:
//      data - Go2MeasurementData object. 
//  Returns: 
//      GO2_TRUE if measurement is valid, GO2_FALSE otherwise. 

GO2_EXPORT(Go2Double) Go2MeasurementData_Value(Go2MeasurementData data); //
//
//  Description:
//      Gets the measurement result value.
//  Arguments:
//      data - Go2MeasurementData object. 
//  Returns: 
//      Measurement result value (units are measurement-specific).

GO2_EXPORT(Go2Bool) Go2MeasurementData_Decision(Go2MeasurementData data); //
//
//  Description:
//      Gets the measurement decision value.
//  Arguments:
//      data - Go2MeasurementData object. 
//  Returns: 
//      Measurement decision value.


/*
 * Go2CustomData Class 
 */

typedef Go2Object Go2CustomData;    // Represents measurement data within a data message.

GO2_EXPORT(const Go2Int64*) Go2CustomData_Attributes(Go2CustomData data); //
//
//  Description:
//      Retrieves a pointer to the attribute array contained within the data object.
//  Arguments:
//      data - Go2CustomData object. 
//  Returns: 
//      A pointer to an array of attributes.

GO2_EXPORT(Go2UInt32) Go2CustomData_Width(Go2CustomData data, Go2UInt32 dimension); //
//
//  Description:
//      Returns the width of the data provided.
//  Arguments:
//      data - Go2CustomData object. 
//      dimension - The index of the dimension whose width is to be returned.
//  Returns: 
//      An integer representing the width of the data.


GO2_EXPORT(Go2UInt32) Go2CustomData_ItemDimensions(Go2CustomData data, Go2UInt32 itemIndex); //
//
//  Description:
//      Returns the dimension of the data contained at the given item index.
//  Arguments:
//      data - Go2CustomData object. 
//      itemIndex - The index of the data item to check.
//  Returns: 
//      0 to indicate an invalid item index, 
//      1 to indicate that the data is a one dimensional array,
//      2 to indicate that the data is a two dimensional array,
//   or 3 to indicate that the data is a three dimensional array.

//array type (itemtype)

#include <Go2ApiEnd.h>

#endif      /* #ifndef LMITECH_GO2_DATA_TYPES_H_INCLUDED */
