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

VxWorks

开发平台:

C/C++

  1. // opc_ae.idl : IDL source for opc_aeps.dll
  2. //
  3. // REVISION:  05/25/99 09:32 AM (GMT)
  4. // VERSIONINFO 1.0.5.0
  5. // 
  6. // This file will be processed by the MIDL tool to
  7. // produce the type library (opc_ae.tlb) and marshalling code (opc_aeps.dll).
  8. // The type library is embedded in the resource of opc_aeps.dll
  9. #ifdef _WIN32
  10. import "oaidl.idl";
  11. import "ocidl.idl";
  12. #else
  13. import "vxidl.idl";
  14. #endif
  15. // define OPC Alarm & Events Component Categories
  16. [
  17. uuid(58E13251-AC87-11d1-84D5-00608CB8A7E9),
  18. helpstring("OPC Event Server Category ID (CATID)"),
  19. pointer_default(unique)
  20. ]
  21. interface OPCEventServerCATID
  22. {
  23. // This empty interface is here so that 
  24. // IID_OPCEventServerCATID will be defined
  25. };
  26. typedef DWORD OPCHANDLE;
  27. typedef enum { OPCAE_BROWSE_UP = 1,
  28. OPCAE_BROWSE_DOWN, 
  29. OPCAE_BROWSE_TO
  30. } OPCAEBROWSEDIRECTION;
  31. typedef enum { OPC_AREA = 1,
  32. OPC_SOURCE
  33. } OPCAEBROWSETYPE;
  34. typedef enum { OPCAE_STATUS_RUNNING = 1,
  35. OPCAE_STATUS_FAILED,
  36. OPCAE_STATUS_NOCONFIG,
  37. OPCAE_STATUS_SUSPENDED,
  38. OPCAE_STATUS_TEST
  39. } OPCEVENTSERVERSTATE;
  40. typedef  struct tagONEVENTSTRUCT {
  41. WORD wChangeMask;
  42. WORD wNewState;
  43. [string] LPWSTR  szSource;
  44. FILETIME ftTime;
  45. [string] LPWSTR szMessage;
  46. DWORD dwEventType;
  47. DWORD dwEventCategory;
  48. DWORD dwSeverity; 
  49. [string] LPWSTR szConditionName;
  50. [string] LPWSTR szSubconditionName;
  51. WORD wQuality;
  52. WORD wReserved; // added for natural alignment
  53. BOOL  bAckRequired;
  54. FILETIME ftActiveTime;
  55. DWORD dwCookie;
  56. DWORD dwNumEventAttrs;
  57. [size_is(dwNumEventAttrs)] VARIANT* pEventAttributes;
  58. [string] LPWSTR szActorID;
  59. } ONEVENTSTRUCT;
  60. typedef  struct tagOPCEVENTSERVERSTATUS {
  61. FILETIME  ftStartTime;
  62. FILETIME  ftCurrentTime;
  63. FILETIME  ftLastUpdateTime;
  64. OPCEVENTSERVERSTATE dwServerState;
  65. WORD wMajorVersion;
  66. WORD wMinorVersion;
  67. WORD wBuildNumber;
  68. WORD wReserved; // added for natural alignment
  69. [string] LPWSTR szVendorInfo;
  70. } OPCEVENTSERVERSTATUS;
  71. typedef  struct tagOPCCONDITIONSTATE {
  72. WORD wState;
  73. WORD wReserved1; // added for natural alignment
  74. LPWSTR  szActiveSubCondition;
  75. LPWSTR szASCDefinition;
  76. DWORD dwASCSeverity;
  77. LPWSTR szASCDescription;
  78. WORD wQuality;
  79. WORD wReserved2; // added for natural alignment
  80. FILETIME ftLastAckTime;
  81. FILETIME ftSubCondLastActive;
  82. FILETIME ftCondLastActive;
  83. FILETIME ftCondLastInactive;
  84. LPWSTR szAcknowledgerID;
  85. LPWSTR szComment;
  86. DWORD dwNumSCs;
  87. [size_is (dwNumSCs)] LPWSTR * pszSCNames;
  88. [size_is (dwNumSCs)] LPWSTR * pszSCDefinitions;
  89. [size_is (dwNumSCs)] DWORD  * pdwSCSeverities;
  90. [size_is (dwNumSCs)] LPWSTR * pszSCDescriptions;
  91. DWORD dwNumEventAttrs;
  92. [size_is(dwNumEventAttrs)] VARIANT* pEventAttributes;
  93. [size_is(dwNumEventAttrs)] HRESULT* pErrors;
  94. } OPCCONDITIONSTATE;
  95. [
  96. uuid(65168851-5783-11D1-84A0-00608CB8A7E9),
  97. helpstring("IOPCEventServer Interface"),
  98. pointer_default(unique)
  99. ]
  100. interface IOPCEventServer : IUnknown
  101. {
  102. HRESULT GetStatus(
  103. [out] OPCEVENTSERVERSTATUS **ppEventServerStatus
  104. );
  105. HRESULT CreateEventSubscription(
  106. [in] BOOL bActive,
  107. [in] DWORD dwBufferTime, 
  108. [in] DWORD dwMaxSize,
  109. [in] OPCHANDLE hClientSubscription,
  110. [in] REFIID riid,
  111. [out, iid_is(riid)] LPUNKNOWN * ppUnk,
  112. [out] DWORD *pdwRevisedBufferTime,
  113. [out] DWORD *pdwRevisedMaxSize
  114. );
  115. HRESULT QueryAvailableFilters(
  116. [out] DWORD* pdwFilterMask
  117. );
  118. HRESULT QueryEventCategories(
  119. [in]  DWORD  dwEventType,
  120. [out] DWORD* pdwCount, 
  121. [out, size_is(,*pdwCount)] DWORD** ppdwEventCategories,
  122. [out, size_is(,*pdwCount)] LPWSTR** ppszEventCategoryDescs
  123.   );
  124. HRESULT QueryConditionNames(
  125. [in]  DWORD  dwEventCategory, 
  126. [out] DWORD* pdwCount, 
  127. [out, size_is(,*pdwCount)] LPWSTR** ppszConditionNames
  128. );
  129. HRESULT QuerySubConditionNames(
  130. [in]  LPWSTR szConditionName, 
  131. [out] DWORD* pdwCount, 
  132. [out, size_is(,*pdwCount)] LPWSTR** ppszSubConditionNames
  133.   );
  134. HRESULT QuerySourceConditions(
  135. [in]  LPWSTR szSource, 
  136. [out] DWORD* pdwCount, 
  137. [out, size_is(,*pdwCount)] LPWSTR** ppszConditionNames
  138.   );
  139. HRESULT QueryEventAttributes(
  140. [in]  DWORD dwEventCategory, 
  141. [out] DWORD* pdwCount, 
  142. [out, size_is(,*pdwCount)] DWORD** ppdwAttrIDs,
  143. [out, size_is(,*pdwCount)] LPWSTR** ppszAttrDescs,
  144. [out, size_is(,*pdwCount)] VARTYPE** ppvtAttrTypes
  145. );
  146. HRESULT TranslateToItemIDs(
  147. [in] LPWSTR szSource,
  148. [in] DWORD dwEventCategory,
  149.   [in] LPWSTR szConditionName,
  150.   [in] LPWSTR szSubconditionName,
  151. [in] DWORD  dwCount, 
  152. [in, size_is(dwCount)] DWORD* pdwAssocAttrIDs, 
  153. [out, size_is(,dwCount)] LPWSTR** ppszAttrItemIDs,
  154. [out, size_is(,dwCount)] LPWSTR** ppszNodeNames,
  155. [out, size_is(,dwCount)] CLSID** ppCLSIDs
  156. );
  157. HRESULT GetConditionState (
  158. [in]  LPWSTR szSource,
  159. [in]  LPWSTR szConditionName,
  160. [in]  DWORD dwNumEventAttrs,
  161. [in, size_is(dwNumEventAttrs)] DWORD* pdwAttributeIDs,
  162. [out] OPCCONDITIONSTATE ** ppConditionState
  163. );
  164. HRESULT EnableConditionByArea(
  165. [in] DWORD dwNumAreas, 
  166. [in, size_is(dwNumAreas)] LPWSTR* pszAreas
  167. );
  168. HRESULT EnableConditionBySource(
  169. [in] DWORD dwNumSources, 
  170. [in, size_is(dwNumSources)] LPWSTR* pszSources
  171. );
  172. HRESULT DisableConditionByArea(
  173. [in] DWORD dwNumAreas, 
  174. [in, size_is(dwNumAreas)] LPWSTR* pszAreas
  175. );
  176. HRESULT DisableConditionBySource(
  177. [in] DWORD dwNumSources, 
  178. [in, size_is(dwNumSources)] LPWSTR* pszSources
  179. );
  180. HRESULT AckCondition(
  181. [in] DWORD dwCount,
  182. [in, string] LPWSTR szAcknowledgerID ,
  183. [in, string] LPWSTR szComment ,
  184. [in, size_is(dwCount)] LPWSTR* pszSource,
  185. [in, size_is(dwCount)] LPWSTR* pszConditionName,
  186. [in, size_is(dwCount)] FILETIME* pftActiveTime,
  187. [in, size_is(dwCount)] DWORD* pdwCookie,
  188. [out, size_is(,dwCount)] HRESULT **ppErrors 
  189. );
  190. HRESULT CreateAreaBrowser(
  191. [in] REFIID riid,
  192. [out, iid_is(riid)] LPUNKNOWN* ppUnk
  193. );
  194. };
  195. [
  196. uuid(65168855-5783-11D1-84A0-00608CB8A7E9),
  197. helpstring("IOPCEventSubscriptionMgt Interface"),
  198. pointer_default(unique)
  199. ]
  200. interface IOPCEventSubscriptionMgt : IUnknown
  201. {
  202. HRESULT SetFilter(
  203. [in] DWORD  dwEventType, 
  204. [in] DWORD dwNumCategories,
  205. [in, size_is(dwNumCategories)] DWORD* pdwEventCategories, 
  206. [in] DWORD dwLowSeverity,
  207. [in] DWORD dwHighSeverity,
  208. [in] DWORD dwNumAreas,
  209. [in, size_is(dwNumAreas)] LPWSTR* pszAreaList,
  210. [in] DWORD dwNumSources,
  211. [in, size_is(dwNumSources)] LPWSTR* pszSourceList
  212. );
  213. HRESULT GetFilter(
  214. [out] DWORD* pdwEventType, 
  215. [out] DWORD* pdwNumCategories,
  216. [out, size_is(,*pdwNumCategories)] DWORD** ppdwEventCategories, 
  217. [out] DWORD* pdwLowSeverity,
  218. [out] DWORD* pdwHighSeverity,
  219. [out] DWORD* pdwNumAreas,
  220. [out, size_is(,*pdwNumAreas)] LPWSTR** ppszAreaList,
  221. [out] DWORD* pdwNumSources,
  222. [out, size_is(,*pdwNumSources)] LPWSTR** ppszSourceList
  223. );
  224. HRESULT SelectReturnedAttributes(
  225. [in] DWORD dwEventCategory,
  226. [in] DWORD dwCount,
  227. [in, size_is(dwCount)] DWORD* dwAttributeIDs
  228. );
  229. HRESULT GetReturnedAttributes(
  230. [in]  DWORD dwEventCategory,
  231. [out] DWORD * pdwCount,
  232. [out, size_is(,*pdwCount)] DWORD** ppdwAttributeIDs
  233. );
  234. HRESULT Refresh(
  235. [in] DWORD dwConnection
  236. );
  237. HRESULT CancelRefresh(
  238. [in] DWORD dwConnection
  239. );
  240. HRESULT GetState(
  241. [out] BOOL * pbActive, 
  242. [out] DWORD * pdwBufferTime,  
  243. [out] DWORD * pdwMaxSize,
  244. [out] OPCHANDLE * phClientSubscription
  245. );
  246. HRESULT SetState( 
  247. [unique, in] BOOL *  pbActive, 
  248. [unique, in] DWORD * pdwBufferTime,
  249. [unique, in] DWORD * pdwMaxSize,
  250. [in] OPCHANDLE hClientSubscription,
  251. [out] DWORD * pdwRevisedBufferTime,
  252. [out] DWORD * pdwRevisedMaxSize
  253. );
  254. };
  255. [
  256. uuid(65168857-5783-11D1-84A0-00608CB8A7E9),
  257. helpstring("IOPCEventAreaBrowser Interface"),
  258. pointer_default(unique)
  259. ]
  260. interface IOPCEventAreaBrowser : IUnknown
  261. {
  262. HRESULT ChangeBrowsePosition(
  263.      [in]  OPCAEBROWSEDIRECTION dwBrowseDirection,  
  264.      [in, string] LPCWSTR  szString
  265. );
  266. HRESULT BrowseOPCAreas(
  267.      [in] OPCAEBROWSETYPE   dwBrowseFilterType,
  268.      [in, string] LPCWSTR  szFilterCriteria,  
  269.      [out] LPENUMSTRING  * ppIEnumString
  270. );  
  271. HRESULT GetQualifiedAreaName( 
  272. [in] LPCWSTR szAreaName,
  273. [out, string] LPWSTR *pszQualifiedAreaName
  274. );
  275. HRESULT GetQualifiedSourceName( 
  276. [in] LPCWSTR szSourceName,
  277. [out, string] LPWSTR *pszQualifiedSourceName
  278. );
  279. };
  280. [
  281. uuid(6516885F-5783-11D1-84A0-00608CB8A7E9),
  282. helpstring("IOPCEventSink Interface"),
  283. pointer_default(unique)
  284. ]
  285. interface IOPCEventSink : IUnknown
  286. {
  287. HRESULT OnEvent(
  288. [in] OPCHANDLE hClientSubscription,
  289. [in] BOOL bRefresh,
  290. [in] BOOL bLastRefresh,
  291. [in] DWORD dwCount,
  292. [in, size_is(dwCount)] ONEVENTSTRUCT* pEvents
  293. );
  294. };
  295. [
  296. uuid(65168844-5783-11D1-84A0-00608CB8A7E9),
  297. version(1.0),
  298. helpstring("opc_ae 1.0 Type Library")
  299. ]
  300. library OPC_AE
  301. {
  302. importlib("stdole32.tlb");
  303. importlib("stdole2.tlb");
  304. interface IOPCEventServer;
  305. interface IOPCEventSubscriptionMgt;
  306. interface IOPCEventAreaBrowser;
  307. interface IOPCEventSink;
  308. interface OPCEventServerCATID;
  309. };