beautypg.com

ProSoft Technology MVI56E-LDM User Manual

Page 125

background image

ControlLogix Platform ♦ "C" Programmable

CIP API Functions

Linux Application Development Module

Developer's Manual

ProSoft Technology, Inc.

Page 119 of 264

March 12, 2014

OCXcip_BuildTagDb

Syntax

int OCXcip_BuildTagDb(OCXHANDLE apihandle,
OCXTAGDBHANDLE tdbHandle,
WORD * numSymbols);

Parameters

apiHandle

handle returned by previous call to OCXcip_Open

tdbHandle

pointer to device path string

numSymbols

Pointer to WORD value - set to number of discovered symbols if
success

Description
This function is used to retrieve a tag database from the target device. If the
database associated with

tbdHandle

was previously built, the existing database

will be deleted before the new one is built. This function communicates with the
target device and may take a few milliseconds to a few tens of seconds to
complete.

tbdHandle

must be a valid handle previously created with

OCScip_CreateTagDbHandle

. If successful,

*numSymbols

is set to the number of

symbols in the tag database.

Return Value

OCX_SUCCESS

tag database was built successfully

OCX_ERR_NOACCESS

apihandle

or tdbHandle is invalid

OCX_ERR_VERMISMATCH

The device program version changed during the build

Example

OCXHANDLE hApi;
OCXTAGDBHANDLE hTagDb;
WORD numSyms

If (OCXcip_BuildTagDb(hApi, hTagDb, &numSyms) !=OCX_SUCCESS)

printf("Error building tag database\n");

else

printf("Tag database build success, numSyms=%d\n", numSyms);

See Also
OCXcip_CreateTagDbHandle , OCXcip_DeleteTagDbHandle ,
OCXcip_TestTagDbVer , OCXcip_GetSymbolInfo