/*
 * zGo2Part.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_Z_PART_H_INCLUDED
#define LMITECH_GO2_Z_PART_H_INCLUDED

#include <Go2Part.h>
#include <z/zGo2Object.h>
#include <Go2System.h>
#include <zXml.h>
#include <zList.h>
#include <Go2ApiBegin.h>

typedef struct Go2PartClass
{
    GO2_OBJECT_FIELDS(); 

    Go2Object system; 
    
    Go2Double heightThresholdLimitMin; 
    Go2Double heightThresholdLimitMax; 
    Go2Double heightThreshold; 
    Go2PartHeightThresholdDirection heightThresholdDirection;
    Go2PartFrameOfReference frameOfReference;

    Go2Double gapThresholdLimitMin; 
    Go2Double gapThresholdLimitMax; 
    Go2Double gapThreshold; 

    Go2Double areaThresholdLimitMin; 
    Go2Double areaThresholdLimitMax; 
    Go2Double areaThreshold; 

    Go2Double lengthMaxLimitMin; 
    Go2Double lengthMaxLimitMax; 
    Go2Double lengthMax; 

    zList measurements; 
} Go2PartClass; 

GO2_EXPORT(Go2Status) Go2Part_Construct(Go2Part* part, Go2Object system); 
GO2_EXPORT(Go2Status) Go2Part_Destroy(Go2Part part); 

GO2_EXPORT(Go2Status) Go2Part_Init(Go2Part part, Go2Object system); 
GO2_EXPORT(Go2Status) Go2Part_VRelease(Go2Part part); 

GO2_EXPORT(Go2Status) Go2Part_Read(Go2Part part, zXml xml, zXmlItem item); 
GO2_EXPORT(Go2Status) Go2Part_Write(Go2Part part, zXml xml, zXmlItem item); 

GO2_EXPORT(Go2Status) Go2Part_FindMeasurement(Go2Part part, Go2Type type, Go2UInt32 id, Go2Measurement* measurement); 
GO2_EXPORT(Go2Status) Go2Part_CreateMeasurement(Go2Part part, Go2Type type, Go2UInt32 id, Go2Measurement* measurement); 

GO2_EXPORT(Go2Status) Go2Part_ParseType(const Go2Char* typeName, Go2Type* type); 
GO2_EXPORT(Go2Status) Go2Part_FormatType(Go2Type type, Go2Char* typeName, Go2UInt32 capacity); 

#include <Go2ApiEnd.h>

#endif      /* #ifndef LMITECH_GO2_Z_PART_H_INCLUDED */
