pipt_signupforupdates

This function registers a process to receive a list of all changes to the Point Database (by calling the function pipt_updates). This function checks the list of processes that have called this routine and cleans up for other processes that may have aborted, if possible.

world privilege is required to determine if all other processes which have signed up for point updates are still running. group privilege is required to determine if processes in the uic group of this process are still running. This routine cleans up after an image in this process that may have aborted. Up to 50 processes can sign up for point updates at one time.

C format

int32 pipt_signupforupdates( void );

Returns

>0

System error

0

Success

-60

No more pid slots available

Arguments

None

Usage Notes

Example

The following code segment demonstrates the use of the pipt_signupforupdates and the pipt_updates functions:

int32 status;

long signedup;

/* sign this application up for point update notification */

if ( status = pipt_signupforupdates() ) {

/* print error message */ 

/* maybe fatal if signup is vital */ 

signedup = FALSE; 

}

else {

signedup = TRUE; 

}  .

  . /* other initialization */

  .

/* main program loop */

while( TRUE ) {

  .

  . /* main activities */

  .

/* periodically check for point updates */ 

if ( signedup && lastptupdate < curtime ) { 

while ( !(status = pipt_updates( &pt, tagname, 

sizeof tagname, &mode)) ) { 

if ( status == -61 || mode == NOTAGS ) { 

break; 

else if ( status != 0 ) { 

/* post an error message */ 

signedup = FALSE; 

break; 

else if ( mode == POINTCREATE ) { 

/* add point to application list? */ 

else if ( mode == POINTEDIT ) { 

/* modify pt in application list? */ 

else if ( mode == POINTDELETE ) { 

/* delete pt from application list? */ 

}

Enabling Operational Intelligence