Name
prt_api_req_class_itemlist_Ex
Purpose
Request list of item tracking data.
Description:
This routine provides a mechanism to request the Item Tracking Data for one or more Items of a particular Item Class from the PRT Data Server (PRT_DS) residing within all configured PRT services, a specific PRT service, a specific Tracking Group, a specific Tracking Region, or at a specific location within a specific Tracking Region. If the request is a success the calling routine will receive back a count of the number of items returned to the item list. If the request fails, the calling routine will receive back status information on the reason for the failure.
Syntax
int prt_api_req_class_itemlist (prt_svc_id, group_id,
region_id, region_loc,
item_class_id, item_count,
max_location, search_flag, retstat)
char prt_svc_id[SERVICE_ID_LEN + 1];
char group_id[PRT_REGION_ID_LEN + 1];
char region_id[PRT_REGION_ID_LEN + 1];
COR_I2 region_loc;
char item_class_id[PRT_ITEM_CLASS_ID_LEN+1];
COR_I4 *item_count;
COR_I4 *max_location;
COR_BOOL search_flag;
COR_STATUS *retstat;
Data Structures
None
Arguments
Argument |
Description |
Input |
|
prt_svc_id |
PRT service identifier (optional, but required if no other arguments specified) |
group_id |
Identifier of the group. (optional, but required if no other arguments specified) |
region_id |
Identifier of the region. (optional, but required if no other arguments specified, required if region location specified) Note: At least one of the above three arguments must be specified. If not, all services will be queried. It is possible that a list of 'items' will be collected, but not all services will have responded (because one or more of them were down). Thus the user has a list of valid responses, but may not have ALL the 'items' that should have been returned. In this case, the function will return COR_WARNING with an err_code of PRTI_NOT_ALL_SVCS_RESPONDED. The function returns, through an argument passed, the number of 'items' actually received. This argument will show how many valid 'items' were received. |
region_loc |
Specific location in the region (required). If all items within a region are being requested, the region_loc must be specified as ALL_LOCATIONS. Otherwise a specific location requests items at only that location. |
Item_class_id |
Filter to use to select a particular class. Enter a blank to select all items (that is for no filtering). |
Search_flag |
If search_flag is 0 then item are searched in the default project if any default is set already and if not found then other configured projects are searched. For setting a project as default project we can use prt_api_cur_project. |
Output |
|
*item_count |
Count of Items returned to schema |
*max_location |
Location number of the highest populated location in the region, regardless of the Item Class in the region. |
*retstat |
Pointer to COR_STATUS structure |
Return Value
Either COR_SUCCESS, COR_WARNING or COR_FAILURE.
If the function returns COR_WARNING or COR_FAILURE, additional error information can be found in the COR_STATUS structure.
Error Codes
PRTS_NO_GLOBAL_XREF |
No XREF global section available (Warning) |
PRTS_REGION_NOT_DEFINED |
Region not configured (Warning) |
PRTS_NO_GLOBAL_REGION |
No global section available for Region (Warning) |
PRTS_NO_ITEMS_AT_LOCATION |
There are no items at location specified (Warning) |
PRTI_SVC_ID_NULL |
PRT service identifier NULL (Warning) |
PRTI_SVC_ID_NDEF |
PRT service identifier not valid (Warning) |
PRTI_REG_ID_NULL |
Region identifier NULL (Warning) |
PRTI_REG_ID_NDEF |
Region identifier not valid (Warning) |
PRTI_INVALID_REG_LOC |
Invalid region location (Warning) |
PRTI_GRP_ID_NULL |
Group identifier NULL (Warning) |
PRTI_GRP_ID_NDEF |
Group identifier not valid (Warning) |
PRTI_REG_NOT_IN_GRP |
Region not in group specified (Warning) |
PRTI_REG_NOT_IN_SVC |
Region not managed by service specified (Warning) |
PRTI_GRP_NOT_IN_SVC |
Group ID inconsistent with service specified (Warning) |
PRTI_UNEXPECTED_SEG_TYPE |
Unexpected segment type from PRT_DS (Warning) |
PRTI_PARTNER_DEAD |
Partner dead (Warning) |
PRTI_EXTRA_SEGS |
Ignored extra segments after STATUS_SEG or END_SEG (Warning) |
PRTI_NOT_ALL_SVCS_RESPONDED |
Not all services responded (Warning) |
PRTI_WRITE_PORT_ERR |
Error in ipc_write_port (Warn/Fail) |
PRTI_MF_INIT_ERR |
Error initializing segment (Failure) |
PRTI_CRESEG_ERR |
Error creating segment (Failure) |
PRTI_BAD_MSG |
Error in segment (Failure) |
PRTI_READ_PORT_ERR |
Error in ipc_read_port (Failure) |
Application subroutines. |