⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opccombinedserverimpl.cpp

📁 OPCCombinedServerImpl for vxWorks5.5.1
💻 CPP
字号:
/* OPCCombinedServerImpl.cpp - A&E and DA Combined Server registration file *//* Copyright 2001-2002 Wind River Systems, Inc. */ /* modification history -------------------- 01a,14feb01,nhc     written*/ /* includes */ #include "OPCstdafx.h"#include "OPCServer.h"#include "DADoc.h"#include "OPCRegistry.h"/* globals */ #include "OPCstdafx.h"#include "OPCCombinedServer.h"#include "OPC_ae_i.c"#include "OPCda_i.c"#include "OPCComn_i.c"#include "OPCRegistry.h"/* globals */// \/ \/ \/ Toolkit Modify Here Begin\/ \/ \///You must change here, to give your server a new unique CLSID,/* 3e2cb380-1bfb-11d6-bee9-005004ae11ca */CLSID CLSID_OPCCombinedServer =    {     0xCCCCCCC,    0x1bfb,    0x11d6,    {0xbe, 0xe9, 0x00, 0x50, 0x04, 0xae, 0x11, 0xca}    };// \/ \/ \/ Toolkit Modify Here End\/ \/ \//***************************************************************************** strAEDAServerProgID - get the WIND NET OPC A&E server's Prog ID as a string** Global variables replaced with get functions to avoid* compiler dependent initialization problems. Note that* this introduces a memory leak because nothing takes care* of destruction. That's still better than to crash at initialization, though.* This method must be modified by the user before starting a project, if the* Server name says WindRiver.OPCEvtAndDAServer.1, so that your server * has a unique prog ID.** RETURNS: EString &*/EString& strAEDAServerProgID (void)    {    // \/ \/ \/ Toolkit Modify Here Begin\/ \/ \/    //To give your server a new name change here    static EString* strServerProgID = new EString(_T("WindRiver.OPCEvtAndDAServer.1"));    // \/ \/ \/ Toolkit Modify Here End\/ \/ \/    return *strServerProgID;    }/***************************************************************************** strAEDAServerDesc - get the WIND NET OPC A&E server's description as a string** Global variables replaced with get functions to avoid* compiler dependent initialization problems. Note that* this introduces a memory leak because nothing takes care* of destruction. That's still better than to crash at initialization, though.* This method must be modified by the user before starting a project, if the* Server description says "WindRiver WIND NET OPC Alarms and Events Server",  * so that this string decribes your server better.** RETURNS: EString &*/EString& strAEDAServerDesc()    {    // \/ \/ \/ Toolkit Modify Here Begin\/ \/ \/    //To give your server a new description change here    static EString* strServerDesc = new EString(_T("WindRiver WIND NET OPC Alarms and Events and Data Access Server"));    // \/ \/ \/ Toolkit Modify Here End\/ \/ \/    return *strServerDesc;    }// Create a NULL-terminated list of component category GUIDs that it belongs to.GUID CATID_OPCDAServer20 = { 0x63d5f432, 0xcfe4, 0x11d1, { 0xb2, 0xc8, 0x0, 0x60, 0x8, 0x3b, 0xa1, 0xfb } };GUID CATID_OPCDAServer10 = { 0x63d5f430, 0xcfe4, 0x11d1, { 0xb2, 0xc8, 0x0, 0x60, 0x8, 0x3b, 0xa1, 0xfb } };GUID* OPCAEDAServerComCats[] = 	{	&CATID_OPCDAServer20, 	(GUID *)&CATID_OPCAEServer10, 	0};/* * For automation interface, declare it as a v10 server ! * GUID* OPCServerComCats[] = {&CATID_OPCDAServer10, 0}; * */FILETIME opcServerStartTime;DADoc *   opcTheDoc = NULL;#ifndef WIN32// AutoRegister ServerAUTOREGISTER_VXOPC (CombinedSvr, CLSID_OPCCombinedServer, strAEDAServerProgID(), \                    OPCAEDAServerComCats, strAEDAServerDesc(), PS_DEFAULT, 0);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -