茶馆

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一次的例子是通过PI-SDK获取Tag的属性并且修改它,我想更重要的是怎么取出Tag的值和进行更新吧。在进行尝试之前看了看文档,了解了一下PISDK的对象结构,下面这一张就是PISDK的结构图

简要了解在例子中要用到的对象,并把它们的描述进行了简单的翻译,我想翻译的目的应该是帮助自己更好的进行学习,给出英文对照。不妥之处,忘大牛们指正:



//**********************正文开始*************************************************/

The Server object represents a single server (data archive). Server objects are retrieved from the Servers collection and provide access to the basic entities represented on each server, such as points, point classes, digital states, users, and groups. Some basic properties are available from the Server object as initially retrieved from the Servers collection.
    Typically a program will require a network connection to the server. Connections are established either by calling the Open method of the Server object explicitly or by accessing a property or calling a method of the Server object that requires server access, forcing an implicit connection.
    Many of the services available through the Server object are accessed through its properties which return other objects. For example, the PIPoints property provides a PIPoints collection object for accessing the various points on a server.

    服务器(Server)对象表示了一个单独的PI数据库服务器,服务器对象可从服务器集合中获得并且提供了访问每个数据库中的实体的方法,这些实体包括点,点集合,数字量(开关量),用户和组。服务器对象提供了一些基本的属性从而在服务器集合中队服务器进行初始化。
     
一般地,程序连接到服务器需要网络连接属性,这个连接可以通过服务器对象的Open方法显式的进行,也可以通过服务器对象的某个属性或方法连接需要验证的服务器来进行一个隐式的连接。

上面这一段有点不太懂,直到目前我都没有用过显式的Open方法,都是通过
    _piServer = piSDK.Servers.DefaultServer;
    这种所谓的隐式方法来连接,这个是不是就是所谓的隐式连接?因为在
PISDK安装的时候指定了一个PI数据源,所以DefaultServer就是这个?所以我访问的时候都不需要输入用户或者密码

       我们可以通过服务器对象的属性来返回其他的对象从而获得很多服务。例如,通过服务器对象的PIPoints属性返回的PIPoints集合的对象来访问数据库里面的不同的点。


A PIConstant collection maps display strings to PI-SDK enumerations.  This provides a way for an application to display strings indicating choices of behavior for a user to select particular actions.  The application then retrieves the associated constant and passes it to a particular method being called. A PIConstant collection contains members, stored and accessed as NamedValue objects that represent the display string (the name) and the constant (the value).  A PIConstant collection is retrieved using PISDK.PIConstants.Item.

       PIConstant集合映射字符串到PI-SDK枚举。(使字符串和枚举的项一一对应)。它为程序提供了字符串来代表用户选择的一个特殊的操作,然后程序可以把这个字符串对应的值获得并且把它传送到使用的方法里面去。PIConstant集合包含了Members不知道什么意思),存贮和访问NamedValue对象。NamedValue对象是一个字符串(名字)-常量(数值)对。PIConstant集合中的对象通过PISDK.PIConstants.Item来获取

       我觉得这个PIConstant集合就是相当于在C#中用DialogueResult枚举中用OK代表某个具体的意思。具体代表的东西我们不用关心,知道是什么就可以了。NamedValue就是一个字符串-常量对,有点像一个字典吧,最后一句话说PISDK.PIConstants.Item来获取PIContant,但是我在C#PISDK.PIConstants没有Item属性,反而使直接通过PISDK.PIConstants[Name]取到。同时NamedValue是在PISDKCommon命名空间下面

 

       The PIPoint object represents a point on a PI Server.  The PIPoint is the primary access point to data on the Server as well as configuration of a point's properties.  

       PIPoint对象表征PI数据库里面的点,PIPoint是访问数据库里面点的值和属性的主要方法。

 

       The PIData object is associated with a single PIPoint and is used to send and retrieve values to and from the server.  It is accessed through the Data property of the PIPoint.

       PIData对象是和单独的PIPoint联系的,它从服务器获取数据或者写回数据到服务器。它通过PIPointData属性得到。

//******************************结束********************************/

        本来翻译完这些准备再把例子试验一下的,但是没有时间了,下次吧!先作一下铺垫。 

        这些英文文字都是来源于PI的Manual,版权归OSISOFT所有,与我无关,至于我翻译的中文文字只是简单的鹦鹉学舌,版权仍然是OSISOFT的,红色的我的感受版权当然是我的了,Maybe我的论文还要用呢.因此本文谢绝转载.包括网络和其他介质

posted on 2006-06-01 17:58  laue  阅读(3658)  评论(3编辑  收藏  举报