/***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /******* *******/ /******* D H C - 8 S e r i e s 4 0 0 *******/ /******* *******/ /******* F U E L Q U A N T I T Y G A G I N G S Y S T E M *******/ /******* *******/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /* */ /* Program Name : DHC-8 Fuel Quantity Gaging System */ /* Source File Name : defines.h */ /* CPC : N/A */ /* Engineer : Sridhar Rokkam / Katherine monroe */ /* Criticality Level : */ /* Contents : global defines */ /* Description : This file contains the global defines. */ /* */ /* Defines in this file are grouped by function. */ /* */ /* */ /* */ /* Contents of this document are propriety information, property of: */ /* PARKER HANNIFIN CORPORATION */ /* GULL ELECTRONIC SYSTEMS DIVISION */ /* SMITHTOWN, NEW YORK 11787 */ /* Any attempt to copy or use the contents of this document in any manner */ /* whatsoever without express written consent of the owner is prohibited. */ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ #include "c:\c51\inc\absacc.h" #define SET 1 #define RESET 0 #define TRUE 1 #define FALSE 0 #define PASS 1 #define FAIL 0 #define COLD 0 #define WARM 1 #define LEFT_PROCESSOR 1 #define RIGHT_PROCESSOR 0 #define G_WARM_COLD_BIT 0x8 // temp correct after hardware defined #define INVALID_INTEGER 0x8000 #define INVALID_LONG 0x80000000 /******************/ /* Global defines */ /******************/ #define G_NORMAL_TIMER_MODE 0 /* indicates timers 0&1 should be set for normal mode */ #define G_DENS_TIMER_MODE 1 /* indicates timers 0&1 should be set for acquiring */ /* densitometer coefficients */ #define G_MAX_ACQ_ERROR 3 //**************************************** //* floating point error handler defines * //**************************************** #define NaN 0xffffffff #define PLUS_INF 0x0000807f #define MINUS_INF 0x000080ff //***************** //* rs232 defines * //***************** #define CRET 0xD #define LF 0xA #define ETX 0x3 //***************** //* macros * //***************** #define BETWEEN(x,l,h) ((x >= l) && (x <= h)) #define VALID_FLOAT(x) ((x != NaN) && (x != PLUS_INF) && (x != MINUS_INF)) #define SWAP_BYTES(x) ((x << 8) | (x >> 8)) //************************** // pdm / refuel defines * //************************** #define RESET_LIST 1 // 5/23/95 km #define NEXT_FAULT 0 // 5/23/95 km //************************** // fault isolation defines * //************************** #define WARM_COLD_CIRCUIT 0 #define LOW_BYTE_MASK 0x00ff #define HARD_FAILURE 0x00ff #define NO_FAULT_DATA 0xff //************************** // refuel defines * //************************** #define REFUEL_ENABLED 1 #define REFUEL_DISABLED 0 //************************** // Discrete defines * //************************** #define SYSTEM_TEST_ENABLED 1 #define SYSTEM_TEST_DISABLED 0 #define TURN_REFUEL_VALVE_OFF 0x01 /* 0000 0001 6-27-97*/ #define TURN_REFUEL_VALVE_ON 0xFE /* 1111 1110 6-27-97*/ #define SYSTEM_FAULT_DISABLE 0xFB /* 1111 1011 */ #define SYSTEM_FAULT_ENABLE 0x04 /* 0000 0100 */ //#define LLS_FAULT_DISABLE 0xFB /* 1111 1011 */ //#define LLS_FAULT_ENABLE 0x04 /* 0000 0100 */ #define LLS_WARNING_DISABLE 0xF7 /* 1111 0111 */ #define LLS_WARNING_ENABLE 0x08 /* 0000 1000 */ #define DOOR_CLOSED 1 #define DOOR_OPEN 0 #define TOTAL_QTY_ENTRY 0 #define OTHERS_QTY_ENTRY 1 #define OWN_QTY_ENTRY 2 #define MY_SIDE 0 #define OTHER_SIDE 1 //************************** // Data acquisition defines* //************************** #define NUMBER_OF_RECEIVERS 2 #define NUMBER_OF_FAULTS 5 #define NUMBER_OF_PROBES 9 #define TANK_REC_CYCLE 0 #define LLS_REC_CYCLE 1 //************************** // ARINC defines //************************** #define SSM_FAILURE_WARNING 0x0 #define SSM_NO_COMPUTED_DATA 0x2000 #define SSM_FUNCTIONAL_TEST 0x4000 #define SSM_NORMAL_OPERATION 0x6000