C Language Programming for Extended Terminal Services
7524 Extended Terminal Services / DCConnect Client Technical Reference
PLANT FLOOR SERIES
Data Collection Edition
7524 Extended Terminal Services / DCConnect Client
Technical Reference
Release 1.03
SC28-9750-01
Note! |
---|
Before using this information and the product it supports, be sure to read the general information. (Notices) |
Fourth Edition, November 2005
This edition applies to Release 2.2.0 of the DCConnect Client and to all subsequent versions and releases until otherwise indicated in new editions. Make sure you are using the correct edition for the level of the product.
Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address below.
A form for reader's comments is provided at the back of this publication. If the form has been removed, address comments to:
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.
Note to US Government users--Documentation related to restricted rights--Use, duplication, or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.
References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program, or service is not intended to state or imply that only IBM's product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any of IBM's intellectual property rights may be used instead of the IBM product, program, or service. Evaluation and verification of operation in conjunction with other products, except those expressly designated by IBM, is the user's responsibility.
IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to the IBM Director of Commercial Relations, IBM Corporation, Purchase, NY 10577.
The following terms, which are denoted by an asterisk (*) in this publication, are trademarks or service marks of IBM Corporation in the United States and/or other countries:
IBM PLANT FLOOR SERIES OS/2 AS/400 System/36 System/38 Proprinter Data Collection Edition Quickwriter
The following terms, which are denoted by a double asterisk (**) in this publication, are trademarks of other companies as follows:
Code 39 Interface Mechanisms, Inc. Microsoft Microsoft Corporation
This manual was originally written in 1995 for the 7524 Extended Terminal Services (ETS) program that can be flashed into IBM 7524 terminals (or their Intermec/Norand equivalents). In 1997, a product called 752x Emulator for DOS was created by IBM that was based on the same code as the 7524 ETS flash. The 752x Emulator for DOS was written to support various models of terminals from Intermec, Symbol and Telxon. Then in 2000, support was added for several Windows platforms and the 752x Emulator for DOS was renamed to DCConnect Client.
Because much of the source code the 7524 ETS flash and the DCConnect Client is the same, much of the discussion in this manual applies to both products. Therefore any reference to "ETS" or "Extended Terminal Services" applies to both products - unless explicitly stated otherwise.
The DCConnect Client has a separate manual, in HTML format, that describes how to install and configure the product - which can vary greatly depending on the device or platform one which it is running. That document is available from our website:
http://www.ibm.com/software/data/dcconnect
Follow the link to "Library" and then "DCConnect Client User's Guide".
The Extended Terminal Services Technical Reference is divided into three parts:
This part describes the interface for and provides guidance during the planning of the Extended Terminal Services (ETS) program for a data collection terminal. It discusses all aspects of how an application on a terminal server interfaces to the Extended Terminal Services command set, file structures, and transaction programming.
This part is for the programmer who plans to use C language to enhance the functionality of transaction programs that run on the terminal.
This part provides supplemental information for use in conjunction with the other two parts.
Part 1 is intended for installers, programmer/analysts, and other technical personnel who work with the IBM* 7524 DCT or any terminal/ platform supported by the DCConnect Client.
Part 2 provides technical reference material for the programmer or other technical person who will be writing C language programs for use with ETS.
In addition to having a general knowledge of data processing, to use part 1 it would be helpful to be familiar with the following:
To use part 2, you should have experience in writing programs using C language.
Review this document thoroughly before attempting to perform the described activities. Complete each step in the order given wherever a sequence of steps is specified, and do not skip any steps unless they are designated as optional. Otherwise, the activity may not be successfully completed, and errors may occur.
Part 1 contains a general description of the Extended Terminal Services program and detailed information about the following items:
Part 2 provides technical reference material for writing C language programs for use with the Extended Terminal Services. These C programs may be developed for use either as complete terminal application programs (TAPs), or as Custom Function Routines (CFRs) for use with transaction programs.
The appendixes contain information regarding:
The following publications are available for the IBM 7524 Data Collection Terminal:
Model 101/102 handheld portable terminal
Model 201 UHF mobile mount terminal
Model 202 SST mobile mount terminal
Publications for the Data Collection Connection (DCConnect) / ERPBridge family of products are in softcopy format and they are available from out website:
http://www.ibm.com/software/data/dcconnectFollow the link to "Library". Among the publications you can find are:
This manual was originally written in 1995 for the 7524 Extended Terminal Services (ETS) program that can be flashed into IBM 7524 terminals (or their Intermec/Norand equivalents). In 1997, a product called 752x Emulator for DOS was created by IBM that was based on the same code as the 7524 ETS flash. The 752x Emulator for DOS was written to support various models of terminals from Intermec, Symbol and Telxon. Then in 2000, support was added for several Windows platforms and the 752x Emulator for DOS was renamed to DCConnect Client.
Because much of the source code the 7524 ETS flash and the DCConnect Client is the same, much of the discussion in this manual applies to both products. Therefore any reference to "ETS" or "Extended Terminal Services" applies to both products - unless explicitly stated otherwise.
This publication describes both forms of the Extended Terminal Services (ETS) program:
Loading of the 7524 ETS program into flash is usually done prior to shipment, with the code residing in non-volatile "FLASH" ROM. 7524 ETS can only be used with the 7524 DCT (or the equivalent Intermec/Norand model).
The latest version of 7524 ETS flash for all supported terminal models is available from our website:
http://www.ibm.com/software/data/dcconnect
Follow the link to "Product Downloads" and then "7524 ETS Flash Loads and CFR Samples, Programming Tools".
ETS includes a set of functions similar to those provided in the other IBM 752x Data Collection Terminals: 7527 running 7527 Extended Terminal Services and 7526 with its native microcode.
Through downloaded ETS files, the DCT can be customized to collect user-specified data as an intelligent, distributed processing device. For complete details about files, (SeeRAM Files) .
ETS interfaces via the RF data network / TCP/IP network / serial connection with a personal computer (PC) or industrial computer that acts a terminal server. The terminal server collects data from and provides files and query services to all of the data collection terminals supported by the DCConnect Client, as well as 7524 terminals and IBM 7526 and 7527 terminals. To perform this server function, IBM offers the product Data Collection Connection (version 1.4.0 or later). If using IBM 7524 terminals or their Intermec/ Norand equivalent, the the program product 7524 Interface Support is also required.
There are versions of both the 7524 ETS flash and the DCConnect Client program which allow the terminal to communicate to the terminal server via the serial port. Terminals loaded with this version of the flash/program are often referred to as 'batch' terminals.
Most of the time, terminals loaded with the DCConnect Client program commmunicate with the terminal server over a TCP/IP network. This network may be a fixed Ethernet or it may involve RF communications over part of the Ethernet. Whether RF is involved or not is transparent to the DCConnect Client.
Most of the time, terminals loaded with 7524 ETS flash communicate with the terminal server over a special RF data network using components from Intermec/Norand. An RF controller is attached to the terminal server via the serial port and that controller is attached to one or more RF bases (access points) which communicate via radio to the 7524 terminals. There are different kinds of radio technologies available: UHF, SST, 9.02mhz OWL, 2.4ghz OWL. However, whichever radio technology is used is transparent to the logic of the 7524 ETS flash.
The specific 7524 radio frequency products which form the RF data network include:
Figure 1 illustrates the data flow of ETS. This diagram contains references to the following terms:
The location of the alphabetic and numeric keys on the DCT varies depending on the model.
For additional information, (SeeKeypad Operation) and (SeeCommand and Special Key Relationships) .
GP communications are point-to-point communications with user-supplied devices such as a scale, printer, and scanners.
For a discussion of GP communications, (SeeRAM Files) .
File 8 is the message file. For a complete description, (SeeFile 8--Message File) .
The location and use of the PF keys vary depending on the terminal model.
For additional information, (SeeKeypad Operation) and (SeeCommand and Special Key Relationships) .
The 7524 terminals, models 50, 51, 52, 54, 100, 101, 102 and 104, can be ordered with an optional integrated bar code laser scanner. All 7524 terminals also have a sensor port to support the connection of a tethered bar code wand, CCD, or laser scanner.
Most third party terminals supported by the DCConnect Client also included integrated scanners and/or the ability to attach a tethered bar code wand, CCD or laser scanner.
Transactions are placed in File 9. For more information, (SeeFile 9--Transaction Queue File) and (SeeModes of Operation) .
New data may be appended to user variables and then manipulated and used during the processing of a transaction program.
For a discussion of User variables, (SeeCharacter String Construction and Manipulation) .
Figure 1. Extended Terminal Services Data Flow Diagram
This chapter applies only to the 7524 ETS flash; it does not apply to the DCConnect Client. For installation and configuration instructions regarding the DCConnect Client, please refer to the softcopy DCConnect Client User's Guide which is available from our website:
http://www.ibm.com/software/data/dcconnect
Follow the link to "Library" and then "DCConnect Client User's Guide".
7524 Radio Frequency Terminals usually have their terminal personality program installed at the factory per the customer's order. However, if the need arises to convert a terminal from one personality type to another (for example, from 3270 emulation to 7524 ETS), or to install a new version of the program, then a simple procedure may be used to erase the "flash" non-volatile memory of the terminal and reload the personality application program.
Before attempting to load 7524 Extended Terminal Services to a terminal, ensure that the required hardware and software are available.
The minimum hardware requirements for re-loading 7524 ETS to the terminal's memory are:
The minimum software requirements are:
To install an update to the 7524 Extended Terminal Services (ETS) program, perform the following steps:
and
PROGDUX2.EXE--the OS/2 version of the program to do the download
and
GO.CMD--the OS/2 command file which calls PROGDUX2 using the command line arguments.
This chapter describes the modes of operation for the transaction queue maintained in the terminal by ETS. A transaction is a collection of related data which has been collected by the DCT during the execution of a transaction program. A transaction queue is a temporary storage area for transactions that have been collected. These transactions are waiting to be sent to the terminal server. After a transaction is sent to the server, it is removed from the queue by ETS after ETS has received an indication from the terminal server that the transaction was received properly.
The terminal handles the removal of transactions from the queue differently depending on whether it is communicating to the host by way of the RS-232 port ('batch' interface) or by way of an RF or TCP/IP network ('networked' interface).
Collecting Transactions from a Batch Terminal | Because the batch terminal communicates through the RS-232 port, it can be on the same communications line as other fixed 752X terminals, provided an RS232-RS485 converter is used. Server applications, such as DCConnect, can communicate with a batch terminal. For this reason, the batch terminal was set up so that transactions are collected from it in the same way that they are collected from 752x terminals such as the 7527. In fact, server applications, such as DCConnect, can communicate with an ETS batch terminal as if it were a 7527 terminal. The batch terminal must be polled to collect transactions from it. Whenever the terminal server polls the terminal, the terminal either responds with the next transaction in the queue or it responds with a NAK, indicating there are no transactions to be collected. Depending on how the batch terminal has been configured, a release command from the terminal server may be required before the terminal discards a transaction that has been sent to the terminal server. |
Collecting Transactions from a Network-Attached Terminal | Network-attached terminals include 7524 RF terminals as well as any terminal that is running the DCConnect Client and is communicating to the terminal server using TCP/IP. A terminal operating in the networked environment does not have to be polled in order to collect transactions from it. Continuous polling of a network of terminals would drastically degrade the performance of the network - particularly if RF is involved. A networked terminal is able to send a transaction to the terminal server as soon as it is generated, rather than in response to a poll. A message that is transmitted through the network indicates which terminal it is coming from or going to. Therefore, the terminal server can determine which terminal the transaction came from even though it did not explicitly poll any terminal for a transaction. The networked terminal, after having sent the first transaction in the queue, will not attempt to send any others until the terminal server sends an explicit release command for that one transaction. When the terminal server sends a valid release command, the terminal immediately sends the next transaction in the queue, if there is one. Only one transaction is outstanding from the networked terminal at a time. Because there are times when the terminal server will not want the terminal to send transactions to it, special commands were created for networked terminal that can be used by the terminal server to inform the terminal that it can or cannot send transactions. For information on these commands, (SeeUnsolicited Message Flow Control) . When the terminal has been informed not to send transactions, it stores any transactions that are generated in its queue until the terminal server informs the terminal that it can send them again. At such time, the first transaction is sent and must be released by the terminal server before the next is sent. |
The transaction queue operates in 3 modes:
The mode of the transaction queue can be set in one of three ways:
:I and all other key commands are described in Table 6.
For a description of File 0, (SeeFile 0--Terminal Operating Parameters/Program Storage) . The DCConnect product presents graphical input panels which make it easy to configure the various operating options controlled by File 0, record 00.
Buffered mode allows the terminal to place all transactions in the transaction queue as they are entered, regardless of whether the terminal server is currently communicating with the terminal. Transactions are sent to the terminal server from the queue using the first in/first out (FIFO) method; transactions are sent to the terminal server in the same order that they were added to the queue. The sequence of commands used by the terminal and the terminal server varies, depending on whether the terminal is an RF or batch terminal and whether or not transactions must be explicitly released by the terminal server with a special release command (CMD K).
Because an RF terminal is not explicitly polled by the terminal server, the terminal determines when to send transactions to the terminal server, following certain rules of protocol. The first rule is that the terminal should not send transactions unless the terminal server gives permission.
The terminal maintains a transaction flow control flag to track whether or not it is allowed to send transactions to the terminal server. The don't-send-me-transactions command (CMD A0X) is used by the terminal server to turn this flag off. When a terminal is first powered on, the flag defaults to the off state. However, a power-up message informing that the terminal is now active is sent to the terminal server. At this time, the terminal server can choose to send to the terminal a you-can-now-send-me-transactions command (CMD A1X), which turns on the terminal's transaction flow control flag.
If the terminal sends a transaction without the terminal server's permission, the terminal server sends to the terminal the CMD A0X followed by a NAK for the transaction. The NAK indicates the terminal server did not or could not receive the transaction and that the terminal should resend it when it receives a CMD A1X from the terminal server.
Whenever the terminal receives the CMD A1X command, it sends whatever transaction is first in its queue. If the terminal server receives that transaction successfully, it responds with an ACK to the terminal. The ACK, however, does not release the transaction from the terminal's queue. The terminal expects a CMD K release before it will discard the transaction. The ACK sent by the terminal server indicates that the transaction's checksum was valid and that the terminal server is now accepting transactions. The CMD K is used when the terminal server has successfully stored the transaction (for example, in a DCConnect logfile).
Note: | There are other possible responses to the A1X command; these are discussed in the next chapter. |
When the terminal receives a valid CMD K (the sequence number matches that of the first transaction in the queue), the first transaction is discarded. If more transactions are in the queue, the next one is immediately sent to the terminal server.
This process repeats until all transactions have been sent to the terminal server. If new transactions are generated before the queue is emptied, they are added to the end of the queue. In the case where a new transaction is generated and the queue is empty, the terminal immediately sends the transaction to the terminal server, provided its transaction flow control flag is on.
If a transaction was sent, the terminal server responds with an ACK or a NAK, as follows.
Depending on how the terminal is configured, the ACK to the transaction may or may not cause the transaction to be discarded by the terminal.
Note: | A terminal operating parameter (File 0 record 00 offset 203) enables the transaction release requirement. If this parameter is not present (that is, a smaller file 0 has been downloaded), then the terminal defaults to not requiring the release command. |
This transaction release requirement provides improved throughput and prevents loss of data at the same time. Multiple transactions can be sent to the terminal server and still be retained in the terminal. When the terminal server has successfully stored a block of transactions, it sends the CMD K to the terminal to release that block of transactions from the terminal.
When the release requirement is in effect:
Timer A has not expired | All transactions that the terminal server polls are marked in the terminal as sent but not released and are kept in the terminal's transaction queue. When any valid CMD K is received, the timer A is restarted. |
Timer A has expired | The terminal assumes that all transactions marked as sent but not released did not reach their final destination. As a result, the terminal resets the transaction queue so that the first transaction in it will be the next one that is returned to the terminal server in response to the next poll. On the next poll, the Timer A will be restarted. |
For both networked and batch terminals, the transaction queue may run out of space if the terminal has not been communicating with the terminal server for some time. When the buffer fills up, the terminal does nothing until it has a new transaction to add to the buffer that will not fit. The terminal then shows a Buffer full message indicating how many transactions are stored. The terminal user will be unable to create any more transactions until the terminal is able to send some of the stored transactions to the terminal server.
The size of the transaction buffer can vary based on the kind of device being used and its configuration. Unlike other 752x terminals, the size of the transaction buffer is not affected by the terminal server command that initializes file 9 (the transaction buffer) to a specific size. Terminals with 7524 ETS flash can store up to 735 transactions. Terminal running the DCConnect Client default to a capacity of 367 transactions. However, this default value can be changed using the MAX_TRANSACTIONS keyword in the Client configuration. Refer to the DCConnect Client documentation for more information.
This chapter specifies the communications control protocol used by the Extended Terminal Services and outlines the requirements for control command structures, control characters, and communications symbols.
The IBM-designed 1283 communication line protocol is the basis for the communication between the terminal server and the attached DCT. This protocol is used by the following hard-wired communications terminals: IBM 7524 batch terminal, 7525, 7526, 7527 and terminals running the serial (batch) version of the DCConnect Client. It is a polled protocol, suitable for use with wired terminals.
However, with communications over an RF or TCP/IP network, polling of terminals cannot be done because performance of the network would be dramatically degraded. Thus the networked terminal uses a modified version of the 1283 protocol, which does not require constant polling of the terminals. The networked terminal can send unsolicited messages to the server.
The batch terminal uses the standard 1283 protocol. The remainder of this chapter discusses the differences in the modified 1283 protocol used by the networked terminal.
The modification eliminates the polling of the DCT transaction queue characterized as follows:
Terminal Server DCT Response STX, ADDR, ADDR, ETX NAK (error) NAK (no data) STX, data, CS1, CS2, ETX (data) DC2 (download of ETS needed) DC1 (download of files needed)
Note: | The batch terminal uses polling; the networked terminal does not. |
Instead of polling, the modification stipulates that the networked DCT can send unsolicited transaction data to the terminal server. Unsolicited transaction data sent from the DCT will not be released (the DCT will retain the data) until its receipt is acknowledged by the terminal server (this is the present behavior). For information, (SeeBuffered Mode for Networked Terminals) .
Unsolicited | Unsolicited messages from the terminal can occur at any time. These messages include transactions, download requests (DC1), 'I-am-here' messages (DC2), time requests (DC2nnnnn), and 'I-have-no-transactions-and-don't-need-a-download' messages (DC3).
| ||
Command/responses | Commands and their responses are completed synchronously. That is, a second command is not issued to a terminal until the response to the first command is received or a timeout occurs. |
Using the standard 1283 protocol, transactions and commands are distinguished via the polling mechanism. The terminal server specifically requests transaction data by issuing a poll; since the DCT always responds with data or NAK (or DC1/DC2), polls are immediately concluded and commands may therefore be issued at any time.
Elimination of the polls and allowing unsolicited transaction data means that there is no longer any method by which the terminal server can determine if data received from the DCT is transaction data or the response to a command. Further, it is possible for transaction data to be sent to the terminal server between a command and its response, prohibiting the data collection server software from reading the command response it expects. For a description of how to overcome these potential problems, (SeeLogical Channels) .
The 1283 protocol as implemented in the batch terminal provides for several responses to polls. The most common command responses are a transaction packet or a NAK indicating that no data is available. Because transactions are sent to the host in an unsolicited manner, the NAK is no longer needed and is no longer sent.
The poll, however, is also how a batch terminal requests a load of RAM files, if they are not present in the terminal. Because polling is not used by the networked terminal, the following mechanism is used to ensure that files are loaded when necessary.
Note: |
ETS never handles the loading of itself, the 7524 ETS flash / DCConnect
Client ,because for 7524 terminals the flash is maintained in
nonvolatile flash ROM and for terminals running the DCConnect
Client, the Client must be loaded in the terminal before it
can even communicate with the terminal server.
This eliminates the
need for and use of the DC2 response for this purpose.
Instead, the DC2 unsolicited message is used to inform the
terminal server that the terminal is active in the following
situations:
|
Upon startup of the terminal server, the server will try to communicate with all terminals that are configured on the TCP/IP network. However for the 7524 RF network, it does not do this. Instead, the server expects the 7524 RF terminals and/or the RF controller to tell the server which terminals are currently communicating. This is how the terminal server gets its initial snapshot of which terminals are communicating on both kinds of networks.
After this point, a power on of any 7524 RF terminal or startup/unsuspend of the DCConnect Client will cause an 'I-am-here' message to be sent to the server.
Likewise, if a terminal was already powered and was just out of range, when it comes back in range, an 'I-am-here' message will eventually be sent to the server.
Whenever the terminal server identifies a terminal that has just started communicating, whether at startup or later and whether on a 7524 RF network or TCP/IP network, a startup sequence of commands is performed with the terminal to ensure the terminal is in the proper state and that it is able to send unsolicited messages if it should be allowed to do so.
Part of the startup sequence is the sending of the A1X command to the terminal which tells the terminal that it is permitted to send unsolicited messages. It is at this time that the terminal will send a DC1 message to the server if it requires RAM files to be loaded.
The networked terminal will only request a file load when it detects that one or more RAM files are missing. This avoids a file reload each time that the terminal establishes communications with the server. However, the server can choose to reload the RAM files at any time, usually at the request of someone operating the server.
To maintain the ability to keep transaction and command data separate, the single communications channel (RF or TCP/IP) is divided into two logical channels by way of an intermediate-level protocol that is implemented between the data collection server and the DCT, on top of the modified 1283 protocol. The two channels are used for:
All traffic through each of these channels must be kept separate.
To implement the two logical channels over the single communications channel, an additional header is added to the front of each message that specifies its type as either the unsolicited or command. Only one header character is needed. All traffic between the terminal and the server that traverses the RF / TCP/IP network must have this additional header character.
ASCII 'X' | An ASCII 'X' is used for transactions and other unsolicited terminal messages. Any terminal server responses to these unsolicited messages must also use this character. |
ASCII 'C' | An ASCII 'C' is used for commands initiated by the terminal server and the terminal responses to those commands. |
The data collection server must use the header byte to determine what type of message it has received. The terminal does the same. Without the header the messages look the same as they do in the standard 1283 protocol.
When communicating over a TCP/IP network, the DCConnect Client and the data collection server use an additional field in the front of the header to hold a 4-byte message sequence number. Most of the time UDP protocol is used on the TCP/IP network; therefore there is a potential for lost or duplicate messages. A message sequence number is used to match up responses with commands. A different sequence number is maintained for each channel ('X' and 'C'). The server maintains the sequence number for the 'C' channel and the terminal maintains the sequence number for the 'X' channel.
The sequence number is a 4-byte long integer prededing the channel character ('X' or 'C') in the message header. It is in network byte order.
For every command the server sends, the sequence number is incremented by one. If a command does not get a response from the terminal before the specified timeout, the command is sent again using the same message sequence number. For the response to any 'C' channel command, the terminal copies the sequence # from the command message to the response message before sending back the response message.
The terminal also saves the last response it sent back for every kind of command along with the sequence number associated with that command/response. For every command received, a check is made to see if the sequence number in the new command matches the one for the saved command. If it does, the saved response is sent without actually processing the command. This avoid problems such as loading the same block for a file into the terminal more than once.
In the 'X' channel, only transactions use the message sequence number because they are the only messages for which the terminal expects an explicit response. The other unsolicited messages: download requests, I-am-here messages, and time requests will all be retried by the terminal if it does not get the expected activity that the request should generate within a certain period of time. The message sequence number for all 'X' channel messages besides transactions is set to 0.
In the command channel, the 'A1X' and 'A0X' commands also have the message sequence number set to 0 because they are commands that are not expected to get an immediate response (the server does not wait for a response before issuing any other command).
At this time, message sequence numbers are not used in a 7524 RF network because communications in the 7524 RF network have guaranteed delivery; the messasge sequence nubmers are only used for communications over a TCP/IP network.
For the remainder of this manual, any discussion of message formats will not mention the message sequence number since is not used by the 7524 RF network. But you should assume it is there for all messages that are send in a TCP/IP network.
Terminals that communicate over a stream socket in a TCP/IP network have two additional fields that precede the message sequence number. The first two bytes of these messages is a start of message identifier that must always be the hex value 0x0365 in network byte order. The next two bytes are the length of the remainder of the message in network byte order. These extra fields are used for reconstructing a message that may be broken up as it is sent through the TCP/IP network. With the start of message identifier and length Extended Terminal Services knows when it has a new message and how many bytes it is going to be.
For the remainder of this manual, any discussion of message formats will not mention theses additional fields because they are not common to all the different kinds of messages for networked terminals.
All packets in the RF / TCP/IP network include an address field in the header to indicate which terminal the packet originated from or is supposed to go to. The message format for the 1283 protocol also had 2 positions for an address character; both positions had the same character. Extended Terminal Services ignores the two address characters that are used in the 1283 protocol. The server software may still set these addresses for additional debugging messages when watching the network traffic.
In the 7524 RF network, terminal addresses can range from 0 through 126, giving a total of 127 unique addresses. The 1283 protocol allows for addresses A-Y, 0-6, giving a total of 32 unique addresses. As a convention, the 7524 Interface Support sets up the two address characters in the message as follows:
7524 Terminal Addresses Two Message Characters(3) ----------------------- ---------------------- 0 - 24 AA - YY 25 - 31 00 - 66 32 - 56 AA - YY 57 - 63 00 - 66 64 - 88 AA - YY 89 - 95 00 - 66 96 - 120 AA - YY 121 - 126 00 - 55
In a TCP/IP network, these address characters are also filled in for backwards compatability. They are generated based simply on the order of the terminals in the server configuration. For example, the first terminal uses AA, the second uses BB, the 26th uses 00, the 32nd uses 66, the 33rd uses AA, the 34th uses BB, ...
Present 1283 Protocol Modified 1283 Protocol Command 'C' Command Response 'C' Response Poll Eliminated Transaction 'X' Transaction
Allowing unsolicited transactions and other messages from the DCTs introduces a flow control problem in the data collection server. The server needs the ability to inform terminals that they should not send any unsolicited messages. As a result, two new commands (A1X and A0X) were introduced to the 1283 protocol that are similar in meaning to two existing commands (A1 and A0).
Existing commands |
Note: The A1 and A0 commands controlled whether or not terminal users were able to run transaction programs to create transactions. |
New commands |
|
The A1X and A0X commands fall into the 'command' category and are thus preceded with the 'C' header character. However, these commands do not receive explicit response from the terminal. In other words, when the server sends out these commands on the 'C' channel, it will not wait for any response (and none will be sent by the terminal) on the 'C' channel.
But when a terminal receives an A1X command on the 'C' channel it may cause the terminal to generate one of several messages on the 'X' channel:
The A0X command can be used in the case where a terminal sends a transaction and the server is not ready for it. (SeeBuffered Mode for Networked Terminals) . This could occur immediately after the server sent out a command to that terminal but before the response from the terminal came back. The following sequence illustrates this case:
Note:
Legend/Symbol | Description |
---|---|
==> | Transmission from terminal server to terminal |
<== | Transmission from terminal to terminal server |
==> C 5 Command to beep the terminal <== X transaction Terminal sent up transaction at same time ==> C A0X Server does not want transactions now ==> X NAK Transaction NAKed so that terminal will resend it later <== C ACK Response to the beep command by the terminal
In the preceding sequence, there are two outstanding commands to the terminal at the time that the C A0X is issued. Because the A0X will not generate a terminal response, the terminal server can be sure that the C ACK that is received later is for the beep command.
The A0X and A1X commands cross the boundary between the command channel and the unsolicited channel, which is why these commands have characteristics of both. They are initiated by the terminal server, which is true of all commands on the 'C' chaneel. However, they do control the flow in the unsolicited channel. The protocol has been set up such that if an A0X or A1X command is lost, no transactions would be lost and no synchronization problems would result.
Commands A0X and A1X toggle an internal terminal state flag called the transaction flow control flag. When a terminal is first powered on, this flag defaults to being off. Only when the server sends an A1X command will the flag be turned on. At that time the terminal can begin sending transactions, if it has any, or request a download of RAM files, if it needs one.
Note: |
The unsolicited DC2 message ("I-am-here") is not governed by
the transaction flow control flag. It is used in several situations
to let the server know that the terminal is functioning:
|
A1X | When an A1X command is received by the terminal, the transaction flow control flag is turned on. If no transactions are waiting to be sent and the terminal does not need a download, a DC3 is sent to the terminal server to let the terminal server know that the terminal received the A1X command. If a download is needed, the terminal sends an unsolicited DC1 message to the server. If there are transactions in the transaction queue, the first one is sent to the host, even if it has already been sent before. |
A0X | When an A0X command is received by the terminal, the flag is turned off. This does not cause any immediate action to take place in the terminal. Rather, it determines what the terminal will do when the next transaction release command is received or when the next transaction is generated in the terminal. |
When the terminal generates a transaction, what happens next depends on the transaction flow control flag and whether there are transactions currently in the terminal's transaction queue.
When a transaction is successfully released in the terminal and there are transactions in the terminal still waiting to be sent, the transaction flow control flag determines what to do next.
If the terminal has just sent a transaction to the terminal server and that transaction has not yet been released, and then the terminal receives an A0X command followed some time later by an A1X command with no transaction release in between, the same transaction is sent to the terminal server again when the A1X command is received.
If, however, a transaction release command is received after the A0X is received but before the A1X, then the transaction is released from the terminal. When the A1X is received, that released transaction will not be resent because it no longer exists. In this instance, the next transaction sent to the terminal server is the next one in the queue following the one that was just released, if there are any.
The following describes the transaction data/response flow, including the actions in some error conditions.
Note:
Legend/Symbol | Description |
---|---|
==> | Transmission from terminal server to terminal |
<== | Transmission from terminal to terminal server |
The initial state of these examples has the terminal server ready for unsolicited transactions, and the terminal's transaction flow control flag is on. No transactions are currently in the queue and a new transaction has just been generated at the terminal.
<== Xtransaction Transaction is sent by the terminal ==> XAck Transaction received at server, but must not be released from the terminal yet. or ==> XNak Transaction received but the checksum failed. This is an implicit request for the terminal to resend the transaction provided an A0X command was not issued by the server in the mean time.
If at this point the terminal generates more transactions, they are queued in the terminal behind the one that is waiting to be released.
When the terminal server has successfully stored the transaction and is ready to release it, the terminal server sends the transaction release command (CMD K), which specifies the sequence number of the transaction being released: nnnnn. The terminal responds to the release with ACK or NAK indicating whether the release was successful (sequence number matches the first transaction in the queue).
==> CKnnnnn Release transaction with sequence number 'nnnnn' <== CAck Sequence number was correct; transaction is released or <== CNak Sequence number was not correct or other error occurred with the release. Transaction remains in the terminal. Server should resend release or send A1X to have the first transaction again.
The sequence number in the CMD K usually must match that of the first transaction in the queue in order for it to be released. However, if the sequence number in the CMD K is set to 'XXXXX' then the first transaction in the queue should be released no matter what.
If the release is successful and there are other transactions waiting in the terminal, and the transaction flow control flag is on, the first will be sent and the preceding scenario repeats.
If the release was not successful, the terminal will do nothing with the transaction unless it receives one of the following commands:
Another release command | Will try to process as before |
A0X command | The terminal turns off its transaction flow control flag but still leaves the first transaction in the buffer so it can be resent when A1X is next sent from the terminal server. |
A1X command | The first transaction will be sent to the terminal server again |
Each time a transaction is sent to the terminal server, the terminal starts an internal timer in case it does not receive an ACK or NAK response for that transaction. If no response is received before the timer expires, the transaction is resent, provided an A0X command was not received by the terminal in the meantime.
If no ACK or NAK is received for the transaction, and a transaction release is received before the timer expires, the transaction is still released from the terminal and operation continues as usual.
Likewise, when no response is received for a transaction and an A0X command is received followed some time later by a transaction release, the transaction is still released and operation continues as usual.
As a rule, a release command always succeeds if the sequence number specified in the release command matches that of the first transaction or if it is set to XXXXX.
The following table specifies the ASCII characters
used in the communications control commands discussed in this document.
Their hexadecimal equivalents are also provided, along with
brief descriptions.
Table 1. ASCII/Hex Cross-reference
ASCII | Hex | Description |
---|---|---|
SOH | 01 | Start of header |
STX | 02 | Start of text |
ETX | 03 | End of text |
ACK | 06 | Positive acknowledgement |
DC1 | 11 | Device control 1 |
DC2 | 12 | Device control 2 |
DC3 | 13 | Device control 3 |
NAK | 15 | Negative acknowledgement |
ESC | 1B | Escape sequence |
RS | 1E | Record separator |
The following legends and symbols are used in describing the
communications control commands.
Table 2. Communication Legends and Symbols
Legend/Symbol | Description |
---|---|
=> | Transmission from terminal server to terminal |
<= | Transmission from terminal to terminal server |
ADDR | Terminal address -- in a 7524 RF / TCP/IP network it is used only for compatibility with 7526/7527 control programs. The address character is not used by the terminal. Use of address A is suggested for all terminals. |
CMD | Command ID character sent to terminal |
CS1, CS2 | Checksum characters |
data | Characters sent to terminal server from a terminal as a result of a poll or command |
text | Parameters and data associated with a command sent to a terminal from the terminal server |
RS | Record separator |
f | File identifier |
Note: | Communications control commands are discussed throughout the remainder of this chapter. Also, (SeeDCT Communications Control Commands) . In the command descriptions, the commas (,) or spaces ( ) are not sent as part of the text or data stream transmitted or received by the terminal. They are used to clarify the examples for the reader. |
Certain ASCII characters are used in the network protocol as control characters. Because binary files (files which can contain all 256 possible 8-bit characters) can be transferred to the terminal over the network, the protocol defines a use of Escape characters to avoid having binary data misinterpreted as network control characters. To make transmission of the following control characters transparent to the protocol, each character is prefixed with an ESC (1Bh) character as it is transmitted. Additionally, the STX character is suffixed with an ESC character. Transparency for the ESC character itself is achieved by transmitting two ESC characters.
Character Transmit As _________ ___________ SOH (01H) ESC SOH STX (02H) ESC STX ESC ETX (03H) ESC ETX NAK (15H) ESC NAK ESC (1BH) ESC ESCAny computer that transmits data to a 7524 DCT, whether RF or batch, or to a terminal running the DCConnect Client, whether RF or batch, must insert these transparency characters in the data stream, and be prepared to handle transparency characters coming back from the DCT.
The transparency characters just described are most useful for the batch terminal although they are used in the 7524 RF and TCP/IP terminal as well. In addition, the 7524 RF terminal does some further encoding so that the characters in the message are not misinterpreted as part of the framing needed to send a message through the RF network (this additional encodeing is not done for a TCP/IP network). The further RF encoding for 7524 RF terminals involves the following:
In the RF environment it takes much longer to send two messages of size X than it does to send a single message that is twice the size of X. Therefore to maximize performance, messages should be made as long as possible. The preceding RF encoding guidelines allow data to be encoded so that it is made up of characters that are not part of the RF framing. If used correctly, it can also minimize the total number of bytes in the final message.
The 7524 terminal has a receive buffer of 1024 bytes and thus can accept messages of that length for both the RF and batch versions of the terminal. However, the Norand RF controller also has a (1024 - 7) byte limit.
7524 batch terminal and DCConnect Client batch terminal | Messages going to batch terminals cannot exceed 1024 bytes before taking into account the escape encoding has been done for transparency. |
7524 RF terminal | Messages going to the 7524 batch terminal cannot exceed the 1017 bytes after escape encoding has been done for transparency and the RF encoding have been done. The additional RF encoding is done only for messages that are to be sent to the terminal. This allows commands, such as to load files and set user variables, to be as large as possible in order to get the most information into the terminal in each message. RF encoding is not done for messages that are sent from the terminal because most messages from the terminal are very short. The only potentially long message is the transaction, which will not exceed 128 bytes. |
DCConnect Client terminals in a TCP/IP network | Messages going to a terminal running the DCConnect Client in a TCP/IP network cannot exceed 1024 characters - including all framing characters. |
The following example shows a command or message from the terminal server to one terminal with a response from the terminal to the terminal server.
Note: | Not shown here are the additional header fields for message sequence number, start of message identifier and message length - all of which are not common to all the different kinds of networked terminals supported by Extended Terminal Services. |
From terminal server:
=> C STX, ADDR, ADDR, CMD, text, RS, CS1, CS2, ETX
Terminal response:
Error <= C NAK Recv OK <= C ACK Data <= C STX, text, CS1, CS2, ETX
Terminal Server reply if data received:
Error => C NAK Recv OK => C ACK
An ACK response from the terminal after receipt of any command means only that the terminal received the command. CMD 1 must be executed to determine if the last command executed properly. If a command is buffered, executing CMD 1 may not indicate whether the buffered command executed properly.
Note: | Throughout the rest of the book, the leading C that must be part of every server command and terminal response will not be shown because it is not used for batch terminals. |
Messages transmitted and received by the terminal must have two ASCII checksum characters (CS1, CS2) just ahead of the ETX character.
Note: |
The only exceptions are:
|
ETS will always calculate the checksum and transmit two checksum characters (CS1, CS2). The terminal server program may choose to strip off or ignore them when they are received, but it is recommended that the terminal server program calculate the checksum, compare it to the received checksum, and send an ACK if it is correct, or a NAK if it is incorrect.
Checksum characters are calculated as follows:
For example, the terminal server requests the DCT's status:
=> STX, A, A, 1, 3, 1, ETX
The ASCII value of the character '1' that follows STX A A is 0x31. So the two checsum charactes are '3' and '1'.
For example, the DCT responds to the terminal server's status request:
<= STX, 10000A 00B90, 5, D, ETX
The hex values for '10000A 00B90' are added together, dropping any carry:
0x31 + 0x30 + 0x30 + 0x30 + 0x30 + 0x41 + 0x20 + 0x30 + 0x30 + 0x42 + 0x39 + 0x30 = 0x5D.Thus the two checksum characters are '5' and 'D'.
The terminal will NAK a message it receives if the checksum calculated by the terminal does not match the checksum sent by the terminal server. The checksum calculation must be done after any escape encoding is done for transparency. However, the checksum calculation must be done before the RF encoding that is performed on the message in 7524 RF networks.
For information about the communications control protocol used by the ETS and an outline of the requirements for control command structures, control characters, and communications symbols, (SeeModified Communications Control Protocol 1283) The following DCT communications control commands are used with ETS. For a description of these commands (SeeDCT Control Command Details) .
This section specifies the rules for processing commands. For command descriptions, (SeeDCT Control Command Details) .
General command processing rules are as follows:
Notes:
In the past, the term 'offline' was used to mean 'out of service'.
If the IBM DOS Data Collector is installed, offline means the terminal is not being polled by the Data Collector, and disabled means that no operator interaction with the terminal is permitted (out of service), but the terminal can still communicate with the terminal server.
In the past, the term 'online' was used to mean 'in service'.
If the IBM DOS Data Collector is installed, online means the terminal is being polled by the Data Collector, and enabled means the terminal will accept data from the operator and the terminal server (in service).
In this chapter there are references to 'polling' and 'not polling' of the terminal by the terminal server. In the strictest sense, 'polling' is the terminal server asking the terminal whether it has transactions by sending a poll command. However, in the RF and TCP/IP networks, the terminal server does not send poll commands to the terminal; the terminal is able to send a transaction to the terminal server, asynchronously, without having to wait for any command to reply to with the transaction. However, the terminal server can send commands to a networked terminal to tell it whether or not it is allowed to send transactions at all.
So networked terminals are considered to be 'polled' if the terminal has been told it is allowed to send transactions. Conversely, networked terminals are considered to be 'not polled' if they have been told by the terminal server not to send any transactions.
This section describes the DCT communications control commands listed at the beginning of this chapter. The proper format for each command is specified, and additional information is provided where necessary.
Notes:
This command resets the DCT, halts running applications, and reinitializes memory allocations. All terminal files are deleted and the terminal will request a load of all files.
The format for this command is:
=> STX, ADDR, ADDR, 0, CS1, CS2, ETX
There is no terminal response.
The format for this command is:
=> STX, ADDR, ADDR, 1, CS1, CS2, ETX <= STX, data, CS1, CS2, ETX
The data portion consists of a string of 12 ASCII characters that define the terminal, as follows:
Character Description 1 0 Normal state 1 First status request since POST completed 2 0 Last command executed correctly 1 Last command did not execute correctly 3 0 Required file download is present 1 File download required 4 0 Terminal is in service 1 Terminal is out of service 5 0 All commands since last CMD 1 executed correctly 1 Command failure occurred since last CMD 1 6, 7 cc Identifies command for status information. Character 7 is a blank (ASCII space) for single character commands. 8, 9 00 Last command OK 0f Last command OK (f = files 0-e, v = extended validation file) 10 Invalid command 20 Invalid text or format 2f Invalid text or format (f = files 0-e, v = extended validation file) 3f File overrun (no space) 4f File not initialized 69 Invalid attempt to initialize file 9 6f Invalid attempt to initialize file f due to memory constraints 7f Still processing command (f = files 0-e, v = extended validation file) 80 Last command ignored because terminal in wrong state 10, 11 ff Identifies current polled data file 12 0 No data in transaction queue 1 Data exists in transaction queue
The format for this command is:
=> STX, ADDR, ADDR, text, CS1, CS2, ETX <= ACK or NAK
The text refers to ASCII characters to be displayed in the sequence sent. Space characters show as blanks on the display. Normally, the data written to the display will remain until Timer B count has expired as specified in File 0. This command refreshes the display.
Although terminals with 7524 ETS flash or those running the DCConnect Client may have many different font sizes and view port sizes (affecting the number of rows and columns of text which can be shown at one time on the display), ETS always maintains a 20-line by 40-character virtual display in memory. The operator may move the visible window of the display around so that all areas of this virtual display size may be viewed.
In this host command, use ASCII DC2 as the first character of the text to allow the characters on the screen to remain unaffected by Timer B message display time out.
To prevent disturbing normal transaction display messages, this command is handled only during terminal idle cycles. If the terminal is not idle, the command is buffered to be executed when the terminal is idle.
Note: | Idle refers to a terminal state in which the terminal is operating but not active; that is, the terminal may be receiving commands and sending replies, but is waiting for the operator to initiate a transaction. |
The format for this command is:
=> STX, ADDR, ADDR, 3, CS1, CS2, ETX <= STX, data, CS1, CS2, ETX
The data portion consists of a string of four ASCII characters defining the terminal ROM microcode where:
For example, 0101 means version 01, revision 01.
The format for this command is:
=> STX, ADDR, ADDR, 4, text, CS1, CS2, ETX <= ACK or NAK
The text refers to 12 ASCII numeric characters in the following format using the 24-hour clock: YYMMDDHHMMSS.
For networked terminals, CMD 4 can also be used in response to a time request (DC2 nnnnn) from the terminal. Because of the possiblity of delays in the network or the set time command being buffered in an RF controller, when the terminal receives the normal CMD 4, it does not know when that command actually left the terminal server.
So in order to make sure the time is set reasonably accurately, the terminal issues a time request to the terminal server (DC2 nnnnn) filling in a sequence number. It then waits for the response, keeping track of how long it takes. Right now it will wait up to 7 seconds for the response.
The syntax for the response to the time request is the normal CMD 4 with the 5 digit sequence number 'nnnnn' inserted after the date/time string and before the checksum. The checksum calculation includes the sequence number. The terminal server must copy the sequence number from the time request to the response CMD 4.
When the terminal receives the CMD 4 that includes the sequence number, it makes sure sequence number matches the one it used in its last request and it makes sure the 7 second timeout has not expired since that request was sent. If the sequence number is correct and the timeout hasn't expired, the terminal sets its clock based on the time in the command. Otherwise it will increment the sequence number and issue the request again.
The terminal will not send an ACK or NAK in response to the CMD 4 that contains the 5 digit sequence number in it.
The following example illustrates the sequence. The STX, ADDR, CS1, CS2 and ETX characters are not shown in this example.
=> 4030100190605 - Normal server command to set time to 3/1/2000 19:06:05 <= <ACK> - Terminal sends back ACK, although it hasn't acted on the set time command since it doesn't know when it left the server. <= <DC2> 00001 - Terminal sends time request (on 'X' channel) using 00001 as the sequenc number ... - Due to network delay, 10 seconds elapse => 403010019061500001 - Server replies to time request with new set time command for 3/1/2000 19:06:15 using the 00001 sequence number from the time request <= <DC2> 00002 - Because of the delay, the terminal sends another time request after incrementing the sequence number to 00002 => 403010019061800002 - Server replies to time request with new set time command for 3/1/2000 19:06:18 using the 00002 sequence number ... - Terminal acts on this set time command, because only 3 seconds have elapsed. This exchange is now complete.
The format for this command is:
=> STX, ADDR, ADDR, 5, text, RS, CS1, CS2, ETX <= ACK or NAK
The text refers to an ASCII numeric character (1-9) that relates to a tone duration. The value of the text multiplied by 0.5 second determines the duration of the tone.
To prevent disturbance during normal transactions, this command will be handled only during terminal idle cycles. If the terminal is not idle, an ACK is returned to the terminal server, and this command is ignored.
Depending on the type of terminal that ETS is running on, ETS may not observe the duration specified in the command; the duration of the tone may always be the same regardless of the text specified.
The format for this command is:
=> STX, ADDR, ADDR, 6, CS1, CS2, ETX <= STX, data, CS1, CS2, ETX
The data is a string of five ASCII characters that define the terminal's features, as follows:
Char 1 = Display size:
1 = 2L x 40W alphanumeric 2 = APA graphics 4 = 1L x 32W alphanumeric 5 = 1L x 40W alphanumeric.
Char 2 = RAM storage size:
5 = 128Kb 6 = 256Kb 7 = 384Kb.
Char 3 = TOD clock:
1 = Clock installed.
Char 4 = Auxiliary ASCII port:
1 = Installed.
Char 5 = Printer port/DIDO(8) port switch setting:
0 = Printer 1 = DIDO port.
The terminal always sets the display size=2, RAM size=5, TOD clock=1, Auxilliary ASCII port=1, Printer port=0. Some of these values may not be entirely accurate for the hardware the terminal actually has.
The format for this command is:
=> STX, ADDR, ADDR, 7, CS1, CS2, ETX <= STX, data, CS1, CS2, ETX
The data refers to the current terminal time and date using the same format as CMD 4 (YYMMDDHHMMSS).
The format for this command is:
=> STX, ADDR, ADDR, 8, text, RS, CS1, CS2, ETX <= ACK or NAK
The text contains one to three ASCII characters that specify the currently polled buffer or file and the number of data records to be transmitted on a poll. The following ASCII characters are valid parameters for the text portion of CMD 8:
A = Specifies interactive/buffered mode, which holds only one record at a time. The terminal will switch to buffered mode when the terminal server is not polling the terminal; that is, if the transaction is not processed within the time limit specified by Timer A.
C = Specifies interactive mode, which holds only one record at a time. The terminal will go out of service and not allow any data to be entered when the terminal server is not polling the terminal.
B9n = Specifies the polled File 9, which will buffer multiple records.
Note: | ETS allows only n to be set to 1. |
When the terminal is switched to buffered mode, the terminal server must poll all the buffered transaction records out of the terminal before the terminal will switch back to interactive mode. If the terminal is switched to interactive mode without polling all the buffered transactions from File 9, the terminal will transmit all buffered transactions before any interactive transactions are transmitted.
Note: | When specifying the currently polled buffer or file, it is not necessary to take the terminal out of service prior to the execution of this command. If the terminal is in the middle of a transaction, the ACK is sent and the command is buffered. The command is executed when the transaction is completed and will go into effect for the following transaction. |
The 9x commands are used to initialize and manage up to 14 text or data files. Records in these files can be of variable length. An ASCII record separator (RS) must be used between records. This series of commands allows the terminal server to perform the following:
CMD 9A--Send file status to terminal server
CMD 9B--Initialize text file
CMD 9C--Load text file
CMD 9F--Transmit data file contents to terminal server
CMD 9G--Erase files.
Status should be queried (CMD 1) after each text or data file command (9x) to verify that the command was executed properly.
The format for this command is:
=> STX, ADDR, ADDR, 9A, f, RS, CS1, CS2, ETX <= STX, f, data, CS1, CS2, ETX
The f represents the file number (0-9, a-b, d-e).
The data portion consists of a fixed length string of ASCII characters that indicate the status of the specified file.
The format is: aaaaauuuuudp
Where:
The remaining 4 characters make up a hex number from 0x0000 to 0xffff which should be added to the multiple of 65536 bytes specified by the first byte. The sum of these two values is the actual size.
The format for this command is:
=> STX, ADDR, ADDR, 9B, f, text, RS, CS1, CS2, ETX <= ACK or NAK
The f is a the file number (0-9, a-b, d-e).
The text is a fixed length string of ASCII characters that initializes a specified text file, reserves file space, and defines file characteristics.
The format is: llllldtrsfrrrrr
Where:
lllll = File space to be reserved in bytes.
Note: | If file 9 (transaction queue) is the file being initialized, the size is ignored because ETS specifies the size of the transaction queue as a number of transactions rather than a number of bytes. For 7524 ETS, the number of transaction is fixed. For the DCConnect Client, the number of transactions can be set by the MAX_TRANSACTIONS keyword in its configuration. See the DCConnect Client User's Guide for more information. |
The file size can be formatted in one of two ways:
The remaining 4 characters make up a hex number from 0x0000 to 0xffff which should be added to the multiple of 65536 bytes specified by the first byte. The sum of these two values is the actual size.
dtr = Reserved
s = Sorted attribute
f = Fixed length attribute
rrrrr = Record count for variable length and length of record for fixed length.
No binary data is allowed in a variable length record except for File 8 (message file).
It is necessary to initialize all files (even File 9) before downloading or redownloading them, so that the required storage will be allocated.
Notes:
The format for this command is:
=> STX, ADDR, ADDR, 9C, f, text, CS1, CS2, ETX <= ACK or NAK
The f represents the file number (0-8, a-b, d-e).
The text refers to variable length records. The end of a variable length record is indicated by an RS.
This will load text records into a specified file (0-8, a-b, d-e). Repeat the CMD 9C string to load the file. Text records may be variable in length and can be in multiple communications records. This eliminates the restriction that a text record must have a maximum length based on the communication record size. An RS must be entered between the different text records and at the end of the last text record submitted. Spaces are allowed between characters.
CMD 9C is valid only with non-polled files. Any attempt to load text to File 9 will be rejected, and status character 8 will be set to 1.
Note: | The DCT must be set out of service (via CMD A) before CMD 9C can be executed. |
The format for this command is:
=> STX, ADDR, ADDR,9F,fff..ff,(RS),rrrr,CS1,CS2,ETX <= STX,nnn,data,CS1,CS2,ETXThe fff..ff refers to the file, "0" - "8", "a", "b", "d", "e", or an up to 12 character extended validation file name. The RS is present only if the file name is an extended validation file name, it is not present for the basic ETS files "0" - "8", "a", "b", "d", and "e". This provides a way to distinguish extended validation files that may have a single character name that is the same as a basic file name. The rrrr is the file record being requested. Each record is a 100 byte block of the file, record numbers are in the range of 0000 to 3999.
The nnn refers to the number (three ASCII characters) of data bytes being returned (0 to 100) and is the number of bytes following in the data parameter. The only time nnn should be less than 100 is when fewer than 100 bytes are available for the record number requested. If nnn is "000" for record "0000" then the file is empty. If nnn is "UUU" then the file is uninitialized. If nnn is "RRR" then the requested record is out of range for the file requested. If nnn is "000", "UUU", or "RRR" then no data is returned.
The data refers to the data for the record. The data that is returned is in the form that the files are stored by ETS in the terminal. This command is used when the text files, "0" - "8", "a", "b", "e", and the extended validation files, need to be restored by the terminal server. When the files are sent to ETS, "ESC RS" allows the RS to be imbedded in the text, and the ESC is removed by ETS. RS characters that are not preceded by ESC are record separators and are replaced by nulls for use by ETS. For the terminal server to do the restoration, all RS characters (ASCII record separator) need to be preceded by an ESC (ASCII escape), and then all nulls (00) need to be replaced by an RS. No restoration is required for ETS file "d" since it is not a text file and is stored and used in its original form.
Note: | If this command is executed on a file that has been resized in a mode 2 CFR, nnn is always "000", even if data has been written to the file with the CFR. |
The format for this command is:
=> STX, ADDR, ADDR,9G,f,CS1,CS2,ETX <= ACK or NAKThe f represents which set of files to erase.
0 = delete all validation files (extended and files 2-7) 1 = delete all validation files plus files 0, 1, 8, a, b, d, e, (file c, CFR, is deleted separately by CMD MB)
The terminal must be set out of service and the transaction queue (file 9) empty in order to execute this command.
The format for this command is:
=> STX, ADDR, ADDR, A, text, CS1, CS2, ETX <= ACK or NAK
The text is ASCII zero for setting the terminal out of service, and ASCII one for setting the terminal in service.
When out of service, the display will show the OUT OF SERVICE message (in File 8). The terminal will be out of service and transaction programs cannot be run. The executing transaction will be aborted.
The format for this command is:
=> STX, ADDR, ADDR, A, text, X, CS1, CS2, ETX
There is no terminal response.
The text is ASCII zero for setting the terminal's transaction sending state to "off" (do not send transactions), and ASCII one for setting the flag to "on".
Note: | These commands are available only for the RF or TCP/IP networked terminals. |
For details on how transaction flow control works, (SeeUnsolicited Message Flow Control) .
The format for this command is:
=> STX, ADDR, ADDR, B, text, RS, CS1, CS2, ETX <= ACK or NAK
The text is a string of ASCII characters used to control the audible tone and write messages to the display. STX and ETX cannot be used in the text string.
The first character controls audible tone:
The second character defines the display source:
0 = No message to display
1HELLO(RS) = Write message HELLO to display. Message must end with a record separator (RS).
2flllll = Write record at lllll in File f to the display
The following example gives audible tone for a valid transaction and writes ACCEPT to the display:
The following example activates audible tone for a valid transaction and writes record 3 of File 4 to the display:
Notes:
The format for this command is:
=> STX, ADDR, ADDR, C, text, RS, CS1, CS2, ETX <= ACK or NAK
The text is a string of ASCII characters used to control the audible tone and write messages to the display. STX and ETX characters cannot be used in the text string.
The first character controls audible tone:
The second character defines the display source:
0 = No message to display
1HELLO(RS) = Write message HELLO to display. Message must end with a record separator (RS).
2flllll = Write record at lllll in File f to the display
The following example activates tone for invalid transaction and writes NOT ACCEPTED to the display:
The following example activates tones for an invalid transaction and writes record 3 in File 4 to the display:
Notes:
This command allows the terminal server to initiate a data collection transaction program with the terminal. CMD D can have multiple key commands appended to it. These may include all of the command set plus the :6 command. CMD D allows command sequences that are longer than one communications packet. For ETS compatible operation - if the terminating record separator character (RS) is not present in a CMD D, the continuation of the command is assumed to follow in the next CMD D. The command sequence is buffered (up to 512 bytes) until the RS is found in a following CMD D. For TS compatible operation - a CMD D without a terminating RS will generate an error transaction.
Note: | :6(ctextc) is a key command used only in this command; (text) is the message to be displayed. |
The format for this command is:
=> STX, ADDR, ADDR, D, key commands, RS, CS1, CS2, ETX <= ACK or NAK
In interactive or interactive/buffered mode, CMD D (as well as CMD B, CMD C, or CMD 2) will be accepted by the terminal to complete a transaction. This provides the flexibility of using the terminal in a fully interactive mode, allowing the terminal server to control each step in the data collection process.
Transactions created with CMD D contain a function ID of FD. If a CMD 1 (status) is done, character 8 will have a value of '7' which indicates a 'pending' status until the completion of the CMD D transaction.
Example:
=> STX, ADDR, ADDR, D:010:11000:6*Enter Dept*:20500, RS, CS1, CS2, ETX <= ACK
The preceding example generates a transaction from the terminal. A prompt is displayed (File 8 record 10) with a 10-character badge read expected. Next, Enter Dept is displayed with a five-character numeric input expected. The resulting transaction may be polled from the terminal.
Notes:
The format for this command is:
=> STX, ADDR, ADDR, F, RS, CS1, CS2, ETX <= STX, data, CS1, CS2, ETXThe data is a string of 12 ASCII characters defining the memory status of the DCT. The first 6 bytes give the number of bytes of memory left in the DCT and the second 6 bytes give the number of bytes of the largest contiguous block of memory in the DCT. Both fields are right-justified and padded on the left with ASCII zeroes.
This command allows the user to simulate an event on the DCT and execute the transaction program associated with the event without the event actually happening. (An event is any activity that can cause a transaction program to be executed. For further details about events, (SeeFile 0--Terminal Operating Parameters/Program Storage) . Instead of the event actually happening (for example, the user presses F1 on the DCT), the user can issue this command to set the event remotely (create a simulated event).
Once the event has been set, processing of the event will take place in the same manner as if the real event had occurred and transaction record(s) will be created as defined by the transaction program or as defined by the system.
The format for this command is:
=> STX, ADDR, ADDR, G, function ID, RS, CS1, CS2, ETX <= ACK or NAK
The function ID is a two-byte ASCII field that represents a hex value. This value is the same as the function ID field listed in Table 10 and described in the format of a transaction record in File 9, (SeeFile 9--Transaction Queue File) .
Notes:
This command sets a global user variable on the DCT; the user variable is cleared before the data is copied into it.
The format for this command is:
=> STX, ADDR, ADDR,I,text,CS1,CS2,ETX <= ACK or NAKThe text, nnnccc....cc, refers to: nnn = user variable number (010 - 099) ccc....cc = characters to set in user variable, 118 bytes maximum
This command sets one or more user variables in the DCT. The previous values of all affected user variables are not preserved.
The format for this command is:
=> STX, ADDR, ADDR, IM, text, CS1, CS2, ETX <= ACK or NAK The text, nnnlllccc....cc, RS, nnnlllccc....cc, RS, ... refers to: nnn = user variable number (010-099) lll = length of data for the specified user variable ccc....cc = character data to which the user variable should be set
The nnnlllccc....cc, RS sequence can be repeated for as many variables that need to be set. The variables are set in the order that they are presented in the command. The total length of a single IM command cannot exceed 472 bytes.
This command is useful in an RF network because it takes much longer to set multiple user variables using separate commands than it does to set them in one command.
This command will return NAK if any error occurs. There is no need to send CMD 1 to verify its success.
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
This command provides a method to allocate RAM for ETS to be loaded into. When CMD J0 is executed with the size parameter equal to the length of ETS in paragraphs, and assuming RAM is available for allocation, the start segment address is returned in the address portion of the reply. This value is used to fix the ETS load module address to be compatible with the relative load address. If CMD J0 is executed with size = 0, then no memory is allocated, but the first available starting segment address is returned in the address.
The format for this command is:
=> STX, ADDR, ADDR, J0, size, CS1, CS2, ETX <= STX, J0, address, size, CS1, CS2, ETX => ACK or NAK
The size is a two-byte hex variable, expressed in paragraphs, that defines the number of bytes to be allocated. The returned size is the size allocated, if available, or the largest block available, if there is not enough memory.
The address is a two-byte hex segment address, expressed in paragraphs, returned from the terminal.
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
This command loads the program or data into RAM in the space previously allocated by CMD J0. The maximum data length is 128 bytes which includes control characters plus the address and length parameters; therefore,the maximum data length is 112 bytes. Most J1 commands must be limited to 112 bytes because the loads are done on paragraph boundaries (16 bytes). This command is repeated until the program is completely loaded.
The format for this command is:
=> STX, ADDR, ADDR,J1, address, length, data, CS1, CS2, ETX <= STX, J1, address, size, CS1, CS2, ETX => ACK or NAK
The address is a two-byte hex segment address, expressed in paragraphs, of the RAM area to be loaded, or the area that was last loaded. Zero is returned if an error occurred during this load command.
The length refers to the length of data in the link frame. It consists of two hex bytes.
The data is to be loaded into RAM. It consists of hex bytes.
The size refers to the amount of RAM remaining in the allocated area. It consists of two hex bytes, expressed in paragraphs.
Note: | This command requires allocated memory prior to loading data or a program into the terminal's RAM. |
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
Previous allocation of RAM is not required to execute this command. Program or data modules are written into allocated or unallocated RAM. This command can also be executed while ETS is running. Warning: Data and program areas can be overwritten by this command.
The format for this command is:
=> STX, ADDR, ADDR, J2, address, length, data, CS1, CS2, ETX <= STX, J2, address, CS1, CS2, ETX => ACK or NAK
The address refers to the segment address of the RAM area to be loaded. It consists of two hex bytes, expressed in paragraphs.
The length represents the length of data in the link frame. It consists of two hex bytes.
The data is to be loaded into RAM. It consists of hex bytes.
Note: This command forces data or the program into the terminal's RAM without regard to any previous memory allocation.
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
CMD J3 sets up the terminal to dump or return data loaded in RAM. This command is the initialization, and also returns the first data block requested. Execute CMD J7 to return additional RAM data to the terminal server. ETS must be halted with CMD J4 prior to execution of CMD J3.
The format for this command is:
=> STX, ADDR, ADDR, J3, type, address, size, CS1, CS2, ETX <= STX, J3, count, address, size, data 1, data 2, ... data N, CS1, CS2, ETX => ACK or NAK
The type refers to the type of dump to be initiated. It consists of two ASCII characters. The valid codes for dump types are as follows:
The address is a variable, expressed in paragraphs, based on the type of dump requested. It consists of two hex bytes. The returned address should reflect the sent address.
For dump types 01-03, the size sent to the terminal is the maximum size of records to be dumped. For type 04, it is the length of the area to be dumped. It consists of two hex bytes, expressed in paragraphs. For dump types 01-03, the size returned by the terminal is the number of data bytes returned in the first block (N). For dump type 04, the size returned is the length of the area to be dumped.
The count is the record number of the dump, starting with 0001h. It consists of two hex bytes. The last record contains a count of FFFFh.
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
This command stops the execution of ETS if it is loaded and running. It returns the operational status of ETS. The CMD J5 must be executed to start or restart any ETS.
The format for this command is:
=> STX, ADDR, ADDR, J4, CS1, CS2, ETX <= STX, J4, address, size, status, version, CS1, CS2, ETX => ACK or NAK
The address is the first segment of RAM used by the loaded program. It consists of two hex bytes, expressed in paragraphs. It is the lowest address used by the loaded program.
The size refers to the total amount of RAM in the terminal. It consists of two hex bytes, expressed in paragraphs.
The status refers to the terminal's operational status. It consists of two ASCII characters. The following codes are used to indicate the terminal's operational status:
The version refers to the terminal's microcode level. It consists of two hex bytes.
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
This command loads the terminal processor registers from the values found in the .EXE header of the application program previously downloaded via CMD J1. When the registers are loaded, program execution continues from the point execution was stopped. To start ETS after it has been halted with CMD J4, execute CMD J5 without register parameters.
The format for this command is:
=> STX, ADDR, ADDR, J5, ss, sp, cs, ip, es, ds, CS1, CS2, ETX <= STX, J5, return code, CS1, CS2, ETX => ACK or NAK
The following processor registers are loaded via CMD J5:
Each processor register consists of hex bytes.
The following return codes are used with CMD J5:
Each return code consists of two ASCII characters.
This response or status information is returned upon receipt of the first poll after reset, power recovery, or when an error has occurred. When power is restored, if the terminal lost power, it responds to the first poll or command with reason set, indicating a power failure occurred. If an application program was loaded, the application restart indication would also be on.
The format for this command is:
<= STX, J6, reason, CS1, CS2, ETX
The following bit numbers represent reasons for terminal status:
Least Significant Bit (LSB) first
Bits 6 and 7 encoded values are:
Each reason contains one byte of hex data.
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
This command returns data or program information from the terminal's RAM as specified in the count parameter. CMD J3 must be executed successfully prior to CMD J7; otherwise, reason 02 is returned by response J8. The value for the starting dump record is returned by CMD J3 in the count parameter.
The format for this command is:
=> STX, ADDR, ADDR, J7, count, CS1, CS2, ETX <= STX, J7, count, address, size, data 1, data 2, ... data N, CS1, CS2, ETX
The count is the record number of the last record dumped. It contains two bytes of hex data. The last record contains a count of FFFFh.
The address is a variable, expressed in paragraphs, which is the starting address of the data in the record. It contains two bytes of hex data, expressed in paragraphs.
The size is the length of the data in the record. It contains two bytes of hex data. For dump types 01-03, the size returned by the terminal is the number of data bytes returned in the first block (N). For dump type 04, the size returned by the terminal is the length of the area to be dumped.
Note: The 7524 ETS flash / DCConnect Client cannot be loaded into the terminal using the Jx commands. ETS does not ever load itself; it expects that do be done outside of its operations.
7524 ETS is loaded into semi-permanent FLASH ROM via the process described in (SeeInstalling and Downloading the 7524 Extended Terminal Services Flash) For compatibility with existing data collection control software, ETS will respond to the Jx loading commands with dummy data intended to make the terminal server believe that the download is working. The data sent to the terminal is discarded.
For reference only, the function of the command in a 7527 context is reproduced below.
This command is an error response to commands 0, J0 through J5, J7, and J9 when they are sent to the terminal, indicating that the command has invalid parameters or the parameters are out of proper sequence.
The format for this command is:
<= STX, J8, reason, CS1, CS2, ETX
where the reason code explains why the terminal is unavailable.
The valid reason codes are:
The reason code consists of two ASCII characters.
This command returns the hardware and firmware configuration of the terminal.
The format for this command is:
=> STX, ADDR, ADDR, J9, CS1, CS2, ETX <= STX, J9, version, display, touch, ramsize, keylock, pio, CS1, CS2, ETX
Where:
version = ROM microcode major and minor versions, two hex bytes. (For example, V01 would return = 0100.)
display = Display type, one hex byte. Valid display types are:
touch = Screen status, one hex byte. Valid screen status codes are:
ramsize = Size of RAM in paragraphs, two hex bytes
keylock = Status of the keylock, one hex byte. Valid keylock status codes are:
pio = Switch setting for printer or DIDO, one hex byte
Note: | ETS always returns the highlighted values. |
The format for this command is:
=> STX, ADDR, ADDR,K,text,CS1,CS2,ETX <= ACK or NAK
The text, sssss, refers to:
sssss = transaction sequence number (00000-99999)
The sequence number can be set to XXXXX in order to release the first transaction in the terminal regardless of the sequence number of that first transaction.
(SeeBuffered Mode) .
The format for this command is:
=> STX, ADDR, ADDR,L,text,CS1,CS2,ETX <= STX,L,text,CS1,CS2,ETX
The text refers to any ASCII data string, 121 bytes maximum.
Whatever text is received is sent back in the response.
The format for this command is:
=> STX, ADDR, ADDR,MA,CS1,CS2,ETX <= STX,status,size,CS1,CS2,ETX
The status is a single binary byte as follows:
00 No CFR loaded 01 CFR in process of being loaded 02 CFR enabled
The size is two binary bytes and is in paragraphs. A zero size is returned if no space is allocated for a CFR.
Note: | ESC (ASCII escape) sequence for binary data must be sent to the terminal and is also sent by the terminal when needed. |
The format for this command is:
=> STX, ADDR, ADDR,MB,size,CS1,CS2,ETX <= STX,paragraph,CS1,CS2,ETX
The size is two bytes (binary) and is in paragraphs. The maximum size allowed is 64 Kb or 4096 paragraphs.
The base paragraph address is returned (2 bytes, binary) to the server. A base address of 0 is returned if not enough memory. If a CFR is already loaded, this command will disable it and initiate a new CFR load sequence provided the terminal is out of service.
An additional optional byte, set to '1', may follow the paragraph value that is returned, if the CFR is not supposed to be fixed up before downloading. In this case, the CFR executable should be downloaded exactly as it is stored on the terminal server. If this extra byte is not in the response or if it is and is not set to '1', then the CFR should be fixed up (as described at the end of the next chapter) before downloading.
The exception to this is when the DCConnect Client is running on a Windows Client, where the CFR is actually a DLL and not an executable file; CFRs that are DLLs are always downloaded by the terminal server without being fixed up.
The format for this command is:
=> STX, ADDR, ADDR,MC,number,data,CS1,CS2,ETX <= ACK or NAK
This command loads the CFR executable image. The number (2 binary bytes, starting at zero) is a block counter to make sure that no data is lost or repeated. The data is the CFR image.
Note: | A NAK is returned if the number is incorrect or no CMD MB has been executed. |
The format for this command is:
=> STX, ADDR, ADDR,MD,number,CS1,CS2,ETX <= ACK or NAK
This command notifies the terminal to initialize and attach the CFR. The number (2 binary bytes) is the block counter as in CMD MC and must be one greater than the last number used in a CMD MC.
Note: | A NAK is returned if the number is incorrect or no CMD MB and CMD MC has been executed. |
The format for this command is:
=> STX, ADDR, ADDR,NA,fff..ff,CS1,CS2,ETX <= STX,fff..ff,data,CS1,CS2,ETX
fff..ff is file name, 1-12 characters
The data, aaaaauuuuudt, refers to:
aaaaa number of bytes reserved by previous CMD NB uuuuu number of bytes not used d = text type 1 = noncompacted alphanumeric text t = file type 0 = non-polled file
Note: | If a mode 2 CFR does a resize of the file, aaaaa-uuuuu = resize number. |
The format for this command is:
=> STX, ADDR, ADDR,NB,fff..ff,text,CS1,CS2,ETX <= ACK or NAK
fff..ff is file name, 1-12 characters
The text is a fixed length string of ASCII characters that initializes a specified text file, reserves file space, and defines file characteristics.
The format is: llllldtrsfrrrrr
Where:
Note: |
The file size can be formatted in one of two ways:
|
A validation file can be deleted from local storage at the terminal by using CMD NB to reinitialize the file to 0 bytes.
The format for this command is:
=> STX, ADDR, ADDR,NC,fff..ff,RS,data,CS1,CS2,ETX <= ACK or NAK
fff..ff is file name, 1-12 characters
The data refers to variable length data records, a record separator (RS) appears at the end of each record. Repeat the CMD NC string to load the file. Text records may be variable in length and can be in multiple communications records. This eliminates the restriction that a text record must have a maximum length based on the maximum size of the communications record. An RS must be entered between the text records and at the end of the last record transmitted. Spaces are allowed between characters.
Note: | If this command causes a file overrun, this is indicated in a CMD 1 status, where characters 8 and 9 are '3v'. There is no error transaction created. |
The format for this command is:
=> STX, ADDR, ADDR,ND,fff..ff,CS1,CS2,ETX <= ACK or NAK
fff..ff is file name, 1-12 characters
This command signals ETS that the file is complete and available for validation.
The format for this command is:
=> STX, ADDR, ADDR,O,rr,cc,a,e,text,CS1,CS2,ETX <= ACK or NAK
The rr refers to row and cc refers to column. If rr is 00 then the current row is used; if cc is 00 then the current column is used.
The a refers to the attribute:
0 = No blinking, normal, no underline 1 = No blinking, normal, underline 2 = No blinking, reverse video, no underline 3 = No blinking, reverse video, underline 4 = Blinking, normal, no underline 5 = Blinking, normal, underline 6 = Blinking, reverse video, no underline 7 = Blinking, reverse video, underline
The e refers to the erase screen option.
0 = the display is not erased before displaying the text 1 = the display is erased before displaying the text
The text refers to ASCII text to be displayed. Like CMD 2 if the first text character is a DC2 then the text is written to the display buffer unaffected by Timer B. Otherwise, the text will remain displayed for the duration of Timer B. In order for multiple successive CMD Os to display multiple lines of text on the display, the DC2 option must be used at the beginning of each text line and the text will remain until an operator action deletes it. Also, like CMD 2, this command is handled only during terminal idle cycles.
This command returns to the server the contents of a user variable on the DCT
The format for this command is:
=> STX, ADDR, ADDR, Q, text, RS, CS1, CS2, ETX <= STX, Q, data, CS1, CS2, ETXThe text is: nnn = user variable number (000 - 099) The data is the contents of the user variable. The data is not null-terminated. The length of the response message minus the framing characters determines is how the terminal server should determine the length of the user variable data.
The format for this command is:
=> STX, ADDR, ADDR,V,text,RS,CS1,CS2,ETX <= ACK or NAK
For TS operation, the text is a series of 5 ASCII bytes:
For ETS operation, the text is a series of 8 ASCII bytes:
Note: | A 'P' response causes the transaction program to continue operation, while an 'N' response causes the transaction program to either skip or abort. |
This chapter discusses powerup requirements for 7524 terminals and specifies the download sequences for ETS parameter files to both 7524 terminals and terminals running the DCConnect Client.
The 7524 DCT may be reset (that is, restarted) in three ways:
Type of Reset | Description |
Initial start/Cold reset | Upon the initial startup of a new terminal, or a terminal in which the battery has been removed for a long period, all DCT setup parameters must be set using the gold shift and Menu key sequence. Then all the RAM configuration, program, prompt, validation, and CFR files must be downloaded. The System Setup menu contains a Reset Parms option for clearing out the DCT configuration and files. |
Application restart | This type of reset is initiated through power-off/on. Files should not need to be downloaded. |
When the DCT is powered up, it executes a Power On Self Test (POST). If an initial start/cold reset is executed, the terminal setup parameters (communications, and so forth) are set to default values. The default address, "127", is non-operative, so a valid address must be set (valid addresses are 0 to 126). On SST terminals (7524-102 and -202), the LAN ID and host name must also be set (they must match those used by the RF controller and base stations).
All terminals under the control of ETS, upon startup, waits for the download of files 0-8, c and e, so that operating parameters may be loaded in the terminal. For a description of the download sequence for these files, (SeeParameter File Download Sequence) . An initialization command is sent for all the files (RAM space to allocate for each file) followed by the required data as supported by the ETS protocol. Initial text is also loaded into the appropriate files. Once loaded, the parameter files remain in RAM until a new download sequence is received, or until CMD 0 is sent. For initialization requirements, (SeeParameter File Initialization Sequence) .
This section contains the initialization sequence for the parameter files. These files must be initialized before they can be downloaded.
Note: | For the networked terminal, 'Poll,' as shown in the following example, can be eliminated; the terminal sends a DC1 command when it requires a download. In addition, a networked terminal should send an A0X command to the terminal to tell it not to send any unsolicited messages such as transactions or other download requests. |
TERMINAL SERVER DCT ______ ___ Poll ----> <---- DC1 Request Files CMD A0 ----> Set DCT Out of Service <---- ACK CMD 1 ----> Status Request <---- RSP Return Status
If the terminal contains transactions (byte 12 of the status reply is '1') then these transactions must be removed from the terminal before the download can continue. For the networked terminal, the A1X command should be sent to inform the terminal to send transactions. All transactions from the terminal should be handled as described in (SeeModes of Operation) . When all transactions have been removed, the A0X command should be sent to the terminal so that it can no longer send unsolicited messages.
Initialize files 1-8, a-b, and d-e until all are complete CMD 9B ----> Initialize File 9 <---- ACK CMD 1 ----> Status Request <---- RSP Return Status CMD 9A ----> Request file status <---- RSP Return file status Initialize CFR: CMD MB ----> <---- RSP CMD MA ----> <---- RSP Initialize Extended Validation Files: CMD NB ----> <---- ACK CMD NA ----> <---- RSP Repeat for each extended validation file.
This sequence is followed immediately by the download sequence given in (SeeParameter File Download Sequence) . Then the terminal is ready to be put in service by the terminal server.
Notes:
Once the parameter files have been initialized, they are ready for downloading. The required download sequence is as follows:
TERMINAL SERVER DCT ______ ___ CMD 9C ----> Load File 0 <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Repeat until file 0 is loaded. CMD 9C ----> Load File 1 <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Repeat until file 1 is loaded. Continue Loading Files 2-8, B and E CMD 9C ----> Load File 2 <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Load CFR if needed. CMD MC ----> Load CFR <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Repeat until CFR is loaded, then start the CFR. CMD MD ----> Start CFR <---- ACK CMD 1 ----> Status Request <---- RSP Return Status
Load Extended Validation Files. CMD NC ----> Load Extended File <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Repeat until Extended file is loaded, then start the file. CMD ND ----> Start Extended File <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Repeat previous two steps for each extended validation file. Setup Buffer File 9 CMD 8 ----> Specify polled buffer <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Set DCT Clock CMD 4 ----> Set Clock <---- ACK CMD 1 ----> Status Request <---- RSP Return Status Set DCT In Service CMD A1 ----> Set DCT In Service <---- ACK CMD 1 ----> Status Request <---- Return Status For the networked terminal, the A1X command should now be sent to the terminal to allow it to send transactions and other unsolicited messages to the server.
Note: | The parameter files are automatically downloaded by the DCConnect software. |
Downloading of CFR executables is more complex than other files because the CFR executable file image must be adjusted for the location of the CFR in the terminal's memory. Space is allocated in the terminal by the terminal server via CMD MB. The terminal's response is the address (in paragraphs) at which the CFR will be stored in the terminal. The terminal server must then adjust all the absolute references in the CFR executable file (EXE file) and transmit the adjusted image a block at a time using CMD MC. When the entire image has been sent, the terminal server sends CMD MD to notify the terminal to initialize the CFR.
The size of the CFR is derived from values found in the EXE header. Offsets 04 and 05 of the EXE file image give the size of the file in 512 byte increments. Offsets 02 and 03 are the file size MOD 512. Offsets 08 and 09 give the size of the EXE header. For a more detailed explanation of the EXE file format created by LINK, see the DOS Technical Reference Manual chapter titled "EXE File Structure and Loading".
Once the resident size of the CFR has been determined, use CMD MB to allocate space. The ETS will respond to this command with an address in paragraphs. This address + 32 bytes will be the base address of the CFR once it has been downloaded. Use this address + 32 bytes to relocate the CFR image. The final step in the relocation process will be to add a JMP instruction to the entry point of the relocated image. The remaining 27 bytes of the relocated CFR image header should remain unused and set to zero.
Once the relocation of the CFR has taken place, downloading may be performed using CMD MC. After the relocated CFR image has been downloaded, use CMD MD to activate the CFR.
Disk EXE image:
Terminal image:
Procedure:
( ( (offset 04-05h) X 512) + (offset 02-03h) + ( (offset 0A-0Bh) X 16) - (offset 08-09h) )
Note: | In step 3 below, you also add 32 bytes for the CFR header. |
Byte |
|
1 | 8088 jump instruction -- always EAh |
2-3 | Memory offset for jump destination. Set to equal offsets 14-15h from EXE header. |
4-5 | Memory segment for jump destination. Set to equal offsets 16-17h from EXE header plus the relocation value used in step 6 (return from MB command plus 32 bytes). |
TERMINAL SERVER DCT ______ ___ CMD MB ----> Allocate space <---- RSP Allocation address Create download image, do relocations CMD MC ----> Send image blocks <---- ACK CMD 1 ----> Status Request <---- RSP CMD MD ----> CFR load complete <---- ACK
This chapter specifies data entry requirements and describes how data entries are validated.
Field length for device input data (keyboard, sensor ports, and RS-232 port) will always be specified by a length parameter. ETS will overlay the existing display message with underscores (_) to define the length and position when a read is requested. The field will always be placed in the rightmost display position (except in the case of :R (read), where the field will start at the current cursor position), and the cursor will be placed at the start of the input field.
In a numeric data entry field, only numeric characters must be entered in all positions of the field. Valid keys are the numeric keys, the Fill key, and specific PF keys or touch screen regions defined in File b to contain only numeric data. Numeric characters enter into the far right position of the field, with each new key entry moving the previous key entry one position to the left. The Fill key can be used to fill the remainder of the incomplete field with ASCII zeroes (0) on the left. All characters scrolled out of the field (on the left) are deleted.
Limited line editing is allowed using the Backspace (<) key on the keypad. If Backspace is pressed, the most recent character entered is deleted, and the data must be reentered. Backspace can only put you back to the beginning of the current data input field. It cannot corrupt data on the other part of the screen that is not within the current data input field. Press the Enter key to complete the field.
If a numeric data entry field has autofill parameter (a) = 1, it will bypass the length check. The enter key may be use at any time to complete the field. Any remaining underscores in the numeric key entry field will be changed to ASCII zeroes on the left, and the field will be completed.
Notes:
In an alphanumeric data entry field, the space key is used to remove the underscores and advance the cursor from the present position. The Fill key can be used to fill the remainder of the incomplete field with ASCII spaces. Alphanumeric characters enter into the far left position of the field, and each new character enters one position to the right of the previous one. Once the field is full, characters enter into the far right position of the field, scrolling the leftmost character out the left side of the field. All the characters scrolled out of the field (on the left) are deleted.
Limited line editing is allowed using the (<) Backspace key. If Backspace is pressed, the most recent character entered is changed back to an ASCII underscore (_), and the data must be reentered. The Backspace key can only put you back to the beginning of the current data input field. It cannot corrupt data on the other part of the screen that is not within the current data input field. Press the Enter key to complete the field.
An alphanumeric entry field with the autofill parameter (a) = 1 bypasses the length check. The Enter key may be used at any time to complete the field, and any remaining underscore in the alphanumeric data entry field will be changed to ASCII spaces on the right.
Notes:
Validation of data entered is specified by the use of two validation parameters in File 0 (key commands). See Table 6 for detailed descriptions of the key commands used with File 0.
These parameters have the following meanings:
Valid validation file IDs are 2-7, a-z, and A-Z. File E maps these single character file IDs to the 8.3 file names used by the NA, NB, NC and ND commands. The single character file IDs are used in several transaction program commands. Commands 9A, 9B, and 9C can be used to initialize/load validation files with IDs 2 through 7. No validation is specified by setting f equal to zero.
This chapter describes how terminal modes affect keypad operation. The first part describes the keyboard for various models of 7524 terminals and their Intermec/Norand equivalent. The second part describes how the keyboard is treated by the DCConnect Client.
The different models of the 7524 terminal have different keyboard layouts, which affects how to access certain keys:
PF Keys 1-12 |
| ||||||
Clear key |
| ||||||
Cancel key |
| ||||||
Fill key |
| ||||||
OK key |
| ||||||
Space key |
| ||||||
Backspace key |
|
The terminal operates in two modes: idle and transaction These modes affect the way that the terminal responds when the user presses certain keys.
Table 3 describes the terminal's responses to pressing these
keys when the terminal is operating
in the previously mentioned modes. Note that
pressing a key may cause a different operation than the key label
indicates, depending on the terminal state.
Table 3. Impact of Terminal Modes on Keypad Operation
Key | Idle mode | Transaction mode |
---|---|---|
Numeric 0-9 | No response | Places numeric characters 0-9 into a data entry field |
Enter key | No response | Completes the transaction step in progress and advances to next step in transaction. If this is the last step in the transaction, indicates the completion of this transaction record |
Function keys 1-26 or Alphabetic A-Z | Responds to the key definitions in records 1-26 in File 0 | Places alphabetic characters A-Z into the data entry field defined |
Function key 27 | Responds to key definition in record 27 in File 0 |
On 7524 models 05X and 10X -- Used to put space into a data
entry field or to fill the field with spaces.
On the 7524 model 20X -- Used to put a
period in a data entry field.
|
Function key 28 | Responds to key definition in record 28 in File 0 |
On 7524 models 05X and 10X -- Used as a backspace
key when in data entry mode.
On 7524 model 20X -- Used to put a minus sign
(hyphen) in a data entry field.
|
Program Function (PF) keys 1-12 | Responds to key definitions in records 31-42 in File 0 |
Used only when the :Z command is waiting for a keystroke.
|
Fill key | No response | Used to complete the current data input field with ASCII spaces ( ), if the data is to be alphanumeric, or ASCII zeroes (0), if the data is to be numeric |
Space key | No response | Used to put blank/space into a data entry field |
Backspace (<) key |
No response
| Used to allow limited line editing during a data entry operation
If Backspace is pressed, the most recent character entered is deleted or changed back to an ASCII underscore (_), and the data must be reentered. Backspace can only put you back to the beginning of the current data input field. It cannot corrupt data on any other screen area that is not within the current data input field. |
Clear key | Clears the display buffer |
Clears all the data from the current data input field and replaces the
entire field with underscores. Similar to the CE keys on
most calculators that allow you to clear the most recent
entry until Enter is pressed
|
Cancel key | No response | Used to abort the current transaction |
There are a wide variety of terminals supported by the DCConnect Client, each with different numbers of keys and different layouts. But all keys that are used are ones that are found on a standard PC keyboard. These include alphabetic, numeric, arrow keys, F1-F10, Home, Insert, Delete, ...
Not all PC keyboard keys are available and the function of keys may differ depending on which of the two transaction modes the terminal is in:
When in the menus, the keys function in the same way as when in transaction mode.
When in Idle mode the following keys are active:
A-Z = Used to start the transaction programs bound to F1 through F26 , or < = Used to start the transaction program bound to F27 F1-F12 = Used to start the transaction programs bound to PF1 through PF12 Home = or ? = Bring up the configuration menus. Arrow keys = Used to scroll the view of the virtual screen if the display size is set to anything smaller than 20x40. The arrows move the 'view port' relative to the virtual screen. For example, pressing the up arrow will move you closer to row 1 if row 1 is not already displayed.
When in the menus or in a transaction program the following keys are active:
Arrow keys = If in the menus, sometimes used to scroll through choices If not in the menus, used to scroll the view of the virtual screen - just as in idle mode. Backspace = Delete data in an input field In some places in the menus it is used to cancel an operation Tab/Backtab = Used to move between options in the menus. Enter = Used to complete an input field or accept the information on a menu screen. Esc = Cancel a transaction program End = Used in field navigation to accept the data in all input fields. Insert = Used to fill in an input field with spaces when in a transaction program Delete = Used to clear an input field when in a transaction program. F1-F12 = Function as PF1-PF12 in transactions in the following cases: - In an ONKEY/ONSUB (:Z) command to conditionally pass control based on a key pressed. - Can also be used to fill alias string text into an input field if alias string text has been assigned to th PF Keys and if the input field was produced by a READ (:R) command which has the PF Keys selected as an input device. Home = or ? = Bring up the configuration menus (if not already in them) Space # $ % & * + . / 0-9, A-Z = These are the valid characters that can be typed into an entry field (the same set that 7524 terminals has available). In certain menu options where it might be desirable to enter other characters into a field, a method is provided by which the ASCII value of the desired character can be entered.
Note: | While many of the 3rd party terminals have all of the PC keys defined that are needed by the Client, some such as the Intelligent Instrumentation TimePoint (Symbol FMT1060) have a more limited keyboard and thus may not be able to make full use of the Client functions. |
This chapter describes transactions initiated through scanning of a bar-coded badge or other bar code document.
Note: | Refer to :1 llft, :4 llft, and ;1 lld0 in Table 6 for additional information about parameter values for badge data. |
Normally, the DCT initiates a transaction when the operator presses a function key. Certain applications may require that an operator only read a bar code to initiate a transaction. Such functions can be implemented by using either the time-of-day (TOD) for fast clocking or an optional badge transaction program for reading a badge first. The difference between the two types of transactions is the time of day that they occur. These transactions are described in the following paragraphs.
Fast clocking allows transactions to be created with only the reading of a badge (no function key required). These times are specified in File 1. This can be used during a factory shift change, when data defined in record 30 in File 0 can be collected for time and attendance purposes. If a transaction program has not been defined for record 30 in File 0, then the information in bytes 12-15 in File 0 record 00 define the transaction record created during fast clocking. Fast clocking transactions are buffered and retrieved by the terminal server in first in/first out (FIFO) order from the buffer, regardless of terminal operation mode.
Note: | If record 30 is defined (not NOP(10)), the badge data is in user variable 0 (the last read variable). If the badge data is to be validated, the first command in the record 30 transaction program must be a :K (validate) command. This badge data is appended to the transaction record as the first field by default just before the next data input instruction in the transaction program. |
An optional badge transaction program, record 29 in File 0, allows the reading of a badge to initiate a transaction. This badge-initiated transaction may require other input data to be included in the transaction in the optional transaction program. This transaction is initiated when fast clocking is not in effect.
Note: | If record 29 is defined (not NOP), the badge data is in user variable 0 (the last read variable). If the badge data is to be validated, the first command in the record 29 transaction program must be a :K (validate) command. This badge data is appended to the transaction record as the first field by default just before the next data input instruction in the transaction program. |
If the terminal is not currently in a fast clocking time interval, and no program is defined at record 29 in file 0, then when a badge is read by the terminal, no program is run and no transaction is generated. The 'invalid operation message' is usually shown in this situation.
This chapter specifies the requirements for character string construction and manipulation.
There are 99 built-in character strings, known as user variables (UV), are available to users for use in transaction programs. In addition, a system-controlled character string, known as user variable 0 (UV 0), is available to users. User variable 0 contains the last data read from any input device (keyboards, sensors, or devices connected to the RS-232 port). User variable 0 is also called the last read variable.
Whenever a transaction program begins execution, user variables 0 - 9 are automatically cleared (that is, initialized to null). User variable 0 is constructed automatically by the system, but user variables 1-99 can be constructed using the append (:F), clear (:H), and format (:J), key commands (see Table 6). The user can construct user variables 1-99 using the data from the result of the last read (that is, the data stored in UV 0), message record in File 8, PF key definition, touch screen definition, or another user variable. A user variable (UV 1-UV 99) can then be formatted into a specified length and/or have local validation performed on it. User variables 0-99 can then be routed to the parallel printer port, the RS-232 port, or the display, or they can be appended to the current transaction record (see Figure 1).
User variables 010-099 are not cleared before each transaction. This allows carry-over between transactions and the ability to set a user variable from the terminal server via a terminal server command. The terminal server CMD I and CMD IM can be used to set these variables remotely from the terminal server.
Transaction program execution can be halted to wait for the terminal server to send a global user variable to user variables 010-099 as follows: clear the variable using the Clear Data Area (:H) command and then send a user-defined transaction to the terminal server using Write To Terminal Server (:W). Finally, use the Test User Variable (;N) command in combination with the Go To (:G) command to wait for the variable to be set by the terminal server via CMD I or CMD IM.
Before each test, the Delay (:D) command should be used so that the transaction program does not use all of the processor resources looping around and around testing the user variable. With the delay, ETS may not get enough processor time to be able to handle commands from the terminal server - such as the CMD I or CMD IM that is expected.
This chapter specifies the rules for initializing and processing RAM files, and describes the contents of those files. File record contents, parameters, key commands, valid byte values, file structures, and so forth, are included in the file descriptions.
Certain files are required for the proper operation of the DCT and ETS. For information about the optional and required files, (SeePowerup and Download Specifications) These files contain required and optional terminal operating parameters (for example, barcode configuration parameters), user-defined transaction programs and record formats, message text, time period specifications, text validation data, keyboard redefinition requirements, predefined data entry strings, custom function routines, user-specified graphic symbols, and transaction data. In addition, certain files are used when various communications control commands are executed; (SeeDCT Control Command Details) .
The rules governing file initialization and processing are:
There are 15 unique RAM files used with ETS:
Note: File a is not supported with ETS.
Note: File d is not supported with ETS.
This section describes the previously listed files, which are stored on the DCTs. Record formats for each file are also described.
Two file attributes are defined under ETS, both applicable only to the user validation files (files 2-7) specified in CMD 9B (initialize specified text file):
Sorted | If numeric, a sorted file has its members arranged in ascending numerical order. If alphanumeric, the members are ordered alphabetically. Files are sorted if they use Code Page 850 collation sequence; no other type of collation sequence is supported.
| ||
Fixed length | Applicable only to alphanumeric files. True if all records in the file have the same length. |
Within the context of the ETS software, event describes an action that requires some response or servicing by the DCT. Usually, events are serviced by initiating a transaction program. For example, an operator can initiate a transaction program by pressing a function key. When a key is pressed or a badge is scanned, one can say that an event is generated.
Any of the following DCT devices can generate an event:
Note: The transaction program storage locations used on a 7527 terminal for digital input, shifted PF key, and touch screen region initiated event may be used with ETS, but there are no physical input devices on the terminal to allow the operator to start these programs directly. The only access to the stored programs is from other transaction programs isomg commands such as Goto and Onkey. Host command G can also be used to initiate a program that is assigned to one of these storage locations.
File 0 must have 122 records (0-121) containing entries that determine basic terminal operating characteristics (that is, cursor type, display type, fast clocking parameters, and so forth) and transaction programs. File 0 is an alphanumeric file that allows the user to customize the functions of the terminal for a specific application.
Table 4 shows the contents of the records within File 0.
Every record must be terminated by the record separator (RS) character. Once the last record is defined which is not a NOP transaction, the remainder of the file (composed entirely of NOP transactions) need not be supplied by the terminal server. Up to this point, however, a NOP command code must be supplied for all events that are ignored. ETS fills the rest of the records with NOPs for you.
Note: Initialization of File 0 must specify the complete number of bytes for the entire file with all the NOPs included (that is, space must be provided for all 122 records).
Individual transaction programs are limited to 65000 bytes in size.
The following tables describe the contents and options for records
in File 0.
Table 4. Contents of Records in File 0
Record Number(s) | Contents |
---|---|
0 | Terminal characteristics (204 bytes) |
1-26 | Transaction programs associated with terminal keys A-Z |
27-28 | Next two keys in keyboard matrix after Z |
29 | Incoming data on sensor, fast clocking not active |
30 | Incoming data on sensor, fast clocking active |
31-42 | PF keys 1-12 |
43-54 | Shift PF keys 1-12
Note: ETS does not support shifted PF keys; therefore these programs cannot be started directly by an event. However, they may be used via commands in other transaction programs (e.g. Goto, Onkey) or they may be started via the host command G. |
55 | Incoming data on the GP port 1
Note: ETS currently does not support initiating a transaction via RS-232 'General Purpose' port activity. |
56 | Unassigned |
57-64 | State change to trip level on DI ports 0-7
Note: ETS does not support digital I/O ports; therefore these programs cannot be started directly by an event. However, they may be used via commands in other transaction programs (e.g. Goto, Onkey) or they may be started via the host command G. |
65-72 | Unassigned |
73-112 | Touch screen regions 1-40
Note: ETS does not support touch screen points; therefore these programs cannot be started directly by an event. However, they may be used via commands in other transaction programs (e.g. Goto, Onkey) or they may be started via the host command G. |
113-120 | Extra transactions programs, only accessible via other transaction programs or via the host command G. |
121 | New hour on the TOD clock |
All of the unsigned records can also be used to store transaction programs that can be accessed through the :G and :Z commands even though they cannot be started through any physical event.
Table 5 specifies the parameters for File 0, record 00.
This record contains numerous setting with which you can affect the
behavior of the terminal.
Table 5. File 0 Record 00 Parameters
Offset from Start | Length in Bytes | Parameter Function | Parameter Entry | ||
---|---|---|---|---|---|
0 | 2 | Not used |
| ||
2 | 1 | Transaction buffering desired or not |
This is the default value if the individual transaction program has not
defined its own mode using the :I command or no
terminal server CMD 8 has been executed.
| ||
3 | 1 | Format of time display These configuration bytes may be set, but 7524 ETS currently does not use them. To conserve battery power, 7524 ETS does not present a time/date display on the idle screen. However, the DCConnect Client will use the value configured here if the keyword SHOW_IDLE_TIME is used in its configuration. |
| ||
4 | 1 | Idle display format (prompt message from File 8 left-justified) These configuration bytes may be set, but 7524 ETS currently does not use them. To conserve battery power, 7524 ETS does not present a time/date display on the idle screen. However, the DCConnect Client will use the value configured here if the keyword SHOW_IDLE_TIME is used in its configuration. | Time display is right-justified
| ||
5 | 1 | Hourly time transaction Note: ETS currently does not support hourly time transactions. |
Default format of the transaction is the function ID, timestamp as
defined in offset 6, and sequence number if configured.
| ||
6 | 1 | Timestamp for transaction records |
| ||
7 | 1 | Error logging mode for application errors |
| ||
8 | 1 | Number of beeps, good transaction
| X = Number of good beeps (0-9) | ||
9 | 1 | Duration of beep for a good transaction
| X = Number of .25 sec intervals for a good beep (0-9) | ||
10 | 1 | Number of beeps, bad transaction
| X = Number of bad beeps (0-9) | ||
11 | 1 | Duration of beep for a bad transaction
| X = Number of .25 sec intervals for a bad beep (0-9) | ||
12 | 1 | File number for validation of fast clocking badges |
Value is ignored if record 30 exists.
This is the default value if record 30 is NOP.
| ||
13 | 1 | Type, fast clock file validation |
Value is ignored if record 30 exists.
This is the default value if record 30 is NOP.
| ||
14-15 | 2 | Fast clock badge length | XX = Length for validation
Value is ignored if record 30 exists. This is the default value if record 30 is NOP. | ||
16-17 | 2 | Timer A duration (terminal server communications timeout) |
| ||
18 | 1 | Timer B duration (time certain status and error messages remain on the display) | X = 0-9 Time in .5 second increments
(0 = no 'good prompt' for buffered transactions and error messages
display for default 3 second)
Note: Good prompt message is a global flag which can be changed with a CFR. This change lasts past the execution of the transaction program or CFR. | ||
19-20 | 2 | Timer C duration (maximum time between operator actions when in a transaction sequence) |
| ||
21 | 1 | Add sequence numbers to transaction record. Sequence numbers start at 0 and recycle at 99 for TS operation and at 99999 for ETS operation. |
| ||
22 | 1 | Not used |
| ||
23 | 1 | Auto operate the good read LED on panel on badge input at sensor ports |
| ||
24 | 1 | Fast clocking for sensor ports during time periods specified in File 1 |
Value is ignored if record 30 exists. This is
the default value if record 30 is NOP.
| ||
25-41 | 17 | Bar code decoding to be used for sensor ports | Each byte can be:
A space ( ) denotes the end of the list of choices. ETS defaults to F (Code 39) and J (UPC A and E). Only one of Code 39 or Extended Code 39 can be chosen. If only A is used, then ETS uses default barcodes (FJ) also.
| ||
42 | 1 | Display character set selection (used only with Model 002 DCTs) Note: ETS currently does not support setting the display size via these parameters. The terminal always maintains a 20-line x 40-character display buffer; the amount which may be seen at one time is dependent on the font size selected in the terminal's set-up menus. The arrow keys may be used to view areas of the 20x40 display which are currently off of the visible area. |
| ||
43 | 1 | Not used |
| ||
44 | 1 | Cursor format to be used during keyboard reads |
Cursor is only shown during keyboard reads.
| ||
45 | 1 | Set the baud rate for the RS-232-C port |
| ||
46 | 1 | Parity for the RS-232-C port |
| ||
47 | 1 | Set the number of stop bits to be expected on the RS-232-C port | Specify 1 or 2 | ||
48 | 1 | Set the number of data bits to be expected on the RS-232-C port |
| ||
49 | 1 | Asynchronous protocol option for the RS-232-C port: XON/XOFF support |
| ||
50 | 1 | Time display separator These configuration bytes may be set, but 7524 ETS currently does not use them. To conserve battery power, 7524 ETS does not present a time/date display on the idle screen. However, the DCConnect Client will use the value configured here if the keyword SHOW_IDLE_TIME is used in its configuration. |
| ||
51 | 1 | Date display separator These configuration bytes may be set, but 7524 ETS currently does not use them. To conserve battery power, 7524 ETS does not present a time/date display on the idle screen. However, the DCConnect Client will use the value configured here if the keyword SHOW_IDLE_TIME is used in its configuration. |
| ||
52 | 1 | Numeric input field delimiter |
| ||
53 | 1 | Determines idle screen display format These configuration bytes may be set, but 7524 ETS currently does not use them. To conserve battery power, 7524 ETS does not present a time/date display on the idle screen. However, the DCConnect Client will use the value configured here if the keyword SHOW_IDLE_TIME is used in its configuration. |
| ||
54 | 1 | Not used |
| ||
55 | 1 |
Asynchronous protocol option for the RS-232-C port: length of
message start sequence (up to 8 characters to
affix to the start of every message written to the port)
| X = 0-8 Number of characters to be used | ||
56-79 | 24 | Asynchronous protocol option for the RS-232-C port: characters defining the message start sequence | Each 3 bytes have a value from
000-255, which is the ASCII number
of the character (for example, a < < is represented by
060060000000000000000000).
Zeroes are to be used to pad out the bytes that are not being used. | ||
80 | 1 | Asynchronous protocol option for the RS-232-C port: length of message end sequence (up to 8 characters to affix to end of every message written to port) | X = 0-8 Number of characters to be used in the message end sequence | ||
81-104 | 24 | Asynchronous protocol option for the RS-232-C port: characters defining the message end sequence | Each 3 bytes have a value 000-255, which is the ASCII number
of the character (for example, a > > is represented by
062062000000000000000000).
Zeroes are to be used to pad out the bytes that are not being used. | ||
105 | 1 |
Asynchronous protocol option for the RS-232-C port: strip length
for the start of message (number of characters to strip off start of
input message).
| X = 0-8 Number of characters to be stripped from start of
message
Note. Message starting and ending characters are automatically stripped. | ||
106 | 1 |
Asynchronous protocol option for the RS-232-C port: strip length
for the end of message (number of characters to strip off end of input
message).
|
X = 0-8 Number of characters to be stripped from end of message
Note. Message starting and ending characters are
automatically stripped.
| ||
107-108 | 2 | Asynchronous protocol option for the RS-232-C port: timeout (read or write) | XX = 0-99 seconds
00 = wait forever for last character to be received.
This timeout refers to the time allowed for the last characters to be received once the read of the port has started. | ||
109 | 1 | Asynchronous protocol option for the RS-232-C port: retries | X = 0-9 Number of retries for reads and writes | ||
110 | 1 | Not used |
| ||
111-118 | 8 | Not used |
| ||
119 | 1 | Buffering desired for new hour on TOD clock: default buffering Note: ETS does not currently support TOD transactions. |
If not buffered, a new transaction will not be started based on this hour change. If buffered, a new transaction will be started at the end of the current transaction. Value is ignored if record 121 exists.
This is the default value if record 121 is NOP.
A transaction is
created if record 121 does not exist. This transaction
consists of a two-byte function ID,
timestamp as defined in byte 43, and sequence number.
| ||
120 | 1 | Buffer events on DIDO port: default buffering Note: ETS does not currently support digital I/O ports. This byte is ignored. |
If buffered, a new transaction will be started based on this DI transaction when the terminal is idle, if it occurs when the terminal is busy with another transaction program. Only one event per point is buffered. If the DIDO port is buffered, and the condition is no longer true
when the port is ready for service, the transaction program is executed
anyway (records 57-64, if defined).
| ||
121-123 | 3 | Terminal server timeout for response to remote validation |
| ||
124-128 | 5 | Idle screen menu with the idle prompt on DCT display | XXXXX = prompt/screen to display when the DCT is in idle mode
| ||
129 | 1 | Not used |
| ||
130-131 | 2 | Minimum number of characters to expect for Straight 2/5 (value B in bytes 25-41) (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
132-133 | 2 | Maximum length for Straight 2/5 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
134 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for Straight 2/5 |
| ||
135-136 | 2 | Minimum length for USD-1, I 2/5 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits). This is in increments of 2. | XX=00-98 (must be in increments of 2) | ||
137-138 | 2 |
Maximum length for USD-1, I 2/5 if chosen in bytes 25-41 (if min = max = 0,
then no limit is applied and includes all check digits).
This is in increments of 2.
| XX=00-98 (must be in increments of 2) | ||
139 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for USD-1, I 2/5 |
| ||
140-141 | 2 | Not used; USD-2 is not supported on the 7524. | |||
142-143 | 2 | Not used; USD-2 is not supported on the 7524. | |||
144 | 1 | Not used; USD-2 is not supported on 7524 terminals. | |||
145-146 | 2 | Not used; Code B is not supported on 7524 terminals. | |||
147-148 | 2 | Not used; Code B is not supported on 7524 terminals. | |||
149 | 1 | Not used; Code B is not supported on 7524 terminals. | |||
150-151 | 2 | Minimum length for USD-3, Code 39 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
152-153 | 2 | Maximum length for USD-3, Code 39 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
154 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for USD-3, Code 39 |
| ||
155-156 | 2 | Minimum length for Ext. Code 39 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
157-158 | 2 | Maximum length for Ext. Code 39 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
159 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for Ext. Code 39 |
| ||
160-161 | 2 | Minimum length for USD-7, Code 93 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
162-163 | 2 | Maximum length for USD-7, Code 93 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
164 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for USD-7, Code 93 |
| ||
165-166 | 2 | Minimum length for USD-4, Codabar if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
167-168 | 2 | Maximum length for USD-4, Codabar if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
169 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for USD-4, Codabar |
| ||
170-171 | 2 | Minimum length for UPC-A, UPC-E chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 (not applicable) | ||
172-173 | 2 | Maximum length for UPC-A, UPC-E if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 (not applicable) | ||
174 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for UPC-A, UPC-E |
| ||
175-176 | 2 | Minimum length for EAN-8, EAN-13 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 (not applicable) | ||
177-178 | 2 | Maximum length for EAN-8, EAN-13 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 (not applicable) | ||
179 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for EAN-8, EAN-13 |
| ||
180-181 | 2 | Minimum length for USD-8, Code 11 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
182-183 | 2 | Maximum length for USD-8, Code 11 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
184 | 1 | Encoded byte for number of check digits for USD-8, code 11. |
| ||
185-186 | 2 | Not used; Ames is not supported on 7524 terminals. | |||
187-188 | 2 | Not used; Ames is not supported on 7524 terminals. | |||
189 | 1 | Not used; Ames is not supported on 7524 terminals. | |||
190-191 | 2 | Minimum length for MSI Code,
if chosen in offsets 25-39.
If min = max = 0, the default,
variable length, is applied.
| XX=01-32 (variable and fixed length) | ||
192-193 | 2 |
Maximum length for MSI Code,
if chosen in offsets 25-39.
If min = max = 0, the default,
variable length, is applied.
| XX=01-32 (variable and fixed length) | ||
194 | 1 | Not used | |||
195-196 | 2 | Minimum length for USD-6, Code 128 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
197-198 | 2 | Maximum length for USD-6, Code 128 if chosen in bytes 25-41 (if min = max = 0, then no limit is applied and includes all check digits) | XX=00-99 | ||
199 | 1 | Encoded byte for check digit type, 2 or 5 supplement, optional check digit, and return check digit for USD-6, Code 128 |
| ||
200 | 1 | Touch screen matrix Note: ETS does not support touch screen. These byte(s) are ignored. |
| ||
201 | 1 | Touch screen sense mode Note: ETS does not support touch screen. These byte(s) are ignored. |
| ||
202 | 1 | Determines whether or not the transaction release command is sent by the server to the terminal to allow the transaction to be deleted from the terminal's transaction queue. |
| ||
203 | 1 | TS/ETS operating mode specification. |
2
|
Table 6 describes the key commands used for File 0, records 01-121. These records are used to define the transaction programs for the events described in Table 4. The format of the transaction programs is multiple key commands terminated by an RS.
ETS supports the same transaction programming command set as 7527 Extended Terminal Services except:
Notes:
If a 'P' is received as a response to a remote validation, the transaction program continues execution. If an 'N' is received as a response to a remote validation or the terminal server does not respond quickly enough to the validation request, the transaction program aborts or skips.
Command | Parameter Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
:0 rr = Display message on display left-justified on line 1 and column 1. | Specifies record number in File 8 to be displayed (00-99).
Can only display first 100 messages in File 8 (that is, messages
00-99).
Use :E to display messages 0000-9999. | ||||||||||||
:1 llft = Fixed length badge read with validation. |
The data is obtained from whichever sensor has the data available. See notes 1 and 2 immediately preceding this table. | ||||||||||||
:2 llft(appb) = Numeric keypad input expected
with validation.
Optional advanced feature:
| Values for :2 llft are same as for :1 llft.
The DCT accepts data from the keyboard only. See note 2 immediately preceding this table. | ||||||||||||
:3 llft(appb) = Alphanumeric keypad input expected
with validation.
Optional advanced feature:
| Values for :3 llft are same as for :1 llft.
Terminal autofills with spaces to the right. Accepts data from the keyboard only. See note 2 immediately preceding this table. | ||||||||||||
:4 llft = Alphanumeric keys or badge input expected with validation. | Values for :4 llft are same as for :1 llft.
The data is obtained from whichever sensor has the data available. Accepts data from the keyboard only. See notes 1 and 2 immediately preceding this table (page reference #2). | ||||||||||||
:6 cmessagec = Message sent from terminal server to be displayed at the current cursor position. |
This command can only be used within CMD D from the terminal server. A :6 at the beginning of a transaction program clears the screen and places the cursor at 1,1 (top left corner), just like the :T (clear screen). | ||||||||||||
:8 = Link function. | A second key will always follow.
After the execution of the rest of the commands defined in the current
transaction program, message 9 from message File 8 is displayed to prompt
for the second key to be pressed.
All information collected by both transaction programs is sent back in
a single transmission.
Must be used in the first position of a transaction program. The usual data validation is allowed in the second key. A latched key (has a ;2--see description under ";2 = Latching function" in this table) can be the second key, but the second key cannot have a linked function. If it does, the transaction is aborted and an error message is displayed on the terminal display (local error). | ||||||||||||
:9 = Key not used (NOP). | Must be used to define all unused key positions. | ||||||||||||
;0 = Hot key. | Creates a transaction with function ID and timestamp, plus
sequence number if configured (must be the only command in a
transaction program).
The format of the transaction record created by this command is as follows:
| ||||||||||||
;1 lld0 = Read variable length badge with no validation. Use only with magnetic stripe or Code 3 of 9. Do not use with UPC/A or I 2 of 5 bar codes. |
The data is obtained from whichever sensor has the data available. See note 1 immediately preceding this table
(page reference #2).
| ||||||||||||
;2 = Latching function. | This command must be used at the beginning of the transaction program.
The transaction record created by this transaction program is processed,
and this transaction program command is executed again.
Timer C is disabled during this type of transaction program.
Latching transactions with interfacing errors (syntax errors) abort the transaction program and return to the idle screen. | ||||||||||||
:A c = Autotrans state. | c = Concatenate data to
transaction record when the next data read occurs.
This command can be called repeatedly in any single transaction program. The value is set to TRUE at the start of any transaction program. When any data read operation is executed, the result of the read is saved in user variable 0, and if Autotrans is TRUE, the data just read is appended to the transaction record. If Autotrans is FALSE, the data read is not automatically appended to the transaction record; you must append the data to the transaction record yourself, using :F, if you wish it to be there. If Autotrans is FALSE at the end of the transaction, you must write the transaction record to the transaction queue file yourself. (SeeFile 9--Transaction Queue File) . (Use :W to write transaction record to host) Otherwise, if Autotrans is TRUE at the end of a transaction, the transaction record is automatically written to the transaction queue file. | ||||||||||||
:D ll = Delay. | ll = 01-99 seconds
Delay execution of the transaction program for a given amount of time. | ||||||||||||
:E srrrrrxxyya = Display message on display at row xx and column yy. |
| ||||||||||||
:F nnnsrrrrr = Append.
Two other formats of this command are supported:
:F nnnsrrrrrPppplll = append from a given position 'ppp' for a specific length 'lll' :F nnnsrrrrrFfffddd = append specific field using delimiter 'ddd' to determine where the fields are.
|
If any modification is made to the PF key strings during the transaction program, these values are reset to their original values as defined in File b upon completion of the transaction program. If appending from a specific position/length from the source, then the extra parameter bytes 'Pppplll' must follow the :Fnnnsrrrrr and they have the following meaning:
If the specified position or length goes past the data that is available in the source, an error will result and the transaction program will be aborted. If there is no data in the source, it is not an error if position is set to 001 and the length is set to to 000. If appending from a specific field using a delimeter to define the field, then the extra parameter bytes 'Ffffddd' must follow the :Fnnnsrrrrr and they have the following meaning:
When appending a field, the delimeter character is not part of the data that is appended. If the specified field number does not exist in the data that is available in the source, an error will result and the transaction program will be aborted. It is not an error to specify a field that is empty - as long as the delimeter character follows it; this would be the case where two delimters are encountered in a row. | ||||||||||||
:G dddsss = GOTO a transaction program or to the idle screen (abort). |
| ||||||||||||
:GS dddsss = GOSUB, branch to a subroutine. |
A subroutine can start at any step in any transation program but it must
eventually lead to a Return (;R) command at some step. When the Return
command is encounterd, control branches back to the step following the
GOSUB command.
Subroutines can call other subroutines - up to 50 levels of nesting deep.
Other than the S following the :G, this command has the same syntax
and restrictions as the GOTO (:G) command described previously.
| ||||||||||||
:H nnn = Clear user variable nnn. |
Turns variable to a null string. If any modification is made to the PF key strings
or touch screen regions
during the transaction program, these values are reset to
their original values as defined in File b upon completion
of the transaction program.
| ||||||||||||
:I m = Set mode of transaction queue for current transaction. | m = Mode of transaction queue:
This must be used at the start of a transaction program, and the mode is valid for the duration of the current transaction. Mode selected in a second link function key is ignored. | ||||||||||||
:J nnnlllrccclcccfccc = Format user variable. |
Formats the selected string into a field of length lll. Strips indicated leading and trailing characters, truncates field to the length specified, or fills out the remainder of the field with the indicated character. If lll = 000, then only the stripping is done.
| ||||||||||||
:K nnnft = Validate user variable nnn. |
Validates the contents of variable nnn against the validation file specification. Continues with transaction if validation succeeds; otherwise, cancels transaction. See note 2 immediately preceding this table
(page reference #2).
| ||||||||||||
:M pp = Read value of DIDO point.
Note: This command is not supported. | pp = 0-7 DIDO point number to read
Capable of reading output ports as well as digital input. The value returned is the ASCII representation of the data read. Logs error transaction if parallel/DIDO switch in wrong position. (Interface error) When a read from DI is requested, this initiates the debouncing of the DI. As with events, it must hold the state for 55 millisec. A latency of 100 millisec for the read to return is possible. | ||||||||||||
:N ppvtt = Wait DI.
Note: ETS does not support digital I/O ports. This command is not supported. |
Suspends execution of currently defined transaction program in File 0 until value of DI point pp equals v. If DI reading is not satisfied before timeout expires, then transaction is cancelled. Logs error transaction if parallel/DIDO switch in wrong position and if pp is not a DI point (application errors). If point is already in the correct state, no wait is done.
| ||||||||||||
:P ppvtt = Write DO point.
Note: ETS does not support digital I/O ports. This command is not supported. |
Logs error transaction if parallel/DIDO switch in wrong position and if pp is not a DO point (application error). If a point is set and the command is to set it for a specified time, after the timeout the point reverts back to its original state (set in this case). If v=T and tt
is not equal to zero, then this is the way to pulse a DO.
| ||||||||||||
:Q = Terminate the current key definition and send transaction created so far. | Generates a "T" transaction for terminated in
interactive mode or a "U" transaction for
terminated in buffered mode. For example,
this command allows the data accumulated so
far in a transaction to be transmitted
instead of aborting the entire transaction on
a validation error.
Transaction types are:
| ||||||||||||
:R abcdefghijk rlllfte = Read data with validation. |
Data is read into user variable 0. See note 2 immediately preceding this table. The maximum length for keyboard read is 40, and the maximum length for GP communications is 128. In the case of GP communications, the DCT reads no more than lll characters, or up to the message end sequence if it exists, whichever comes first. It times out after timeout in configuration table (byte 107/108). The message start and the message end sequences are not returned as part of the string read, but are flushed from the buffer. If neither lll characters nor the message end sequence is present, the DCT will wait up to configuration table timeout time for one of these conditions to be satisfied. If value of 0 supplied for lll, it will immediately read however many characters are in the buffer for any device and wait for the message end sequence if any is configured in record 00. If input from several sources (including the general purpose port) is allowed, and invalid data is being detected from the general purpose port, pressing the CLEAR key (Esc for DCConnect Client) will allow data to be entered from the other devices selected in this command. (Continued on next page) | ||||||||||||
:R abcdefghijk rlllfte = Read data with validation (continued). |
Sensor read times out after Timer C timeout and data is obtained from whichever sensor has the data available. Likewise, any keyboard read which is not satisfied is aborted after Timer C timeout. If Echo is on, information from device read (except the RS-232 port) is displayed at the current cursor position. Any input data caused by pressing a PF key or touch screen region is also echoed. The current cursor position defines the beginning of where the underscore (_) will begin on the display line. The actual placement of the cursor for the data entry will still be at the start of the input field (which is the far right for numeric data and the far left for alphanumeric data). For additional information about numeric and alphanumeric data entries, (SeeValidation of Device Input Data) . See notes 1 and 2 immediately preceding this table
(page reference #2).
| ||||||||||||
:S uuu d ooo = Set a shift offset factor for adding to the characters of a user variable. |
| ||||||||||||
:T (rr cc ll) = Clear display and put cursor in upper left corner of the display. |
Optional parameters:
| ||||||||||||
:U rrcc = Set cursor position. |
Logs error transaction if row and/or column are out of range for
this DCT display (application error).
| ||||||||||||
:W tsrrrrr = Write data from source to target. |
If you are writing a transaction record to the host (terminal server) the timestamp and sequence number are automatically appended to the record before it is written. If you are writing to the RS-232 port, you must provide all the required framing characters. This is not automatically done by ETS if these sequences are not defined in File 0 record 00. If the message start/end sequences are defined, then they are appended to the message before it is written to the RS-232 port.
In most cases, the function ID that is returned in the transaction
data is for the program that initiated the transaction.
However, when using any command that branches to another program
(e.g. :G = GOTO or :Z = ONKEY) there is an exception.
If the execution branches to another program and that program or
any other issues a :W (write) to the host, the function
ID that is returned in the transaction data will be that of the program
that issued the :W.
In other words, whatever program does the :W, this is the function
ID used in the transaction data.
| ||||||||||||
:X = Denote the beginning and end of the
screen navigation region.
Note: Screen navigation is not supported by ETS. (Ref #3.) |
| ||||||||||||
:Y = Denote a pause for input point in the
screen navigation region
Note: Screen navigation is not supported by ETS. | |||||||||||||
:Z tcccdddsss(cccdddsss...) = ONKEY goto. | Wait for a single key and jump to another
point in the current transaction program or
another transaction program or to the idle screen
(abort the transaction).
This command has the following restriction(s):
| ||||||||||||
:ZS tcccdddsss(cccdddsss...) = ONSUB, wait for key and then branch to a subroutine. |
A subroutine can start at any step in any transation program but it must
eventually lead to a Return (;R) command at some step. When the Return
command is encounterd, control branches back to the step following the
ONSUB command.
Subroutines can call other subroutines - up to 50 levels of nesting deep.
Other than the S following the :Z, this command has the same syntax
and restrictions as the ONKEY (:Z) command described previously.
| ||||||||||||
;7 uuullltext... = Append data to user variables from inline strings of data |
| ||||||||||||
;A nn = Alias transaction ID | This command is used to assign an alias identification to the
transaction in progress.
If the terminal server processes transactions differently
according to the key or other event which started the transaction, the
alias command can be used to allow the terminal server to accept a
transaction as if it were initiated by another event.
| ||||||||||||
;C ltt = Activate selected LED for selected interval
Note: The Panel LED is physically indicated on the 7524 terminal with a display annunciator (icon). The magnetic port LEDs are not supported. The DCConnect Client do not support any LEDs. |
User can activate multiple LEDs at the same time.
| ||||||||||||
;M fnn(abcd...) = Command to call CFR |
| ||||||||||||
;N uuu = Test user variable | uuu = user variable number (000-099) This command tests for the user variable to be not null. It skips the next command if the data is not null; otherwise the next command is executed. | ||||||||||||
;O d uuu = Save the cursor position to a user variable (UV) or restore the cursor position from a user variable. |
| ||||||||||||
;R = RETURN from a subroutine |
Use this command to return from a subroutine that
was called from either a GOSUB (:GS) or ONSUB (:ZS)
command.
If no subroutine has been called and the RETURN command is used, an error will result and the transaction program will be aborted.
Subroutines can call other subroutines - up to 50 levels of nesting deep.
|
Table 7 contains examples of
typical function key record formats for File 0, for selected records.
Table 7. Sample Function Key Record Formats for File 0
Record Number | Record Format | Meaning | Result |
---|---|---|---|
01 | :9RS | :9 = Unused key.
RS = Record separator. | None |
02 | :012:10641RS |
:012 = Write record 12 (File 8) to display. :10641 = Read badge. Validate length =6. Validate data in File 4 with positive file search. RS = Record separator.
| Transaction record follows:
Function ID = 02 Badge data = BBBBBB Timestamp = HHMMSS (see note). |
06 | ;0RS |
;0 = Hot key. RS = Record separator.
| Transaction record follows:
Function ID = 06 Timestamp = HHMMSS (see note). |
07 | :206001031RS |
:20600 = Accept keyed numeric data. Length = 6. No validation. 1031 = Advanced feature parameters available on (:2) and (:3). Parameter values: 1 = Fill with zeroes to length (overrides length check). 03 = Position the leftmost character at display position 03. 1 = Write to the display buffer. RS = Record separator.
| Transaction record follows:
Function ID = 07 Numeric data = NNNNNN Timestamp = HHMMSS (see note). |
Note: Timestamp is selected in byte 6 of File 0, record 00. | |||
08 | :I0:U1307 :R100000000000010000 :W0200100:A0RS | :I0 = Set transaction queue mode to interactive for this
transaction
:U1307 = Set cursor to row 13, column 7 :R1000000000 = Read from numeric keypad 0 = Fixed length read 010 = Length of read is 10 0 = No validation 0 = Data not in file 0 = Echo off, normal timeout :W0200100 = Write transaction record to RS-232 :A0 = Do not append data to transaction record RS = Record separator. | No transaction record is created. |
File 1 is used to hold the start and stop times when the terminal will automatically switch to a fast clocking mode.
Files 2-7 are text validation files. These files are alphanumeric. They may contain variable or fixed length text records for validation of data entered from any source. If fixed length is used, then all records in the file must be of equal length. The maximum file size is 65000 bytes.
The number of records is user-defined, based on the amount of storage allocated for these files. Files may be sorted or unsorted. The records are separated by RS.
After download, all RS characters are converted to NULL characters (which have an ASCII value of 0).
File 8, an alphanumeric file, contains message records, which are written to the display under control of ETS and the key commands :0 or :E. Both :0 and :E may be used to display messages in File 8, but only :E may be used to display the full range of messages (0000-9999) in addition to a row and column specification.
File 8 has a maximum width of 44 characters and contains between 99 and 9999 records. The first four characters define the record number.
Data transparency is handled by leading ESC characters, which then
allows embedded RS, ESC, and other special characters in the message.
To embed special characters in File 8, use the escape sequences
given in Table 8.
Table 8. Escape Sequences for Embedding Special Characters in File 8
Decimal Value | ASCII Character | Escape Sequence |
---|---|---|
00 | NUL | ESC-ESC-ESC-ESC-000 |
01 | SOH | ESC-SOH |
02 | STX | ESC-STX-ESC |
03 | ETX | ESC-ETX |
21 | NAK | ESC-NAK |
27 | ESC | ESC-ESC-ESC-ESC |
30 | RS | ESC-ESC-RS |
Note: NUL = Null character SOH = Start of header All other ASCII characters are defined in Table 1. These characters do not require ESC characters. |
Records 0-9999 are used by the DCTs. The records in the file are in sequence but are not necessarily contiguous. (Records are sorted in ascending order by record number; however, it is not necessary that all numbers be there. The first 10 must always be there.)
If configured in File 0 record 00 bytes 124-128 to have an idle menu as well as an idle prompt, the n-1 records (n is the number of lines on the DCT display) that make up the idle menu are within 9000-9019 of File 8. The last line on the display is the idle prompt found in message 0 in File 8.
All messages sent to the DCTs will be transmitted as variable length records terminated with a record separator (RS).
The total number of records is user-defined; however, the first ten records (0-9) are reserved for system messages. An RS must end each record, even if the text of the message is exactly 40 bytes or less.
The following system messages should be downloaded by the user:
Note: | See Table 9 for message contents. |
Table 9 specifies
the use of the previously listed messages for the records within
File 8.
Table 9. File 8 Record Descriptions
File 8 Record Number | Message Description |
---|---|
0000 | Idle menu prompt |
0001 | Operator timeout (Timer C) message |
0002 | Invalid length on barcode or badge message |
0004 | Invalid operation message |
0005 | Fast clocking idle loop message |
0006 | Waiting for terminal server (interactive mode) message |
0007 | Host down, buffering data (interactive mode) message |
0008 | Good read message (after the transaction completes when DCT is in buffered mode) |
0009 | Link message |
0010-8999 | User messages |
9000-9999 | Reserved for system messages
|
9000-9999 (continued) |
|
File 9 is the transaction queue file. It is used by ETS to store buffered transaction records. These records are sent in a FIFO sequence by the terminal when the host is able to accept and release them.
All transaction records begin with a three-byte header. The first byte contains the type of transaction, and the next two bytes contain the function (transaction) ID (in ASCII hex). The maximum size of a transaction record is 129 bytes, which includes the framing characters STX, CS1, CS2, and ETX.
Valid values for byte 1 are:
Bytes 2 and 3 bytes represent the function or transaction ID as an ASCII hex string if byte 1 is I, B, E, F, T, or U.
The transaction data follows the ID as it was entered, in most cases. The timestamp follows the data. A sequence number can follow the timestamp. The last entry of each transaction record is always RS (record separator).
The transaction (also known as "function") IDs
in hex (with corresponding record numbers in File 0,
in decimal format) are given in Table 10.
Table 10. Transaction ID Cross-Reference
Transaction ID (Hex) | File 0 Record Numbers (Decimal) | Description |
---|---|---|
01-1A | 01-26 | Terminal keys A-Z. |
1B-1C | 27-28 | Next two keys in keyboard matrix after Z. |
1D | 29 | Incoming data on sensors, fast clocking not active = badge-initiated transaction with no fast clocking. |
1E | 30 | Incoming data on sensors, fast clocking active = badge-initiated transaction with fast clocking. |
1F-2A | 31-42 | PF keys 1-12. |
2B-36 | 43-54 | Shift PF keys 1-12. |
37 | 55 | Incoming data GP port 1. |
38 | 56 | Unassigned. |
39-40 | 57-64 | DI ports 0-7 programs |
41-48 | 65-72 | Unassigned. |
49-70 | 73-112 | Touch screen regions 1-40 program locations. |
71-78 | 113-120 | Unassigned. Extra keys. |
79 | 121 | New hour on the TOD clock. |
FC | 252 (Not in File 0) |
Transaction created as result of the configured error logging requested
in File 0, record 00, byte 7.
Error message follows.
|
FD | 253 (Not in File 0) |
Transaction created by terminal server CMD D (initiate
data collection from terminal server).
|
FE | 254 (Not in File 0) | Transaction created by interfacing error on the DCT. Error information follows. |
FF | 255 (Not in File 0) | Transaction created by device error on the DCT. Error information follows. |
ZZ | Not applicable | ETS initialization detected a device failed its POST. Error information follows. |
Custom Function Routines (CFRs) are loaded into file c, and flexible calling and return sequences are defined. For more information on CFRs, (SeeIntroduction to C Programming on terminals running 7524 ETS or the DCConnect Client) , (SeeWriting Custom Function Routines) , and (SeeDevice-level CFR Functions) .
File "e" is a downloadable lookup table that provides a cross reference between single character file names and multi-character (extended) file names of validation files. Key definition commands reference validation files (58 total) by the single-character names 2-7, A-Z, and a-z and the files can be local or at the terminal server. Multi-character file names can be up to 12 characters. For compatibility with TS, the lookup table will default to files 2-7 and A-Z cross referenced to single character file names '2' - '7' and 'A' - 'Z', with no entries for files a-z.
The single-character names are used in several transaction program commands as well as in file 0 record 0; the full file name is not used in either of these places. The full file name is used by ETS in validation transactions, in the commands NA, NB, NC and ND, and can be used in calls to the CFR APIs DataFile() and Validation().
Each record in file "e" has the format: x,f,f,f,...f,f,RS where:
This chapter specifies ETS's error reporting capabilities and describes the types of errors that can occur in ETS. Examples of each error type are included.
Under ETS, errors are grouped into four categories:
All errors in the first two categories generate an error transaction record. For further details about errors in the first category, (SeeDevice Errors and System Software Failures) . For further details about errors in the second category, (SeeInterfacing Errors) .
Errors in the third category generate an error transaction record only if configured in the configuration table (File 0 record 00 byte 7). For further details, (SeeApplication Exceptions) .
Errors in the fourth category are reported to the local display only and not to the terminal server. For further details, (SeeLocal Errors) .
The error transaction record provides an error identifier and additional information to enable the user to find out what caused the error.
Notes:
The device errors are:
If a device error occurs during the execution of a transaction program sequence, the following information is recorded:
The error information is routed to the DCT display, using the appropriate message in File 8 (messages 9201-9600) and remains displayed for the time specified for Timer B in File 0 record 00. An error transaction record in the following format is also sent to the terminal server:
Some examples of interfacing errors are:
If there is an interfacing error, the following information is recorded:
The error information is routed to the DCT display, using the appropriate message in File 8 (messages 9801-9900) and remain displayed for the time specified for Timer B in File 0 record 00. An error transaction record in the following format is also sent to the terminal server:
Some examples of application exceptions are:
These are reported to the terminal server only if configured in byte 7 in record 00 of File 0, and always reported on the local display.
The error information is routed to the DCT display, using the appropriate message in File 8 (messages 9601-9800) and remain displayed for the time specified for Timer B in File 0 record 00. An error transaction record in the following format can be sent to the terminal server:
The application exception numbers are as follows:
Some examples of local errors are:
The error information is routed to the DCT display, using the appropriate message in File 8 (messages 9000-9100), and remains displayed for the time specified for Timer B in File 0 record 00.
The following local errors are used:
In most respects, a C language program for ETS is like a program written for a personal computer. The specific interfaces, devices, available storage, and performance requirements are different from a PC, but the concepts and common programming strategies for applications remain the same. When programming specifically for the 7524 terminal, standard C functions that access devices and storage that might be found on a PC are not valid because these do not exist on a 7524 terminal. But if using the DCConnect Client on a DOS platform or Windows platform, you actually do have access to the resources available on the platform, although most of the time you would not access these directly.
A set of C APIs is available when writing C programs for ETS. These are what you would use most of the time to get access to resource such as the keyboard, scanner, RS-232 port, etc. regardless of what terminal is being used.
Other differences between PC programs and ETS application programs exist because of the unique elements of the ETS programming environment, including:
The tools supported/required for building C programs for use with ETS vary depending on the type of terminal being used:
For the 7524 terminal, the following programs are required on the development personal computer:
http://www.ibm.com/software/data/dcconnect
Follow the link to "Product Downloads" and then "7524 ETS Flash Loads and CFR Samples, Programming Tools".
For terminals running the DCConnect Client, whether DOS or Windows based, there are more options for compilers (IBM, Borland, Microsoft) and different header files and library files for each. To get the latest information concerning which compilers to use and how to set them up, please see the DCConnect User's Guide. To get the latest header files and libraries as well as sample code, please see our website:
http://www.ibm.com/software/data/dcconnect
Follow the link to "Product Downloads" and then "DCConnect Client".
The following special procedures or requirements must be followed for 7524 terminals:
Note: These programs then will not run on a personal computer.
Terminals running the DCConnect Client have varying kinds of power management. Many support a suspend mode which leave the DCConnect Client running with all of its memory battery backed up. When the terminal resumes, the Client picks up right where it was at the time the terminal was suspended.
However, some terminals that are supported by the DCConnect Client do not have any kind of suspend mode. If these are turned off, the Client is immediately aborted and any data in memory is lost. Transactions are written to disk - in non-volatile storage if it is available. So these should survive the power off/on but only if the disk storage is non-volatile.
For those applications which are written in C/2, a 7524 specific, custom CRT0 module is provided. This is the C run-time initialization module which sets up the environment to be consistent with the compiler's code generation assumptions. Under PC-DOS, it provides the standard file streams, access to command line parameters, access to environment variables, and sets up the various segments and registers according to the selected memory model. Most of these services are not available on the 7524, therefore the custom CRT0 module must be substituted for the standard one normally in the C library. The main function of the custom CRT0 module is to establish the segment and register conventions based on the selected memory model. You must be sure to link-in the version of the custom CRT0 module which matches the memory model of the application. For CFRs, the CRT0 routine is imbedded in the CFRAPI24.LIB library, and is not explicitly linked.
Because the current language compilers support mixed memory models, the CFR API library uses a large model interface. For applications written in C/2, it is essential to include the subsystem header files for the API's used in the program. These header files contain function prototypes for each API in the subsystem. These prototypes will cause the compiler to generate the correct calling sequence regardless of the memory model used by the application. The header files also contain definitions of manifest constants and structures used with the API's. The defined constants should be used exclusively to avoid conflicts with possible future changes to an API. The CFRAPI24.H file contains API subsystem function and structure declarations as well as parameter definitions.
The 7524 / DCCOnnect Client program environment is different from PC-DOS, and thus not all the IBM C/2 library functions can be supported on the 7524. In general, all functions that are hardware- or operating system-dependent cannot be used by the 7524 application programs. The following is a list of categories of such C library functions.
Directory Control | Examples are (chdir, mkdir, rmdir). The 7524 does not support a file system. |
File Handling | Examples are (remove, rename). The 7524 does not support a file system. |
Standard I/O | Examples are (getc, putc, gets, puts). The 7524 does not support DOS INT 21 functions. The API keyboard and video function calls support these features on the 7524. |
Math (floating point) | Examples are (_clear87, _control87). The 7524 does not support a math co-processor. The alternate math library is supported. |
Allocation Storage | Examples are (alloc, free, halloc). These calls are operating system dependent. The 7524 does not support these calls. |
Process Control | Examples are (abort, exit, signal). The 7524 does not directly support multi-processing. |
Time | Examples are (asctime, ctime, time). The API Real Time Clock function calls support these features in the 7524. |
Printf | The printf, sprintf, scanf, etc. family of library routines should not be used because they pull in much program material which is specific to personal computers. |
Note: |
The DCConnect Client, which runs on DOS and Windows platforms, could probably
use some of the restricted functions mentioned above, but only in rare
circumstances such as writing a file to disk. However,
when possible, the CFR APIs should be used to get access to resources such
as the keyboard, display, clock, RS-232 port, ... The APIs interact with
ETS which will itself be accessing the keyboard, display, clock, RS-232 port, ...
In order to properly cooridinate the use of these resource, the CFR APIs should
be used.
Also be aware that any function called runs on the stack of the CFR. So calling a function such as sprintf() which uses a bit of stack space, be sure the CFR stack has been made sufficiently large enough. |
Custom Function routines (CFRs) can be used to enhance the functionality of Extended Terminal Services. In most cases, if ETS does not include some flexibility your application requires, it is easier to add-on to ETS with a CFR rather than write a complete terminal application program from the ground up. Simply adding on to ETS with a CFR lets you maintain use of the extensive efforts which have been invested in making it a robust, general, and error-resistant product, as well as maintaining compatibility with the Data Collection Connection program product.
The CFR is created as a single executable (.EXE) program (or in the case of Windows platforms running the DCConnect Client it is a .DLL). If the CFR must handle special work for many different, unrelated functions, then these functions must be merged into a single executable file. This leads most naturally to a program structure in which the first step is to do a flow-of-control "switch" based on the function (and then perhaps a sub-function switch) desired in the particular invocation of the CFR. You cannot load more than one CFR to a terminal at one time. Of course, your executable program may be made up of many source modules compiled or assembled into object files, and then linked together.
Note: | The total size of a downloaded CFR (including code segments, 32 byte header, and stack space) cannot be larger than 64 Kb. |
Sample CFRs for 7524 ETS as well as the DCConnect Client are available from our website:
http://www.ibm.com/software/data/dcconnect
Follow the link to "Product Downloads" and then "7524 ETS Flash Loads and CFR Samples, Programming Tools" or "DCConnect Client".
You should consider keeping the CFRs as general as possible, and do as much of your programming as possible within the commands of the transaction program. This allows changes or enhancements to the operation of the terminal to be done via the parameter-driven programming of Data Collection Connection (or other terminal server software) as possible, requiring less skill and time to complete.
A mode 1 CFR is called with 2 arguments supplied by the caller to the CFR code (these arguments are passed much like command line arguments in a personal computer program). The first argument is a single-digit integer function number, with value between 0 and 9. The second argument is a variable length parameters string of up to 101 characters.
The function number has 2 reserved values:
The parameter string may be used to transfer up to 99 characters of string data to the CFR. The meaning of the data is dependent on the code in the CFR. Uses for this string may include encoding of sub-function numbers, passing of input and output user variable numbers, and passing of program flags. The first 2 characters represent a number from 00 to 99, which should be set to the number of characters remaining in the string (the DCConnect transaction program editor automatically counts the number of characters in the parameter string for the CCFR command and prefixes the string with this number). If there are no additional parameters, then the first 2 characters of the string must be set to "00". The CFR code which processes the parameter string should look at the first 2 characters to obtain the string length (offsets 0 and 1), and characters 3 and on for the rest of the data (offset 2 and on).
DataFile | Returns a pointer to a named validation file, and returns the file size. |
IdleManager | Provided for compatibility with CFRs originally developed for 7526 and 7527 DCTs. |
MaxMemory | Returns the maximum memory available in the terminal. |
PntrFile0 | Returns a pointer to ETS file 0. |
ReadUserVariable | Returns a pointer to the contents of a user variable. |
TransactionMsg | Turns the "Good Transaction" message on/off. |
Validation | Validation with local or remote files. |
WaitEvent | Places the terminal's processors in a low-power state while waiting for input from the operator or for commands from the host. Allows obtaining maximum operating time with battery-powered hand held terminals. |
WriteToTrans | Appends data to a transaction. |
WriteUserVariable | Appends data to a user variable. |
For detail on these API calls, (SeeApplication-level CFR APIs) .
The transaction record is initialized at the beginning of execution of a transaction program, and the transaction record is transmitted at the end of the transaction program. CFRs operating in Mode 1 can add directly to the current transaction by using the CFR API call "WriteToTrans", or it may pass its results back in an appropriate user variable, from which the transaction program may copy it to the transaction record.
The transaction can be sent to the host by the transaction program after the CFR returns, or it can be sent directly by the CFR using the CFR API "SendTransaction".
The transaction buffer can be cleared from the CFR using the API call "ClearUserVariable" with the parameter TRANS_BUFFER.
This example of a Mode 1 CFR does the following:
When a "Y" is hit on the keyboard, the CFR API call "ReadUserVariable" is then used to get user variable 1 for validation, and the CFR API call "Validation" is used to perform the validation. The validation file and the type of validation are supplied in the parameter list. If validation passes, the data is written to the current transaction using the CFR API call "WriteToTrans" and the "good" beeps are sounded using the microcode API call "SpkBeep". If validation fails, the data is written to user variable 15 (for later use by some other function) using the CFR API call "WriteUserVariable" and the "bad" beeps are sounded. The results of the validation are returned by returning whether to skip (SKIP) or not (NO_SKIP) to the calling transaction program process.
When an "N" is hit on the keyboard the "NO_SKIP" return code is returned to the calling transaction program process.
Figure 2. A sample CFR Mode 1 program
//************************** // Sample CFR Mode 1 Program //************************** #include "cfrapi24.h" // ETS CFR defines and function prototypes #include <string.h> #include <stdlib.h> // Function prototypes int main(int, char far *); int ValidateInput(char far *); //**************************************************************************** int far cdecl main(int Function, char * parameters) // Function - Function number being called // parameters - String of parameters if required for function { int skipflag; unsigned short count; switch (Function) { case 0: // Function 0 is called when terminal goes into service InitializeCFR(); return; case 2: // Function 2 is called to notify CFR of a power-fail restart of // the terminal. The CFR should reestablish any volatile BIOS or // terminal settings at this time. return; case 3: // Function to validate data in user variable 1 skipflag = ValidateInput(parameters); // Return to ETS whether or not to skip next command return(skipflag); default: // API to display a string on screen VioWrtCharStr("Error invalid function number",29,1,1,&count,CURSOR_MOVE); // Tell ETS there was an error and to abort transaction return(ABORT); } } // main //**************************************************************************** InitializeCFR() { // Any initialization needed would be performed here } // InitializeCFR //**************************************************************************** int ValidateInput(char far * ValidationParameters) { int i; int skip; // Skip flag to return int ParmListLength; int NumberBadBeeps; int NumberGoodBeeps; char ValidationType; char Input[128]; // Buffer for input to validate char * File0; // Pointer for pointer to file 0 char * ValFilename; char * ParmListLengthStr; unsigned short count; unsigned short key; // ETS API function to get pointer to file 0 record 0 File0 = PntrFile0(); // Index into file 0 record 0 to get Number of Good Beeps Parameter NumberGoodBeeps = File0[8] - '0'; // Convert ASCII character to integer // Index into file 0 record 0 to get Number of Bad Beeps Parameter NumberBadBeeps = File0[10] - '0'; // Convert ASCII character to integer // API to display string on the screen VioWrtCharStr("Validate data? Y/N ",20,1,1,&count,CURSOR_MOVE); for(;;) { // API call to wait for a key to be hit while(KbdReadAscii(&key) == E_NO_DATA) { // API to put terminal to sleep until an input event // occurs. Must check if it was a keystroke because // an input event could also be a command coming in // from the host or a bar code scan. WaitEvent(0L); } if (key == 'Y' »» key == 'N') break; } if (key == 'Y') { // If validation desired // ETS API to read data to be validated from User variable 1 ReadUserVariable(1,Input); // Parse parameter list length from ValidationParameters strncpy(ParmListLengthStr, ValidationParameters, 2); ParmListLengthStr[2] = '\0'; // Convert parameter list length string to an integer ParmListLength = atoi(ParmListLengthStr); // Parse validation filename from ValidationParameters strncpy(ValFilename, ValidationParameters+2, ParmListLength-1); ValFilename[ParmListLength-1] = '\0'; // Parse validation type from ValidationParameters ValidationType = ValidationParameters[ParmListLength+1]; // ETS API to validate skip = Validation(ValFilename,ValidationType,Input); if (!skip) { // If validation passed // ETS API to write input to transaction buffer and put a // message to the screen WriteToTrans(Input); VioWrtCharStr(" ",40,0,0,&count,0); VioWrtCharStr("Validation passed",17,0,5,&count,0); // Perform Good beeps for (i=0 ; i < NumberGoodBeeps ; ++i) { SpkBeep(FREQ_700, DEFAULT_VOLUME,2); } } else { // If validation failed // ETS API to write data to user variable 15 for later use // and put a message to the screen WriteUserVariable(15,Input); VioWrtCharStr(" ",40,0,0,&count,0); VioWrtCharStr("Validation failed",17,0,5,&count,0); // Perform Bad beeps for (i=0 ; i < NumberBadBeeps ; ++i) { SpkBeep(FREQ_700, DEFAULT_VOLUME,2); } } // Return skip flag to tell ETS to skip next command return(skip); } else { // Return skip flag to tell ETS not to skip next command return(NO_SKIP); } } // ValidateInput //****************************** // End Sample CFR Mode 1 Program //****************************** |
A mode 2 CFR is called with only the single-digit integer function number, being used. The function number has 2 reserved values:
The parameter string is not used with a mode 2 CFR.
When a mode 2 CFR starts up, ETS is generally out of service since the 'in service' command from the terminal server arrives after the start of the CFR command. Often the CFR must wait for ETS to go in service in order to proceed (to do a CallKeyDef, for instance). ETS can only go in service if the mode 2 CFR allows the incoming command to be processed. The CFR can do this by the following:
while(IdleManager( 250 ) == TERMINAL_OFFLINE);where 250 is 250 milliseconds. (OFFLINE is the old term used for 'out of service' that is still used in the .H file for backwards compatability).
CallKeyDef | Transfers control to ETS, which then runs the desired transaction program. At the end of the transaction program, control returns to the CFR. The transaction program can do a CFR call as part of its procedure. A mode 2 CFR can execute a transaction program with the CallKeyDef API. This transaction program may call the mode 2 CFR provided the CFR takes all the precautions necessary to avoid reentrancy problems and not attempt to call CallKeyDef again. If the CFR does attempt to call CallKeyDef again, the API will return the TRANS_IN_PROGRESS return code without executing the transaction program. |
DataFile | Returns a pointer to a named validation file, and returns the file size. |
IdleManager | Provided for compatibility with CFRs originally developed for 7526 and 7527 DCTs. |
MaxMemory | Returns the maximum memory available in the terminal. |
PntrFile0 | Returns a pointer to ETS file 0. |
ReadUserVariable | Returns a pointer to the contents of a user variable. |
ResizeFile | Clears and resizes a named validation file. |
TransactionMsg | Turns the "Good Transaction" message on/off. |
Validation | Validation with local or remote files. |
WaitEvent | Places the terminal's processors in a low-power state while waiting for input from the operator or for commands from the host. Allows obtaining maximum operating time with battery-powered hand held terminals. |
WriteUserVariable | Appends data to a user variable. |
For detail on these API calls, (SeeApplication-level CFR APIs) .
In a mode 2 CFR, the API call "WriteToTrans" can be used to append to the transaction buffer and the API call "SendTransaction" can be used to send the transaction to the terminal server.
The API call ClearUserVariable() can be used to clear the transaction buffer if TRANS_BUFFER is specified as the parameter for this call.
The transaction record and all non-global user variables (1-9) are initialized at the beginning of execution of a transaction program, and the transaction is transmitted at the end of the transaction program - unless automatic-transaction appending has been turned off using the AUTO (:A) command.
This example of a Mode 2 CFR does the following:
If a key is hit and it's a '1' then transaction program 2 is executed to do some CFR functions. If key '2' is hit then a function called "Unique_CFR_Function" is executed. In this case this function merely prints out a message to show that it has been called, then calls a time delay function ("WaitAWhile"), forces a redisplay of the prompt by setting "prompt_displayed" to 'N', and returns.
Figure 3. A sample CFR Mode 2 program
//************************** // Sample CFR Mode 2 Program //************************** #include "cfrapi24.h" // ETS CFR define (CallKeyDef) char prompt_displayed; // Function prototypes int main(int, char far *); void Unique_CFR_Func(void); void WaitAWhile(unsigned short); //************************************************************************* int main (int Function, char far * parameters) // Function - Function number being called // parameters - String of parameters if required for function { unsigned short key; unsigned short count; prompt_displayed = 'N'; // set flag to say prompt needs to be displayed for (;; ) { if (Function == 0) { // Function 0 always called when terminal is put into service. Since // this is a mode 2 CFR, no return is made to the calling ETS program. // If prompt message has not been displayed, display it now. if (prompt_displayed == 'N') { VioClear(); VioWrtCharStr("Execute option 1 or 2? ",23,1,1,&count,CURSOR_MOVE); prompt_displayed == 'Y'; } // API call to wait for a key to be hit while (KbdReadAscii(&key) != E_OK) { // ETS API call to execute transaction program defined for key 1 (F8). // In this case, transaction program 1 has been assumed to be // programmed with just a NO-OP. while (CallKeyDef(8) == TERMINAL_OFFLINE) { VioWrtCharStr("Terminal is out of service",26,1,1,&count,CURSOR_MOVE); } } switch (key) { case '1' : // Use ETS transaction program 2 to do something CallKeyDef(2); // Force clear and redisplay of prompt prompt_displayed = 'N'; break; case '2' : // Special code to do something Unique_CFR_Func(); break; default: break; } } else if (Function == 1) { // Function 1 is the reentry point after a transaction program has aborted // API calls to clear, display abort message and sound beeper VioClear(); VioWrtCharStr("Function aborted!!!",19,1,1,&count,CURSOR_MOVE); SpkBeep(FREQ_700, DEFAULT_VOLUME,2); // Wait 2 seconds WaitAWhile(2); // Set flag to resume normal processing Function = 0; // Force clear and redisplay of prompt prompt_displayed = 'N'; } else if (Function == 2) { // Function 2 is the reentry point after a power-fail restart of the // terminal. The CFR should reestablish any volatile terminal or // settings here. return; } else { // If Function parameter illegal return to calling ETS, returned code // irrelevant. return(0); } } } // main //************************************************************************* void Unique_CFR_Func () { unsigned short count; // This can be any function which // can not be done using the normal ETS command processing. // API calls clear display and display dummy message VioClear(); VioWrtCharStr("Doing Unique CFR Function",25,1,1,&count,CURSOR_MOVE); // Set flag to cause redisplay of prompt prompt_displayed = 'N'; // Dummy pause to display message WaitAWhile(2); } // Unique_CFR_Funct //************************************************************************* void WaitAWhile(unsigned short secs) { WaitEvent( (ULONG)secs * 1000L ); } // WaitAWhile //****************************** // End Sample CFR Mode 2 Program //****************************** |
Some recovery problems that occur after a power failure can be traced to the use of statically-initialized global variables. C language statically-initialized global variables are NOT re-initialized when the terminal is re-started after a power failure.
For example:
USHORT InLoop = FALSE; main() { if (!InLoop) { InLoop = TRUE; (do something) InLoop = FALSE; } {
In this example, if the power fails in the middle of "do something", that code will never be executed again. The problem could be avoided by dynamically initializing InLoop at the top of main.
Note: This problem does not apply to local variables. Local variables are allocated from the stack and re-initialized each time into the procedure.
NO_SKIP (0) = do not skip the next command
SKIP (1) = skip the next command
ABORT (2) = to abort the transaction
The terminal has advanced power management capabilities which require cooperation from your programs in order to be most effective. Whenever the terminal is waiting for input (e.g. keystrokes, bar code scan, host response, etc.), most of its processing is put in a "sleep" mode -- suspended to keep power use by the microprocessors and memory devices to a minimum. An auxiliary processor monitors the input devices of the terminal and "wakes" the other processors when an input event occurs. However, to know when it can "sleep", your program needs to inform the system that it is now awaiting input. This is done by calling the WaitEvent function (SeeWaitEvent) whenever your program is waiting for input.
Note: | The discussion above applies specifically to 7524 terminals which are tightly integrated into the 7524 ETS flash with regard to power management functions. Terminals running the DCConnect Client, are not tied as tightly to the hardware and thus aren't able to tell processors to shut down when the terminal is idle or waiting for something. Nonetheless, the techniques described above should still be used when writing your CFR to minimize the amount of processor time is spent in the CFR. |
Some CFRs originally developed for the 7526 or the 7527 will be usable with ETS only if the CFR header file(s) included are replaced with the inclusion of CFRAPI24.H and the CFR is then recompiled. In addition, the resulting object module(s) must be relinked with CFRAPI24.LIB instead of any other CFR library. This will be true if:
In general, you must modify the source code to include CFRAPI24.H instead of the header files used for 7526 and 7527 ETS and re-compile the code. This will provide a thorough check of which functions were used in the source. The compiler will provide warning reports of any 7526/7527 functions which were used but which are not supported in the CFRAPI24.H.
The remainder of this discussion applies to building CFRs for 7524 terminals specifically. For terminals running any version of the DCConnect Client, please see the DCConnect Client documentation for information about how to compile and link CFRs.
CFRs build for 7524 terminals and for DOS versions of the DCConnect Client are interchangeable provided none of the restricted C library functions are used in the CFR.
The CFR writer need only write a function with a "main(function,*paramlist)" entry point, compile with the appropriate "include" files, and link with the CFRAPI24.LIB library provided (and any other libraries required) to create a CFR program file. Compiling and linking a mode 1 or mode 2 CFR is accomplished in the same manner.
The CFR application program interface library, CFRAPI24.LIB, contains:
IBM C/2 Version 1.10 or later
or
Borland Turbo C++ 3.0 for DOS (not 4.5 for Windows)
cl -c -nologo -Fl -ALw -FPa -Zpe -Ox -W3 -G1s -I[path]cfr.h mycfr.c
-c | suppress automatic linking |
-nologo | suppress logo and copyright in output stream |
-Fl | create object file |
-ALw | large model, separate stack segment, does not load DS at each module entry point. |
-FPa | Use alternate math library (can't use emulated or 8087 math library) |
-Zpe | pack structures, enables C language extensions |
-W3 | Use warning level 3 for warning/error messages |
-Ox | maximum optimization |
-G1s | 186 instruction set, no stack checking (to make compatible with more levels) |
-I[path]cfrapi24.h | location of include file, path optional |
mycfr.c | CFR source file |
Note: | You must be sure that CFRAPI24.H is in the path specified in the SET INCLUDE statement for your C compiler. |
link mycfr+...,mycfr.exe,mycfr.map,cfrapi24.lib llibcar.lib /DO /NOD /NOI;
mycfr+.... | list of object modules |
mycfr.exe | output executable file name |
mycfr.map | output map file name |
cfrapi24.lib | CFR API library, required - supplies CFRCRT0.OBJ as a minimum, plus modules for CFR APIs. Be sure to use the IBM C/2 version of this library. |
llibcar.lib | Large model, combined, alternate math library for real mode of the microprocessor (do not use protect mode libraries). |
/NOI | don't ignore upper and lower case |
/DO | arrange segments in DOS fashion |
/NOD | no default library usage; link only with libraries specified on link command line |
Note: You should link with a REAL MODE "C" library, not with a PROTECTED MODE library. Also you must ensure that you are linking with the IBM C2 version of the CFRAPI24.LIB file (it's in the \CFR\IBMC2 directory of the CD/package) and that it is in the current directory or in the path specified in the SET LIB= statement of your environment. It is also important to compile and link specifying the alternate math library instead of the emulation or 8087 math libararies.
tcc -c -ml mycfr.c
-c | suppress automatic linking |
-ml | Compile using large memory model |
mycfr.c | CFR source file |
tlink mycfr1 mycfr2, mycfr.exe, mycfr.map, cfrapi24.lib cl.lib
mycfr1 mycfr2 | list of object modules |
mycfr.exe | output executable file name |
mycfr.map | output map file name |
cfrapi24.lib | Client CFR API library, required - supplies CFR start up code as a minimum, plus modules for CFR APIs to interface with Client Be sure to use the Borland version of this library. |
cl.lib | Large model standard real mode library |
Note: Be sure to link with the Borland Turbo C++ version of the CFRAPI24.LIB library (it's in the \CFR\BORLAND directory of the CD/package). Also be sure it is the first library in the link list to ensure that the correct CFR linkage and parameter passing routines are executed during CFR calls.
This chapter contains reference material for making C calls to the Device-level CFR functions. The following CFR functions are covered:
KbdReadAscii | Returns the next make code in ASCII form |
KbdHandleArrowKeys | Used to disable/enable the terminal's handling of arrow keys for scrolling |
RtcGetAsciiDate | Returns the date in ASCII format |
RtcGetAsciiTime | Returns the time in ASCII format |
RtcGetDate | Returns the binary value of the date |
RtcGetTime | Returns the binary value of the time |
SenActLed | Lights the sensor port LED's for a predetermined time |
SenPower | Turns power to the sensor port (scanner) on or off. |
SenQueryData | Returns the number of sensor data records available |
SenRead | Returns the next sensor data record available |
SpkBeep | Sounds the speaker |
SpkQuery | Returns the on/off state of the speaker |
VioClear | Clears the video display |
VioGetCurPos | Returns the current row and column position |
VioQuery | Returns the current VIO configuration information |
VioReadCell | Returns the character/attribute pair from the display |
VioReadCellStr | Reads a character/attribute pair string from the display |
VioReadChar | Reads a character from the display |
VioReadCharStr | Reads a character string from the display |
VioSetCurPos | Sets the cursor at the indicated row and column |
VioSetCurType | Sets the current cursor type |
VioWrtCellStr | Writes a string of character/attribute pairs to the display |
VioWrtCharStr | Writes a character string to the display |
VioWrtCharStrAtt | Writes a character string with a common attribute to the display |
VioWrtNCell | Writes a character/attribute pair a specified number of times to the display |
VioWrtNChar | Writes character a specified number of times to the display |
HitWatchdog | Provided for compatibility with 7527 |
ComGetParms | Returns the communication parameters for the indicated port |
ComGetProtocol | Returns the values of the protocol options |
ComQuery | Returns the communications subsystem POST status |
ComQueryData | Returns the number of data items available for a given port |
ComRead | Reads a block of data from the specified port |
ComSetMdmCtl | Sets the DTR and RTS modem control lines on the EIS-232 port |
ComSetParms | Set the communication parameters for the selected port |
ComWrite | Sends data to the communication driver of the specified port |
TimerSetAlarm | Sets alarm to trigger at selected times throughout the day to call a transaction program or CFR. |
TimerClearAlarm | Clears all alarms set by the TimerSetAlarm function. |
TimerSetInterval | Sets one or more alarms to trigger at a user-specified interval in order to call a transaction program or CFR. |
TimerClearAlarm | Clears all interval alarms set by the TimerSetInterval function. |
This function returns the next make code in the buffer in ASCII form. All break codes and Shift keys are skipped.
#include "cfrapi24.h" // For defined values USHORT KbdReadAscii(code) USHORT FAR *code // Returned code Returns: E_OK // If no error occurred E_NO_DATA // If no valid code in buffer
If a key has an extended ASCII value, the low byte contains 00 and the high byte contains the extended ASCII value.
Refer to the cfrapi24.h file for key code defines.
This function can be used to enable or disable the terminal's handling of arrow keys to scroll the screen. By default the terminal handles these arrow keys. When the arrow keys are handled, they are never seen by the KbdReadAscii API call. If you want KbdReadAscii to see the arrow keys, then use KbdHandleArrowKeys to disable ETS's handling of these keys.
The constants used for the arrow keys, which are defined in CFRAPI24.H are:
#include "cfrapi24.h" // For defined values USHORT KbdHandleArrowKeys(flag) UCHAR flag // Flag to enable/disable Returns: E_OK // If no error occurred E_PARAM // If invalid parameter is provided
The parameter 'flag' can take one of the following two constants, which are defined in CFRAPI24.H:
This function returns the date in ASCII format. The returned string is not null-terminated. The data buffer should be large enough to take the largest format.
#include "cfrapi24.h" // For defined values USHORT RtcGetAsciiDate(format, buffer, default_format) UCHAR format // Format of date UCHAR FAR *buffer // Pointer to date buffer UCHAR FAR *default_format // Pointer to returned // default format. Returns: E_OK // If no error occurred E_PARAM // If format was invalid E_DEVICE // If clock was busy
Defined values for date format are:
00h DEFAULT_DATE | Use the format set in keylock setup mode. |
01h MMDDYY |
|
02h DDMMYY |
|
03h YYMMDD |
|
04h JJJYY |
|
05h YYJJJ |
|
This function returns the time in ASCII format. The returned string is not null-terminated.
#include "cfrapi24.h" // For defined values USHORT RtcGetAsciiTime(format, buffer, default_format) UCHAR format // Format of time UCHAR FAR *buffer // Pointer to time buffer UCHAR FAR *default_format // Pointer to returned // default format. Returns: E_OK // If no error occurred E_PARAM // If format was invalid E_DEVICE // If clock was busy
An am or pm is appended to the end of the time string in 12-hour format.
Defined values for time format are:
00h DEFAULT_TIME | Use the format set in keylock setup mode. |
01h HHMMSS_12 | (Comes back with eight characters, which includes am or pm) |
02h HHMMSS_24 |
|
This function returns the binary value of the year, month, and day in the specified format.
#include "cfrapi24.h" // For defined values USHORT RtcGetDate(format, year, month, day, default_format) UCHAR format // Format of date UCHAR FAR *year // Pointer to returned year UCHAR FAR *month // Pointer to returned month UCHAR FAR *day // Pointer to returned day UCHAR FAR *default_format // Pointer to returned // default format. Returns: E_OK // If no error occurred E_PARAM // If format was invalid E_DEVICE // If clock was busy
Defined values for date format are:
00h DEFAULT_DATE | Use the format set in keylock setup mode. |
01h MMDDYY |
|
02h DDMMYY |
|
03h YYMMDD |
|
04h JJJYY |
|
05h YYJJJ |
|
This function returns the binary value of the hour, minute, and second in the specified format.
#include "cfrapi24.h" // For defined values USHORT RtcGetTime(format, hour, min, sec, am_or_pm default_format) UCHAR format // Time format UCHAR FAR *hour // Pointer to returned hour UCHAR FAR *min // Pointer to returned minute UCHAR FAR *sec // Pointer to returned seconds UCHAR FAR *am_or_pm // Pointer to returned AM or PM UCHAR FAR *default_format // Pointer to returned format Returns: E_OK // If no error occurred E_PARAM // If format was invalid E_DEVICE // If clock was busy
Defined values for the time format are:
00h DEFAULT_TIME |
|
01h HHMMSS_12 |
|
02h HHMMSS_24 |
|
Defined values for am_or_pm are:
00h AM |
|
01h PM |
|
This function lights the sensor port LEDs for the duration specified.
#include "cfrapi24.h" // For defined values USHORT SenActLed(lednumber, duration) UCHAR lednumber // LED select UCHAR duration // Duration to light LED // 1 = 20 msec Returns: E_OK // If no error occurred E_PARAM // If input parameters invalid
Note: |
The LEDs are simulated on the terminal display using an icon.
The 7524 terminals do not have digital output points on their sensor
port; thus the MAG_PORTx_LEDy uses are not operational.
The LED is lit for the duration times 20 milliseconds
and then extinguished.
If duration is set to 0, the LED is turned on for an indefinite time.
Use a non-zero duration to turn it off again.
LEDs are not supported for terminals that are running the DCConnect Client. |
The defined values for lednumber are:
00h PANEL_LED |
|
01h MAG_PORT1_LED1 |
|
02h MAG_PORT1_LED2 |
|
03h MAG_PORT1_LED3 |
|
04h MAG_PORT2_LED1 |
|
05h MAG_PORT2_LED2 |
|
06h MAG_PORT2_LED3 |
|
This function turns power to the sensor port (scanner) on or off
#include "cfrapi24.h" // For defined values USHORT SenPower(int fTurnPowerOn) USHORT fTurnPowerOn // TRUE - means turn power on // FALSE - means turn power off Returns: E_OK // If no error occurred // (only value returned)
The first time SenPower is called by the CFR, the Client will set a flag telling it to no longer turn on the scanner for all CFR calls. Therefore, the CFR should call SenPower(FALSE) in both case 0 and case 2 of the CFR so that the scanner is turned off before any transaction programs are started.
Even when this API is being used by the CFR, the Client will still turn the scanner off after all API calls - in case the CFR turned it on and forgot to turn it off.
Note: Whether the scanner is actually powered off is dependent on the device on which the DCConnect Client is running. For Windows CE devices, the CFR .DLL, ETSHW.DLL, controls whether or not the scanner is actually turned off.
In some cases, the scanner may be left on but its input might be ignored. For example, the ETSHW.DLL for the Intermec 7xx running Windows Mobile 2003 simply disables the Wedge input. The scanner is left on, but a different beep is given by the scanner if someone attempts to scan while the Wedge input is disabled.
This function returns the number of sensor data records available.
#include "cfrapi24.h" // For defined values USHORT SenQueryData(numrecords) USHORT *numrecords // Pointer to returned number // of data records Returns: E_OK // If no error occurred // (only value returned)
This function returns the next sensor data record available.
#include "cfrapi24.h" // For defined values USHORT SenRead(answerbuffer, maxlist) UCHAR *answerbuffer // Pointer to returned next // sensor data record. USHORT maxlist // Size of answerbuffer Returns: E_OK // If no error occurred E_NO_DATA // If no data records available
The answerbuffer record format is:
First byte is result bar-code type. For certain terminal models, this value is always set to a blank. Otherwise it is a value from CFRAPI24.H (e.g. I_25_CODE, CODE_39, EAN_8, ...).
Second byte is port number. This is always 0.
Third byte is number of data bytes following.
Remainder of buffer is ASCII data from sensor.
See "cfrapi24.h" file for supported bar-code types.
Note: There is no default buffer size for this function. Whatever buffer is provided by the user is used. You can determine if the buffer is too small by checking the third byte of the returned data, which specifies how many data bytes follow. If that is longer than the size of the buffer provided, the data will be truncated to the size of the buffer. Sensor data can never be longer than 100 characters, plus the three prefix characters returned in the buffer. This means that the buffer never needs to be longer than 103 bytes.
This function sounds the transducer.
#include "cfrapi24.h" // For defined values USHORT SpkBeep(frequency, volume, duration) UCHAR frequency // Transducer frequency UCHAR volume // Transducer volume USHORT duration // Transducer duration in // increments of 0.1 Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_DEVICE // If transducer is busy
Defined values for frequency are:
00h FREQ_700 |
|
01h FREQ_2000 |
|
Defined values for volume are:
00h DEFAULT_VOLUME | Uses value from setup keylock mode |
01h VOLUME_OFF |
|
02h VOLUME_LOW |
|
03h VOLUME_HIGH |
|
Note: | On some terminal types, the frequency and/or volume are ignored; in these cases the beep is always the same tone, duration and volume regardless of what parameters are passed. |
This function returns the transducer status (on or off) and the POST completion code for the transducer.
#include "cfrapi24.h" // For defined values USHORT SpkQuery(status, post) UCHAR FAR *status // Pointer to transducer status USHORT FAR *post // Pointer to POST completion code Returns: E_OK // If no error occurred // (only value returned)
This function clears the video display and sets the cursor position to the upper left-hand corner of the display.
#include "cfrapi24.h" // For defined values USHORT VioClear() Returns: E_OK // If no error occurred // (only value returned)
This function returns the current row and column position of the cursor.
#include "cfrapi24.h" // For defined values USHORT VioGetCurPos(Row, Col) UCHAR *Row // Pointer to returned row UCHAR *Col // Pointer to returned column Returns: E_OK // If no error occurred // (only value returned)
The upper left corner of the screen is represented by row-column coordinates of 0,0.
This function returns the number of rows and columns and the current display configuration, cursor type, video mode, character set, touch screen state, and POST completion information.
#include "cfrapi24.h" // For defined values USHORT VioQuery(Row, Col, CurType, Mode, CharSet, Touch, Post) UCHAR *Row // Pointer to number of rows UCHAR *Col // Pointer to number of columns UCHAR *CurType // Pointer to cursor type UCHAR *Mode // Pointer to video mode UCHAR *CharSet // Pointer to character set UCHAR *Touch // Pointer to touch screen state USHORT *Post // Pointer to POST completion code Returns: E_OK // If no error occurred // (only value returned)
Defined values for CurType are:
00h | CURSOR_OFF |
01h | CURSOR_UNDERBAR |
02h | CURSOR_BLINK_UNDERBAR |
03h | CURSOR_BLOCK |
04h | CURSOR_BLINK_BLOCK |
Defined values for video Mode are given below. ETS always returns the value highlighted.
00h TWO_LINE_DISPLAY |
|
01h GRAPHICS_NORMAL |
|
02h GRAPHICS_REVERSE |
|
Defined values for CharSet are given below. ETS always returns the value highlighted.
00h | STANDARD 20x40 |
01h | STANDARD 14x32 |
02h | DOWNLOAD 20x40 |
03h | DOWNLOAD 14x32 |
Defined values for Touch screen are given below. ETS always returns the value highlighted.
00h | TOUCH_NOT_INSTALLED |
This function returns the character/attribute pair at a specified cursor location.
#include "cfrapi24.h" // For defined values USHORT VioReadCell(Row, Col, Cell, CurMove) UCHAR Row // Row position of cell to read UCHAR Col // Column position of cell to read VIO_CELL *Cell // Pointer to returned cell where // data is returned UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a cell read at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function reads a character/attribute pair string from a specified row and column position.
#include "cfrapi24.h" // For defined values USHORT VioReadCellStr(StrPntr, Length, Row, Col, XfrCnt, CurMove) VIO_CELL *StrPntr // Pointer to cell data area // where data is returned USHORT Length // Length of cell string to read UCHAR Row // Row position of cell string UCHAR Col // Column position of cell string USHORT *XferCnt // Actual length of data UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a cell string read at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function reads a character from a specified row and column position.
#include "cfrapi24.h" // For defined values USHORT VioReadChar(Row, Col, Char, CurMove) UCHAR Row // Row position of character UCHAR Col // Column position of character UCHAR *Char // Pointer to character read UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a character read at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function reads a character string from a specified row and column position.
#include "cfrapi24.h" // For defined values USHORT VioReadCharStr(StrPntr, Length, Row, Col, XfrCnt, CurMove) UCHAR *StrPntr // Pointer to string data area USHORT Length // Length of character string UCHAR Row // Row position of string UCHAR Col // Column position of string USHORT *XfrCnt // Number of characters read UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a character string read at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function sets the current cursor position with the specified row and column positions (zero-based row and column).
#include "cfrapi24.h" // For defined values USHORT VioSetCurPos(Row, Col) UCHAR Row // Row position UCHAR Col // Column position Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid
The upper left corner of the screen is represented by row-column coordinates of 0,0.
This function sets the current cursor type.
#include "cfrapi24.h" // For defined values USHORT VioSetCurType(Type) UCHAR Type // Cursor type Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid
Defined values for Type are:
00h CURSOR_OFF |
|
01h CURSOR_UNDERBAR |
|
03h CURSOR_BLOCK |
|
04h CURSOR_BLINK_BLOCK |
|
This function writes a string of character attribute pairs to a specified cursor position.
#include "cfrapi24.h" // For defined values USHORT VioWrtCellStr(StrPntr, Length, Row, Col, XfrCnt, CurMove) VIO_CELL *StrPntr // Pointer to cell string USHORT Length // Length of string to write UCHAR Row // Row position of string UCHAR Col // Column position of string USHORT *XfrCnt // Pointer to number of cells UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a string written at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function writes a character-only string to a specified cursor position, without attributes. The current attribute for the cell is used.
#include "cfrapi24.h" // For defined values USHORT VioWrtCharStr(StrPntr, Length, Row, Col, XfrCnt, CurMove) UCHAR *StrPntr // Pointer to character string USHORT Length // Length of string to write UCHAR Row // Row position of string UCHAR Col // Column position of string USHORT *XfrCnt // Pointer to number of characters UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a string written at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function writes a character string with a common attribute value at a specified cursor position.
#include "cfrapi24.h" // For defined values USHORT VioWrtCharStrAtt(StrPntr, Length, Row, Col, Attr, XfrCnt, CurMove) UCHAR *StrPntr // Pointer to string USHORT Length // Length of string to write UCHAR Row // Row position of string UCHAR Col // Column position of string UCHAR Attr // Attribute of string USHORT *XfrCnt // Pointer to number of characters UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a string written at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for Attr are:
00h NORMAL_VIDEO | |
01h REVERSE_VIDEO | |
02h UNDERBAR | |
04h BLINK | |
08h ALT_FONT | |
0Fh ATTR_MASK |
Defined values for CurMove are:
00h NO_CURSOR_MOVE | |
01h CURSOR_MOVE |
This function writes a character/attribute pair a specified number of times at a specified cursor position.
#include "cfrapi24.h" // For defined values USHORT VioWrtNCell(Row, Col, Cell, RepCount, XfrCnt, CurMove) UCHAR Row // Row position of attribute UCHAR Col // Column position of attribute VIO_CELL Cell // Cell to be written USHORT RepCount // Number of times to repeat USHORT *XfrCnt // Pointer to number of attributes UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
If the user wants a cell written at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values for CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function writes a character a specified number of times at a specified cursor position.
#include "cfrapi24.h" // For defined values USHORT VioWrtNChar(Row, Col, Char, RepCount, XfrCnt, CurMove) UCHAR Row // Row position of character UCHAR Col // Column position of character UCHAR Cell // Character to be written USHORT RepCount // Number of times to repeat USHORT *XfrCnt // Pointer to number of characters UCHAR CurMove // Cursor movement flag Returns: E_OK // If no error occurred E_PARAM // If parameter values invalid E_END_OF_SCREEN // If attempt to move past // end of screen.
The upper left corner of the screen is represented by row-column coordinates of 0,0.
If the user wants a character written at the current row and/or column position, 0xFF should be sent for the row and/or column position value.
Defined values of CurMove are:
00h NO_CURSOR_MOVE |
|
01h CURSOR_MOVE |
|
This function is provided only for compatibility with 7527 program. It is defined in cfrapi24.h as:
#define HitWatchDog()
so that the compiler will eliminate the call from the program.
This function returns the communication parameters for the RS-232C serial ports.
#include "cfrapi24.h" // For defined values USHORT ComGetParms(PortNum, ParmCom) UCHAR PortNum // Port number UCHAR *ParmCom // Returned comm parameters Returns: E_OK // If no error occurred E_PARAM // If invalid PortNum
Defined values for PortNum are:
00h RS232 |
|
For defined values corresponding to the ParmCom return value, (SeeComSetParms) .
This function returns the values of the following options:
#include "cfrapi24.h" // For defined values USHORT ComGetProtocol(PortNum, ParmTbl) UCHAR PortNum // Port number proto_cfg **ParmTbl // Pointer to pointer with comm // parameter table Returns: E_OK // If no error occurred E_PARAM // If invalid PortNum
The receive data filter table is the only valid table parameter on the network port.
Defined values for PortNum are:
00h RS232 |
|
The proto_cfg structure (declared in "cfrapi24.h") defines the ParmTbl format.
This function returns the POST completion code of the communication subsystem in the output parameter.
#include "cfrapi24.h" // For defined values USHORT ComQuery(PostStatus) UCHAR *PostStatus // Returned subsystem POST status Returns: E_OK // If no error occurred (only // value returned)
This function returns the number of characters available to be read from the serial port.
#include "cfrapi24.h" // For defined values USHORT ComQueryData(PortNum, IoDir, Space) UCHAR PortNum // Port number UCHAR IoDir // Transmit or receive buffer USHORT *Space // Pointer to returned values // Receive Count/Space used // Transmit Count/Space free Returns: E_OK // If no error occurred E_PARAM // If invalid PortNum or IoDir
Defined values for PortNum are:
00h RS232 |
|
Defined values for IoDir are:
00h RECEIVE |
|
01h TRANSMIT |
|
This function reads a block of data from the specified port from the buffer initialized by ComSetBuffer (done by ETS) into the user buffer area. If the transfer count is less than or equal to 0, E_NO_DATA is returned.
#include "cfrapi24.h" // For defined values USHORT ComRead(PortNum, buflen, bufptr, xfercnt) UCHAR PortNum // Port number USHORT buflen // Receive buffer size UCHAR *bufptr // Address of receive buffer USHORT *xfercnt // Returned, number of bytes // transferred Returns: E_OK // If no error occurred E_PARAM // If invalid PortNum E_NO_DATA // If no data currently buffered
Defined values for PortNum are:
00h RS232 |
|
This function sets the data terminal ready (DTR) and ready to send (RTS) modem control lines on the RS-232 port.
#include "cfrapi24.h" // For defined values USHORT ComSetMdmCtl(PortNum, MdmOut) UCHAR PortNum // Port number UCHAR MdmOut // DTR and RTS outputs to modem Returns: E_OK // If no error occurred E_PARAM // If PortNum not equal RS232
Defined values for PortNum are:
00h RS232 |
|
80h MDM_DTR_LOW |
|
02h MDM_RTS_LOW |
|
82h Turn on both lines |
|
00h Turn off both lines |
|
This function sets the communication parameters for the serial port. With this function you can change the baud rate, parity, stop bits and data bits.
#include "cfrapi24.h" // For defined values USHORT ComSetParms(PortNum, ParmCom) UCHAR PortNum // Port number UCHAR ParmCom // Parameter settings Returns: E_OK // If no error occurred E_PARAM // If invalid PortNum
Defined values for PortNum are:
00h | RS232 |
0E0h | MSK_BAUD |
00h | BAUD_110 |
20h | BAUD_150 |
40h | BAUD_300 |
60h | BAUD_1200, |
0A0h | BAUD_4800 |
0C0h | BAUD_9600 |
0E0h | BAUD_19200 |
18h | MSK_PARITY |
00h | PARITY_NONE |
08h | PARITY_ODD |
18h | PARITY_EVEN. |
04h | MSK_STOPBITS |
00h | STOPBITS_1 |
04h | STOPBITS_2 |
03h | MSK_DATABITS |
01h | DATABITS_6 |
02h | DATABITS_7 |
03h | DATABITS_8 |
rc = ComSetParms(RS232, BAUD_9600|PARITY_EVEN|DATABITS_7);
This function sends data to the serial port. If the driver does not have buffer space for all of the data, none is transferred, and E_NO_DATA is returned, and the transfer count is loaded with 0 or an error indicator.
#include "cfrapi24.h" // For defined values USHORT ComWrite(PortNum, buflen, bufptr, xfercnt) UCHAR PortNum // Port number USHORT buflen // Length of data in buffer UCHAR *bufptr // Pointer to data buffer USHORT *xfercnt // Pointer to returned number of // bytes transferred. Returns: E_OK // If no error occurred E_PARAM // If invalid PortNum E_NO_DATA // If no data transferred
Defined values for PortNum are:
00h RS232 |
|
This function sets a user specified number of alarms to trigger at a selected time. Triggering can consist of either simulating the start of a function key transaction program or a CFR function. This function will only initiate during terminal idle times.
#include "cfrapi24.h" // For defined values USHORT TimerSetAlarm(timerptr, count) struct timer_alarms * timerptr // Pointer to alarm structures USHORT count // Number of alarms in structure Returns: E_OK // If no error occurred E_PARAM // If parameters are incorrect
When setting a timer alarm, an array of memory must be created using the structure below. No field sizes or locations can be changed or skipped. This structure is defined in CFRAPI24.H.
All timer alarms desired MUST be declared in the call to TimerSetAlarm. To do this, put a subscript on the timer structure definition. For example, use
struct timer_alarms timers[5];
to create five copies of the timer_alarms structure. This memory must be global so that is it not de-allocated when the CFR processing completes.
All times are in 24 hour format.
If 'keydef' is 0, then the CFR is called using the 'function' and 'parmstring' defined in the structure. Otherwise 'keydef' should be in the range 1-121 for one of the transaction programs to be called.
If used, the length of the 'parmstring' must be in the first two bytes of the string. The length should not include those first 2 bytes (e.g. "02ZA").
struct timer_alarms { USHORT function; UCHAR *parmstring; UCHAR keydef; UCHAR day; USHORT hour; USHORT minute; USHORT second; UCHAR reserved[6]; };
Defined values for 'day' are:
#include "cfrapi24.h" struct timer_alarms timers[1]; int far cdecl main(int funct, char far *params) { . . . // Set up the timer structure to trigger CFR function // 4 with the parameter string of 032093 on Monday through // Friday at noon timers[0].keydef = 0; timers[0].function = 4; timers[0].parmstring = "06032093"; timers[0].day = WEEKDAY; timers[0].hour = 12; timers[0].minute = 0; timers[0].second = 0; if (TimerSetAlarm(timers, 1) == E_OK) { // Alarm initialized and active } else { // Handle error } . . . }
This function clears all of the defined timer alarms set by the TimerSetAlarm function.
#include "cfrapi24.h" // For defined values USHORT TimerClearAlarm() Returns: E_OK // If no error occurred // (only value returned)
This function sets a user specified number of alarms to trigger at selected repeating intervals. Triggering can consist of either simulating the start of a function key transaction program or a CFR function. This function will only initiate during terminal idle times.
#include "cfrapi24.h" // For defined values USHORT TimerSetInterval(timerptr, count) struct timer_intervals * timerptr // Pointer to alarm structures USHORT count // Number of intervals in structure Returns: E_OK // If no error occurred E_PARAM // If parameters are incorrect
When setting a timer alarm, an array of memory must be created using the structure below. No field sizes or locations can be changed or skipped. This structure is defined in CFRAPI24.H.
All timer intervals desired MUST be declared in the call to TimerSetInterval. To do this, put a subscript on the timer structure definition. For example, use
struct timer_intervals timers[5];
to create five copies of the timer_intervals structure. This memory must be global so that is it not de-allocated when the CFR processing completes.
The 'interval' is in 20ms increments (1/50th of a second). For example, to set up an interval that is 5 minutes long use the value 300 seconds * 50 per second = 15000. The maximum interval length is 65535 intervals / 50 per second = 1310.7 seconds which is about 21 minutes and 50 seconds.
If 'keydef' is 0, then the CFR is called using the 'function' and 'parmstring' defined in the structure. Otherwise 'keydef' should be in the range 1-121 for one of the transaction programs to be called.
If used, the length of the 'parmstring' must be in the first two bytes of the string. The length should not include those first 2 bytes (e.g. "02ZA").
struct timer_interval { USHORT function; UCHAR *parmstring; USHORT interval; UCHAR keydef; UCHAR reserved[3]; };
#include "cfrapi24.h" struct timer_ timers[1]; int far cdecl main(int funct, char far *params) { . . . // Set up the timer structure to trigger CFR function // 4 with the parameter string of 032093 every minute timers[0].keydef = 0; timers[0].function = 4; timers[0].parmstring = "06032093"; timers[0].interval = 60 * 50; // seconds * intervals per second if (TimerSetInterval(timers, 1) == E_OK) { // Interval initialized and active } else { // Handle error } . . . }
This function clears all of the defined timer intervals set by the TimerSetInterval function.
#include "cfrapi24.h" // For defined values USHORT TimerClearInterval() Returns: E_OK // If no error occurred // (only value returned)
AliasTransID -- Changes the transaction identifier bytes on the transaction currently being built. This allows compatibility with an existing DCConnect export application when you want to have the operator be able to start a transaction from a key or other event other than what the export application expects.
CallKeyDef -- Transfers control to ETS, which then runs the desired transaction program. At the end of the transaction program, control returns to the CFR. The transaction program cannot do a CFR call as part of its procedure.
ClearUserVariable -- Clears the specified user variable or the transaction buffer.
DataFile -- Returns a pointer to a named validation file, and returns the file size
GetPowerState -- Used only in 7524 terminals to find out the state of the battery.
GetTerminalAddress -- Obtains the address that the terminal is using to communicate with the terminal server. This may be one of: a serial address (A-Y, 0-6), RF network address (0-126) or and TCP/IP network IP address and port number.
GetTerminalSettings -- Given a pointer to the TERM_SETTINGS structure, returns it filled in with information about the terminal settings, including the number of rows and columns for which the terminal is configured.
IdleManager -- Provided to maintain compatibility with 7526 and 7527 CFRs, which used this API to allow other system tasks to run. Can be used as a convenient method to delay for a time period.
MaxMemory -- Returns the maximum memory available in the terminal
PntrFile0 -- Returns a pointer to ETS file 0
QueryTransactionCnt -- Returns number of buffered transactions and amount of space available.
ReadUserVariable -- Copies the contents of a user variable to a buffer used in the CFR.
SendTransaction -- Send the contents of the transaction buffer to the terminal server.
TransactionMsg -- Turns the "Good Transaction" message on/off
Validation -- Validation with local or remote files
WaitEvent -- Allows the microprocessors to "sleep" in a low-power state while the the terminal waits for operator input or a host command.
WriteToTrans -- Appends data to a transaction
WriteUserVariable -- Appends data to a user variable.
ETS does not support the following CFR APIs which are used on the 7526 or 7527:
ProcBufferedHostCmds
ResizeFile
ShowClock
Refer to Table 14 for a quick-reference table comparing CFR functions and APIs available for ETS and IBM's 7526 and 7527 terminals.
The following is a summary of the return codes used by the Application-level CFR API functions:
0 OK * Function call was successful. 2 ABORT * Abort code returned by "IdleManager" and "CallKeyDef". 3 RANGE_ERROR * Parameter out of range. 4 FILE_NOT_FOUND * File name not downloaded. 5 LENGTH_ERROR * String length + user variable length too long. 6 CFR_TYPE_ERROR * CFR Type not allowed to make call. 7 TRANS_IN_PROGRESS * Cannot call key definition if CFR called in a key definition. 8 TERMINAL_OFFLINE * Terminal offline (out of service) status returned by "IdleManager" and "CallKeyDef". 16 REMOTE_VAL_FAILED * Remote Validation failed. 17 MEMORY_ERROR * Not enough memory in terminal to resize file to specified size.
#include "cfrapi24.h" // for defined values int AliasTransID(NewId) unsigned char NewId // New transaction ID (1-255)
This function sets the transaction ID for the current transaction record. This may be used to give a transaction an alternative ID (or alias) to allow it to be handled by applications that usually look for specific transaction IDs.
NewID is the new transaction ID for the current transaction. Any value from 1 to 255 is acceptable. 0 is not allowed.
0 OK | Command executed properly |
3 RANGE_ERROR | NewID is invalid |
#include "cfrapi24.h" int far cdecl main(int funct, char far *params) { unsigned char newid; // New transaction ID . . . // Change the current transaction ID to 24 newid = 24; AliasTransID(newid); . . . }
#include "cfrapi24.h" // For defined values int CallKeyDef( KeyDef ) int KeyDef // Port number
This API does not automatically clear the DCT screen. Situations that can clear the DCT screen are:
CallKeyDef allows a mode 2 CFR to call a transaction program. As a consequence, any "buffered" host commands are not executed. They include commands that write to the terminal display and the file initialization commands (most notably, "NB - Initialize Specified Validation File").
2 ABORT | Caused by operator timeout waiting for input, operator hitting the CANCEL key, or transaction program having a syntax error. The ABORT return code supersedes the OK or TERMINAL_OFFLINE return codes. |
0 OK | If transaction program executed properly. |
3 RANGE_ERROR | If an invalid transaction program number is specified. |
7 TRANS_IN_PROGRESS | If a transaction program is already in progress and thus could not execute another transaction program. |
8 TERMINAL_OFFLINE | If terminal offline (out of service), so the program could not be executed |
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { int Key = 2; /* Key definition to execute */ int rc; /* CFR return code */ . . . /*************************************************/ /* Executes transaction program defined for F2=B */ /*************************************************/ rc = CallKeyDef(Key); . . . }
#include "cfrapi24.h" // For defined values int ClearUserVariable ( UserVar ) int UserVar
0 OK | Command operated properly |
3 RANGE_ERROR | If an invalid user variable is specified. |
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { int UserVar = 2; /* user variable to append to */ int rc; /* CFR return code */ . . . /****************************************/ /* Clears user variable 2 */ /****************************************/ rc = ClearUserVariable(UserVar); . . . }
#include "cfrapi24.h" // For defined values int DataFile( name, ptr, size ) char far * name char far ** ptr long far * size
This function allows the CFR to access any of the ETS validation data files. The files are stored in contiguous blocks.
With this API, the CFR can treat the validation file as any type of file it desires. For example, the "validation file" may not have validation records in it at all, but rather it has tabular data for doing price look-ups, list items in a bill of materials, or plain text delimited with carriage return characters (which the CFR displays and scrolls around). The data in the file may also represent a program which the terminal (via the CFR) downloads to a bar code printer.
To access the file on the terminal, file 'e' must have a reference to the name, or else ETS does not know about it. For DCC/2 users, this means that you must have a dummy validation transaction program in your .CFG. file.
4 FILE_NOT_FOUND | If no such file is loaded on the terminal |
0 OK | If command executed properly |
#include "cfrapi24.h" char * ValFilename = "AGES.VAL"; /* name of validation file */ int far cdecl main(int Funct, char far *params) { long filesize; /* returned size of named file */ char * fileptr; /* returned pointer to named file */ int rc; /* CFR return code */ unsigned int numWritten; /* pointer to number of characters */ . . . /**************************************************/ /* Returns a pointer to AGES.VAL and the filesize */ /**************************************************/ rc = DataFile(ValFilename,&fileptr,&filesize); /****************************************************/ /* Displays all records in AGES.VAL on the terminal */ /* starting at row 1 column 1 */ /****************************************************/ VioWrtCharStr(fileptr,filesize,0,0,&numWritten,0); . . . }
#include "cfrapi24.h" // For defined values USHORT GetPowerState (buffer) PUCHAR buffer
For 7524 terminals, the first character of the buffer will be set to one of the following values depending on the current state of the battery:
0 OK | This is always returned |
#include "cfrapi24.h" #define UV_FOR_FOR_POWER_STATE 11 int far cdecl main(int Funct, char far *params) { char powerState; char * powerStateString; . . . GetPowerState(&powerState); switch (powerState) { case POWER_LOWBATT: powerStateString = "Low Battery"; break; case POWER_CHARGE: powerStateString = "Charging"; break; case POWER_FULL_CHARGE: powerStateString = "Fully Charged"; break; . . . default: powerStateString = "Unknown"; break; } ClearUserVariable(UV_FOR_POWER_STATE); WriteUserVariable(UV_FOR_POWER_STATE, powerStateString); . . . }
#include "cfrapi24.h" // For defined values USHORT GetTerminalAddress (buffer) PUCHAR buffer
For terminal types using TCP stream sockets, the port number is not included.
Make sure the buffer provided is long enough to hold the longest possible address (111.222.333.444,7500) which is 21 bytes including the trailing null.
0 OK | This is always returned |
#include "cfrapi24.h" #define UV_FOR_ADDRESS 12 int far cdecl main(int Funct, char far *params) { char address[21]; . . . GetTerminalAddress(address); ClearUserVariable(UV_FOR_ADDRESS); WriteUserVariable(UV_FOR_ADDRESS, address); . . . }
#include "cfrapi24.h" // For defined values USHORT GetTerminalSettings(settings, which) TERM_SETTINGS * settings ULONG which
This API is only available in versions 1.40Y and later.
One or more of the following values may be passed for the parameter, which:
If more than one setting is needed, all values should be logically or'd together (see the example below). To have all values filled in the structure, just use SETTING_ALL. The use of the parameter, which, allows new settings to be added to the structure without breaking existing code that does not know about the new settings.
0 OK | This is always returned |
#include "cfrapi24.h" /* * Global screen dimensions */ UCHAR numRows; UCHAR numCols; int far cdecl main(int Funct, char far *params) { TERM_SETTINGS termSettings; . . . GetTerminalSettings(&termSettings, SETTING_NUMROWS | SETTING_NUMCOLS); numRows = termSettings.numRows; numCols = termSettings.numCols; . . . }
#include "cfrapi24.h" // For defined values ushort IdleManager (Delay_time ) long Delay_time
IdleManager will delay for the time interval specified in the single numeric parameter. The time period is specified as a number of 5 millisecond periods. For example, to delay for 1 second, specify a count of 1/.005 = 200.
Note: The time period is specified in a granularity of 5 milliseconds, but the actual delay time is rounded to the nearest unit of 55 milliseconds. Specifying a delay of 1 through 11 time periods will all yield a delay of 55 milliseconds. A count of 12 will yield a delay of 110 milliseconds.
It is the explicit responsibility of the CFR to return control to ETS (end the CFR) when the IdleManager returns ABORT or TERMINAL_OFFLINE, as shown in the following code:
. . . rc = IdleManager (1); if ((rc == ABORT) || (rc == TERMINAL_OFFLINE)) return (ABORT);
2 ABORT | Terminal operation aborted (error in terminal server command and so forth) If above occurs, the ABORT return code supersedes the OK or TERMINAL_OFFLINE codes. This allows the CFR to test whether the terminal is in service without having to use CallKeyDef. |
0 OK | Terminal is in service |
8 TERMINAL_OFFLINE | Terminal is offline (out of service) |
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { long delayCount; int rc; delayCount = 200; // 1 second . . . /***********************************************/ /* Delay for 1 second */ /***********************************************/ rc = IdleManager (delayCount); if ((rc == ABORT) || (rc == TERMINAL_OFFLINE)) return(ABORT); . . . }
#include "cfrapi24.h" // For defined values int MaxMemory ( size ) long far * size
This function allows the CFR to determine the amount of memory remaining in the terminal.
0 OK | If command executed properly |
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { long MemLeft; /* returned amount of memory */ int rc; /* CFR return code */ . . . /*****************************************************************/ /* Returns amount of unassigned memory available in the terminal */ /*****************************************************************/ rc = MaxMemory(&MemLeft); . . . }
#include "cfrapi24.h" // For defined values char far * PntrFile0( void );
File 0 contains various configuration parameters and all of the transaction program operation codes. For details of the file 0 format, (SeeFile 0--Terminal Operating Parameters/Program Storage) .
This function provides a method for a CFR (in Mode 1 or 2) to look up setup parameters in ETS file 0. It returns a pointer to the start of the contiguous file, the writer must use this pointer along with an appropriate offset to access the parameters.
Note: Any writes to file 0 record 0 data areas will not necessarily take effect immediately. ETS only checks these parameters at certain times. Writing to this file should be handled with great care. Most of the parameters in this record take effect only when ETS is put out of service and then back in service.
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { char * File0; /* pointer to file 0 */ . . . /*******************************/ /* Returns a pointer to file 0 */ /*******************************/ File0 = PntrFile0(); . . . }
#include "cfrapi24.h" // for defined values void QueryTransactionCnt(NumTxtns, NumFree) unsigned short * NumTxtns // Ptr to return number buffered unsigned short * NumFree // Ptr to return space free
This function returns to the caller the total number of transactions that are currently in the transaction buffer as well as the number of transactions that can still be added to the buffer before it is filled up.
NumTxtns is a pointer to a variable in which will be returned the number of currently buffered transactions.
NumFree is a pointer to a variable in which will be returned the number of transactions that can still be added to the buffer before it fills up.
None
#include "cfrapi24.h" int far cdecl main(int funct, char far *params) { unsigned short numtxtns; unsigned short numfree; . . . // Ask for the current transaction counts QueryTransactionCnt(&numtxtns, &numfree); . . . }
#include "cfrapi24.h" // For defined values int ReadUserVariable ( UserVar, buffer ) int UserVar char far * buffer
buffer is the buffer to copy contents of user variable into. This buffer must be at least 129 bytes long to accommodate the maximum length of a user variable plus the trailing null character.
0 OK | Command executed properly |
3 RANGE_ERROR | If invalid user variable number specified |
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { int UserVar = 2; /* user var to copy contents of */ char UserVarData [129]; /* buffer to copy contents into */ int rc; /* CFR return code */ . . . /********************************************************/ /* Returns contents of user variable 2 into UserVarData */ /********************************************************/ rc = ReadUserVariable(UserVar,UserVarData); . . . }
ResizeFile ( name, size )This 7527 command is not supported by ETS.
#include "cfrapi24.h" // for defined values int SendTransaction(void)
This function sends a transaction to the terminal server from a CFR. The transaction consists of the data in the transaction buffer, prefixed by the transaction header and followed by the date/time stamp and sequence number.
In the buffered mode, this function returns when the transaction has been written to file 9.
In the interactive mode, this function returns when the host responds with CMD B or C.
In the interactive/buffered mode, this function returns when the host responds with CMD B or C. If the host does not respond before the host timeout occurs, the transaction is written to file 9.
If the CFR was entered with function 0 or 2, then AliasTransID must be called to set a key ID for the generated transaction before calling SendTransaction.
None
0 OK | Command executed properly |
6 E_SPACE | Transaction buffer is full |
#include "cfrapi24.h" int far cdecl main(int funct, char far *params) { . . . // Send the current transaction to the host if (SendTransaction() == OK) // Transaction sent . . . else // Handle error . . . }
#include "cfrapi24.h" // For defined values int TransactionMsg ( show ) int show
In some applications, eliminating the time required to display the "Successful Transaction" message is desirable. This API will allow that message to be selectively turned on and off.
This is a global flag and it lasts past the execution of the CFR or transaction program.
0 OK | Command executed properly |
3 RANGE_ERROR | If the show parameter is incorrect. |
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { int rc; /* CFR return code */ . . . /**************************************/ /* Disables "Good Transaction message */ /**************************************/ rc = TransactionMsg(NO_TRANS_MSG); . . . }
#include "cfrapi24.h" // For defined values int Validation ( filename, type, data ) char far * filename char type char far * data
This function provides a convenient way to perform validation against local or remote validation files. It must be provided with the file name (a null-terminated string), the type of validation to be performed, and a pointer to the data string to be validated. Validation may be either "exclusive" or "inclusive". In "exclusive" validation, the test is considered to pass if the string did not match any string in the validation file. For "inclusive" validation, the test passes if the string matched an entry in the validation file.
Validation types '2' (exclusive) and '3' (inclusive) always return to the calling CFR but return the codes SKIP (on validation fail) or NO_SKIP (on validation pass). SKIP and NO_SKIP are defined in the CFR include file "cfrapi24.h", as are validation type parameters.
If the file is located on the terminal, in order to access the file, file 'e' must have a reference to the name, or else ETS does not know about it. For DCC/2 users, this means you must have a dummy validation transaction program in your .CFG. file.
type is the type of validation to perform:
0 NO_SKIP (also defined as VAL_PASSED) | If the validation passed. |
3 RANGE_ERROR | If 'type' was not set to EXCL_SKIP_IF_FAIL or INCL_SKIP_IF_FAIL |
4 FILE_NOT_FOUND | If the validation file was not found on the terminal, the files were loaded with the Extended Terminal Services method and the filename was not found in file 'e' (extended validation support). |
16 REMOTE_VAL_FAILED | If the terminal server did not respond with a positive or negative response within the timeout period. |
1 SKIP (also defined as VAL_FAILED) | If the validation failed. |
#include "cfrapi24.h" char * Data = "1234"; /* data to perform validation on */ char * ValFilename = "AGES.VAL"; /* name of validation file */ int far cdecl main(int Funct, char far *params) { . . . /****************************************************/ /* Validates whether "1234" is included in AGES.VAL */ /****************************************************/ rc = Validation(ValFilename,INCL_SKIP_IF_FAIL,Data); . . . }
#include "cfrapi24.h" // For defined values void WaitEvent ( time ) unsigned long time // Timeout value in milliseconds to // wait for an event; use 0 to wait forever.
WaitEvent is a blocking call which will return control to your CFR after any of the following events occur:
When WaitEvent returns, you must use a CFR API to determine if the event was indeed the event you were interested in. If you want to wait further for another event or for the event of interest, then you can call WaitEvent in a loop.
The time specified will be rounded up to the nearest multiple of 55 milliseconds, which is the granularity of the terminal clock tick in most cases.
It is the explicit responsibility of the CFR to return control to ETS (end the CFR) when the WaitEvent returns ABORT or TERMINAL_OFFLINE, as shown in the following code:
. . . rc = WaitEvent(30000); if ((rc == ABORT) || (rc == TERMINAL_OFFLINE)) return (ABORT);
0 OK | Terminal is in service |
8 TERMINAL_OFFLINE | Terminal is offline (out of service) |
#include "cfrapi24.h" int far cdecl main(int Funct, char far *params) { int rc; long start_time, elapsed_time; . . . /************************************************/ /* Get operator input from board or scanner */ /* while being a good, power-conserving citizen */ /************************************************/ // Get current number of seconds since 1900 // (get_seconds() from CFRUTL24.LIB samples library) start_time = get_seconds(); elapsed_time = 0L; do { /* Wait for an input event for up to 30 secs */ /* Take into account elapsed time from previous*/ /* times through the loop */ rc = WaitEvent(30000L - (elapsed_time * 1000L)); if ((rc == ABORT) || (rc == TERMINAL_OFFLINE)) return (ABORT); /* Some kind of input event occurred */ /* Determine if it was the event we were */ /* waiting for. */ /* If it was the keyboard, handle the key*/ if ( KbdReadAscii(&code) == E_OK ) { my_kbd_handler(); return( CONTINUE); } /* If it was the scanner, handle the data*/ if ( SenRead(SenBuff, 100) == E_OK ) { scanner_handler(); return( CONTINUE); } /* The event must have been a host command */ /* which we are not interested in. Keep */ /* looking for operator input */ } while ( (elapsed_time = (get_seconds() - start_time)) < 30 ); . . . }
#include "cfrapi24.h" // For defined values int WriteToTrans ( data ) char far * data // Null-terminated string to send to // the transaction buffer
For mode 1 CFRs The buffer will be sent to the terminal server at the normal end point of the transaction program (only if automatic transaction building is set on).
The CFR API SendTransaction() can also be used to send the transaction for mode 1 or mode 2 CFRs.
0 OK | Command executed properly |
5 LENGTH_ERROR | The data written would exceed the maximum allowed transaction size. |
#include "cfrapi24.h" char * Data = "testing"; /* Data to append to transaction */ int far cdecl main(int Funct, char far *params) { int rc; /* CFR return code */ . . . /********************************************/ /* Appends "testing" to current transaction */ /********************************************/ rc = WriteToTrans(Data); . . . }
#include "cfrapi24.h" // For defined values int WriteUserVariable ( UserVar, data ) int UserVar char far * data
If the current length of the user variable plus the length of the string to append will exceed 128 bytes, the function will not be performed, and an error code will be returned.
This function appends to a user variable. If desired, the variable may be cleared first using the CFR API ClearUserVariable().
5 LENGTH_ERROR | If the append was not done because the result would exceed 128 bytes. |
0 OK | Command operated properly |
3 RANGE_ERROR | If an invalid user variable is specified. |
#include "cfrapi24.h" char * Data = "testing"; /* data to append to user variable */ int far cdecl main(int Funct, char far *params) { int UserVar = 2; /* user variable to append to */ int rc; /* CFR return code */ . . . /****************************************/ /* Appends "testing" to user variable 2 */ /****************************************/ rc = WriteUserVariable(UserVar,Data); . . . }
This appendix contains information pertaining to the relationships between various commands and special keys.
Table 11 shows key commands, whether input data is displayed on the DCT, and the meanings of certain special keys when the indicated key command is in effect.
Note: | The key commands listed in this table are described in Table 6. |
The columns within Table 11 have the following meanings:
Lists and briefly describes the indicated key command.
Indicates whether the input in response to the command is displayed on the terminal screen. Note that the table may indicate yes for the display of input, even if the input is from a magnetic device, and the first byte is the secure header (a hex A). In this case, the input will be shown as a series of asterisks (*) equal to the length of the data.
Indicates the effect, if any, of pressing the Fill key on the keyboard. No indicates that the key has no effect. In some input operations, pressing the Fill key before the completion of the input will cause the field to be filled with leading zeroes or trailing blanks out to the length specified.
If the Enter key is pressed before the full amount of input has been entered in certain keyboard input operations, the field will automatically be filled to its maximum length. The Autofill column shows for which commands this action takes place.
Tells which input operations require the Enter key to indicate that input is complete. The Enter key is required for all keyboard input operations and for sensor input using the ;1 and :4 commands (which display input to the screen).
Table 11. Command and Special Key Relationships
Key Command | Input Data | Fill Key | Autofill | Enter Key |
---|---|---|---|---|
:1 = Fixed badge | No | No | No | Not used |
:2 = Fixed numeric keypad | Yes | No | Leading zeroes | Required |
:3 = Alphanumeric keypad (fixed) | Yes | Trailing blanks | Trailing blanks | Required |
:4 = Fixed badge or alphanumeric keypad |
Keypad--yes Sensor--yes
|
Keypad--trailing blanks Sensor--no
|
Keypad--no Sensor--no
|
Keypad--required Sensor--required
|
;1 = Variable badge | Optional; depends on command format (see d parameter in key command ;1 lld0 in Table 6) | No | Trailing blanks | Optional; depends on command format (see d parameter in key command ;1 lld0 in Table 6) |
:R = General purpose read |
Echo = on
Echo = off
|
Variable--no Fixed
|
Variable--no Fixed
|
KA--required KN--required Sensor--not used RS232--not used
|
Note: KA = Alphabetic keypad, PF key, or touch screen region KN = Numeric keypad, PF key, or touch screen region ¹ = No need to press the Fill key before pressing Enter |
Commands | ETS | 7526 | 7527 |
---|---|---|---|
Original 7494-ELF Commands | |||
:0 Display message | X | X | X |
:1 Read badge | X | X | X |
:2 Keyboard input, numeric | X | X | X |
:3 Keyboard input, alpha-num | X | X | X |
:4 Keyboard or badge input | X | X | X |
:8 Link | X | X | X |
:9 Key not used (NOP) | X | X | X |
;0 Hot key | X | X | X |
;1 Variable badge/stripe read | X | X | X |
;2 Latching function | X | X | X |
String commands | |||
:F Append | X | X | X |
:H Clear | X | X | X |
:J Format | X | X | X |
;7 Append string to user variable | X | X | X |
Display commands | |||
:E Write | X | X | X |
:T Clear | X | X | X |
:U Set cursor | X | X | X |
:6 Write to display in CMD D | X | X | X |
DIDO commands | |||
:M DI read |
| X | X |
:N DI wait |
| X | X |
:P DO write |
| X | X |
General Purpose I/O | |||
:R Read | X | X | X |
:W Write | X | X | X |
Flow Control | |||
:D Delay | X | X | X |
:G GoTo | X | X | X |
:GS GoSub | X | X |
|
:Z On key goto | X | X | X |
:ZS On key gosub | X | X |
|
;R Return from subroutine | X | X |
|
:L Label for branching to |
| X |
|
:Q Quit transaction send current data | X | X | X |
;M Execute CFR | X | X | X |
Miscellaneous commands | |||
:5 Comment | X | X | X |
:A Auto transaction state | X | X | X |
:I Transaction buffer mode | X | X | X |
:K Validate | X | X | X |
:S Set UV character shift offset | X |
| X |
:X,:Y Screen editing markers |
|
| X |
;A Alias transaction ID | X | X | X |
;C Set LED |
| X | X |
;N Test user variable (UV) | X | X | X |
;O Save/restore cursor to/from UV | X |
| X |
|
|
|
|
Commands | ETS | 7526 | 7527 |
---|---|---|---|
0 Reset terminal | X | X | X |
1 Transmit terminal status | X | X | X |
2 Write to terminal display | X | X | X |
3 Transmit BIOS version | X | X | X |
4 Set terminal TOD | X | X | X |
5 Audible tone | X | X | X |
6 Transmit terminal features | X | X | X |
7 Transmit TOD to host | X | X | X |
8 Specify polled buffer | X | X | X |
9A Send file status | X | X | X |
9B Initialize text file | X | X | X |
9C Load text file | X | X | X |
9F Transmit file contents | X | X | X |
9G Erase files | X |
| X |
A On/Off line | X | X | X |
AnX Terminal allowed/not allowed to send transactions | X |
|
|
B Positive host acknowledge | X | X | X |
C Negative host acknowledge | X | X | X |
D Download transaction | X | X | X |
F Storage query | X | X | X |
G Test event handler | X | X | X |
I Set user variable | X | X | X |
IM Set multiple user variables | X | X |
|
K Transaction release | X |
| X |
L Loopback test | X |
| X |
MA Send CFR status | X | X | X |
MB Allocate CFR file | X | X | X |
MC Load CFR file | X | X | X |
MD Start CFR | X | X | X |
NA Send validation file status | X |
| X |
NB Initialize validation file | X |
| X |
NC Load validation file | X |
| X |
ND Signal validation file load complete | X |
| X |
O Write to terminal display with attributes | X | X | X |
Q Read User Variable | X | X |
|
V Remote validation response | X | X | X |
|
|
|
|
Function/API | ETS | 7526 | 7527 |
---|---|---|---|
CFR Functions | |||
ComGetAppVector |
|
| X |
ComGetIntVector |
|
| X |
ComGetMdmCtl |
|
| X |
ComGetNetPort |
|
| X |
ComGetParms | X |
| X |
ComGetProtocol | X |
| X |
ComQuery | X |
| X |
ComQueryData | X |
| X |
ComRead | X |
| X |
ComReqDownload |
|
| X |
ComSetAppVector |
|
| X |
ComSetBuffer |
|
| X |
ComSetIntVector |
|
| X |
ComSetMdmCtl | X |
| X |
ComSetNetPort |
|
| X |
ComSetParms | X |
| X |
ComSetProtocol |
|
| X |
ComTapRdy |
|
| X |
ComTapRead |
|
| X |
ComTapWrite |
|
| X |
ComWrite | X |
| X |
DidoQuery |
|
| X |
DidoRead |
| X | X |
DidoSet |
|
| X |
DidoWrite |
| X | X |
KbdGetShift |
|
| X |
KbdHandleArrowKeys | X |
|
|
KbdQueryData |
|
| X |
KbdQueryPost |
|
| X |
KbdReadAscii | X | X | X |
KbdReadAsciiRec |
|
| X |
KbdReadMakeBreak |
|
| X |
KbdReadMakeBreakRec |
|
| X |
KbdReadScan |
|
| X |
KbdReadScanRec |
|
| X |
KbdSetBuffer |
|
| X |
KbdSetEcho |
|
| X |
KbdSetKeyTables |
|
| X |
KbdSetShift |
|
| X |
KbdWaitAsciiRec |
|
| X |
KbdWaitMakeBreakRec |
|
| X |
KbdWaitScanRec |
|
| X |
KbdSetMode |
| X |
|
MemAlloc |
|
| X |
MemFree |
|
| X |
MemQuery |
|
| X |
PrtChar |
| X | X |
PrtInit |
| X | X |
PrtQuery |
| X | X |
PrtQueryData |
| X | X |
PrtSetBuffer |
| X | X |
|
|
|
|
PrtSetStatus |
| X | X |
PrtStr |
| X | X |
RtcGetAsciiDate | X | X | X |
RtcGetAsciiTime | X | X | X |
RtcGetDate | X |
| X |
RtcGetFormat |
|
| X |
RtcGetTime | X |
| X |
RtcSetDate |
|
| X |
RtcSetFormat |
|
| X |
RtcSetTime |
|
| X |
SenActLed | X | X | X |
SenQuery |
|
| X |
SenQueryData | X |
| X |
SenRead | X | X | X |
SenSet |
|
| X |
SenSetBuffer |
|
| X |
SenSetDiscrimGroup |
|
| X |
SenSetGlobalParams |
|
| X |
SenSetVector |
|
| X |
SpkBeep | X | X | X |
SpkQuery | X |
| X |
TchQuery |
|
| X |
TchQueryData |
|
| X |
TchRead |
|
| X |
TchSet |
|
| X |
TmrClearAlarm | X | X |
|
TmrClearAlarmAsynch |
| X |
|
TmrClearInterval | X | X |
|
TmrCountRead |
|
| X |
TmrCountWrite |
|
| X |
TmrGetInt |
|
| X |
TmrRead |
|
| X |
TmrSetAlarm | X | X |
|
TmrSetAlarmAsynch |
| X |
|
TmrSetInt |
|
| X |
TmrSetInterval | X | X |
|
VioClear | X | X | X |
VioGetCurPos | X | X | X |
VioQuery | X | X | X |
VioReadCell | X |
| X |
VioReadCellStr | X |
| X |
VioReadChar | X |
| X |
VioReadCharStr | X | X | X |
VioRestoreCurPos |
|
| X |
VioRestoreCurType |
|
| X |
VioSaveCurPos |
|
| X |
VioSaveCurType |
|
| X |
VioSelCharSet |
|
| X |
VioSelMode |
|
| X |
VioSetFont |
|
| X |
VioSetCurPos | X | X | X |
VioSetCurType | X | X | X |
VioWrtCellStr | X |
| X |
VioWrtCharStr | X | X | X |
VioWrtCharStrAtt | X |
| X |
VioWrtNatt |
|
| X |
VioWrtNCell | X |
| X |
|
|
|
|
VioWrtNChar | X |
| X |
VioWrtPixel |
|
| X |
LockQuery |
|
| X |
LockSet |
|
| X |
NmiCritSectEnter |
|
| X |
NmiCritSectExit |
|
| X |
NmiGetAppVect |
|
| X |
NmiSetAppVect |
|
| X |
PftReset |
|
| X |
PftQueryReset |
|
| X |
PftQueryPost |
|
| X |
PftSetAppRestartEntry |
|
| X |
PftSetExcHandler |
|
| X |
PftStatus |
|
| X |
HitWatchdog | X | X | X |
CFR APIs | |||
AliasTransID | X | X | X |
CallKeyDef | X |
| X |
ClearUserVariable | X | X | X |
DataFile | X | X | X |
GetPowerState | X |
|
|
GetTermAddress | X | X |
|
IdleManager | X | X | X |
Note: ETS and 7526 require time delay parameter.
| |||
MaxMemory | X | X | X |
PntrFile0 | X | X | X |
ProcBufferedHostCmds |
|
| X |
QueryTransactionCnt | X |
|
|
ReadUserVariable | X | X | X |
ResizeFile |
|
| X |
SendTransaction | X | X |
|
ShowClock |
|
| X |
TransactionMsg | X | X | X |
Validation | X | X | X |
WaitEvent | X |
|
|
WriteToTrans | X | X | X |
WriteUserVariable | X | X | X |
|
|
|
|
ACK | positive acknowledgement |
ACS | application control structure |
ADDR | address |
APA | all points addressable |
API | application program interface |
ASCII | American Standard Code for Information Interchange |
bps | bits per second |
CCF | cold cathode fluorescent |
CD | customer diagnostics |
CFR | custom function routine |
CMD | command |
comm | communication |
Co-Proc | Co-Processor |
CRC | cyclical redundancy check |
CS1 | check sum sequence, first byte |
CS2 | check sum sequence, second byte |
CTS | clear to send; an RS-232-C control line |
CRU | customer-replaceable unit |
DC1 | data download request |
DC2 | full download request / terminal is alive |
DC3 | Terminal has no transactions and doesn't need a download |
DCD | data carrier detect; an RS-232-C control line |
DCT | Data Collection Terminal |
DI-DO | digital input/digital output |
DMA | direct memory access |
DSR | data set ready; an RS-232-C control line |
DTR | data terminal ready; an RS-232-C control line |
DMAU | direct memory access unit |
EAN | European article numbering |
EGA | enhanced graphics adapter |
EBCDIC | Extended Binary Coded Decimal Interchange Code |
ELF | entry level function |
ESC | ASCII escape character |
ETX | ASCII end-of-text character |
EZNL | 4-byte PSP identifier |
FDX | duplex flow |
FRU | field-replaceable unit |
FSM | finite state machine |
h | Hexadecimal notation |
HDX | half-duplex |
HI | host interface application |
Hz | Hertz |
ICU | interrupt control unit |
INT | interrupt |
I/O | input/output |
IPL | initial program loading |
ISR | interrupt service routine |
IRET | return from interrupt routine |
IRQ | interrupt request |
ISR | interrupt service routine |
kb | times 1000 bytes |
KB | times 1024 bytes |
KB | times 1024 bytes |
Kbd | keyboard |
Kbps | thousand bits per second |
LCD | liquid crystal display |
LED | light emitting diode |
LTS | line turnaround sequence |
load module | Data Collection Terminal software loadable from a host system |
mA | milliampere(s) |
mem | memory |
misc | miscellaneous |
mod | modulo |
msec | millisecond(s) |
mV | millivolt(s) |
NAK | negative acknowledgement |
N/A | not applicable |
NMI | non-maskable interrupt |
OS | operating system |
pixel | picture element |
POST | power-on self test |
prt | printer |
PSP | program segment prefix |
RAM | random access memory |
RET | return from routine |
ROM | read-only memory |
RS | record separator |
RSP | response |
RTC | real-time clock |
RTS | ready to send; an RS-232-C control line |
SCC | serial communications controller |
SCU | serial control unit |
sen | sensor |
spk | speaker |
STX | ASCII start-of-text character |
S/W | software |
TAP | terminal application program |
tch | touch screen |
TCU | time control unit |
tmr | timer |
TOD | time-of-day |
TTL | transistor-transistor logic |
UPC | Universal Product Code |
USD | Uniform Symbol Description |
Vio | video |
This glossary contains definitions for special terms as they are used in the context of this document.
The term 'online' has been used in the past to mean 'in service'.
Note: | If the Data Collector is installed, online means the terminal is being polled by the Data Collector, and enabled means the terminal will accept data from the operator and the terminal server. See the &dcguide. for additional information. |
The term 'offline' has been used in the past to mean 'out of service'.
Note: | If the IBM DOS Data Collector is installed, offline means the terminal is not being polled by the Data Collector, and disabled means that no operator interaction with the terminal is permitted, but the terminal can still communicate with the terminal server. See the &dcguide. for additional information. |
(1) Throughout this document, GP communications refers to general purpose (that is, RS-232) communications.
(2) Throughout this document, CMD represents command. For example, CMD A means Command A. For the meanings of CMD 8 and all other communications commands, (SeeDCT Communications Control Commands) .
(3) The duplication is done for debugging purposes only and is not critical to the operation of the protocol.
(4) ROM = Read-Only Memory
(5) TOD = Time of Day
(6) This command is provided for compatibility with 7527 terminal communications. A dummy response compatible with what the host is expecting is returned. Both the 7524 ETS flash and DCConnect Client do not handle the reloading of themselves into the terminal.
(7) RAM = Random-Access Memory
(8) DIDO = digital input/digital output
(9) Throughout this document, the acronym ID shall be used to indicate an identifier, which is a unique representation of a particular entity. An ID identifies the entity to ETS. In turn, ETS recognizes the ID and performs the processing required for the entity that the ID represents. Examples of IDs are: function ID, reference ID, file ID.
(10) NOP = no operation