The PTMAP data structure is:
typedef struct ptm_data_rec
{
PTM_DATA_TYPE type;
PTM_DATA_LENGTH len;
PTM_ELEMENTS elem;
UCHAR fill[PTM_DATA_FILL];
COR_I1 value[PTM_MAXSIZE];
} PTM_DATA;
Applications can access the fields for the following information:
type |
Configured point data type, such as BOOL, SINT, UINT. See the next chapter for details |
Note
See the POINT_TYPE.DAT description for further details
len |
Length of point type. |
elem |
Number of elements in the point. |
value |
Point value. |
Note: Never declare a variable as PTM_DATA since PTM_MAXSIZE can equal 64K.
The macros described below are used to access these fields.
Memory for PTMAP data must be allocated and deallocated using the following functions:
PTMAP_alloc_ptm_data
PTMAP_alloc_eu_conv
PTM_free_ptm_data
Data structures can be copied from one record to another already allocated record using
The subroutines are:
Determine the Alarm State of a Point |
|
Deallocate Memory For PTM_rsp |
|
Allocate Memory For PTM_DATA |
|
Allocate Memory For EU Conversion Result |
|
Deallocate Memory For PTM_DATA |
|
Copy A PTM_DATA Record |
|
Convert Raw Value To Real Number With Engineering Units |
|
Convert Point Value From Engineering Units To Raw Value |
Access point data. |