PTMAP_get_struct_components

This subroutine provides the ability to get the information regarding a structure point type that is necessary to decompose the raw point data into the various structure components. When a response for a structure point is received, the data for all of the components are packed into a single value in the response message. By calling PTMAP_get_struct_components, you can get information regarding the order, type, size, and offset of each component within the point value.

This function only provides the structure layout; it does not process the data in the point value.

Syntax

int PTMAP_get_struct_components (point_type_id,

                                 struct_details,

                                 length, comp_qty,

                                 retstat)

                    *point_type_id;

STRUCT_DETAILS_PTR  struct_details;

COR_U2              *length;

COR_U2              *comp_qty;

COR_STATUS          *retstat;

Input Arguments

point_type_id

The Point Type ID of a structure whose details are to be returned.

struct_details

A pointer to the record structure STRUCT_DETAILS. This will be populated with the list of components and their information.

If you pass a NULL in this pointer, only the length and total number of components are returned.

Output Arguments

length

The overall length, in bytes, of the STRUCTURE, including any filler needed for data alignment.

comp_qty

The total number of distinct components that are defined for the STRUCTURE. The STRUCT_DETAILS record is made up of arrays, and this is the maximum number of valid entries that should be used.

retstat

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

 

PTMAP_INV_PT_TYPE

 

PTMAP_TYPE_NOT_STRUCT

 

PTMAP_COMP_INVALID

 

PTMAP_SEQ_NUM_MISMATCH

Return Value

The contents of retstat.status.

More information

Structure details data structure (STRUCT_DETAILS).

Point Management API subroutines.