ProSoft Technology MVI56E-LDM User Manual
Page 138

CIP API Functions
ControlLogix Platform ♦ "C" Programmable
Developer's Manual
Linux Application Development Module
Page 132 of 264
ProSoft Technology, Inc.
March 12, 2014
OCXcip_GetTagDbTagInfo
Syntax
int OCXcip_GetTagDbTagInfo (OCXHANDLE apihandle,
OCXTAGDBHANDLE tdbHandle,
char * tagName,
OCXCIPTAGINFO * tagInfo);
Parameters
apiHandle
handle returned by previous call to OCXcip_Open
tdbHandle
handle created by previous call to
OCXcip_CreateTagDbHandle
tagName
Pointer NULL terminated tag name string
tagInfo
Pointer to OCXCIPTAGINFO structure- all members set if
success:
daType
= Data type codee
hStruct
= Zero if member is a base type, nonzero for structure
eleSize
= Data element size in bytes
xDim
= X dimension - zero if not an array
yDim
= Y dimension - zero if no Y dimension
zDim
= Z dimension - zero if no Z dimension
xIdx
= X index - zero if not array
yIdx
= Y index - zero if not array
zIdx
- Z index - zero if not array
dispFmt
= Recommended display format
Description
This function gets information regarding a fully-qualified tag name (i.e.,
symName[x,y,z].mbr[x].etc). If symName or mbr specifies an array, unspecified
indices are assumed to be zero. A tag database must have been previously built
with
OCXcip_BuildTagDb()
. This function does not communicate with the target
device or verify the device program version.
Return Value
OCX_SUCCESS
Success
OCX_ERR_*
Failure
Example
OCXHANDLE hApi;
OCXTAGDBHANDLE hTagDb;
OCXCIPTAGInfo tagInfo;
int rc;
rc = OCXcip_GetTagDbTagInfo(hApi, hTagDb, "sym[1,2,].mbr[0]", &tagInfo);
if ( rc != OCX_SUCCESS)