Skip to main content
Omnitracs Knowledge Base

Proposed EAL Usage

Proposed External Application Link Usage

It may be useful to allow an external application program to automatically transmit a message to a vehicle based on input from a user. For instance, suppose that an external application program was written that allowed a user to call up the list of available loads and to match a load from that list with an available vehicle. Once the load match is made, the user would like to send a Load Assignment message to the vehicle in question. The user could copy down all of the information about the load and then start up QTRACS and fill in all of the load information on a Load Assignment macro message and transmit it to the vehicle. A better way to do this is to allow the user to create and transmit the message from inside of the external application software. QTRACS supports this action through the OMCRTMSG API.

Using the Forward Macro Definition Menu, create the Load Assignment macro template. This template should contain an entry for every field that the external application will want to transmit to the vehicle in the load assignment message. These fields should match the fields that are already in your database of available loads. For the sake of this discussion, assume that macro number 1 is the load assignment macro.

Modify the existing load matching application so that it contains data structures that match the fields in the OMCRTMSG parameter blocks (See the OMCRTMSG API description in this document). The message body field should be included in the data structure such that there is an entry for every field in the Load Assignment macro template.

Application Architecture

image001.png
Once the fields in the data structure are set to the desired values, then the application software can submit the message to QTRACS by calling the OMCRTMSG API.

The architecture in figure 1-1 calls for a separate process to handle return messages and message confirmation transactions. This is called the External Return Message Processor in the figure. The purpose of this process is to field messages from its input queue and take the necessary action based on the contents of the transaction. Message completion transactions are placed into this queue as the Load Assignment messages are processed and transmitted. You may choose to have both positive and negative acknowledgments returned to your application or you may choose to have only negative acknowledgments (exceptions) returned.

In the case of the load assignment message the return message handler might want to update the database with information about the delivery of the message. The handler may want to alert a user if a load assignment does not reach its intended destination.

In addition, figure 1-1 shows multiple External Applications but only a single Return Message Handler. It is possible to declare the same input queue for multiple external applications. This allows you to write a single Return Message Processor that can service all of the return messages for your applications.

It is possible to use the QTRACS External Application Link in such a way that the vehicle's driver can make direct queries on the dispatch database without human intervention at the host. One application for this capability could be to provide drivers with directions to certain delivery sites.

Assume that you already have an application that takes as input a 5-character customer or location code. This application searches a directions database using the code as a key. It returns the directions as 5 fields of 38 characters each. We would like to make this application directly available to the driver.
The first step is to define two macro templates. The first macro template is a return macro. It is formatted as follows:

Return Macro #09 REQUEST FOR DIRECTIONS PLEASE GIVE ME DIRECTIONS TO: _____

This is the macro that the driver sees when he wants to request directions. Suppose we assign macro number 9 to this return macro. This macro template would be associated with the DVRDRCTN external application. This means that when an unsolicited message is received using this macro, the Router sends it to the input queue of the specified application. Suppose that the input queue is a data queue called EXADTAQ.

The next step is to define a forward macro template. This is the macro template that is used by the application to respond to the driver's request. Assume that this is forward macro number 7. It is formatted as follows:

Forward Macro #07 DIRECTIONS TO: ___ ________________________________ __________________________________ __________________________________ __________________________________ __________________________________ ____________________________________

The first 5-character field is used to echo the location code back to the driver (in case he types something wrong). The next full line is used to return the expanded location (full customer name or city name or ...) to the driver. The next 5 full lines are used to return directions.

An example exchange might look like the following macro example. The driver would request directions using return macro number 9.

Return Macro #09 REQUEST FOR DIRECTIONS PLEASE GIVE ME DIRECTIONS TO: QCOMM

The application would respond with forward macro number 7 as follows:

Forward Macro #07 DIRECTIONS TO: QCOMM QUALCOMM INC. SAN DIEGO, CALIFORNIA TAKE I-5 SOUTH TO I-805 SOUTH. TAKE THE MIRA MESA BLVD EXIT. GO RIGHT OFF OF THE EXIT ON SORRENTO VALLEY ROAD. GO ¾ MILES. QUALCOMM IS ON THE RIGHT.

The vehicle driver starts things off by requesting directions using macro template number 9. The message is returned to the QTRACS Communications Manager by the Qualcomm NMC. The Communications Manager forwards the message to the QTRACS Message Router. The QTRACS Router reads the message and, because macro number 9 is declared to be associated with an external application, routes it to the DVRDRCTN application via the applications input data queue EXADTAQ.

Path of Messages

image002 (1).png

image003.png
The DVRDRCTN external application return macro message handler is going to receive a return message from the EXADTAQ data queue that looks something like this:

From To Size Type Field Description Sample Value
1 5 9 Packed Global Message Handle 123456789
6 8 3 Character Transaction Type 600
9 9 1 Character Source Entity Type V
10 19 10 Character Source Entity Identifier 1-385xxxxx
20 24 9 Packed Forward Global Message Handle 000000000
25 25 1 Character Trip Status U
26 26 1 Character Return Message Priority 0
27 30 7 Packed Mobile Firmware Version Number 0001601
31 31 1 Binary Mobile Feature Enable Indicators Hex '00000000'
32 32 1 Character QMASS Copy 0
33 42 10 Character QMASS Auxiliary ID of Owner X
43 73 31 Character QMASS Return Auxiliary ID String X
74 80 13 Packed Message Received @ Host Time 174655042490
81 173 100 Character Reserved - returned as blanks Blanks
174 176 3 Zoned Macro Template Number 001
177 179 3 Zoned Macro Template Version 009
180 186 13 Packed Message Time 174655042490
187 190 4 Zoned Message Length 0005
191 2090 1900 Character Message Body QCOMM

The Global Message Handle (GMH) for the message is a 9-digit packed decimal number. It is returned in 5 bytes in the transaction. The Router assigns the GMH to the return message. The Forward GMH is also a 9-digit packed decimal number returned in 5 bytes. In this message, the Forward GMH is equal to zero because the message is unsolicited.

There is only one field in the message body of this return message. It is the location code. The DVRDRCTN process must now look up the directions for the requested location from its direction database, formulate the body of the message based on the fields defined in forward macro #7 and create the input data structure for the OMCRTMSG API call as follows:

Parameter

Value

Sender

DVRDRCTN××

Reserved

×

Destination (1)

1-385××××××

Destination (2)

×××××××××××

Destination (3)

×××××××××××

...

...

Destination (20)

×××××××××××

Times to Transmit

0

Message Priority

0

Off Peak Selector

0

Return Receipt Selector

0

Word Wrap Selector

0

Reply Indicator

××××××××××

Macro Number

07

Macro Version

01

Reserved

×××××××××××××××××

Message Type

T

Message Length

0240

Message Body

QCOMM QUALCOMM, INC. SAN DIEGO, CALIFORNIA TAKE I-5 SOUTH TO I-805 SOUTH. TAKE THE MIRA MESA BLVD EXIT. GO RIGHT OFF OF THE EXIT ON SORRENTO VALLEY ROAD. QUALCOMM IS ON YOUR RIGHT ABOUT ¾ MILES DOWN SORRENTO VALLEY ROAD.

A complete description of the fields and data structures used in the OMCRTMSG API is included in this document in the Application Programmer's Interface chapter.
The DVRDRCTN application can cause the forward message to be transmitted to the vehicle by calling the OMCRTMSG API and passing the above data structure to it as the input data block. This will cause the message to appear immediately in the QTRACS message database and to be submitted to the QTRACS Communications Manager for transmission to the vehicle.

  • Was this article helpful?