opcuaserverinfo (opcua)

Query host for installed OPC UA servers



Sinfo = opcuaserverinfo(HostName) queries the specified host for its installed OPC UA servers. HostName can be a host name or IP address, specified as a character vector or string.

Sinfo is returned as an OPC UA ServerInfo object, or an array of these objects, containing the read-only properties Description, Hostname, and Port.

Use the opcua function to create an OPC UA client object directly from an opc.ua.ServerInfo object.


collapse all

Find all available servers on the local host, and view the properties of the first.

Sinfo = opcuaserverinfo('localhost');
OPC UA ServerInfo 'UA Sample Server':

   Connection Information
    Hostname: 'HOST4421'
        Port: 51210

Input Arguments

collapse all

Host name or IP address, specified as a character vector or string, identifying the machine running the OPC UA servers.

Example: 'localhost'

Data Types: char | string

Output Arguments

collapse all

Server information, returned as an array of opc.ua.ServerInfo objects. Index into the array to access the following individual server properties.

HostnameHost name used by the server to authenticate connections
PortPort number used for connections to the server
DescriptionFriendly name of the OPC UA server

See Also


Introduced in R2015b