picm_serverupdates

This function returns a single cache point update to the caller if one is available.

C format

int32 picm_serverupdates(

int32 * pt,

char PIPTR * tagname,

int32 len,

int32 PIPTR * mode );

Returns

0

Success

-61

No more changed tags

-411

Tagname is truncated

-20020

No cache file for current host

Arguments

pt (returned)

Point number

tagname (returned)

Name of updated tag

len (passed)

Length of the passed tagname buffer

mode (returned)

Update mode

Usage Notes

The caller of this function must have previously called picm_opencache to open the cache file and piut_setservernode to set the PI Server if a call to piut_setservernode had been made since the initial call to picm_opencache.

The user must synchronize the cache with a call to picm_synchronizecache in order for picm_serverupdates to return an update.

Tagnames greater than 12 characters will be truncated and a -411 return code will be given. The point number will still be valid.

The following defines are provided in piapi.h to be used with the mode parameter:

#define NOTAGS 0

#define POINTCREATE 1

#define POINTEDIT 2

#define POINTDELETE 3

Enabling Operational Intelligence