/******************************************************************************* * msg.h definitions to be used in conjunction with the * eurogam register server c library */ #ifndef INCmsgh #define INCmsgh #include #if defined(__cplusplus) extern "C" { #endif #define MSG_VERS 0 #define MESSAGE_SERVER "egmsg" /* host name of central message server */ enum messageSeverityLevel { MSG_S_MINIMUM = 0, MSG_S_ZERO = 0, MSG_S_TEST = 1, MSG_S_DEBUG = 2, MSG_S_INFORMATION = 3, MSG_S_WARNING = 4, MSG_S_ERROR = 5, MSG_S_ALARM = 6, MSG_S_FAULT = 7, MSG_S_FAILURE = 8, MSG_S_CATASTROPHE = 9, MSG_S_ACTION = 9, /* Action if with xclass 9 */ MSG_S_MAXIMUM = 9 }; enum messageClass { MSG_C_TEST = 0, /* for testing */ MSG_C_MISC = 1, /* no xclass for this message */ MSG_C_AUTOFILL = 2, /* autofill system */ MSG_C_HV = 3, /* high voltage system */ MSG_C_SPECTRUM = 4, /* spectrum server */ MSG_C_FRONTEND = 5, /* frontend VXI cards */ MSG_C_HISTOGRAM = 6, /* histogrammer */ MSG_C_RM = 7, /* VXI resource manager auto configuration */ MSG_C_ERS = 8, /* eurogam register server */ MSG_C_EB = 9, /* Event Builder */ MSG_C_ACTION = 9, /* Action if with severity 9 */ MSG_C_CAMAC = 10, /* VME CAMAC i/f */ MSG_C_EGLK = 11, /* eurogam link (now unused) */ MSG_C_EGTS = 12, /* tape server */ MSG_C_ROCO = 13, /* readout controler interupts */ MSG_C_RACK = 14, /* Rack monitoring system */ MSG_C_ST = 15, /* VXI self test functions */ MSG_C_WATCHDOG = 16, /* System watchdog */ MSG_C_FDDI = 17, /* Event builder FDDI link */ MSG_C_HAWK = 18, /* Event builder Hawk Ethernet link */ MSG_C_VME = 19, /* VME register server functions */ MSG_C_MEIS = 30, /* MEIS - miscellaneous message */ MSG_C_STEPPER = 31, /* MEIS - stepper motors */ MSG_C_ACS = 40, /* Exogam Acquistion Command Serveur */ MSG_C_SURV = 41, /* Exogam Surveyor Serveur */ MSG_C_EXOGAMD2VB = 42, /* Exogam D2VB (input) Serveur */ MSG_C_OUTPUT = 43, /* Exogam Output Serveur */ MSG_C_MAXIMUM = 99 }; #ifndef OK /* define possible function returns */ #define OK 0 #endif #ifndef ERROR #define ERROR (-1) #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE (!FALSE) #endif typedef struct msgList { u_int xclass; u_int lowLevel; u_int highLevel; u_int count; struct msgList *next; }MSG_LIST; extern int errno; #if defined(__STDC__) || defined(__cplusplus) extern void msgInstall (); extern int msgInitialise (char *host); extern char * msgPerror (char *string); extern char * msgVersion (); extern char * msgSeverity (u_int level); extern int msgNullProc (); extern int msgDefineMessage (u_int id, u_int xclass, u_int level, char *source, char *body); extern int msgSignOn (char *name, MSG_LIST *list); extern int msgSignOff (char *name); #else extern void msgInstall (); extern int msgInitialise (); extern char * msgPerror (); extern char * msgVersion (); extern char * msgSeverity (); extern int msgNullProc (); extern int msgDefineMessage (); extern int msgSignOn (); extern int msgSignOff (); #endif /* __STDC__ */ #if defined(__cplusplus) } #endif #endif /* INCmsgh */