Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

msgLog.h

Go to the documentation of this file.
00001 /* msgLog.h - header file for msgLogLib */
00002 
00003 /* 
00004  * Tim Nicholls, Real Time Systems Group
00005  * CLRC Rutherford Appleton Laboratory
00006  */ 
00007 
00008 /*
00009  * Current CVS Tag:
00010  * $Header: /cvs/minoscvs/rep1/minossoft/OnlineUtil/msgLogLib/msgLog.h,v 1.2 2005/09/06 19:06:49 rhatcher Exp $
00011  */
00012 
00013 /* 
00014  * Modification History : DO NOT EDIT - MAINTAINED BY CVS 
00015  * $Log: msgLog.h,v $
00016  * Revision 1.2  2005/09/06 19:06:49  rhatcher
00017  * Synch with online CVS repository as of 2005-08-25.  This includes fixes
00018  * for const correctness on char* format strings.  Alas, it now uses
00019  * clock_gettime() rather than gettimeofday() -- this exists on Linux,
00020  * but doesn't for MacOSX, but does require linkage to -lrt library.
00021  *
00022  * Revision 1.9  2005/08/25 17:37:24  howcroft
00023  * Added a function that allows a process to set its own max message repeat rate
00024  *
00025  * Revision 1.8  2005/08/25 17:20:43  howcroft
00026  * VxWorks and Linux now share code for time based message rate limiting. replaced the linux calls to gettimeofday with clock_getttime.
00027  *
00028  * Also, change char pointers to const pointers for format args.
00029  *
00030  * Revision 1.7  2005/05/03 10:12:39  tcn
00031  * Added function msgLogPidSet
00032  *
00033  * Revision 1.6  2003/10/24 13:34:53  howcroft
00034  * Bug fix, typo
00035  *
00036  * Revision 1.5  2003/10/24 13:30:22  howcroft
00037  *
00038  * MsgLogLib:
00039  * o Messages go via UDP to runControl directly rather than via syslog.
00040  * o Include a header with infomation about node Id, and message counter, we can now tell when messages are dropped.
00041  *
00042  * o msgLogger.c builds a little binary to act like the logger script.
00043  * o msgRead, a library to extract the messages from the UDP socket and fill a common struct defined in msgCommon.h
00044  *
00045  * Revision 1.4  2002/03/01 11:19:01  tcn
00046  * Implemented new debug message scheme with specifiable debug level and
00047  * and reporting threshold.
00048  *
00049  * Revision 1.3  2001/08/16 12:13:57  tcn
00050  * Added protos for msgLogInit and logNotice
00051  *
00052  * Revision 1.2  2001/06/18 10:53:05  tcn
00053  * Implemented multi-level message logging.
00054  *
00055  * Revision 1.1  2001/04/05 13:35:19  tcn
00056  * First commit of msgogLib
00057  *
00058  *
00059  */ 
00060 
00061 #ifndef _MSG_LOG_LIB_H
00062 #define _MSG_LOG_LIB_H
00063 #ifdef __cplusplus 
00064 extern "C" { 
00065 #endif /* __cplusplus */
00066 
00067 /* includes */
00068 
00069 /* defines */
00070 
00071 /* VxWorks doesn't have syslog so define the levels for the proxy */
00072 #ifdef VxWorks
00073 #define LOG_EMERG       0
00074 #define LOG_ALERT       1
00075 #define LOG_CRIT        2
00076 #define LOG_ERR         3
00077 #define LOG_WARNING     4
00078 #define LOG_NOTICE      5
00079 #define LOG_INFO        6
00080 #define LOG_DEBUG       7
00081 #endif
00082 /* typedefs */
00083 
00084 /* global variable declarations*/   
00085 
00086 /* function prototype declarations */
00087 
00088 void msgLogInit(const char *ident);
00089 void msgLogCleanup(void);
00090 void msgLogNodeIdSet(long nodeid);
00091 void msgLogPidSet(long pid);
00092 void msgLogLocalEchoSet(int enable);
00093 void msgLogResetMsgCount(long count);
00094 long msgLogGetMsgCount();
00095 void logDebugLevelSet(unsigned int level);
00096 void logMaxRepRateSet(long max_dt_ns);
00097 void logCritical(const char *fmt, ...);
00098 void logError(const char *fmt, ...);
00099 void logWarn(const char *fmt, ...);
00100 void logNotice(const char *fmt, ...);
00101 void logInfo(const char *fmt, ...);
00102 void logDebug(unsigned int level, const char *fmt, ...);
00103 
00104 #ifdef __cplusplus 
00105 } 
00106 #endif /* __cplusplus */ 
00107 
00108 #endif /* _MSG_LOG_LIB_H */

Generated on Mon Nov 23 05:27:25 2009 for loon by  doxygen 1.3.9.1