Once Point Management returns responses to the application process, the application may call one of the PTMAP_get functions to access the responses. The PTMAP_get functions allow the application to specify the responses that it is interested in. Each PTMAP_get function returns a single response and must be called iteratively to get all responses. An error is returned when there are no more responses to be returned. For example, after sending a Shopping List containing four "Snapshot" requests and waiting for the responses, the application should call PTMAP_get_sl four times to get the responses. If the application calls PTMAP_get_sl a fifth time, COR_WARNING is returned.
In addition to checking the return status on the PTMAP_get function (returned in retstat argument) the application must check the status of the response which is returned in the rsp_stat argument. Depending on the rsp_stat->status value, rsp_ptr points to a ptm_rsp record containing the response data as follows:
rsp_stat->status |
Remainder of |
rsp_ptr |
ptm_rsp |
COR_FAILURE |
Set |
null |
---- |
COR_WARNING |
set * |
valid |
Point ID Point state; no data, no stamp, data present if last known value is available |
COR_SUCCESS |
Undefined |
valid |
each field set |
* If a point is unavailable, rsp_stat->err_code is set to PTM_POINT_UNAVAILABLE. Additional information is also available in this case in rsp_stat->err_ref. If rsp_stat->err_ref is set to PTMAP_RP_UNREACHABLE, the Point Management Resident Process is unreachable; otherwise, the point is unavailable for some other reason.
After accessing required information following a PTMAP_get function, applications must deallocate this structure by calling the PTMAP_free_ptm_rsp function. See the next section for additional information on accessing point data.
The subroutines are:
Get Point Management Response By Request |
|
Point Management Response By Point |
|
Get Point Management Response By Shopping List |
|
Get Point Management Response By Shopping List Point |
|
Get All PTMAP Responses |
Point Management Application Interface overview. |