亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lightopc.h

?? OPCSERVER源代碼
?? H
?? 第 1 頁 / 共 3 頁
字號:
/**************************************************************************
 *                                                                        *
 * Light OPC Server development library                                   *
 *                                                                        *
 *   Copyright (c)  Timofei Bondarenko 2000-2002,                         *
 *   Copyright (c)  Kostya Volovich  2000                                 *
 **************************************************************************/

#ifndef LIGHTOPC_H
#define LIGHTOPC_H (0x0888)

#ifndef WINAPI
#include <windows.h>
#endif
/**************************************************************************
 General architecture
 ~~~~~~~~~~~~~~~~~~~~
 .......................................
 :            OPC Server               :
 :  ______                 _________   :             ___________
 : /      \               /         \  :            /           \
  / CUSTOM \             / Light-OPC \   OLE-COM   /             \
 <  DRIVER  >  lo-API   <   LIBRARY   >   OPC-DA  < An OPC-Client >
  \        /  interface  \           /  interface  \    (SCADA)  /
 : \______/               \_________/  :            \___________/
 :                                     :
 :.....................................:


 Data path
 ~~~~~~~~~
  _________                                ........................
 |         |                               :   _________________  :
 | Process |---------\  loCacheUpdate() ----->|                 | :
 |         |  DRIVER  >                    :  |    Secondary    | :
 |  Data   |-----^---/  loCacheLock() ------->|      Cache      | :
 |_________|     |                         :  |_________________| :
                 |     ______________      :    |             |   :
                 +----| ldReadTags() |     :    |             |   :
                      | ldWriteTags()|     :   \|loUpdatePipe |/  :
                      |______________|     :    \   thread    /   :
                            |              :     \           /    :
                            |              :   ___\_________/___  :
                       _____^____          :  |                 | :
    /=============  __|          | /----------|     Primary     | :
   /             __|  | loClient |<           |      Cache      | :
  <  OPC DA     |  |  |__________| \----------|_________________| :
   \            |  |__________|            :                      :
    \========== |___________|              :...... loService .....:


 Async. model
 ~~~~~~~~~~~~

 ... OPC-DA ..... ...loClient::client_scheduler() thread...      .. D ..
                 :                  ___________           :      :  R  :
      ___        :                 |           |/--/ UpdatePipe /=  I  :
     |   <--------- Subscription --|  Primary  |\--\~~ thread ~~\=  V  :
     |   <--------- OnDataChange --|   Cache   |<===+     :......:  E  :
     |           :                 |_____^_____|    |            :  R  :
     |   <-------------------------------|-------------Async--+  :     :
     |           :                       |          |         |  :     :
     |        +---------------+        CACHE        |         |  :     :
 AsyncIO ---->| Request Queue |          |          |    _____|__:____ :
              | q_req         |-- Async--+--DEVICE----->|             |:
              |               |                     |   | ldWriteTags |:
    DEVICE -->+---------------+-- Sync-DEVICE --------->| ldReadTags  |:
        |        :                                  |   |_____________|:
        |     +---------------+                     |         |  :     :
 SyncIO-+ <---| Response Queue|                     |         |  :     :
        |     | q_ret         |<------------------------Sync--+  :     :
        |     +---------------+                     |            :     :
     CACHE <========================================+            :     :
                 :...............................................:.....:

 **************************************************************************/
/** The <lo-API> is mostly described here. **/
/**************************************************************************

 Almost all functions are thread-safe except object destruction procedures.
 Naturally, once destruction initiated no one may use that object.

 **************************************************************************
 Public definitions to be exported:
 **************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif

#ifndef LO_PUBLIC
#define LO_PUBLIC /*extern*/
#endif

LO_PUBLIC
int loServerRegister(const GUID *CLSID_Svr, const char *ProgID,
    		         const char *ServName, const char *exPath,
                     const char *Model /* 0=exe, ""=STA dll, "Both", "Free" ...*/);
LO_PUBLIC
int loServerUnregister(const GUID *CLSID_Svr, const char *ProgID);
/* Returns 0: OK; != 0 on Failure, 
   GetLastError() will return error code.
   The exPath can be NULL or "" for an NT-Service. */

/*struct loService;*/
typedef struct loService loService;
/*struct loRealTag_;*/
typedef struct loRealTag_ *loRealTag;
#ifdef __cplusplus
class LightOPCServer;
typedef LightOPCServer loClient;
#else
struct LightOPCServer;
typedef struct LightOPCServer loClient;
#endif

#if 0
typedef loTagDesc *loTagId;
#else
typedef unsigned   loTagId;
#endif
/* 0 is UNEXISTING TagId / RealTag */

typedef unsigned loTrid; /* Transaction identifier for loUpdateCache */

typedef unsigned loPLid; /* Identifier of a proprties' list */
/* 0 is UNEXISTING list */

#if 1
typedef WCHAR   loWchar;
#else
typedef wchar_t loWchar;
#endif

typedef unsigned long loMilliSec; /* must be unsigned */

typedef struct loCaller /* Caller's context for ldCallbacks */
   {
    loService *ca_se;
    void *ca_se_arg;   /* a copy of loDriver::ldFirstArg */
    loClient  *ca_cli; /* can be NULL if no loClient assotiated with request */
    void *ca_cli_arg;  /* a copy of loClientCreate(,,,,, void *release_handle_arg)*/
   } loCaller;

typedef struct loTagPair
   {
    loTagId   tpTi;
    loRealTag tpRt;
    void     *tpAP; /* identifier of AccessPath */
   } loTagPair;

typedef struct loTagState
   {
    FILETIME tsTime;
    HRESULT  tsError;
    int      tsQuality;
   } loTagState;

/* NOTE: if tsTime.dwHighDateTime == 0 then 
         tsTime.dwLowDateTime should contain index in the timestamp array
         (see loCacheTimestamp()). Time from timestamp array will 
         be substituted when actual reading occure. */

typedef struct loTagValue
   {
    VARIANT    tvValue;
    loTagState tvState;
    loTagId    tvTi;
   } loTagValue;


/* loDriver contains all driver-specefic information. All fields
   can be set to 0 */

typedef struct loDriver
   {
    void *ldDriverArg; /* user-defined parameter for passing back using
     loDriverArg() to all loDriver:: functions */
    loMilliSec ldRefreshRate; /* Granularity for client's UpdateRate > 0 */
                              /* 0 mean implementation dependent default */
                              /* It's better to set it explicitly ****** */
    loMilliSec ldRefreshRate_min; /* The shortest possible UpdateRate */
                                  /* 0 mean implementation dependent default */
    unsigned ldQueueMax; /* the limit of queued requests (mostly from Async
                            operations). Value 0 mean reasonable default */
    unsigned ldFlags; /* loDF_XXXX constants */
    char     ldBranchSep; /* single character branch separator for
                             IOPCBrowseAddressSpace. if = 0 then FLAT */

   HRESULT (*ldAskItemID)(const loCaller *,
                          loTagId *ti, void **acpa,  /* return values */
                          const loWchar *itemid, const loWchar *accpath,
                          int vartype, int goal);
                      /* Called when client trying to AddItem(), ValidateItem()
   and so on with an unknown tag. vartype indicates requested datatype,
   usally it is VT_EMPTY. The exact goal of each call is indicated by goal.
   It may be one of loDAIG_XXXX constans.
   Driver may return OPC_E_INVALIDITEMID, OPC_E_UNKNOWNITEMID, OPC_E_UNKNOWNPATH
   or E_FAIL when the tag cannot be created.
   Also driver may find an existing or create new tag and return S_OK.
   In this case returned *ti will help the server to identify requested tag.
   Also driver may return driver-dependent key for specified accpath in *acpa.
   this key will be transferred to driver in ldReadTags()/ldWriteTags() */

    int (*ldWriteTags)(const loCaller *,
                       unsigned count, loTagPair taglist[], VARIANT values[],
                       HRESULT error[], HRESULT *master_err, LCID);
    /* Called for writing tags into controller/driver.
   A driver have to write listed tags into device. Also <error> should be set
   for each handled tag. If a tpTi in taglist is 0 driver should ignore this tag
   (and don't touch the appropriating error[]). In the case of an error driver
   have to set *master_err to S_FALSE (or left it unchanged when all is ok).

   The values[] passed as they are specified by a client. Conversion to canonical
   datatypes may be reqired, also LCID (group-specefic) may be used in such
   conversion. The driver may modify the passed values[] so they can be converted
   "in-place".

   Driver may also change some of taglist[].tpTi to 0.
   If driver return loDW_TOCACHE then lopc will put values with non-zero tpTi
   into cache.
   If the driver return loDW_ALLDONE then none of values will be copied to cache.

   Naturally, driver may update the cache explicitly via loUpdateCache().
    */

   loTrid (*ldReadTags)(const loCaller *,
                        unsigned count, loTagPair taglist[],
                        VARIANT values[], WORD qualities[],
                        FILETIME stamps[], HRESULT errs[],
                        HRESULT *master_err, HRESULT *master_qual,
                        const VARTYPE vtype[], LCID);
   /* Called for reading tags from controller/driver
      to satisfy clients' requests for DEVICE reading.
   Driver may actually update the cache and/or fill the output parameters.
   Possible return values:
   - a value, returned by loCacheUpdate() or loCacheUnlock(), the LightOPC will
     wait until the specified transaction completed ant then return cached values;
   - loDR_CACHED  -- all data is already in cache, no waiting necessary;
   - loDR_STORED  -- driver have stored actual values in values[].

   In the case of a Refresh request the <values> will be 0 as well as
   qualities, stamps and errs thus driver must not fill these output parameters
   and must not return loDR_STORED.

   If the driver returns loDR_STORED the returned values will be transferred to
   client "as is" that ensure athomicity of "device read" operations. Thus driver
   have to convert returned values to vtype[] & LCID requestd by client.
   Also driver have to update the cache because the returned values will not be
   placed in the cache automatically.

   If driver returns other than loDR_STORED the cached values will be posted to
   client and athomicity of this portion of data can not be guaranted.
   The master_err master_qual should be set to S_FALSE if the driver set
   any of errs[] and qualities[] to values other than S_OK and GOOD_XXX
   respectively.

   If a tpTi in taglist is 0 driver have to ignore this tag.

   On another hand, driver may forcibly set a tpTi/tpRt to 0 if it decided to
   return value other than loDR_STORED. The LOPC will get from cache only tags
   with non-zero tpTi. Therefore driver may perform device read only for some
   tags in a request.
   */


   void (*ldConvertTags)(const loCaller *,
                      unsigned count, const loTagPair taglist[],
                      VARIANT values[], WORD qualities[], HRESULT errs[],
                      HRESULT *master_err, HRESULT *master_qual,
                      const VARIANT source[], const VARTYPE vtype[], LCID);
   /* This function is called to convert (localize) those tags that have loTF_CONVERT
      set after they have been read from CACHE.
      For tags read from DEVICE the ldRadTags() should perform such conversion.

      This function have convert source[] to values[] according requested
      vtype[] & LCID. The values[] might be the same as source[].
      It also may modify errs[] and qualities[] when conversion can't be done.
      The master_err & master_qual are also must be set to S_FALSE if any
      errors occured.
      This function have to ignore the tags with taglist[].tpTi is 0.
      If all conversions are completed successfully or no conversion
      performed at all (as in case of empty taglist[]) then
      the master_err & master_qual must left unchanged.

      Unlike other ldXXXX callbacks the ldConvertTags() might be called
      a) very often;
      b) from unclear state of the lightopc library.

      Therefore there are following limitations:
      a) loClientName(), loClientArg(), loDriverArg() can be called freely.
      b) loTridWait(), loSetState() must not be called due to deadlock.
      c) calling of other lightopc functions (referencing to loCervice / loClient)
         may decrease performance.
      d) this function must work fast and must not wait for a event due
         to performance reason.

      See loTF_CONVERT for additional info.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美丝袜自拍制服另类| 一区二区在线观看视频| 中文字幕亚洲区| 日本视频中文字幕一区二区三区| 国产精品亚洲午夜一区二区三区| 欧美日韩一区三区四区| 久久精品视频在线看| 日韩电影在线观看网站| 一本在线高清不卡dvd| 久久精品夜色噜噜亚洲a∨| 日韩国产精品大片| 在线观看视频91| 中文av一区特黄| 国产麻豆视频一区二区| 欧美一区二区久久| 日本欧美一区二区三区乱码 | 国产精品嫩草影院av蜜臀| 日韩精品亚洲专区| 欧美日韩你懂的| 亚洲一区二区三区四区中文字幕| 91免费观看视频在线| 欧美国产精品v| 国产成人自拍网| 欧美韩国一区二区| 成人影视亚洲图片在线| 久久精品亚洲精品国产欧美 | 日韩三级视频中文字幕| 日日摸夜夜添夜夜添国产精品 | 欧美精品三级日韩久久| 亚洲免费电影在线| 一本色道综合亚洲| 亚洲一卡二卡三卡四卡| 日本大香伊一区二区三区| ...中文天堂在线一区| 99国产精品久久久久久久久久久| 国产精品视频一区二区三区不卡| 高清不卡一区二区| 国产精品久久久爽爽爽麻豆色哟哟 | 国产精品亚洲第一| 国产精品丝袜黑色高跟| 99这里只有久久精品视频| 国产精品国产三级国产a| 99re这里都是精品| 亚洲国产精品综合小说图片区| 欧美午夜精品久久久久久孕妇| 一区二区三区在线视频免费| 欧美在线一区二区| 美女视频黄 久久| 久久久久国产精品人| 99re这里都是精品| 亚洲h在线观看| 久久人人爽人人爽| 91麻豆免费在线观看| 日日骚欧美日韩| 久久青草国产手机看片福利盒子| 成人免费毛片a| 亚洲大片精品永久免费| 欧美mv日韩mv亚洲| 97精品国产97久久久久久久久久久久| 一区二区三区高清不卡| 欧美大片在线观看| 成人网在线播放| 亚洲午夜一区二区| 久久精品视频免费| 欧美色图在线观看| 国产精品综合二区| 亚洲综合色噜噜狠狠| 久久综合丝袜日本网| 9i看片成人免费高清| 日韩av网站在线观看| 国产精品久久久久久久浪潮网站 | 欧美日韩久久一区| 国产一区二区三区免费看| 亚洲欧美综合另类在线卡通| 在线成人免费视频| 成av人片一区二区| 麻豆91在线播放免费| 亚洲免费观看高清在线观看| 日韩欧美在线123| 91蝌蚪porny成人天涯| 激情五月婷婷综合网| 亚洲午夜久久久久中文字幕久| 国产欧美视频一区二区| 337p亚洲精品色噜噜噜| 99免费精品视频| 国产真实乱偷精品视频免| 天天操天天综合网| 一区二区三区在线免费播放| 国产亚洲视频系列| 欧美精品一区二区久久婷婷| 欧美性猛片aaaaaaa做受| av中文字幕在线不卡| 韩国v欧美v亚洲v日本v| 日韩av一级电影| 亚洲国产视频一区二区| 亚洲欧美激情插| 亚洲人一二三区| 国产精品激情偷乱一区二区∴| 久久久久国产精品免费免费搜索| 欧美一区二区免费视频| 91精品蜜臀在线一区尤物| 欧美综合色免费| 色综合天天综合网天天狠天天| 不卡的电视剧免费网站有什么| 美女国产一区二区| 日韩av在线播放中文字幕| 亚洲一本大道在线| 亚洲成人免费影院| 午夜免费欧美电影| 午夜国产不卡在线观看视频| 亚洲福利视频三区| 五月婷婷激情综合| 五月天精品一区二区三区| 亚洲国产毛片aaaaa无费看| 一区二区欧美视频| 亚洲国产精品一区二区久久 | 欧美日韩国产综合一区二区三区| 欧美亚洲动漫制服丝袜| 欧美三级中文字幕在线观看| 91久久精品国产91性色tv| 在线看不卡av| 欧美日韩精品综合在线| 91精品国产一区二区三区香蕉| 欧美一区二区三区的| 日韩视频一区二区三区在线播放| 日韩精品自拍偷拍| 日本一区二区三区四区| 亚洲免费在线观看视频| 亚洲国产三级在线| 久久疯狂做爰流白浆xx| 国产麻豆日韩欧美久久| eeuss影院一区二区三区| 欧美在线免费视屏| 欧美电影在哪看比较好| 欧美一区二区三区色| 久久精品视频网| 亚洲精品v日韩精品| 日本不卡高清视频| 成人网男人的天堂| 色一区在线观看| 欧美精品少妇一区二区三区| 2023国产精华国产精品| 国产精品久久久久一区二区三区 | 国内精品免费**视频| 白白色 亚洲乱淫| 欧美日韩在线播放三区四区| 日韩一区国产二区欧美三区| 中文字幕av在线一区二区三区| 亚洲国产美女搞黄色| 国产一二三精品| 欧美色欧美亚洲另类二区| 精品福利在线导航| 亚洲精品国产一区二区三区四区在线| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产精品1区2区| 欧美视频一区在线| 国产日韩综合av| 日本va欧美va欧美va精品| 91一区二区在线观看| 精品少妇一区二区三区在线视频 | 91黄色免费版| 久久久久久久久伊人| 亚洲自拍偷拍麻豆| 懂色一区二区三区免费观看| 欧美肥大bbwbbw高潮| 中文字幕亚洲综合久久菠萝蜜| 蜜臀av性久久久久av蜜臀妖精| 色综合一个色综合| 久久久久久麻豆| 老司机免费视频一区二区| 色噜噜狠狠色综合中国| 中文字幕第一页久久| 蜜桃视频一区二区三区| 欧美日韩免费电影| 亚洲精品视频在线| 成人av在线网站| 国产亚洲成年网址在线观看| 午夜精品免费在线观看| 日本高清不卡在线观看| 中文字幕 久热精品 视频在线| 蜜桃视频第一区免费观看| 欧美日韩你懂得| 亚洲综合小说图片| 色伊人久久综合中文字幕| 亚洲欧洲日韩在线| av在线一区二区三区| 国产精品第四页| 成人小视频免费在线观看| 久久精品亚洲麻豆av一区二区| 久久丁香综合五月国产三级网站| 91精品欧美综合在线观看最新| 婷婷丁香久久五月婷婷| 69精品人人人人| 午夜精品久久久久久久蜜桃app| 欧美亚洲动漫制服丝袜| 亚洲成人激情综合网| 欧美日韩一区二区三区视频| 亚洲一区二区偷拍精品| 欧美午夜一区二区三区| 午夜在线成人av|