zoukankan      html  css  js  c++  java
  • ChangeBrowsePosition Method

    http://advosol.com/manuals/opcdanet/topic891.html

    Change the current browse position. Move up, down or to in the hierarchical address space. ( IOPCBrowseServerAddressSpace:: ChangeBrowsePosition )
    The function will return E_FAIL if called for a FLAT space. An error is returned if the passed string does not represent a 'branch'. Moving UP from the 'root' will return E_FAIL.
    Note OPC_BROWSE_TO is new for version 2.0. Clients should be prepared to handle E_INVALIDARG if they pass this to a 1.0 server.

    Syntax

    Visual Basic (Usage)
    Copy Code

    Dim instance As OpcServer
    Dim direction As OPCBROWSEDIRECTION
    Dim name As String
    Dim value As Integer   value = instance.ChangeBrowsePosition(direction, name)

    C#

    public int ChangeBrowsePosition(    OPCBROWSEDIRECTION direction,    string name
    )
    Parameters
    direction
    IN: direction, up, down or to
    name
    IN: branch name to move to
    Return Value

    HRESULTS
    Description

    S_OK
    Successful Read.

    E_FAIL
    The call failed with an unspecific error.

    E_OUTOFMEMORY
    Not enough memory.

    OPC_E_INVALIDARG
    An argument of the call was invalid.

    Example

    C#
    Copy Code

    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_UP, "" );  // to parent
    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_DOWN, "Device1" );
    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_TO, "" ); // to root
    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_TO, "Plant3.Section5.Device2" );

    Visual Basic
    Copy Code

    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_UP, "" )  ' to parent
    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_DOWN, "Device1" )
    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_TO, "" )  ' to root
    Srv.ChangeBrowsePosition( OPCBROWSEDIRECTION.OPC_BROWSE_TO, "Plant3.Section5.Device2" )

    Requirements

    OPC DA Server Version: V2

    See Also

    Reference
    OpcServer Class
    OpcServer Members
  • 相关阅读:
    反射入门
    把数据库表的信息添加到list集合里面
    简单的事务分析及使用
    java-web与jdbc 的使用
    菜鸟入门bootstrap
    如何彻底的卸载mysql
    发生系统错误 1067,解决方案
    纯js的购物车案例
    idea里面怎么把自己项目添加maven
    js入门
  • 原文地址:https://www.cnblogs.com/cppss/p/4078559.html
Copyright © 2011-2022 走看看