prt_api_check_route
Name
prt_api_check_route
Purpose
Validate tracking route.
Description
This routine provides a mechanism for validating that an ITEM of a specific type is configured to move from a Source Tracking Region to a Destination Tracking Region. Route validation is performed locally by the API from configuration information that was read into the API's internal schema during initialization. If the function returns COR_SUCCESS, the route is valid. If some other status is returned, the err_code field of the COR_STATUS structure will contain additional information. If a valid route does exist between the source and destination regions specified (according to the configuration data) but the item type specified is not allowed to transition along this route, PRTI_INVALID_ROUTE is returned in the err_code field. If there are no routes configured between the source and destination regions specified, the err_code field is set to PRTI_NO_SUCH_ROUTE.
Syntax
int prt_api_check_route ( src_region_id, dest_region_id,
item_type_id, retstat )
char src_region_id[PRT_REGION_ID_LEN + 1];
char dest_region_id;[PRT_REGION_ID_LEN + 1]
char item_type_id[PRT_ITEM_TYPE_ID_LEN + 1];
COR_STATUS *retstat;
Data Structures
See Static Information Requirements
Arguments
Argument | Description |
---|---|
Input | |
src_region_id | Source region id; the starting region of the route (required). |
dest_region_id | Destination region id; the destination region of the route (required). |
item_type_id | Item type identifier (required). |
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
PRTI_REG_ID_NULL | Region identifier NULL (Warning) |
PRTI_REG_ID_NDEF | Region identifier not valid (Warning) |
PRTI_ITEM_TYPE_NULL | Item type identifier NULL (Warning) |
PRTI_ITEM_TYPE_NDEF | Item type identifier not valid (Warning) |
PRTI_NO_SRC_OR_DEST | Route has no source and no destination region (Warning) |
PRTI_INVALID_ROUTE | Invalid route for item type (Warning) |
PRTI_NO_SUCH_ROUTE | No route exists between src/dest regions (Warning) |