主要内容

opchdaserverinfo

Query host for installed HDA servers

    Description

    An opc.hda.ServerInfo object provides information on OPC HDA servers installed on a specific host.

    Creation

    Description

    serverInfoObj = opchdaserverinfo(hostName) queries the host specified in hostName for the OPC HDA servers installed on that host. hostName can be the name of the host or its IP address.

    example

    Input Arguments

    expand all

    OPC HDA server host name, specified as a character vector or string.

    Example: 'host-name'

    Data Types: char | string

    Output Arguments

    expand all

    OPC HDA server information, specified as an OPC HDA ServerInfo object. You can use the ServerInfo object to find a particular server based on the Description property and by using the findDescription function. You can also construct a client by passing the relevant element of the object to the opchda function. This table lists the read-only properties of the ServerInfo object.

    Property NameDescription
    HostName of the host name.
    ServerIDProgrammatic Server ID to use when constructing an HDA Client object associated with the server.
    DescriptionDescription of the server.
    HDASpecificationA character vector denoting the supported HDA specification. Currently, the function supports only the HDA1 specification.

    Examples

    collapse all

    Find the HDA servers on the local host.

    sInfo = opchdaserverinfo('localhost');

    Locate the specific server with a description containing the character vector 'Matrikon'.

    mIndex = findDescription(sInfo,'Matrikon');

    Construct an OPC HDA client for that server.

    hdaClient = opchda(sInfo(mIndex));

    Version History

    Introduced in R2014a

    See Also