wvLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:4k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* wvLib.h - event log header */
  2. /* Copyright 1994-1998 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01p,13may98,cth  added protype for wvUploadTaskConfig
  7. 01o,20apr98,cth  added protypes for wvLogHeaderCreate/Upload, modified 
  8.  wvEvtLogInit definition, changed wvUploadTaskPriority to 01l
  9. 01n,17apr98,cth  changed prototype of wvEvtLogInit
  10. 01m,15apr98,cth  added prototypes for task name storage, and wvEvtBufferGet,
  11.  renamed wvContinuousUploadStop to wvUploadStop
  12. 01l,17mar98,pr   added memory instrumentation support
  13. 01k,27jan98,cth  added wvEvtLogInit function declaration, updated copyright
  14. 01j,18dec97,cth  removed temporary references used for WV2.0 integration, 
  15.  updated include files, removed wvOn/Off, fixed prototypes
  16. 01i,16nov97,cth  more work for WindView 2.0
  17. 01h,30jul97,nps  major rework for WindView 2.0.
  18. 01g,08mar94,smb  changed prototype for OSE functionality
  19.  removed PASSIVE_MODE
  20. 01f,04mar94,smb  changed prototype for wvHostInfoInit (SPR #3089)
  21. 01e,22feb94,smb  changed typedef EVENT_TYPE to event_t (SPR #3064)
  22. 01d,15feb94,smb  renamed collection modes
  23. 01c,19jan94,smb  removed wvEvtLog, added wvEvtLogEnable and wvEvtLogEnable
  24.  removed ALL_LEVELS and changed OBJECT_STATE to OBJECT_STATUS
  25.  added wvOn(), wvOff(), and wvEvtLogStop().
  26. 01b,30dec93,c_s  changed prototype of wvServerInit ().  SPR #2790.
  27. 01a,10dec93,smb  written.
  28. */
  29. #ifndef __INCwvlibh
  30. #define __INCwvlibh
  31. #include "vxWorks.h"
  32. #include "private/wvBufferP.h"
  33. #include "private/wvUploadPathP.h"
  34. #include "private/wvLibP.h"
  35. #include "private/eventP.h"
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. /* defines */
  40. #define OBJ_TASK        1 /* task objects */
  41. #define OBJ_SEM         2 /* semaphore objects */
  42. #define OBJ_MSG         3 /* message queue objects */
  43. #define OBJ_WD          4 /* watch-dog timer objects */
  44. #define OBJ_MEM         5 /* memory objects */
  45. #define INSTRUMENT_ON   1 /* create objects with instrumentation on */
  46. #define INSTRUMENT_OFF  2 /* create objects with instrumentation off */
  47. /* types */
  48. typedef struct wvUploadTaskDescriptor * WV_UPLOADTASK_ID;
  49. typedef struct wvEvtLogHeader *WV_LOG_HEADER_ID;
  50. /* function declarations */
  51. #if defined(__STDC__) || defined(__cplusplus)
  52. extern void    wvLibInit (void);
  53. extern void    wvLibInit2 (void);
  54. extern void wvEvtLogInit (BUFFER_ID bufId);
  55. extern void  wvEvtLogStart (void);
  56. extern void    wvEvtLogStop (void);
  57. extern void    wvEvtClassSet (UINT32 classDescription);
  58. extern UINT32   wvEvtClassGet (void);
  59. extern void    wvEvtClassClear (UINT32 classDescription);
  60. extern void    wvEvtClassClearAll (void);
  61. extern BUFFER_ID wvEvtBufferGet (void);
  62. extern void wvUploadTaskConfig (int stackSize, int priority);
  63. extern STATUS  wvUploadStop   (WV_UPLOADTASK_ID upTaskId);
  64. extern WV_UPLOADTASK_ID wvUploadStart  (BUFFER_ID bufId, UPLOAD_ID pathId, 
  65.                 BOOL uploadContinuously);
  66. extern WV_LOG_HEADER_ID wvLogHeaderCreate (PART_ID memPart);
  67. extern STATUS wvLogHeaderUpload (WV_LOG_HEADER *pH, UPLOAD_ID pathId);
  68. extern STATUS  wvObjInstModeSet (int mode);
  69. extern STATUS  wvObjInst (int objType, void *objId, BOOL evtLoggingOn);
  70. extern STATUS  wvSigInst (int mode);
  71. extern STATUS  wvEvent (event_t usrEventId, char *buffer, 
  72.  size_t bufSize);
  73. extern TASKBUF_ID wvTaskNamesPreserve (PART_ID memPart, int size);
  74. extern STATUS wvTaskNamesUpload  (TASKBUF_ID bufId, UPLOAD_ID pathId);
  75. extern STATUS wvTaskNamesBufAdd  (short eventId, int status, 
  76.     int priority, int taskLockCount,
  77.     int tid, char *name);
  78. #else   /* __STDC__ */
  79. extern void    wvLibInit ();
  80. extern void    wvLibInit2 ();
  81. extern void wvEvtLogInit ();
  82. extern void  wvEvtLogStart ();
  83. extern void    wvEvtLogStop ();
  84. extern void    wvEvtClassSet ();
  85. extern UINT32   wvEvtClassGet ();
  86. extern void    wvEvtClassClear ();
  87. extern void    wvEvtClassClearAll ();
  88. extern BUFFER_ID wvEvtBufferGet ();
  89. extern void wvUploadTaskConfig ();
  90. extern STATUS  wvUploadStop ();
  91. extern WV_UPLOADTASK_ID wvUploadStart ();
  92. extern WV_LOG_HEADER_ID wvLogHeaderCreate ();
  93. extern STATUS wvLogHeaderUpload ();
  94. extern STATUS wvObjInstModeSet ();
  95. extern STATUS wvObjInst ();
  96. extern STATUS wvSigInst ();
  97. extern STATUS wvEvent ();
  98. extern TASKBUF_ID wvTaskNamesPreserve ();
  99. extern STATUS wvTaskNamesUpload ();
  100. extern STATUS wvTaskNamesBufAdd ();
  101. #endif  /* __STDC__ */
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105. #endif /* __INCwvlibh*/