ProSoft Technology MVI56E-LDM User Manual
Page 120

CIP API Functions
ControlLogix Platform ♦ "C" Programmable
Developer's Manual
Linux Application Development Module
Page 114 of 264
ProSoft Technology, Inc.
March 12, 2014
OCXcip_CreateTagDbHandle
Syntax
int OCXcip_CreateTagDbHandle (OCXHANDLE apihandle,
BYTE *pPathStr,
WORD devRspTimeout,
OCXTAGDBHANDLE * pTagDbHandle);
Parameters
apihandle
handle returned by previous call to OCXcip_Open
pPathStr
Pointer to device path string
devRspTimeout
Device unconnected message response timeout in milliseconds
pTagAccArrDbHandle
Pointer to OCXTAGDBHANDLE instance
Description
OCXcip_CreatTagDbHandle
creates a tag database and returns a handle to the
new database.
IMPORTANT: Once the handle is created,
OCXcip_DeleteTagDbHandle
should be
called when the tag database is no longer necessary.
OCXcip_Close()
will delete
any tag database resources that the application may have left open.
Return Value
OCX_SUCCESS
operation was successful
OCX_ERR_NOACCESS
apiHandle does not have access
OCX_ERR_MEMALLOC
Not enough memory is available
Example
OCXHANDLE hAPI;
OCXTAGDBHANDLE hTagDb;
BYTE * devPathStr = (BYTE *)"p:1,s:0";
int rc
rc=OCXcip_CreateTagDbHandle(hApi, devPathStr, 1000, &hTagDb);
if (rc!=OCX_SUCCESS)
printf("Tag database handle creation failed!\n");
else
printf("Tag database handle successfully created.\n);
See Also
OCXcip_DeleteTagDbHandle