33 SDO_TRKR Package (Location Tracking)

The MDSYS.SDO_TRKR package contains subprograms for using the location tracking server.

To use these subprograms, you must understand the concepts and techniques described in Location Tracking Server.

Topics:

33.1 SDO_TRKR.CREATE_TRACKING_REGIONS

Format

SDO_TRKR.CREATE_TRACKING_REGIONS(
     region_set_name  IN VARCHAR2, 
     num_trkr_queues  IN NUMBER(38), 
     num_loc_queues   IN NUMBER(38)); 

Description

Creates a tracking region set and the tables and queues required for the location tracking server.

Parameters

region_set_name

Name of the tracking network.

num_trkr_queues

Number of queues that should be created for managing the tracking objects.

num_loc_queues

Number of queues that should be created for managing the location messages

Usage Notes

This procedure creates the necessary tables and queues required for the location tracking server. It should be executed to set up the required objects of the tracking server. This is the first step required for enabling the tracking server.

For conceptual and usage information about the location tracking server, see Location Tracking Server.

Examples

The following example creates a tracking network named TRACKING_REGIONS with 10 tracking and 10 location queues.

EXECUTE SDO_TRKR.CREATE_TRACKING_REGIONS('TRACKING_REGIONS', 10, 10);

33.2 SDO_TRKR.DESTROY_TRACKING_REGIONS

Format

SDO_TRKR.DESTROY_TRACKING_REGIONS(
     region_set_name  IN VARCHAR2, 
     num_trkr_queues  IN NUMBER(38), 
     num_loc_queues   IN NUMBER(38)); 

Description

Destroys (removes) a tracking region set and the tables and queues required for the location tracking server.

Parameters

region_set_name

Name of the set of regions that are tracked as a group.

num_trkr_queues

Number of queues that should be created for managing the tracking objects.

num_loc_queues

Number of queues that should be created for managing the location messages.

Usage Notes

This procedure destroys the tracking network that was created by a previous call to the SDO_TRKR.CREATE_TRACKING_REGIONS procedure.

For conceptual and usage information about the location tracking server, see Location Tracking Server.

Examples

The following example destroys the tracking network named TRACKING_REGIONS.

EXECUTE SDO_TRKR.DESTROY_TRACKING_REGIONS('TRACKING_REGIONS', 10, 10);

33.3 SDO_TRKR.SEND_LOCATION_MSGS

Format

SDO_TRKR.SEND_LOCATION_MSGS(
     region_set_name IN VARCHAR2, 
     location_msgs   IN LOCATION_MSG_ARR, 
     queue_no        IN NUMBER DEFAULT NULL); 

Description

Sends new location information for the objects that are tracked.

Parameters

 region_set_name

Name of the tracking region set.

location_msgs

Messages of type LOCATION_MSG_ARR.

queue_no

The specific location queue that should be used for this location message. It is recommended that you not specify this parameter, in which case the tracking server determine the best queue for managing this location message.

Usage Notes

This procedure adds a new location message for tracking purposes. Whenever a new location is obtained for an object that is being tracked, this procedure can be used to update the location of that object.

The location_msgs parameter is of type LOCATION_MSG_ARR, which is defined in Data Types for the Location Tracking Server.

Each message can include an optional timestamp value, which is maintained along with the location information

For conceptual and usage information about the location tracking server, see Location Tracking Server.

Examples

The following example adds a new location message. The message includes a timestamp value. The example does not specify a queue_no value.

EXECUTE SDO_TRKR.SEND_LOCATION_MSGS('TEST',  LOCATION_MSG_ARR(location_msg(1, '02-AUG-16 01.53.46.000000 PM', 1,1)));

33.4 SDO_TRKR.SEND_TRACKING_MSG

Format

SDO_TRKR.SEND_TRACKING_MSG(
     region_set_name IN VARCHAR2, 
     tracking_msg    IN TRACKER_MSG; 

Description

Inserts tracking objects in the required queue. One TRACKER_MSG is required for each moving object that is tracked.

Parameters

region_set_name

Name of the tracking set.

tracking_msg

Message of type TRACKER_MSG. This is used to create new objects that need to be tracked against the tracking region set.

Usage Notes

This procedure creates new objects that are tracked against the specified tracking region set

The tracking_ms parameter is of type TRACKER_MSG, which is defined in Data Types for the Location Tracking Server.

For conceptual and usage information about the location tracking server, see Location Tracking Server.

Examples

The following example inserts a new tracking object with an ID of 1 (first value) to be tracked against a polygon with an ID of 1 (second parameter) in the tracking region set named TEST. It also specifies that the ISTRACKINSIDE is N and ISACTIVE is Y.

EXECUTE SDO_TRKR.SEND_TRACKING_MSG('TEST', TRACKER_MSG(1, 1, 'N', 'Y'));

33.5 SDO_TRKR.START_TRACKING_REGIONS

Format

SDO_TRKR.START_TRACKING_REGIONS(
     region_set_name  IN VARCHAR2, 
     num_trkr_queues  IN NUMBER(38) DEFAULT NULL, 
     num_loc_queues   IN NUMBER(38) DEFAULT NULL); 

Description

Starts the queues for the location tracking server and starts jobs to monitor those queues.

Parameters

region_set_name

Name of the tracking region set.

num_trkr_queues

Number of queues used for tracking the tracking objects.

num_loc_queues

Number of queues used for tracking the location messages.

Usage Notes

This procedure activates the tracking region set that has been previously created by a call to the SDO_TRKR.CREATE_TRACKING_REGIONS procedure.

For conceptual and usage information about the location tracking server, see Location Tracking Server.

Examples

The following example activates tracking region setthat was previously created.

EXECUTE SDO_TRKR.START_TRACKING_REGIONS('TRACKING_REGIONS', 10, 10);

33.6 SDO_TRKR.STOP_TRACKING_REGIONS

Format

SDO_TRKR.STOP_TRACKING_REGIONS(
     region_set_name  IN VARCHAR2, 
     num_trkr_queues  IN NUMBER(38) DEFAULT NULL, 
     num_loc_queues   IN NUMBER(38) DEFAULT NULL); 

Description

Stops the queues for the location tracking server and stops jobs to monitor those queues.

Parameters

region_set_name

Name of the tracking region set.

num_trkr_queues

Number of queues for tracking the objects.

num_loc_queues

Number of queues for tracking the tracking messages.

Usage Notes

This procedure stops the tracking network that was previously started by a call to the SDO_TRKR.START_TRACKING_REGIONS procedure.

For conceptual and usage information about the location tracking server, see Location Tracking Server.

Examples

The following example stops the TRACKING_REGIONS network.

EXECUTE SDO_TRKR.STOP_TRACKING_REGIONS('TRACKING_REGIONS', 10, 10);