PTMAP_eu_conv

This subroutine converts a raw data value to a real number with engineering units. The application passes the raw value and is returned a real value and an engineering units string. The conversion is defined by configuration data for the data point in the file, EU_CONV. If no conversion has been specified, an error is returned.

Syntax

int PTMAP_eu_conv (point_id, pt_val, result, eu_label,
                   retstat)
             *point_id;
PTM_DATA     *pt_val;   
PTM_DATA     *result;   
char         *eu_label;
COR_STATUS   *retstat;

Input Arguments

Point_id Point identifier.
pt_val Point value structure containing the raw value.

Output Arguments

Result Point value structure containing the converted value (FLOATINGPOINT). Result is a PTM_DATA structure. Space for this structure must be allocated by a call to PTMAP_alloc_eu_data.
For example, result = PTMAP_alloc_eu_data .
eu_label Engineering units string from configuration data.
Retstat Pointer to status structure. The following errors may be returned (see Appendix A for an explanation of this code):
PTMAP_INVAL_POINT_ID
PTMAP_HAS_NOT_EU_CONV
PTMAP_INVAL_EU_RES_TYPE

Return Value

The contents of retstat.status .