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

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

?? lightopc.h

?? 一個OPC服務器開發的源代碼。結構清晰
?? 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一区二区三区免费野_久草精品视频
国产一区二区三区国产| 久久女同精品一区二区| 欧美精品一区二区三区蜜臀| 国产精品无遮挡| 欧美aa在线视频| 色94色欧美sute亚洲13| 欧美激情资源网| 免费精品视频最新在线| 欧美在线一区二区| 亚洲欧洲成人精品av97| 国产精品自在欧美一区| 69久久99精品久久久久婷婷| 亚洲欧美一区二区不卡| 成人性视频免费网站| 精品国产免费一区二区三区四区| 亚洲午夜免费电影| 一本色道久久综合亚洲aⅴ蜜桃| 久久久不卡影院| 经典三级一区二区| 67194成人在线观看| 亚洲精选一二三| 99re在线精品| 亚洲男同1069视频| 成人av影院在线| 国产精品久久国产精麻豆99网站| 国产精品一卡二卡在线观看| 久久一区二区三区四区| 麻豆精品一二三| 精品国产乱码久久久久久浪潮 | 日韩激情在线观看| 在线视频国内一区二区| 亚洲精品成人精品456| 色噜噜偷拍精品综合在线| 亚洲欧美日韩在线| 91福利国产精品| 亚洲福中文字幕伊人影院| 欧美日韩一区高清| 日韩一区精品视频| 日韩欧美另类在线| 国内精品写真在线观看| 国产色综合久久| 99热精品国产| 亚洲成年人网站在线观看| 欧美精品久久久久久久多人混战| 日韩不卡在线观看日韩不卡视频| 欧美精品久久99久久在免费线| 美女视频一区二区| 久久久久成人黄色影片| 99精品黄色片免费大全| 亚洲一区二区三区四区在线免费观看 | 久久黄色级2电影| 久久久国产精品午夜一区ai换脸| 成人av免费在线观看| 亚洲国产日韩一级| 精品久久久久av影院| av在线一区二区三区| 亚洲第一综合色| 精品奇米国产一区二区三区| 成人av免费在线| 午夜伦理一区二区| 日本一区二区免费在线| 91亚洲精品久久久蜜桃| 男人的j进女人的j一区| 久久九九99视频| 91国产丝袜在线播放| 久久精品免费观看| 中文字幕中文在线不卡住| 欧美电影在哪看比较好| 国产999精品久久久久久| 亚洲在线成人精品| 久久伊99综合婷婷久久伊| 91久久精品国产91性色tv| 久久99久久久久久久久久久| 亚洲欧美福利一区二区| 精品免费一区二区三区| 在线精品视频一区二区| 国产一区视频网站| 偷拍与自拍一区| 亚洲欧洲综合另类| 久久先锋影音av鲁色资源| 欧美少妇xxx| va亚洲va日韩不卡在线观看| 成人a免费在线看| 日韩专区欧美专区| 怡红院av一区二区三区| 国产精品污网站| 91精品国产综合久久精品图片| 成人99免费视频| 国产一二精品视频| 蜜臀av性久久久久av蜜臀妖精| 亚洲激情男女视频| 国产精品无码永久免费888| 精品福利一区二区三区| 欧美一区二区啪啪| 欧美视频在线一区二区三区| av高清不卡在线| 福利一区二区在线| 国产激情视频一区二区三区欧美| 天天综合日日夜夜精品| 亚洲国产精品久久久久秋霞影院| 综合在线观看色| 国产精品三级视频| 国产欧美精品一区aⅴ影院| 精品对白一区国产伦| 精品电影一区二区| 日韩一区二区免费视频| 日韩视频国产视频| 日韩免费看的电影| 日韩精品在线一区二区| 日韩亚洲欧美高清| 欧美成人精品高清在线播放| 日韩一区二区视频| 日韩免费高清av| 日韩免费一区二区| 国产亚洲人成网站| 中文字幕第一区二区| 一区免费观看视频| 亚洲自拍偷拍图区| 亚洲高清免费视频| 久久精品国产99| 精品伊人久久久久7777人| 国产一区二区不卡| 丁香激情综合国产| 色综合久久综合网欧美综合网| 97久久精品人人做人人爽| 在线观看不卡视频| 3d成人动漫网站| 久久亚洲精华国产精华液| 中文字幕在线免费不卡| 亚洲在线视频网站| 久久国产生活片100| 成人中文字幕在线| 91成人网在线| 欧美成人福利视频| 国产精品视频yy9299一区| 一二三区精品视频| 蜜桃av噜噜一区| 99久久精品久久久久久清纯| 91免费观看国产| 欧美一区二区三区免费| 国产婷婷色一区二区三区四区| 国产精品视频一二三区 | 天天色天天操综合| 国产自产v一区二区三区c| 成人app下载| 91精品国模一区二区三区| 久久一日本道色综合| 久久国产生活片100| 91一区二区三区在线观看| 欧美一级艳片视频免费观看| 亚洲国产精品激情在线观看| 香蕉加勒比综合久久| 国产不卡在线一区| 91精品啪在线观看国产60岁| 欧美激情中文不卡| 奇米色一区二区| 91成人看片片| 国产视频不卡一区| 免费在线观看视频一区| 成人精品视频一区二区三区| 91精品国产综合久久久蜜臀粉嫩| 国产精品久久久久久久久免费樱桃 | 欧美高清你懂得| 国产精品免费免费| 视频一区视频二区中文| jizzjizzjizz欧美| 精品久久久久久综合日本欧美| 亚洲综合999| www.视频一区| 国产亚洲成aⅴ人片在线观看| 天堂va蜜桃一区二区三区漫画版| av一区二区三区在线| 欧美成人精品高清在线播放| 亚洲mv在线观看| 色欧美片视频在线观看在线视频| 国产日韩欧美电影| 久久99精品久久久久| 678五月天丁香亚洲综合网| 一区二区三区丝袜| 97超碰欧美中文字幕| 久久麻豆一区二区| 韩国av一区二区三区| 欧美一级免费大片| 午夜电影久久久| 欧美精品久久久久久久多人混战| 亚洲特级片在线| av不卡免费在线观看| 久久精品一二三| 国产精品乡下勾搭老头1| 精品国产91乱码一区二区三区| 美腿丝袜亚洲三区| 国产精品久久久久久亚洲毛片 | 日韩av二区在线播放| 欧美日韩久久一区二区| 亚洲激情图片一区| 色婷婷av一区二区三区大白胸| 亚洲精品亚洲人成人网在线播放| 99国产精品一区| 一二三区精品福利视频| 欧美日韩成人一区|