/************************************************************************* ** File: tptypes.h Definitions of Test Port Types *************************************************************************/ #define HAZELTINE 1 /* Hazeltine terminal type */ #define ANSI 2 /* ANSI - NT HyperTerminal */ #define TELEVIDEO 3 #define ADM 4 #define VT102 5 #define VT220 6 typedef unsigned long BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef unsigned long ULONG; /* ****************************************** ** RTOS Msg Connection structures. ** Kernel IO peripherial messages to and from User space ****************************************** */ /* Kernel Input peripherial data sent to user process in virutal memory. */ typedef struct { unsigned long msgType; /* Message Type code - Structure ID */ unsigned long count; /* sequential msg count */ unsigned long data; /* Reserved input definitions */ char kpchr; /* Kernel Print Character */ unsigned long charAvail; /* Kernel Print Char is Available */ } Adata; /* User process data result sent back to peripherial through Kernel. */ typedef struct { unsigned long msgType; /* Message Type code - Structure ID */ unsigned long count; /* sequential msg count */ unsigned long data; /* Reserved peripherial definitions */ char kpchr; /* Kernel Print Character */ unsigned long charAvail; /* Kernel Print Char is Available */ } Sdata; /* ****************************************** ** Task statistics ****************************************** */ struct taskitem { unsigned long task_run_count; /* run == execution count */ Time timeAtEntry; Time timeAtExit; Time totalRunTime; Time maxRunTime; Time minRunTime; Time totalSepTime; /* Sep == Separation interval */ Time maxSepTime; unsigned long task_switch_error_count; unsigned long API_error_count; Time accWallClockTime; //Checking arithmetic with this result // unsigned char *dstack; /* task's default stack ptr */ // unsigned char *stack; /* task's current stack ptr */ // unsigned short stacksize; /* */ // void (*taskhandler)(void); /* Rx task handler */ // unsigned long state; /* current state of task */ // char *tag; /* task identifier character string */ // unsigned char flags; /* display enable flag */ // unsigned long tnum; /* RTOS Task number from Integrate */ // unsigned long taskItemArrayIndex; /* array index, This Task item */ // TASKst *thisTASKstPtr; // TASKst *nextTASKstPtr; // TASKst *prevTASKstPtr; }; typedef struct taskitem TASKst; /* ****************************************** ** Test Port Structures ****************************************** */ typedef struct { unsigned long *numpointer; char *descriptor; /* Text Descriptor */ void (*func)(unsigned long *num); } ScanItem; typedef struct { /* No Text Descriptor in this table */ void *numpointer; } numpointerArray; typedef struct { char *descriptor; /* Text Descriptor */ } StringArray; struct funcitem { /* Keyboard commands */ char *name; char *description; void (*func)(void); }; struct stringitem { /* task description string */ char *description; }; typedef struct stringitem STRINGst; /* ** 8 byte structure definition */ typedef struct { unsigned char byte0, byte1, byte2, byte3; unsigned char byte4, byte5, byte6, byte7; } msg8; /* ** 16 byte message structure */ typedef struct { unsigned char byte0, byte1, byte2, byte3; unsigned char byte4, byte5, byte6, byte7; unsigned char byte8, byte9, byte10, byte11; unsigned char byte12, byte13, byte14, byte15; } msg16; /******************************************* ** Queues ** Storage for Queue variables. *******************************************/ typedef struct { unsigned long nextin; /* offset to next in char */ unsigned long nextout; /* offset to next out char */ unsigned long count; /* current count of items in queue */ unsigned long maxcount; /* maximum count of items in queue */ unsigned long overflowflag; /* input overrun current flag */ unsigned long overflowcount; /* input overrun count */ unsigned long trafficcount; /* traffic counter */ unsigned long Qsize; /* is size of Q in items */ } Queue; /**************************************************************************/