getNameSpace
OPC HDA server name space
Syntax
Description
NS = getNameSpace(HdaObj)
retrieves the entire server name space from the connected OPC HDA Client
HdaObj
.
NS = getNameSpace(HdaObj,'StartItemID','itemID')
retrieves the server name space beginning at Fully Qualified Item ID
'itemID'
, and all branches in the name space below
'itemID'
.
NS = getNameSpace(HdaObj,'Depth',dLevel)
retrieves the dLevel
levels of the server name space
beginning at the server name space root. Specifying dLevel
as
1
retrieves only the nodes (branch and leaf) contained in
the root of the server name space.
NS = getNameSpace(HdaObj,'StartItemID','itemID','Depth',dLevel)
retrieves the dLevel
levels of the name space starting at
Fully Qualified Item ID 'itemID'
.
In all cases, NS
is a recursive structure array
representing the name space of the server. Each element of NS
is a node in the name space. NS
contains the fields:
Name
— a descriptive nameFullyQualifiedID
— the fully qualifiedItemID
of that nodeNodeType
— defines the node as a'branch'
node (containing other nodes) or'leaf'
node (containing no other nodes)Nodes
— a structure array with the same fields asNS
, representing the nodes contained in this branch of the name space
Use flatnamespace
to flatten the hierarchical name
space.
Examples
Version History
Introduced in R2011a