Name
prt_api_reorder_region
Purpose
Reorder locations within tracking region.
Description
This routine provides a mechanism to completely reorder the locations within a tracking region. This has the effect of moving all the items at each location in the region to another (possibly the same) location in the region.
Syntax
int prt_api_reorder_region ( region_id, reorder_list,
num_locations, comment,
user_or_svc_id, retstat )
char region_id[PRT_REGION_ID_LEN + 1];
COR_I2 reorder_list[num_locations];
COR_I2 num_locations;
char comment[SC_DESCRIPTION_LEN + 1];
char user_or_svc_id[SERVICE_ID_LEN + 1];
COR_STATUS *retstat;
Data Structures
See Static Information Requirements
Arguments
Argument |
Description |
Input |
|
region_id |
Tracking Region identifier (required) |
reorder_list |
Pointer to an array consisting of region locations. These location numbers (1 to num_locations), specify the new region location for items residing in their current location, e.g. the locations the items are to be moved to. The reorder_list array index implicitly identifies the current location number, i.e. the first element in the reorder_list array (reorder_list[0]) refers to the items that currently reside in region location 1. The value of reorder_list[0] specifies the region location where the items currently in region location 1 are to be moved to. This array must include elements for each location currently occupied in the region. |
num_locations |
The number of locations in the region which currently are occupied. This number must match what the Data Collector thinks are the number of locations currently occupied or else the Data Collector will return an error (err_code = PRTC_REORDER_MISMATCH) and the operation will not be performed. Failure to allocate the reorder_list array with num_locations elements is bad. |
comment |
Comment to be recorded in PRT history log file (optional). |
user_or_svc_id |
User or service identifier. This is used for logging purposes and is optional. If this pointer is NULL, the host process id is used. (optional) |
Output |
|
*retstat |
Pointer to COR_STATUS structure |
Return Value
Either COR_SUCCESS or COR_FAILURE.
If the function returns COR_FAILURE additional error information can be found in the COR_STATUS structure.
Error Codes
PRTC_BAD_REG_SPEC |
Bad region specified (Warning) |
PRTC_REORDER_MISMATCH |
Num. of locs in request different from num. of locs in region (Warning) |
PRTI_REG_ID_NULL |
Region identifier NULL (Warning) |
PRTI_REG_ID_NDEF |
Region identifier not valid (Warning) |
PRTI_REORD_NUM_TOO_BIG |
Element # bigger than list size (Warning) |
PRTI_MF_INIT_ERR |
Error initializing segment (Failure) |
PRTI_CRESEG_ERR |
Error creating segment (Failure) |
Plus all error codes returnable by prt_api_send_cmd.
Application subroutines. |