
/*
 * $Id$
 * 
 * Copyright (C) PI 2007-2008. All rights reserved.
 * 
 * Version: 1.0.3
 * 
 */

#ifndef __MACROS_H
#define __MACROS_H

#define	PI_BLOCK_MODE_AUTO		0x08
#define	PI_BLOCK_MODE_MAN		0x10
#define	PI_BLOCK_MODE_OUT_OF_SERVICE	0x80

#define PI_ENUMS_STATUS_QUALITY \
	{ 0x20, [PI_status_GOOD_00] }, \
	{ 0x21, [PI_status_GOOD_01] }, \
	{ 0x22, [PI_status_GOOD_02] }, \
	{ 0x23, [PI_status_GOOD_03] }, \
	{ 0x24, [PI_status_GOOD_04] }, \
	{ 0x25, [PI_status_GOOD_05] }, \
	{ 0x26, [PI_status_GOOD_06] }, \
	{ 0x28, [PI_status_GOOD_08] }, \
	{ 0x29, [PI_status_GOOD_09] }, \
	{ 0x10, [PI_status_UNCERTAIN_00] }, \
	{ 0x11, [PI_status_UNCERTAIN_01] }, \
	{ 0x12, [PI_status_UNCERTAIN_02] }, \
	{ 0x13, [PI_status_UNCERTAIN_03] }, \
	{ 0x14, [PI_status_UNCERTAIN_04] }, \
	{ 0x15, [PI_status_UNCERTAIN_05] }, \
	{ 0x16, [PI_status_UNCERTAIN_06] }, \
	{ 0x17, [PI_status_UNCERTAIN_07] }, \
	{ 0x00, [PI_status_BAD_00] }, \
	{ 0x01, [PI_status_BAD_01] }, \
	{ 0x02, [PI_status_BAD_02] }, \
	{ 0x03, [PI_status_BAD_03] }, \
	{ 0x04, [PI_status_BAD_04] }, \
	{ 0x05, [PI_status_BAD_05] }, \
	{ 0x06, [PI_status_BAD_06] }, \
	{ 0x07, [PI_status_BAD_07] }

#define PI_ENUMS_STATUS_LIMIT \
	{ 0x00, [PI_status_limit_OK] }, \
	{ 0x01, [PI_status_limit_UNDERFLOW] }, \
	{ 0x02, [PI_status_limit_OVERFLOW] }, \
	{ 0x03, [PI_status_limit_VALUE_CONSTANT] }

#define PI_ENUMS_STATUS_CONDENSED \
	{ 0x00, [PI_status_BAD_00]                  }, \
	{ 0x23, [PI_Status_Quality_Limit_enum_0x23] }, \
	{ 0x24, [PI_Status_Quality_Limit_enum_0x24] }, \
	{ 0x25, [PI_Status_Quality_Limit_enum_0x25] }, \
	{ 0x26, [PI_Status_Quality_Limit_enum_0x26] }, \
	{ 0x27, [PI_Status_Quality_Limit_enum_0x27] }, \
	{ 0x28, [PI_Status_Quality_Limit_enum_0x28] }, \
	{ 0x29, [PI_Status_Quality_Limit_enum_0x29] }, \
	{ 0x2A, [PI_Status_Quality_Limit_enum_0x2A] }, \
	{ 0x2B, [PI_Status_Quality_Limit_enum_0x2B] }, \
	{ 0x3C, [PI_Status_Quality_Limit_enum_0x3C] }, \
	{ 0x3D, [PI_Status_Quality_Limit_enum_0x3D] }, \
	{ 0x3E, [PI_Status_Quality_Limit_enum_0x3E] }, \
	{ 0x3F, [PI_Status_Quality_Limit_enum_0x3F] }, \
	{ 0x4B, [PI_Status_Quality_Limit_enum_0x4B] }, \
	{ 0x4F, [PI_Status_Quality_Limit_enum_0x4F] }, \
	{ 0x68, [PI_Status_Quality_Limit_enum_0x68] }, \
	{ 0x69, [PI_Status_Quality_Limit_enum_0x69] }, \
	{ 0x6A, [PI_Status_Quality_Limit_enum_0x6A] }, \
	{ 0x6B, [PI_Status_Quality_Limit_enum_0x6B] }, \
	{ 0x73, [PI_Status_Quality_Limit_enum_0x73] }, \
	{ 0x74, [PI_Status_Quality_Limit_enum_0x74] }, \
	{ 0x75, [PI_Status_Quality_Limit_enum_0x75] }, \
	{ 0x76, [PI_Status_Quality_Limit_enum_0x76] }, \
	{ 0x77, [PI_Status_Quality_Limit_enum_0x77] }, \
	{ 0x78, [PI_Status_Quality_Limit_enum_0x78] }, \
	{ 0x79, [PI_Status_Quality_Limit_enum_0x79] }, \
	{ 0x7A, [PI_Status_Quality_Limit_enum_0x7A] }, \
	{ 0x7B, [PI_Status_Quality_Limit_enum_0x7B] }, \
	{ 0x80, [PI_Status_Quality_Limit_enum_0x80] }, \
	{ 0x84, [PI_Status_Quality_Limit_enum_0x84] }, \
	{ 0x85, [PI_Status_Quality_Limit_enum_0x85] }, \
	{ 0x86, [PI_Status_Quality_Limit_enum_0x86] }, \
	{ 0x87, [PI_Status_Quality_Limit_enum_0x87] }, \
	{ 0x89, [PI_Status_Quality_Limit_enum_0x89] }, \
	{ 0x8A, [PI_Status_Quality_Limit_enum_0x8A] }, \
	{ 0x8D, [PI_Status_Quality_Limit_enum_0x8D] }, \
	{ 0x8E, [PI_Status_Quality_Limit_enum_0x8E] }, \
	{ 0xA0, [PI_Status_Quality_Limit_enum_0xA0] }, \
	{ 0xA1, [PI_Status_Quality_Limit_enum_0xA1] }, \
	{ 0xA2, [PI_Status_Quality_Limit_enum_0xA2] }, \
	{ 0xA3, [PI_Status_Quality_Limit_enum_0xA3] }, \
	{ 0xA4, [PI_Status_Quality_Limit_enum_0xA4] }, \
	{ 0xA5, [PI_Status_Quality_Limit_enum_0xA5] }, \
	{ 0xA6, [PI_Status_Quality_Limit_enum_0xA6] }, \
	{ 0xA7, [PI_Status_Quality_Limit_enum_0xA7] }, \
	{ 0xA8, [PI_Status_Quality_Limit_enum_0xA8] }, \
	{ 0xA9, [PI_Status_Quality_Limit_enum_0xA9] }, \
	{ 0xAA, [PI_Status_Quality_Limit_enum_0xAA] }, \
	{ 0xAB, [PI_Status_Quality_Limit_enum_0xAB] }, \
	{ 0xBC, [PI_Status_Quality_Limit_enum_0xBC] }, \
	{ 0xBD, [PI_Status_Quality_Limit_enum_0xBD] }, \
	{ 0xBE, [PI_Status_Quality_Limit_enum_0xBE] }, \
	{ 0xBF, [PI_Status_Quality_Limit_enum_0xBF] }

#endif /* __MACROS_H */
