Docstoc

User Guide Table of Contents

Document Sample
User Guide Table of Contents Powered By Docstoc
					Table of Contents − User Guide

 Introduction

   The TILCON difference

   What’s new in Version 4

   How the manual system is organized



 Overview



Target Requirements

 QNX 4.x

 QNX 6.x

 MS NT Embedded

   Creating A Tilcon Component

   Included Tilcon Files

   Included DLL Files

   Example .kdf file

 MS CE Embedded

   Creating the CE Platform

   Adding Tilcon Components

   Creating The CE Image

 Wind Riverfi VxWorks

   Configure Tornado to run the application

   Create the VxWorks image file

   Configure WindML to run the application

   Build the VxWorks image file

   To create a boot disk

                                              1
 To transfer the application

 Configure Tornado compiler

 Connect to the target

 Downloading and running the application



Colors



Transmit Keys, Shortcut Keys




                                           2
Overview

 How the TRTD works

 Building a real−time application

 Porting your application to

   another TRTD−supported platform

 Concepts

  Notification and callback

  Objects

  Components

  Fonts

  Component Index

 Object spaces

 Scalability

 Triggers

 TCP/IP

  How the TILCON Channels work

 Redraw options

  Redraw object

  Area redraw

  Never

 Returns

 Running your real−time application

  Structure

  Attributes

    Setting and getting specific attributes

    (TRT_SetValues and TRT_GetValues)

                                              3
 Common attributes

 Attribute data types

   Character strings

   Attribute values using TRT_VarLen

 Attribute flags

 Using TRTConst.h and other headers

 Using TRT_ATT_CHANGE

    and TRT_ATT_CURRENT

Compiling and linking

Sample application




                                       4
The Toolbox

   Adding Objects to Your Work Window

   Editing an Existing Object

   Fine−tuning an Object's Appearance

 Animation

   Animation Area

   To find an animation area for editing

   Animation Object

   Rotate Animation Object (.tsy & .cgm)

 Button

   To add a button to your window

   To select On/Off button options

   To add a button image

 Charts

   To create a new chart

   To select a type of chart

   Data selection

   Scale options

   To create Error Limits

   For Area, Bar and Stacked bar charts

   Scrolling Options

   Pie Chart selections

 Checkbox

   To add a Checkbox to your window

   To add an image to the Checkbox

 Clock (Date and Time)

                                           5
 To add a clock

Color Combobox

 To add a color Combobox

Color Listbox

 To add a color listbox

Color State Object

 To add a color state object

Combobox

 To add a Combobox

Directory box

 To add a Directory box

Draw Tools

Fill Meter

 To add a Fill meter

 Meter Rotate Options

 Meter Depth/Placement/Sizing Options

HTML File Display

 To add a HTML File Display

Listbox

 To add a Listbox to your window

Menu

 Menu item behavior

 To add the main menubar

 To add a sub−menu

 Menu Form in QNX Photon microGUI

Multi−State Objects

                                        6
 To add multi−state objects

Needle Meter Body and Needle Options

 To add a Needle meter body to your window

 Meter Rotate Options

 Meter Depth/Placement/Sizing Options

 Needle Options

Number box

Panel

 To add a Panel

Radio Button

 To add a radio button to your window

 To add an image to your item

Raw Image Object

 To add a Raw Image to your window

Scale

 To add a Scale

Scroll Area

 To add a scroll area

Selector (Find) Tool

Slider

 To add a slider

 Size/Depth/Placement form

Spectrograph

 To add a spectrograph

Tabbed Notebook

 To add a Tabbed notebook

                                             7
Table

 To add a Table

 AutoGenerate Labels

 Editing objects in a table

Text Tools

Tool bar

Tree

 To add a Tree




                              8
                                              1     Introduction

1       Introduction
Welcome

The TILCON Real−Time Developer is a fast, easy to use, multi−platform application developer. It is a quick
way to create powerful real−time applications for QNX 6.2, MS Windows 98/2000/ME and Windows NT,
Windows CE, and other platforms supported by TILCON. You can port your application created with the
TILCON Real−Time Developer from one operating system to another without any code changes. That option
gives you maximum flexibility. It simplifies application development and significantly reduces your
programming time and effort.

1.1 The TILCON difference

The architecture of the TILCON Real−Time Developer is the difference! The TILCON Real−Time Developer
provides you with the TILCON Graphics Editor and the TILCON Run−Time. Your application communicates
with the Run−Time using TILCON API (Application Programming Interface) function calls. The Run−Time
is specific to a platform. This means that without any change in code, your application can operate on any
platform for which a Run−Time is available.

The TILCON Graphics Editor consists of powerful integrated tools to create the windows , menus, buttons,
boxes and all other user interface objects for your real−time application. These tools represent object−oriented
technology and are cross−platform compatible.

In the window creation stage of your application, you can specify triggers and links which allow objects to be
updated or actions to occur without the need of API functions during real−time display. In effect, triggers and
links build programming right into your window and enable buttons and other interfaces in your application to
display information more quickly.

The TILCON Run−Time monitors the interactions between end−user and application. This powerful toolkit
processes trigger and link updates, notifies the real−time application when the user selects graphical user
interface (GUI) objects, and allows the application to update objects within the windows by means of C
function calls (the TILCON API).

This describes the basics of the TILCON Real−Time Developer. If you have used a previous version of the
TILCON Real−Time Developer the “What’s New in Version 4.0” will be of particular interest.

Contents

      • New features in Version 4.0
      • How this manual is organized

1.2    What’s new in Version 4

TILCON's version 4 is the culmination of an intensive design effort.

A major goal was the implementation of full dynamic creation and editing capabilities. All objects in version
4 can be created or edited dynamically. Version 4 features a highly simplified API consisting of a handful of
functions (Create, Simple Create, Get Values, Set Values, Display, Delete...being the core functions) along
with a name/value paired list of attributes affecting all of the objects characteristics. The result in an
unparalleled level of dynamic configuration abilities and fine tune control to the developer over the

                                                       9
                                               1     Introduction
appearance and behavior of objects at runtime.

TILCON has added numerous enhancements to the Graphics Editor and to the TILCON objects to make your
job easier, provide outstanding flexibility and allow you to effortlessly implement the functionality of objects.

Users of previous versions of TRTD will note that window capabilities have been drastically enhanced.
TILCON now offers industry−first scalable windows. Color options now include all 3 color models (RGB,
CMYK, HLS) as well as the TILCON Color Palette. Inverted colors, transparent icons, true color bitmaps are
now supported. Fountain fills (radial, log, linear) are now available. Line, edge cap, pattern options have been
expanded. TILCON’s Raw Image object allows you to import vector and raster images.

TILCON now offers fully customizable, segmented text for LCD or LED displays. A highly versatile Tree
Object is now provided for convenient display of hierarchical items. New standalone scale provides many new
options. Expanded capabilities and images handling for listbox and comboboxes. Pop−up menus are now
available for most objects. Tab notebooks now offer many new options including bottom, left and right side
tab options.

The TILCON Graphics Editor is now fully an application of the TILCON Runtime. With the power and
versatility of the TILCON’s API, developers of SCADA or other highly distributed applications will now be
able to easily create their own fully customized editors. To facilitate this task, TILCON will be selling editor
source code.

A brief summary of the main features of the principal TILCON objects will follow.

Buttons:          can respond in a variety of ways to 'clicks' depending on the button type − spring, toggle,
                  repeating, on/off and instant button types are available. Use vector and raster images to
                  complement or replace textual labels. Customize shape, shading, dimming, blinking and
                  help bubbles. Notify your application of events, invoke callback functions, and/or build a
                  list of commands to be triggered in response to the 'clicks'.

Radio Buttons:    manage a group of buttons; selecting one item automatically de−selects the others in the
                  group. Apply vector/raster images and help bubbles to each label. Customize layout, bullets,
                  shading. Triggers and callbacks are available for individual items, as well as notification of
                  the selected item by the group.

Checkboxes:       offer an array of checkmarks, layouts and shadings. Add vector/raster images and help
                  bubbles to the label. Respond to user actions by notifying the application, invoking a
                  callback, or triggering a pre−defined list of commands.

Scroll Areas:     these containers with scroll bars allow you to group many or large objects into a small area
                  of your window. Any object can be placed into a scroll area, including background images
                  (e.g. maps) over which other objects can be layered. Choose the viewed size, total size,
                  shadings, and scrollbar options.

Directory         allow the user to choose from a list of files. Drive, directory, filename and file type are
Boxes:            shown; file types can be limited so only certain types are visible to the user. An invaluable
                  tool for 'Open' and 'Save As' forms!

Toolbars:         attach themselves to any edge of a window − top, bottom, left or right. They provide space


                                                       10
                                              1     Introduction

                  for vital information that should be displayed even when the main contents of a window
                  change. Clocks, warning messages and status indicators are a few objects commonly placed
                  in toolbars, which can be customized in layout, shading, as well as in content.

Trees:            provide a visualization of a hierarchical list of items. Trees are built quickly and easily:
                  each item is added as a child or sibling of a previous item. Branches expand and collapse in
                  response to user 'clicks'; selected items can trigger commands or send notifications to the
                  application. Customize each item by adding an image, changing its shading or providing a
                  help bubble.

Color Listboxes/ are simple tools for providing a choice of colors to the user. A palette of 256 colors is
Comboboxes:      available through these listbox and combobox objects.


Listboxes:        allow the selection of one or more items from a list. Tailor the listbox behaviour to your
                  needs by choosing multiple/single selection, specifying the orientation and sorting of the
                  items, and setting the conditions under which notifications are sent, callbacks invoked, or
                  commands triggered. Specify multiple columns with individual widths. Provide images,
                  help bubbles, hiding, dimming and colors for each item.

Comboboxes:       combine a text field and a listbox. Choose a popup or static listbox, editable or non editable
                  text, and an array of options for both listbox and text components: layout, colors, images,
                  shading, help bubbles, to name a few.

Numberboxes:      are the perfect tool for numeric input. Control the layout of the editable text, repeating
                  arrows and label. Specify minimum, maximum values, decimal accuracy, number of digits
                  displayed, justification, arrow increments and help bubbles. Set the conditions when
                  notifications are sent, callbacks invoked, or commands triggered. Customize the appearance
                  by setting colors, shading and other options. Link to other object to share a common value.

Tabbed            group objects into related categories, each contained in its own folder. Selecting a tab
Notebooks:        changes the active folder, allowing many choices in a form while using little real estate.
                  Tabbed Notebooks options include setting the location, shape, font, default colors, highlight
                  colors, and labels of each tab, as well as the colors for each folder in the notebook.

Panels:           a very common tool for grouping objects, these containers are surrounded by a 3−D border
                  with an optional label at the top. All objects in the panel can be moved as one, hidden, cut,
                  copied, pasted − by performing these actions on the panel itself. The type of 3−D border,
                  the label and all colors can be customized.

HTML File         will, as the name implies, display an html page given its URL. Use this to create on−line
Displays:         help applications, or maybe even your own web browser! Font, scrollbar and notification
                  controls are built in (where applicable).

LCD Text:         simulates the segmented text of an LCD or LED screen. Ideal for realistic−looking displays,
                  e.g. for calculator applications and consumer appliance displays. Customize the segment
                  sizes, margins and colors.




                                                       11
                                             1     Introduction

Raw Images:      are used to import vector and raster images into a window. Like all objects, they have their
                 own frame, can be moved about the window, and can send notification of mouse clicks...
                 they can even display a help bubble.

Text:            editable, message, label and multi−line forms of text are available to meet the need for
                 textual objects. Editable and multi−line text can respond to user interaction and events −
                 gaining focus, losing focus, individual keystrokes − by sending a notification, invoking a
                 callback or triggering a command. International text is supported, as are input masking,
                 formatted output, and a wide assortment of fonts and sizes. Other attributes include
                 justification, colors, dimming, hiding, linking to other objects, blinking, and help bubbles.

Tables:          provide spreadsheet−like control of your data I/O. Each column can contain its own type of
                 object, including editable text, message text, raw images, numberboxes and comboboxes.
                 Every cell has all the options and attributes available to the type of object it contains, so
                 tables provide vast amounts of built−in functionality and configurability. In addition to
                 which the table has many attributes of its own, including row/column dimensions, scrollbar
                 options, grid line options and colors, and sorting. And, as with all objects, every attribute
                 can be modified dynamically!

Fill Meters:     are an invaluable tool for process−control applications, where a value is represented by the
                 fill level within an outer body. Updates are smooth, fast and flicker−free. In addition to the
                 predefined shapes (square, rounded, triangular, thermometer), vector images can be
                 imported. Fully configurable scales are automatically attached; calculations can be built in;
                 and the value can be linked to other objects. The meter can fill from its minimum or from 0;
                 it can also change its fill color automatically as its value crosses 0. Other features include
                 control of the colors and borders of each component.

Needle Meters: are formed after adding one or more Needles into a Needle Meter Body. An array of body
               shapes are available, defining the behaviour of the needles; they can also be hidden so the
               needles are shown over imported images, increasing their realism. As with fill meters,
               scales are automatically attached, and needle updates are smooth and flicker−free. Needles
               offer an array of predefined shapes and widths; vector images can also be imported to
               increase realism. Links can be made to other objects; calculations can be applied to values
               before they are displayed. Other options affect colors, tip/tail lengths, and pin shape and
               size.

Color− and       are ideal alarms. They are configured to have one or more 'states' corresponding to a range
Multi−State      of values. When the value in the object crosses the boundary from one state to another,
Objects          either the color or symbol of the object changes, and the object can trigger a command or
                 notify the application of this event. Vector images are imported and used as the symbols.
                 Blinking can be set for each state individually; links can be made to other objects; and
                 calculations can be applied to values before state changes are assessed.

Scales:          numeric, alphanumeric, date and time stand−alone scales provide the perfect complement to
                 drawings, animation and other objects. With the choice between linear or circular shapes,
                 linear or logarithmic increments, a tri−colored alarm indicator, and a battery of configurable
                 options for the text and tickmarks, the scale offers complete versatility.




                                                      12
                                                1     Introduction

Menubars:         placed at the top of the window, the menubar provides multiple levels of drop−down menu
                  items. The cascaded sub−menus provide command, toggle and radio button behaviour for
                  each of their items. Each item can send a notification, invoke a callback or trigger a
                  command upon its selection. Additionally, Pop−up Menus can be created in most objects;
                  these appear when a 'right−click' occurs on an object that has defined a pop−up menu.

Sliders:          provide a visual method for numeric input. The slider offers predefined and custom handle
                  images, optional end−buttons, attached scales, and a choice of directions. Customize the
                  layout and appearance of each of its components. Set the conditions under which the slider
                  responds to user input − by notification, callback or trigger.

Clocks:           offer the display of current date or time in a variety of formats. Fonts and colors are also
                  configurable.

Charts:           represent data as a function of an independent (x) variable, where each y−series provides a
                  data point for each x−value. The x−data may be numeric, alphanumeric, date or time;
                  attached scales can represent each of these cases. Charts offer multiple ways of plotting
                  their data: as scattered points, as connected lines, as solid areas, as pie slices, as vertical or
                  horizontal bars, as stacked bars or areas when more than one series is supplied. Series can
                  also be used to create x/y error bars or high−low plots. Other features include auto−scaling,
                  dual y−scales, markers for each point, individual colors for each line/area/marker, limits
                  above/below which plotted colors change, linear/log increments for each scale, and many
                  other options affecting the chart's appearance. Functions are provided to update the chart
                  one point at a time or in groups of points (like an oscilloscope) or to scroll data onto the
                  chart (like a strip−chart recorder). Like in other objects, every attribute of the chart is fully
                  dynamic and can be changed either during development or programmatically.

Spectrographs:    display a raster image in an array of cells. However, this data is supplied by directly setting
                  the colors for each cell rather than through the use of an image file. With a configurable cell
                  size, variable number of rows and columns, and the ability to scroll the spectrograph's data
                  towards any edge, this object provides a simple yet powerful alternative to raw images for
                  applications that have immediate access to the data that will form the image.

Animation         provide smooth motion for vector images and raster images, and smooth sizing and rotation
Areas             for vector images. The area defines the space in which the objects may move and sets up a
and Objects:      coordinate system scaled to that area. Object position, and the size and rotation of vector
                  objects, are calculated with respect to the animation area coordinates.


1.3        How the manual system is organized

Getting Started

The TILCON Getting Started manual contains instructions for installing the system .It also contains a set of
tutorials that explain the operation and creation of various GUI/MMI objects, text tools, color, draw functions
and window creation. It is highly recommended for first time users or if you are just browsing to see what the
software can do. The manual also contains the instructions for installing the software.

Users Guide


                                                        13
                                              1    Introduction

The TILCON User's Guide manual is designed for the convenience of the real−time application
programmer/screen developer.

This manual provides an overview of the TILCON Real−Time Developer system. It defines the interface
elements of the product and explains how to use it.

Editor

This manual covers the basics of creating a real−time application window.
Also described here are the draw functions and symbol creation features as well as a library of symbols,
bitmaps and icons which are provided with the software.

API Reference Manual

The TILCON Application Programming Interface manual contains the API function calls (for monitoring the
interaction between end−user and real−time application) and explains how to get the application up and
running.

Chapter 1 provides explanations on how to get the application running and the complete explanation of
TILCON function calls for monitoring the interaction between the end−user and the real−time application.

Chapter 2 contains the attributes pertaining to and descriptions of TILCON objects.

Chapter 3 contains the component attributes and descriptions, which are common to many of the objects.

Chapter 4 contains the C++ library.

ODBC Feature Manual

The TILCON ODBC Feature Manual contains the API function calls for the ODBC Feature. This manual
describes the TILCON ODBC Feature and how to use it.

OPC Feature Manual

The TILCON OPC Feature manual contains the function calls for the OPC Feature. This manual describes the
TILCON OPC Feature and how to use it.

Maps Feature Manual

The TILCON Maps Feature Manual contains the function calls for the TILCON Maps Feature. This manual
describes the TILCON Maps feature and how to use it.

Utilities Manual

The TILCON Utilities Manual contains descriptions and operating instructions for provided TILCON utilities.

The information contained in all of these manuals is also available via TILCON’s on−line help function. The
Getting Started manual is provided with the software. The other manuals are available at a cost if requested.

Pictures used in these manuals


                                                      14
                                                1     Introduction
The pictures used throughout this manual are snapshots taken from the Microsoft 95/98/NT version of
TILCON’s Real−Time Developer. There may be slight differences between your screens and the ones
depicted here.

Instructions in these manuals

Most of the instructions in this manual are based on mouse actions for using TILCON Real−Time
Development Software. In most cases, keyboard methods are omitted. Where keystrokes appear, the name for
the key usually appears in CAPITAL letters. Key combinations are indicated with plus signs; Alt+Ctrl+Del,
for instance, means that you should press all three keys at the same time.

To create objects, to select objects, to alter their properties, and to open forms with additional options, click on
the object using the left mouse button. If there are selectable elements within the object, you can then select
any one of them with a click. Once an object (or element) is selected, you can apply the options in the Main
menu or Speedbar that are relevant to it (color, for instance).

To access the real−time properties of the object

Click the right mouse button. An attribute modification screen will appear to allow the attributes of the object
to be modified.




                                                        15
                                                  2   Overview

2     Overview
2.1        How the TRTD works

The main advantages of the TILCON Real−Time Developer are the ease and speed with which you can
develop dynamic real−time applications and port them from one TILCON−supported platform to another
without recoding.

This simple diagram illustrates how the two components of the TRTD –– API and TILCON Runtime ––
interact with your application to deploy it in real−time.




Your application

It interacts with the real world by monitoring real−time data, reacting to messages, button clicks, etc. You
visually develop the windows of your application interface in the TILCON Graphics Editor. The Graphics
Editor saves each window and its contents as a collection of objects — not as platform−specific code. The
resulting .twd files can be used without modification on any platform. Your application communicates only
with the TILCON Runtime using API commands.

TILCON Runtime:

This program is the go−between your application and the windowing system. It contains the Graphics Engine
that interacts with the windowing system in response to API commands. It knows how to read a .twd file; how
to create a window from it; and how to create all the buttons, text, charts, meters and other objects within the
window. It knows what windowing system commands to use to update an object; how to get the value stored
in an object; and how to detect when the user changes an object. It runs side−by−side with your application
and in response to its API commands loads and displays the required windows, puts values into the meters,
charts and other objects. The Runtime tells the application about text modifications, button clicks and other
user interactions with objects in your interface window.

TILCON API:

This is the library of functions and attributes that your application calls up to start the Runtime and
communicate with it.

2.2    Building a real−time application

1) Your application starts the Runtime and opens a line of communication with it using the only
platform−specific API command: TRT_Start


                                                        16
                                                2     Overview
If the Runtime is already running, TRT_Start can be used either to gain and share access to the existing
objects, or to create an independent “object space” (see Concepts) for your process. After performing some
initialization commands, your application will then instruct the Runtime using API commands to load and
possibly display the introductory windows of your interface or create them dynamically.

2) The API commands are mostly called within the control process and pass instructions that are queued into
the Graphics Engine of the Runtime. The commands, which are asynchronous, don’t have to wait for the
display to be updated before returning to its task of monitoring/controlling the real−world system. (If a
command waits before passing control back, it is said to be synchronous) The Graphics Engine isolates the
GUI calls from the control application as a separate process to allow the control application to be real−time.

3) In the Web environment, the Graphics Engine relays messages along TCP/IP. Your application can interact
with other windows and nodes over the Web.

2.3     Porting your application to another TRTD−supported platform

All api and .twd files of your TRTD application are stored as data files, not C code, and can be used without
modification on any other supported platform.

To port your TRTD application:

1) Copy your code and .twd files to the file system of the new TRTD−supported platform

2) Compile with the TILCON library native to that platform

3) Run your application and the Runtime native to that platform. Your only platform−specific API function is
TRT_Start, which starts the Runtime for that platform.

2.4     Concepts

2.4.1     Notification and callback

The API commands involved in notification and callback are: TRT_GetInput and TRT_ReceiveData. When a
notification or callback occurs, the kernel queues a structure describing the event, then kicks the application
and returns to its own main loop. The application, at its convenience, executes the API command,
TRT_GetInput, to receive the next event in the notification queue. If this event is a callback, the callback is
executed before returning from the TRT_GetInput function call. If the event is processed by a callback, the
returning value is 1.

2.4.2     Objects

In simplest terms an object is any window, shape or text that has an ID. Each object has specific attributes
such as its size and common attributes like colour that control its appearance and behaviour. Object attributes
are described in Section 3.

Animation Area   Editable Text   Multi−line Text    Spectrograph
Animation Obj    Groups          Needle             State Objects
Button           Html            Numberbox          Tab Notebook
Charts           Label Text      Panel              Table

                                                       17
                                                 2    Overview

Checkbox          LCD Text       Radio Button        Tree
Clock             Listbox        Real Image          Window
Combobox          Menu Items     Scale
Directory Box     Message Text   Scroll Area
Draw Tools        Meter          Slider

2.4.3     Components

Objects can contain components. For example, the button object can have alarms which are components.

Alarms               Common                 Images               Scales
Anchor               Container              Indicators           Scrollbars
Angle                Cursor Types           Items                Tab Notebook
                                                                 Item
Blinking             Draw Components        Link Group           Tabbing
Borders (Frames)     Fields                 Notification         Text
                                                                 Component
Bubbles              Files                  Popup Menu           Triggers
Calculations         Fountain Fills         Position
Callbacks            Highlight              Pulldown Menu

2.4.4     Component Index

To ‘Get’ and ‘Set’ the attributes of the components a Component Index is used to point to a component.

2.4.5     Fonts

The TRTD uses a font driver to render text objects either to the screen or to an offscreen image. This driver
has a small footprint and is fast.

The TRTD maintains an internal list of all fonts. A font file is loaded only once. An initial list of True Type
font files is supplied with the TRTD. Additional fonts can be added to the registry using the
TRT_RegisterFontFile API command.

The appearance of the text can be altered by using the TRT_SetValues API command to affect the text
properties such as size, bold/italic, underline etc.

If a Window is resized, the text will be scaled appropriately.

Fonts are fully scalable and not limited to particular point sizes. The Editor, however, is limited in the number
of sizes in its font selection combobox.

Anti−aliasing is supported.

All valid TRTD colors including transparent, XOR (both inversion of background and XOR'ing background
with a color) is supported. Also provided is a variety of shadow types and shadow colors. These properties can
be set individually.


                                                         18
                                                2   Overview
The application program uses the TRT_GetValues and TRT_SetValues API commands to get / set the the font
attributes. These attributes are of the form TRT_ATT_FONT_*.

Four text types are supplied with the TRTD:

                     Helvetica
                     Courier
                     New Century
                     Times Roman


2.5    Object spaces

An object space is a description of an instance of the window(s) environment. Each object space is a different
instance of the window environment. An object’s ID must be unique within a given object space, but two
different object spaces may each contain the same window and/or object.




ODBC

For an overview of the ODBC Feature, please refer to the ODBC Manual.

OPC

For an overview of the OPC Feature, please refer to the OPC Manual.



                                                      19
                                                 2   Overview

Maps

For an overview of the Maps Feature, please refer to the Maps Manual.

2.6     Scalability

The TILCON Real−Time Developer enables you to create a custom−configured kernel, which is composed
only of the components required by your application. With this scalable kernel option, you can compile a
much smaller kernel using less RAM. The scalable option allows you to discard any unnecessary software
overhead. This of course, is especially significant in embedded systems where memory is at a premium. An
application, for example, that never uses animation does not require a Runtime kernel with animation
capabilities.

Using a utility in the TRTD and a simple point and click interface, you can select the desired capabilities from
the available set of TILCON libraries. The utility then produces a makefile that can be used to link the
appropriate libraries to create the scaled down Runtime kernel.

2.7     Triggers

Triggers are handled exclusively within Runtime. Triggers are API commands that were built into the objects
themselves when they were created. In response to specific events – foe example, a checkbox becoming
un−checked – the Runtime executes the trigger that was built into the selected object. In this way, a button
could be used to dim several fields and display a window, without the need for Runtime to communicate with
your application

2.8     TCP/IP

2.8.1    How the TILCON Channels work

The Tilcon channel is a mechanism through which communication takes place between two processes (or
threads).For example, between an application and a runtime. The channel is said to have two "ends". A
message sent from one end, arrives at the other end. These commands support a standard interface for sending
and receiving messages so that an application (without a runtime) can easily communicate with a TILCON
runtime on another machine. Channels are used internally by the Tilcon API to exchange data between an
application and the Tilcon kernel. There are also explicit channel API functions that an application can use for
interprocess communication. Each thread must create its own channel ends. A thread should not share a
channel end with another thread. The Tilcon channel mechanism is based on the Send/Receive?reply model. It
uses the native IPC mechanism when communication is between threads on the same machine and TCP/IP
between machines. The TRT_ChTrigger call is a non−blocking send.

With this architecture, one process could create a channel and another process could connect to that channel.
The first process could then use the channel to send a TRT_GetInput command to the second process which
could then reply with the requested data.

An application can connect to many remote runtimes each running on a different but supported platform. Each
remote channel is identified by a channel ID and channel name.

There are three phases to the life−cycle of a channel:

Connection: During this phase, a connection is established between two ends. Communication: During this

                                                         20
                                                2   Overview
phase, messages are sent between ends. Termination: During this phase, the connection between the ends is
disconnected.

In the following descriptions, the pertinent Tilcon API calls are described for each of the above mentioned
phases for each of the architectures identified.
Architectures:

Application – Runtime Same Machine




Application – Runtime Different Machines




                                                      21
                                                2   Overview




The TRT_StartEX will not launch the kernel in the remote machine. The kernel in the remote machine must
be running before the TRT_StartEX is called, or the TRT_StartEX call will fail.

The remote kernel can be started by calling the kernel with the −t option.


Application – Application Same Machine




                                                      22
                                                 2   Overview




Application – Application Different Machines (Not yet Implemented)


2.9     Redraw options

2.9.1   Redraw object

In order to update an object, it must be redrawn. All or part of the object must be cleared and then drawn again
to reflect new values or settings. This re−draw of the object may be done directly on the screen, or it may first
be produced as an offscreen image, which is copied to the screen. There are differences between Onscreen and
Offscreen Redraw.

Redrawing objects Onscreen is the quickest way to update them. However, because the old setting must be
cleared from the screen to draw and display the updated settings, the user often sees a flicker in the application
where the clearing occurs. The Onscreen option is best used when the application must make a quick update
of an object that does not change very frequently. For example, if the text in a Message Text box is updated

                                                       23
                                                  2    Overview
once every few minutes, the fast flicker that occurs does not repeat itself until a few minutes later. This
flickering therefore, does not draw attention to itself.

By drawing first into the offscreen image and then copying that image to the screen, the user never sees the
screen cleared, and therefore sees no flicker. This is a recommended method for updating objects, which are
constantly changing such as a Needle−Meter or Fill−Meter.

If the object to be updated has other superimposed objects, you must decider whether you want to draw just
the object or the area that encompasses it.

Redraw Object− is the choice when an object stands alone, or when no other objects are layered above or
beneath it. Drawing only one object is much faster than redrawing its area, but that object will be drawn over
any other object at that location.

2.9.2    Area redraw

This option redraws the object that you are updating and all other objects, which are layered on top and below
it. In effect, it draws the "area" which is affected by the update. In this way, an object is redrawn in its correct
position amidst the layers. If the area is drawn Onscreen, flickering will appear for the updating of the area. If
it is done Offscreen, the layers are drawn from the back to the front, and appear much smoother when
displayed.

2.9.3 Never

This option is useful for objects you do not wish to have redrawn when you know another update is
forthcoming. ‘Never’ objects do not redraw themselves when they are updated, only when the area they are in
must be redrawn.

Example:

Let's create a new window, link a few objects together, and see how the Redraw Options affect the display of
these objects. The objects that we are going to create are all 'Output Objects'. The user cannot set (input) their
values directly; they display (output) values that are set program

2.10 Returns

Every command returns a value:

0 – command successful

1 – critical error

other value – other type of error

2.11 Running your real−time application

2.11.1 Structure

A sample program structure for a typical real−time application is the following:

TRT_StartUP(…);                spawns the TILCON Runtime

                                                        24
                                                 2   Overview

TRT_WindowLoad(…);                       loads a .twd file into memory

TRT_WindowDisplay(…);         displays the window

TRT_GetInput(…);                         queries TILCON Runtime for events/notifications

          It receives the notification structure from Runtime and invokes any callbacks

TRT_MeterValue(…);                       changes the value of a meter (example of attribute change)

TRT_Exit(…);                  Runtime closes all windows and exits

2.11.2 Attributes

The way an object looks and behaves is controlled by attributes. All objects have a set of common attributes
that cause the same behavior. Each object has a set of attributes specific to itself. Some objects contain
components. These components also have attributes.




2.11.2.1 Setting and getting specific attributes(TRT_SetValues and TRT_GetValues)

The functions needed to interact with an object's properties are:

TRT_SetValues to set the format etc. of the the attribute of the object

TRT_GetValues to obtain actual values for the attribute

These functions take a variable number of arguments; the last argument must always be a NULL pointer to
show that the list is complete. The arguments in these functions are paired. One parameter specifies which
attribute is to be changed or queried; it is immediately followed by the value to be assigned or, for
TRT_GetValues, by a pointer to a variable that will hold the value of the queried attribute.

Some attributes cannot be set but only queried (e.g. TRT_ATT_RADIO_LAST_FOCUS). The Usage
column in tables describing object attributes in Section x, indicates whether the attribute can be used only in
TRT_SetValues (S), only in TRT_GetValues (G) or in both (S, G).

Using the example of a clock, to set the format, etc of the time values:



                                                       25
                                                2    Overview
TRT_SetValues (TRT_cid, "my_clock",
TRT_ATT_CLOCK_TYPE, TRT_TIME_CLOCK_TYPE,
TRT_ATT_CLOCK_FORMAT, TRT_TIME_FORMAT_HHMMSS,
NULL);

In addition to setting the properties of an object, TRT_SetValues can also be used to perform certain
commands. For example, TRT_SetValues can use TRT_ATT_LIST_DELETE_ITEMS to empty a listbox
of all items.

To get the actual time:

TRT_GetValues (TRT_cid, "my_clock",
TRT_ATT_CLOCK_FORMAT,&long_value,
NULL);

2.11.3 Common attributes

Many attributes are common to more than one object and may even be used several times within a single
object. For example, one border can surround a button; a second border can enclose its text; a third border its
image; and a fourth border both the text and image. To set an attribute for one of these borders, the command
must specify which border to modify. This is done using:

TRT_ATT_CHANGE_BORDER_TYPE to specify the border of interest (i.e. border around button)

TRT_ATT_CURRENT_BORDER_TYPE to identify which border is ‘current’ or of interest (i.e. this is the
border around the button)

          // set the border enclosing the button to a one−tone look //

TRT_SetValues (TRT_cid, "my_button",
TRT_ATT_CHANGE_BORDER_TYPE, TRT_CHANGE_FRAME_LOOK,
TRT_ATT_BORDER_LOOK3D, TRT_ONE_TONE_LOOK3D,
NULL);

          // what's the look of the border around the button? //

TRT_GetValues, TRT_cid, "my_button",
TRT_ATT_CHANGE_BORDER_TYPE, TRT_CHANGE_FRAME_LOOK,
TRT_ATT_BORDER_LOOK3D, &look,
NULL);

          // which is the "current" border? //

          // which_border should be set to TRT_CHANGE_FRAME_LOOK //

          // if this follows the previous command. //

TRT_GetValues, TRT_cid, "my_button",
TRT_ATT_CURRENT_BORDER_TYPE, &which_border,
NULL);

2.11.4 Attribute data types

Built into each attribute is a flag indicating what data type is expected for the associated value. For
TRT_SetValues, the value can be a long, double, NULL−terminated character string, or a pointer to a
TRT_VarLen structure. For TRT_GetValues, the value is a pointer to a long or double, a character buffer or

                                                      26
                                               2   Overview

a pointer to a char *, or a pointer to a TRT_VarLen.

2.11.4.1 Character strings

Using a character string in a TRT_SetValues call follows the same style as using a double or a long shown in
the previous examples.

char buff[] = "This is out";
TRT_SetValues (TRT_cid, "my_button",
TRT_ATT_BUTTON_OUT_TEXT, buff,
TRT_ATT_BUTTON_IN_TEXT, "This is in",
NULL);

The string must be NULL−terminated and, for non−ASCII text, encoded using UTF8 (the multibyte version
of Unicode).

For TRT_GetValues, there are two syntaxes for obtaining a string. If you know the size of the string and
have a buffer large enough to hold it, this syntax is faster:

char *cptr, buff[64];
        // place string into pre−allocated buffer //
TRT_GetValues (TRT_cid, "my_button",
TRT_ATT_BUTTON_OUT_TEXT, buff,
NULL);

If you don't know the size of the string in advance, then combining the attribute (not the value!) with
TRT_ATT_ALLOC signals TRT_GetValues to allocate a buffer for you. In this case, you must provide the
address of a character pointer, which you will have to free when you're done with it.

        // allocate memory for the string //
TRT_GetValues (TRT_cid, "my_button",
TRT_ATT_BUTTON_OUT_TEXT | TRT_ATT_ALLOC, &cptr,
NULL);

2.11.4.2 Attribute values using TRT_VarLen

TRT_Varlen is used with several attributes, in particular with Chart data and with Drawing objects.The
TRT_VarLen structure looks like:




typedef struct
{
                    long length;
   void *buffer;



                                                       27
                                                   2    Overview
} TRT_VarLen;

The buffer points to a structure specific to the attribute; the length is the size of that structure in bytes.

For instance, consider a chart, which plots one or more series of data (doubles) against x values. The attribute
TRT_ATT_CHART_SERIES_DATA can be used to change some or all of the data for each series. Its
associated structure is described in Appendix C as

{
    long num_pts;
    long first_index;
    double data[num_pts];
}

The size of the structure depends on num_pts.

To update the first ten points in a series, for example:

typedef struct
{
    long num_pts;
    long first_index;
    double data[10];
} Update10Points_St;

The code to update the first ten points of the first series would be:

void UpdateTenPoints()
{
    Update10Points_St update;
    TRT_VarLen cmd;
    long i;
                    // fill update structure //
   update.num_pts = 10;
   update.first_index = 0;
   for (i=0; i<10; i++)
       update.data[i] = GetSomeValue();

                     // apply it into the TRT_VarLen structure //

    cmd.length = sizeof(Update10Points_St);                     // size in bytes //
    cmd.buffer = (void *) &update;                              // points to the struct //

                     // update the chart //

   TRT_SetValues (TRT_cid, "my_chart",
TRT_ATT_CHART_CHANGE_SERIES, 0, // the first series
TRT_ATT_CHART_SERIES_DATA, &cmd,        // the varlen ptr
NULL);
   }

To update a variable number of points, a buffer of the right form must be created dynamically instead of
relying on a structure.

void UpdateNPoints(long num_pts)
{
TRT_VarLen cmd;


                                                           28
                                               2    Overview
long *lptr;
double *dptr;
long i;
                // the buffer will require 2 longs + num_pts doubles //
cmd.length = 2 * sizeof(long) + num_pts * sizeof(double);
cmd.buffer = malloc (cmd.length);

                        // the first two entries are longs //
lptr = (long *) cmd.buffer;
*lptr++ = num_pts;      // number of points in update //
*lptr++ = 0;            // first point to update //

                        // then come the data, num_pts doubles //
dptr = (double *)lptr;
for (i=0; i<num_pts; i++)
*dptr++ = GetSomeValue();

                // update the chart //
TRT_SetValues (TRT_cid, "my_chart",
TRT_ATT_CHART_CHANGE_SERIES, 0, // the first series
TRT_ATT_CHART_SERIES_DATA, &cmd,        // the varlen ptr
NULL);

                // and free the buffer //
free (cmd.buffer);

}

TRT_GetValues has the option of allocating space for the TRT_VarLen. However, the buffer contained in
the TRT_VarLen structure not the structure itself is allocated. The request for space allocation is, again
signalled by combining TRT_ATT_ALLOC with the attribute being queried, as shown in this example.

void GetSeriesData()
{
TRT_VarLen cmd;
long *lptr, num_pts, first_index;
double *data;

                // get the data for the first series //
TRT_GetValues (TRT_cid, "my_chart",
TRT_ATT_CHART_CHANGE_SERIES, 0, // the first series
TRT_ATT_CHART_SERIES_DATA | TRT_ATT_ALLOC, &cmd,
NULL);

                // interpret varlen structure //
lptr = (long *)cmd.buffer;
num_pts = *lptr++;
first_index = *lptr++;
data = (double *) lptr;
}

When you know the size of the buffer required, you can accelerate the TRT_GetValues by using a
pre−allocated buffer. For example, if you know there are ten points in each series, you can use the
Update10Points_St structure defined earlier.

void GetSeriesData()
{
Update10Points_St update;
TRT_VarLen cmd;


                                                     29
                                                  2   Overview
long *lptr, num_pts, first_index;
double *data;

          // we know there are 10 points in the series //
          // the required buffer is thus a structure of type Update10Points_St //

cmd.length = sizeof(Update10Points_St); // size in bytes //
cmd.buffer = (void *) &update; // points to the struct //

                // get the data for the first series //
TRT_GetValues (TRT_cid, "my_chart",
TRT_ATT_CHART_CHANGE_SERIES, 0, // the first series
TRT_ATT_CHART_SERIES_DATA, &cmd,        // cmd.buffer is filled
NULL);

                // interpret varlen structure //
num_pts = update.num_pts;
first_index = update.first_index;
data = update.data;
}

2.11.5 Attribute flags

It is enough to have part of the attribute name for its identification. The remaining bits are used for attribute
flags to specify properties such as the data type to expect or to denote options.

The TRT_ATT_ALLOC flag, for example is used to specify that space be allocated during a
TRT_GetValues call. TRT_ATT_REFRESH specifies that the object either be redrawn or not after the
completion of the TRT_SetValues command. Normally, the default setting is the preferred option. If set, the
entire object will be refreshed. If not, only the damaged part of object will be.

For example, the default setting for refresh bit is off for TRT_ATT_DRAW_MODE. But an object will
refresh itself by:

TRT_SetValues (TRT_cid, object_ID,
TRT_ATT_DRAW_MODE | TRT_ATT_REFRESH,
TRT_DRAW_FORCED_ONCE | TRT_DRAW_OBJECT_ONSCREEN,
NULL);

2.11.6 Using TRTConst.h and other headers

Most of the information in this manual can actually be deduced from an examination of the header files.

<tilcon/TRTAPI.h>               Version 4.6API functions
<tilcon/TRT_API.h>              Additional functions (e.g. those used in v3)
<tilcon/TRTConst.h>             Object and component attributes, and most macro definitions.
<tilcon/TRTBaseClass.h> Basic C++ object/class definitions.

TRTConst.h has been organized in a similar fashion to this manual. The attributes for each object are
gathered together, and comments indicate which components are used by that object. With many attributes
you will find definitions for the possible values for that attribute.

To find an object in TRTConst.h, search for @W and the object type,

For example, button:


                                                        30
                                                  2   Overview
@WButton

To find the attributes of a component, search for @L and the component type,

For example, the scale on the button:

@Lscale

2.11.7 Using TRT_ATT_CHANGE and TRT_ATT_CURRENT

When an object contains several similar components (e.g. items in a list box, plots in a chart etc.),
TRT_ATT_CHANGE_xxx and TRT_ATT_CURRENT_xxx can specify one component in particular.

This is necessary to Set/Get the attributes of that component (e.g. to set the plot type of Plot # 2 on a chart to
be a bar plot),

TRT_SetValues (TRT_cid, chart.ID, TRT_ATT_CHART_CHANGE_PLOT, 2,
TRT_ATT_CHART_PLOT_TYPE, TRT_CHART_2D_BAR, NULL);

When using TRT_SetValues, TRT_ATT_CHANGE and TRT_ATT_CURRENT are interchangeable.

To query which component is the ”active” one, use

TRT_ATT_CURRENT_xxx


2.12 Compiling and linking

To help make your application easily portable, the TILCON TRTAPI library contains the code that actually
communicates with the TILCON Runtime. That is, the TRT functions (TRT_WindowLoad(), TRT_Exit(),
etc.) are in TRTAPI. The Runtime itself is contained in trtkrnlw in MS, (trtkrnlwx in X Windows, trtkrnlwp in
Photon).

TRTAPI uses C++ commands, so plib3r.lib must be present during compilation

QNX:

cc <filename.c> −l TRTAPI −o <filename>

          For Watcom compiler:

install the C++ libraries

MS:

          For Watcom compiler:

wcl386 /l=nt_win <filename.c> \TE4\lib\watcom\trtapi.lib

          For Microsoft Visual C++ compiler:

cl <filename.c> /link \TE4\lib\vc\trtapi.lib gdi32.lib user32.lib




                                                        31
                                               2   Overview

2.13     Sample application

Here is the skeleton of an application for use with TILCON. Communication is opened with TRT_Start, and
an initial window is created and displayed. Within the main loop, TRT_GetInput waits for the Runtime to
report an event. Your application provides some form of ProcessTilconNotification function to be called when
notifications are received from the Runtime; TRT_GetInput takes care of processing callbacks.
TRT_GetInput can also be set up so that messages from other processes can be received, or it can wait for
semaphores to signal events, allowing for this program to communicate with other processes. At some point,
in response to some event, the program will break out of the infinite loop and call TRT_Exit, which will tell
the Runtime to terminate.




                         This is a very simple application that uses TRTD V4.6.

                                   It creates a window and two buttons.

                                                     32
                                            2   Overview
                         on one of the buttons the window will change color.

                            To compile you must link this to "trtapi.lib".

#define CC_TRT_DOS        // Do this so the kernel knows we are in Windows

#include   <windows.h>
#include   <stdlib.h>
#include   <tilcon/TRTConst.h>
#include   <tilcon/TRTAPI.h>

// Function Prototypes //

void CreateGUI(pid_t TRT_pid);

// Global variables //

TRT_StartData StartData;            // This structure will store info about the kernel

// Function Definitions WinMain or Main //

int WINAPI WinMain ( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow
{
TRT_ReceiveData rec_data;
long running;
long looping = 0;
long c;

        // Start the runtime //

StartData.Display = NULL;       // This flag is used for TCP/IP. Normally it is set to NULL
StartData.Userprog = "tutor";
StartData.AppName = "tutor";
StartData.Flags = NULL;         // For now set to NULL
StartData.Os_Env = TRT_MS_WINDOWS;      // The operating system this app is running under.
running = TRT_Start ( &StartData);

        // If the runtime started up okay //

if (0 == running)       // − 1 an error//
{                       // Create the GUI //
CreateGUI(StartData.TRT_CID);
looping = 1;
}

while (looping)
{

        // Wait for input from the runtime. Notice TRT_BLOCK //

c = TRT_GetInput (0, 0, NULL, 0, &rec_data, TRT_BLOCK );
if (c == 0)
{
                // You can find definitions for the codes in TRTCONST.H //
                // The receive data structure essentially works the same as //
                // in version 3 //

switch (rec_data.code)
{



                                                  33
                                         2   Overview
                         // The user clicked on a button //

case TRT_button:
if (0 == strcmp("button1", rec_data.ID))
{

                                 // Color the window dark blue //

TRT_SetValues(StartData.TRT_CID, "main",
TRT_ATT_FILL_COLOR, 1,
NULL );
}
else if (0 == strcmp("button2", rec_data.ID))
{

                                 // Color the window green //

TRT_SetValues(StartData.TRT_CID, "main",
TRT_ATT_FILL_COLOR, 2,
NULL );
}

break;

                // The user clicked on something else, most probably the X close button on the

default:
looping = 0;;

break;
}
}
}

TRT_Delete(StartData.TRT_CID, "main");
TRT_Exit(StartData.TRT_CID);
return 0;
}

void CreateGUI (pid_t TRT_pid)

  Parameters: TRT_pid:        Channel ID of an object space within a tilcon runtime
  Returns     int:            Exit code
  Comments:                      Create a window and two (2) buttons.

void CreateGUI(pid_t TRT_pid)
{
SimpleObject widget;    // This structure is used to create Widgets

         // Create the main window //

strcpy ( widget.Id,     "main" ) ;         // This is the ID of the window
strcpy ( widget.Label, "Tutor" ) ;         // This is the label that appear on the window
widget.parent_id[0] = NULL;     // The window will not have a parent
widget.Style    = 0;
widget.X        = 0; // It will appear at 0,0
widget.Y        = 0;
widget.Width         //
                = 320; and be 320x240
widget.Height   = 240;
widget.Flag     = 0;



                                              34
                                                    Colors
TRT_SimpleCreate (TRT_pid, (long)TRT_window, &widget);

          // Create a button //

strcpy ( widget.Id, "button1");
strcpy ( widget.Label, "Blue");
strcpy ( widget.parent_id, "main");
widget.Style    = 0;
widget.X        = 5;
widget.Y        = 5;
widget.Width    = 60;
widget.Height   = 40;
widget.Flag     = 0;

TRT_SimpleCreate (TRT_pid, (long)TRT_button, &widget );

          // Make the button look a little more intresting //

TRT_SetValues(TRT_pid, "button1",
TRT_ATT_HIDE,0,
TRT_ATT_BORDER_LOOK3D, 0,
TRT_ATT_BORDER_DEPTH3D, 2,
TRT_ATT_NOTIFY, 1,
NULL);

          // Create another button with the same attributes //

strcpy ( widget.Id, "button2"); // All widgets require a unique ID
strcpy ( widget.Label, "Green");
strcpy ( widget.parent_id, "main");
widget.Style    = 0;
widget.X        = 65;
widget.Y        = 5;
widget.Width    = 60;
widget.Height   = 40;
widget.Flag     = 0;

TRT_SimpleCreate (TRT_pid, (long)TRT_button, &widget );
TRT_SetValues(TRT_pid, "button2",
TRT_ATT_HIDE, 0,
TRT_ATT_BORDER_LOOK3D, 0,
TRT_ATT_BORDER_DEPTH3D, 2,
TRT_ATT_NOTIFY,1,
NULL);

          // Display our Widgets //

TRT_Display(TRT_pid, "button2");
TRT_Display(TRT_pid, "button1");
TRT_Display(TRT_pid, "main");
}


Colors
When updating the color of an object, your application must pass an appropriate value to the API function.
This value can (a) be an index into the TILCON palette; (b) specify values for red, green and blue intensities;
(c) be TRT_Transparent; or (d) TRT_InvertColor.



                                                      35
                                                  Colors
The TILCON palette consists of 256 colors. These are the colors available in color listboxes, and in the
TILCON Graphics Editor as you create windows. The red, green and blue intensities for each palette entry are
listed at the end of this section. Macro definitions are available for the first 16 colors.

To obtain a color with specific values for red, green and blue intensities, use TRT_RGB_Color or
TRT_RGB. TRT_RGB_Color accepts r,g,b values from 0 to 255 and obtains a value that you can use in
subsequent API functions. TRT_RGB returns the color instead of passing it as a parameter.

To set a color to transparent, use TRT_Transparent

Use TRT_InvertColor to draw objects by inverting the colors behind them.

Examples:

TRT_RGB_Color(&black,0,0,0);

White = TRT_RGB(255,255,255);

TILCON Palette Table

Macro                Index   R     G     B
TRT_BLACK            0       0     0     0
TRT_DBLUE            1       0     0     128
TRT_DGREEN           2       0     128   0
TRT_DCYAN            3       0     128   128
TRT_DRED             4       128   0     0
TRT_DMAGENTA         5       128   0     128
TRT_DYELLOW          6       128   128   0
TRT_LGRAY            7       192   192   192
TRT_DGRAY            8       128   128   128
TRT_BLUE             9       0     0     255
TRT_GREEN            10      0     255   0
TRT_CYAN             11      0     255   255
TRT_RED              12      255   0     0
TRT_MAGENTA          13      255   0     255
TRT_YELLOW           14      255   255   0
TRT_WHITE            15      255   255   255
−−                   16      0     0     0
−−                   17      20    20    20
−−                   18      32    32    32
−−                   19      44    44    44
−−                   20      56    56    56
−−                   21      69    69    69
−−                   22      81    81    81
−−                   23      97    97    97


                                                     36
                            Colors

−−   24   113   113   113
−−   25   130   130   130
−−   26   146   146   146
−−   27   162   162   162
−−   28   182   182   182
−−   29   203   203   203
−−   30   227   227   227
−−   31   255   255   255
−−   32   0     0     255
−−   33   65    0     255
−−   34   125   0     255
−−   35   190   0     255
−−   36   255   0     255
−−   37   255   0     190
−−   38   255   0     125
−−   39   255   0     65
−−   40   255   0     0
−−   41   255   65    0
−−   42   255   125   0
−−   43   255   190   0
−−   44   255   255   0
−−   45   190   255   0
−−   46   125   255   0
−−   47   65    255   0
−−   48   0     255   0
−−   49   0     255   65
−−   50   0     255   125
−−   51   0     255   190
−−   52   0     255   255
−−   53   0     190   255
−−   54   0     125   255
−−   55   0     65    255
−−   56   125   125   255
−−   57   158   125   255
−−   58   190   125   255
−−   59   223   125   255
−−   60   255   125   255
−−   61   255   125   223
−−   62   255   125   190
−−   63   255   125   158
−−   64   255   125   125
−−   65   255   158   125

                             37
                             Colors

−−   66    255   190   125
−−   67    255   223   125
−−   68    255   255   125
−−   69    223   255   125
−−   70    190   255   125
−−   71    158   255   125
−−   72    125   255   125
−−   73    125   255   158
−−   74    125   255   190
−−   75    125   255   223
−−   76    125   255   255
−−   77    125   223   255
−−   78    125   190   255
−−   79    125   158   255
−−   80    182   182   255
−−   81    199   182   255
−−   82    219   182   255
−−   83    235   182   255
−−   84    255   182   255
−−   85    255   182   235
−−   86    255   182   219
−−   87    255   182   199
−−   88    255   182   182
−−   89    255   199   182
−−   90    255   219   182
−−   91    255   235   182
−−   92    255   255   182
−−   93    235   255   182
−−   94    219   255   182
−−   95    199   255   182
−−   96    182   255   182
−−   97    182   255   199
−−   98    182   255   219
−−   99    182   255   235
−−   100   182   255   255
−−   101   182   235   255
−−   102   182   219   255
−−   103   182   199   255
−−   104   255   0     0
−−   105   230   0     0
−−   106   199   0     0
−−   107   173   0     0

                              38
                           Colors

−−   108   143   0     0
−−   109   117   0     0
−−   110   87    0     0
−−   111   61    0     0
−−   112   255   94    0
−−   113   230   84    0
−−   114   199   73    0
−−   115   173   64    0
−−   116   143   52    0
−−   117   117   43    0
−−   118   87    32    0
−−   119   61    22    0
−−   120   255   191   0
−−   121   230   172   0
−−   122   199   149   0
−−   123   173   130   0
−−   124   143   107   0
−−   125   117   88    0
−−   126   87    65    0
−−   127   61    46    0
−−   128   255   255   0
−−   129   203   230   0
−−   130   176   199   0
−−   131   153   173   0
−−   132   126   143   0
−−   133   104   117   0
−−   134   77    87    0
−−   135   54    61    0
−−   136   128   255   0
−−   137   115   230   0
−−   138   99    199   0
−−   139   87    173   0
−−   140   71    143   0
−−   141   59    117   0
−−   142   43    87    0
−−   143   31    61    0
−−   144   34    255   0
−−   145   31    230   0
−−   146   27    199   0
−−   147   23    173   0
−−   148   19    143   0
−−   149   16    117   0

                            39
                            Colors

−−   150   12   87    0
−−   151   8    61    0
−−   152   0    255   64
−−   153   0    230   57
−−   154   0    199   50
−−   155   0    173   43
−−   156   0    143   36
−−   157   0    117   29
−−   158   0    87    22
−−   159   0    61    15
−−   160   0    255   157
−−   161   0    230   142
−−   162   0    199   123
−−   163   0    173   107
−−   164   0    243   88
−−   165   0    117   72
−−   166   0    87    53
−−   167   0    61    38
−−   168   0    255   255
−−   169   0    230   230
−−   170   0    199   199
−−   171   0    173   173
−−   172   0    143   143
−−   173   0    117   117
−−   174   0    87    87
−−   175   0    61    61
−−   176   0    162   255
−−   177   0    145   230
−−   178   0    126   199
−−   179   0    110   173
−−   180   0    90    143
−−   181   0    74    117
−−   182   0    55    87
−−   183   0    39    61
−−   184   0    64    255
−−   185   0    57    230
−−   186   0    50    199
−−   187   0    43    173
−−   188   0    36    143
−−   189   0    29    117
−−   190   0    22    87
−−   191   0    15    61

                             40
                           Colors

−−   192   30    0   255
−−   193   27    0   230
−−   194   23    0   199
−−   195   20    0   173
−−   196   17    0   143
−−   197   14    0   117
−−   198   10    0   87
−−   199   7     0   61
−−   200   128   0   255
−−   201   115   0   230
−−   202   99    0   199
−−   203   87    0   173
−−   204   71    0   143
−−   205   59    0   117
−−   206   43    0   87
−−   207   31    0   61
−−   208   221   0   255
−−   209   199   0   230
−−   210   172   0   199
−−   211   150   0   173
−−   212   124   0   143
−−   213   102   0   117
−−   214   75    0   87
−−   215   53    0   61
−−   216   255   0   191
−−   217   230   0   172
−−   218   199   0   149
−−   219   173   0   130
−−   220   143   0   107
−−   221   117   0   88
−−   222   87    0   65
−−   223   61    0   46
−−   224   255   0   98
−−   225   230   0   88
−−   226   199   0   76
−−   227   173   0   66
−−   228   143   0   55
−−   229   117   0   45
−−   230   87    0   33
−−   231   61    0   23
−−   232   255   0   0
−−   233   230   0   0

                            41
                                        Transmit Keys, Shortcut Keys

−−                   234    199   0     0
−−                   235    173   0     0
−−                   236    143   0     0
−−                   237    117   0     0
−−                   238    87    0     0
−−                   239    61    0     0
−−                   240    255   94    0
−−                   241    230   84    0
−−                   242    199   73    0
−−                   243    173   64    0
−−                   244    143   52    0
−−                   245    117   43    0
−−                   246    87    32    0
−−                   247    61    22    0
−−                   248    255   255   0
−−                   249    230   230   0
−−                   250    199   199   0
−−                   251    173   173   0
−−                   252    143   143   0
−−                   253    117   117   0
−−                   254    87    87    0
−−                   255    61    61    0

Transmit Keys, Shortcut Keys
When specifying a particular keystroke, your application can use the ASCII value of the character or any of
the following:

TRT_KEY_BACKSPACE             Backspace key
TRT_KEY_TAB                   Tab key
TRT_KEY_ENTER                 Enter key
TRT_KEY_ESC                   ESC key
TRT_KEY_SPACE                 Spacebar
TRT_KEY_CAPS                  Caps lock key
TRT_KEY_PGUP                  Page up key
TRT_KEY_PGDN                  Page down key
TRT_KEY_END                   End key
TRT_KEY_HOME                  Home key
TRT_KEY_LEFTARROW             Left arrow key
TRT_KEY_UPARROW               Up arrow key
TRT_KEY_RIGHTARROW            Right arrow key
TRT_KEY_DOWNARROW             Down arrow key


                                                     42
                                      Transmit Keys, Shortcut Keys

TRT_KEY_INS                   Insert key
TRT_KEY_DEL                   Delete key
TRT_KEY_CENTER                The center key on the key pad
TRT_KEY_GRAYPLUS              The plus key on the key pad
TRT_KEY_GRAYMINUS             The minus key on the key pad
TRT_KEY_GRAYENTER             The enter key on the key pad
TRT_KEY_GRAYASTRIX            The asterisk key on the key pad
TRT_KEYGRAYSLASH              The slash key on the key pad
TRT_KEY_F1                    The F1 function key
TRT_KEY_F2                    The F2 function key
TRT_KEY_F3                    The F3 function key
TRT_KEY_F4                    The F4 function key
TRT_KEY_F5                    The F5 function key
TRT_KEY_F6                    The F6 function key
TRT_KEY_F7                    The F7 function key
TRT_KEY_F8                    The F8 function key
TRT_KEY_F9                    The F9 function key
TRT_KEY_F10                   The F10 function key
TRT_KEY_F11                   The F11 function key
TRT_KEY_F12                   The F12 function key

This value can be combined using the bitwise OR with any or all of the following:

TRT_KEY_CTRL The CTRL key
TRT_KEY_ALT The ALT key
TRT_KEY_SHIFT The SHIFT key




                                                     43

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:90
posted:2/13/2011
language:English
pages:43