Main Content

getIndexFromID

Indices matching OPC HDA data item IDs

Description

ind = getIndexFromID(dObj,itemID) returns the index of HDA data object array dObj that matches the item ID.

example

Examples

collapse all

Load the OPC HDA example data file and find the index of 'Example.Item.1' and 'Example.Item.2'.

load opcSampleHdaData;
ind = getIndexFromID(hdaDataVis,{'Example.Item.1','Example.Item.2'})
ind =

     1     2

Input Arguments

collapse all

Raw OPC HDA data, specified as an OPC HDA data object.

OPC HDA data item ID, specified as a character vector or cell array of character vectors.

Example: 'Random.Real4'

Output Arguments

collapse all

Index of the specified data item, returned as a scalar or a vector.

Version History

Introduced before R2006a