PTMAP_add_pt_list

This subroutine adds points to the local data store from a list of points. This function can be used in place successive calls to PTMAP_add_point when several points are to be added to the local data store.

In order to use this function, an array of PTMAP_PT_LIST structs must first be allocated. The array must contain one struct for each point plus one as a terminating record. Each element of the array must be populated and the last used record should be given a NULL Point ID and point address.

The PTMAP_PT_LIST struct is defined as follows:

         typedef struct

           {

             RECORD_PTR ptr;

             COR_I4 seq_num;

           } PTMAP_ADDR;

         typedef struct

           {

             char       *point_id;

           PTMAP_ADDR *addr;

           } PTMAP_PT_LIST;

PTMAP_ADDR contains values for each point added from the list.

The following C macro has been defined to load the point list:

#define        LOAD_PT_LIST(dest,pt_id,point_addr)\

    dest.point_id = pt_id;\

    dest.addr =  point_addr;\

When you load the point list, the pt_id field can contain a Point ID or a Point ID followed by a period (.) and an attribute name. For more information on point attributes, see Point Attribute Descriptions.

Syntax

int PTMAP_add_pt_list ( point_list, full, retstat )

PTMAP_PT_LIST *point_list;

COR_BOOLEAN   full;

COR_STATUS    *retstat;

Input Arguments

point_list

List of Point IDs to be added

full

For GE Fanuc use. Always set this argument to FALSE.

Output Arguments

retstat

Pointer to status structure. The following error may be returned (see Appendix A for an explanation of this code):

 

PTMAP_POINT_ALRDY_ADDED

 

PTMAP_POINT_ADR_NOTF

Return Value

The contents of retstat.status.

More information

Point Management API subroutines.