/* header file for the universal protocol demo program */ /* <%Z%%M% %Q% sccs %I%> */ /**************************************************************************** comdemo.h: Date Written: 11/3/95 Written by: John LaBatt Project: COMDEMO.MAK Purpose: This contains the definitions of the constants that are used by the program. It also contains some global variables and, the function prototypes ****************************************************************************/ #define TRUE 1 #define FALSE 0 /* 0 Black 1 Blue 2 Green 3 Cyan 4 Red 5 Magenta 6 Brown 7 White 8 Dk Grey 9 Lt Blue 10 Lt Green 11 Lt Cyan 12 Lt Red 13 Lt Magenta 14 Yellow 15 Brt White */ #define BLACK 0 #define RED 4 #define WHITE 7 #define DK_GREY 8 #define BRT_WHITE 15 #define DI_WINDOW 0 #define DO_WINDOW 1 #define AI_WINDOW 2 #define AO_WINDOW 3 #define FI_WINDOW 4 #define FO_WINDOW 5 /* Two character control keys */ #define ALTX 173 /* 45 + 128 */ #define UPARROW 200 /* 72 + 128 */ #define DOWNARROW 208 /* 80 + 128 */ #define LEFTARROW 203 /* 75 + 128 */ #define RIGHTARROW 205 /* 77 + 128 */ #define PAGEUP 201 /* 73 + 128 */ #define PAGEDOWN 209 /* 81 + 128 */ /* Normal one character control keys */ #define TAB 9 #define BACKSPACE 8 #define RETURN 13 /* Maximum of all three types */ #define MAX_DISCRETE 256 #define MAX_ANALOG 150 #define MAX_FLOAT 20 /* Globals for controlling the windows */ int activewindow; int startaddr[6]; int curraddr[6]; int maxaddr[6]; char editstr[20]; int quit; int editted; /* Global arrays for printing screen information */ char discrete_in[MAX_DISCRETE / 8]; char discrete_out[MAX_DISCRETE / 8]; int analog_in[MAX_ANALOG]; int analog_out[MAX_ANALOG]; float float_in[MAX_FLOAT]; float float_out[MAX_FLOAT]; /* Prototypes for screen and keyboard information -- found in SCREEN.C */ void SetWindow(int); void UpdateDiscreteWindow(int,unsigned char*); void UpdateAnalogWindow(int,int*); void UpdateFloatWindow(int,float*); void InitScreen(); void RestoreScreen(); void ProcessKey(); /* Prototypes for Universal Driver Routines found in IO.C */ void WriteVal(); void ReadVals(); void InitComm(int);