Technical Notes |
|
Reflection can execute Reflection Command Language (RCL) commands sent from a host program. This technical note describes the syntax used in the host program and explains how to effectively use completion codes returned by Reflection.
For an overview of how host-initiated programs work with Reflection, refer to Technical Note 1223.
RCL is best used for host programs that send a single command to Reflection or that perform simple functions. To write host programs that perform complex procedures or use OLE (object linking and embedding) technology, use Reflection Basic (RB) instead. See Technical Note 1279 for details.
RCL commands in a host program appear on a single line within an escape sequence (HP emulation) or device control string (VT emulation).
Syntax: <ESC>&o<term><RCL command><CR>
Example: <ESC>&oB SET CAPS-LOCK YES <CR>
Syntax: <DCS>1234;<term> {<RCL command><ST>
Example: <DCS>1234;b {SET CAPS-LOCK YES <ST>
<ESC>, <DCS>, <ST>, and <CR> are described in Generating Special Characters below.
<term> specifies whether or not Reflection returns a completion code to the host program. See Specifying Completion Codes below for acceptable values.
Use the values and key combinations below to properly generate the following special characters in your host programming language.
| Special characters |
Decimal |
Hexadecimal |
Octal |
7-bit |
| <CR> |
13 |
0D |
15 |
- |
| <ESC> |
27 |
1B |
33 |
- |
| <DCS> |
144 |
90 |
220 |
<ESC>+P |
| <ST> |
156 |
9C |
234 |
<ESC>+\ |
Although many choices are available, we recommend that you use one of the following values for <term>. Other options are listed in your Reflection documentation.
| B |
Always return a completion code |
| F |
Never return a completion code |
| 1 |
Always return a completion code |
| 2 |
Never return a completion code |
When Reflection receives a command that requires a completion code, it returns one of the following values:
| S |
Indicates the command was successfully executed |
| F |
Indicates the command failed |
The host program should process either reply gracefully. For an explanation of special completion codes associated with file transfers, see Technical Note 1280.