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

VxWorks

开发平台:

C/C++

  1. /* wtxexchp.h - wtx message exchange private header file */
  2. /* Copyright 1984-1995 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,26feb97,bjl renamed 'private' field in struct _wtx_exchange to 
  7. 'private_data' for c++ compatibility
  8. 01a,15may95s_w  written. 
  9. */
  10. #ifndef __INCwtxexchph
  11. #define __INCwtxexchph 1
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #include "wtxexch.h"
  16. /* defines */
  17. #define WTX_EXCHANGE_RETURN(handle, errCode, retVal) 
  18. do 
  19.     { 
  20.     handle->error = errCode; 
  21.     return retVal; 
  22.     } while (0)
  23. /* typedefs */
  24. /* This type is private to the exchange protocol implementation */
  25. typedef struct _wtx_exchange 
  26.     {
  27.     WTX_XID self; /* pointer to self for validation */
  28.     void * transport; /* transport connection data */
  29.     void * private_data; /* data private to implementation */
  30.     UINT32 timeout; /* timeout for exchange service requests */
  31.     WTX_ERROR_T error; /* last error code recorded */
  32.     FUNCPTR xCreate; /* create connection function */
  33.     FUNCPTR xDelete; /* delete connection function */
  34.     FUNCPTR xExchange; /* exchange function */
  35.     FUNCPTR xFree; /* free result function */
  36.     FUNCPTR xControl; /* misc. control function */
  37.     } _WTX_EXCHANGE; /* WTX exchange handle */
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* __INCwtxexchph */