|
X64 Wireless Terminals
|
|
| XRML
advanced terminal screen description language |
General
Functions
Input/Output
Functions (T_Read)
List
Functions
Variable
Functions
Goto
Functions
XRML functions are defined in RIOCOM.DLL
1. Simple
description of XRML and sample program
XRML works with screens that are sent to and received from the
terminals.
PC software must poll the DLL for events (typically at 100ms invervals)
using RIOCOM.DLL function
T_CheckIfReceiveData(TerminalId,
ScreenName, DataType, RawDataSize, RawData)
This function returns 0 when nothing happened and 1 in case a terminal
has issued an event, it's return parameters mean the following:
DataType is an integer describing the type of event that has ocurred
TerminalId contains the string name of the terminal causing the event
ScreenName is a string description of the next screen the terminal is
expecting
RawDataSize and RawData are not
normally used, they allow user C code embedded in the XRML screens to
comunicate with the PC software
When a terminal is waiting for a valid screen it issues a
data_type_ask_for_screen type event and the software on the PC should
send it any number of screens it wants to. A screen with the
scr_flag_execute bit set to 1 will be executed at once. All other
screens must have the scr_flag_execute bit set to 0 and will be stored
in cache for later use. Screens have a "cache valid thru" property that
can range from 1 second to several hours, days or years. When a
terminal
is reset it will ask for a "START" screen. On subsequent screen
requests
this description is set by the previous screen.
The terminals will also use screens to send data back to the PC. For
sending a screen back to the PC a terminal will issue
a data_type_send_screen_xxzipped type event. The PC the software
must then run the same program lines it used to create the initial
screen and the DLL will update its variables according to the data
received.
Let's see an example:
Program text is displayed in red
// We set a timer that keeps polling the DLL for events
// and calls the functions SendScreen and ReceiveScreen in our code
// Please copy this code block to your own applications
Private Sub Timer1_Timer()
Dim TerminalId As String
Dim ScreenName As String
Dim DataType As Byte
Dim RawDataSize As Long
Dim RawData As String
TerminalId =
Space(8)
ScreenName =
Space(50)
RawData =
Space(2000)
Do While
T_CheckIfReceiveData(TerminalId, ScreenName, DataType, RawDataSize,
RawData)
Debug.Print "Receive CheckIf" + ScreenName + " " + TerminalId
ScreenName = Trim(ScreenName)
If Len(ScreenName) >0 Then
ScreenName = Left(ScreenName, Len(ScreenName) - 1)
End If
Select Case DataTypedata_type_ask_screen
Case data_type_send_screen_zipped
ReceiveScreen TerminalId, ScreenName
Case data_type_send_screen_unzipped
ReceiveScreen TerminalId, ScreenName
Case data_type_ask_screen
SendScreen TerminalId, ScreenName
Case data_type_send_raw_data
' This
is only used for comunicating with
InsertLine
Left(RawData, RawDataSize) ' C
software embedded inside the XRML screens
End Select
ScreenName = Space(50)
Loop
End Sub
// The SendScreen and ReceiveScreen functions defined below will call
the apropriate
// screen_drawing / data_retrieving function for each screen that must
be sent to or
// received from the terminal
// You must edit these two functions to include calls for all the
screens you want to implement
// Screen selection logic must be implemented in the SendScreen function
// On this example an error_message_screen is sent in place of the
invoice_screen
// when password_valid is not true
// The 0 parameter is passed to the functions so they know a SendScreen
is being done
Private Sub SendScreen(TerminalId
As String, ScrName As String)
Select Case
ScrName
Case "login"
login_screen 0
Case "invoice"
If password_ok=1 Then
invoice_screen 0
Else
error_message_screen 0
End If
Case "logoff"
logoff_screen 0
End Select
End Sub
//
This function just calls the corresponding screen_drawing /
data_retrieving function
// when a screen is received from the terminal so that the program
variables are updated
// and data can be processed and/or written to a database
// The 1 parameter is passed to the
functions so they know a ReceiveScreen is being done
Private Sub
ReceiveScreen(TerminalId As String, ScrName As String)
Select Case ScrName
Case "login"
login_screen 1
Case "invoice"
invoice_screen
1
Case "logoff"
logoff_screen 1
End Select
End Sub
// When a terminal asks for a screen the software must reply with
one or more screens.
// We'll define a few functions that create screens on the terminal and
read back its data.
// An integer parameter indicates if the function is to receive or send
data.
// The same function is used both for creating the screen and
retrieving its data,
// depending on the value of Receiving.
//
This is the login screen for the terminal
procedure login_screen(Receiving As Integer)
begin
//
First we initialize all variables
username=""
password=""
cursor_position=0;
' start at the top of the screen
valid_until=0;
'
// Open the screen for writing or reading
according to Receiving
If Receiving=0
Then
T_OpenScreenForWriting
TerminalId, "login", scr_flag_execute, cursor_position,
valid_until
Else
T_OpenScreenForReading TerminalId, "login", 0, 0, 0
End If
// Now we write some screen_drawing/data_retrieving functions
T_Say("Username ");
T_GetText(username,10,0);
T_NewLine;
T_Say("Password
");
T_GetText(password,10,0);
T_Beep(50,50);
// The T_Read function enters the interactive input mode
// for the user to input his username and password
T_Read
// After user input the screen must be sent back to the PC
T_SendScreenToPc("login", scr_flag_update_pc_now +
scr_flag_auto_destroy )
// The next screen the terminal will execute is the invoice screen
// If there's a valid invoice screen in cache at the time, it'll be
executed
// if not, the terminal will ask the PC for an "invoice" screen, the PC
software will then reply
// with one or many screens and the one with the scr_flag_execute bit set will be executed
T_GotoScreen("invoice");
// Now we close the screen. If the screen has been opened for writing
// the DLL will send it to the terminal
T_CloseScreen;
//
If we have been retrieving data we can process it now
// at this point the data is already
stored in the program variables
If Receiving=1
Then
If password<>"8565" Then
password_ok=0
Else
password_ok=1
End If
End If
end;
procedure error_message_screen(Receiving As Integer)
begin
// write your own code here
end;
procedure invoice_screen(Receiving As Integer)
begin
// write your own code here
end;
procedure logoff_screen(Receiving As Integer)
begin
// write your own code here
end;
I my opinion, carefull
reading of the example above is the best way to get started writing a
XRML application.
Ready to run VB sourcecode examples of XRML use are available in the
Download section.
The code on those examples is somewhat older and has a messier
structure.
The emulator can be used to start writing and debugging an
application without the need for any real hardware. Several emulators
can work togeather if they have different Ids.
2. General
Functions
InitializeComm
int __stdcall InitializeComm(int ComPort,int BaudRate);
Opens the serial port and starts communications.
ComPort must be 1,2,3...
BaudRate must be 9600,19200,38400
If ComPort is 0 the DLL automatically searches for the antenna and
returns 0 if no antenna is found.
TerminateComm
void __stdcall TerminateComm(int ComPort);
This closes the port.
T_ResetComunications
int __stdcall T_ResetComunications();
This allows a terminal to reestablish communications after the PC
software is restarted.
After a communications break it is necessary for the user to press the
reset button on the terminal if the terminal software does not call
this function.
Software on the PC must use the function T_SaveScreens when it exits
and T_LoadScreens at startup so that the T_ResetComunications
function can be used.
T_SaveScreens
int __stdcall T_SaveScreens(char *filename)
The DLL keeps a RAM copy of the screens it sends to the terminals
in order to improve communication speed. Only changed data is
transmitted. This function saves the PC RAM cache to disc.
T_LoadScreens
int __stdcall T_LoadScreens(char *filename)
This function reads the PC RAM cache from disc at program startup.
T_SaveComunicationStatus
int __stdcall T_SaveComunicationStatus( char *filename)
This function saves communications status to disc.
Use of this function avoids the user having to press Reset on the
terminals if the PC software is restarted.
T_LoadComunicationStatus
int __stdcall T_LoadComunicationStatus( char *filename)
Used at startup to retrieve communications status from disc.
T_OpenScreenForWriting
int __stdcall T_OpenScreenForWriting(char *TerminalId,char
*ScreenName,int ScreenFlags,
int ScreenCursor, int ValidThru);
Opens a named screen for writing. The screen functions should follow
this function call. A CloseScreen call terminates the screen and sends
it to the terminal.
char *TerminalId - Terminal identification string. Must be
"XXXXXXDD" where XXXXXX is a name common to all terminals being
used together and DD is a specific number for each terminal. Example:
"TESTE 01", "TESTE 02", etc.
char *ScreenName - Identification name for each screen, it can
have any size.
char *ScreenFlags
int ScreenCursor - Cursor starting position for the screen. This value
also returns the cursor position after the
screen is executed.
Int ValidThru - Time in seconds when the screen stops
being valid. The current time in seconds can be computed with the
following expression: ((Date - 35065) + Time) * 24 * 60 * 60 (using
Visual Basic)
T_OpenScreenForReading
int __stdcall T_RefreshScreen(char *TerminalId,char *ScreenName);
Whenever a screen is received from the terminal the PC software
variables must be updated by using this function to open the screen for
reading and executing the same program lines that were used to create
the screen.
T_CloseScreen
int __stdcall T_CloseScreen();
Closes a screen that has been opened for reading or writing.
If the screen has been opened for writing the DLL will send it to the
terminal.
T_SetLcdLightPower
int __stdcall T_SetLcdLightPower(char state);
Enables or disables LCD backlight.
T_SetSeconds
int __stdcall T_SetSeconds(int seconds);
Adjusts terminal date and time. Please see function
T_OpenScreenForWriting for instructions on how to compute the current
time value in seconds.
T_SetLaserParameter
int __stdcall T_SetLaserParameter(int parameter,int value);
Laser barcode reader configuration function.
T_Beep
int __stdcall T_Beep(int duration,int period);
Sounds the terminal beeper.
T_SendScreenToPc
int __stdcall T_SendScreenToPc(char *ScreenName,int scr_flags);
Sends the current screen to a buffer that will be sent to the
PC.
ScreenName is the name of the screen that is about to be sent.
The scr_flags changes the flags of this screen if it stays
alive in cache
The following flags can be used:
#define scr_flag_update_pc_if_possible 4
The terminal transmits the screen but tries only once. If it is not
successefull it saves the data on a buffer for later
transmission.
#define scr_flag_update_pc_now 8
The terminal transmits the screen and keeps on trying until it succeeds.
#define scr_flag_update_pc_later 16
Data should be saved in a buffer for later transmission.
T_SendScreenToNull
int __stdcall T_SendScreenToNull(char *ScreenName,int scr_flags);
This function is used to discard a screen. It must be used with
the scr_flag_restore_fields_after_send flag.
T_ChangeUpsideDown
int __stdcall T_ChangeUpsideDown(char flag);
This function inverts the display. It does not work on the
emulator.
T_PrintString
int __stdcall T_PrintString(char *txt);
Prints a string on the terminal at the current cursor position.
T_PrintLarge
int __stdcall T_PrintLarge(char *txt);
Prints a string on the terminal using a large screen font.
T_Print_Inverse
int __stdcall T_PrintInverse(char *txt);
Prints a horizontally centered string in reverse video.
T_NewLine
int __stdcall T_NewLine();
Moves the cursor to the beguinning of the next screen line.
T_Cls
int __stdcall T_Cls();
Clears the terminal screen
T_WaitChar
char __stdcall T_WaitChar();
Waits for a key and returns its ASCII value.
T_Delay
int __stdcall T_Delay(int miliseconds);
Halts the terminal for the specified time period.
T_CheckIfReceiveData
int __stdcall T_CheckIfReceiveData(char *TerminalId,char
*Screen_Name,char *DataType,int *RawDataSize,char *RawData)
This function must be used (typically every 100ms) to poll the DLL for
any terminal related events.
#define data_type_send_screen_zipped 1
#define data_type_ask_screen 2 #define data_type_reset
3 #define data_type_send_screen_unzipped 4 #define data_type_softreset
5 #define
data_type_send_CAddress 6 #define
data_type_send_raw_data 7 For the applications
programmer options screen_zipped and screen_unzipped mean the same.
Please read the application example at the top of this page for more
information on this function.
T_SetFunctionKeys
int __stdcall T_SetFunctionKeys(char *txt)
This function defines the terminal function keys.
*txt is a four character string, one for each of the F1,F2,F3 and F4
keys
Please see functions GetText_flag_ForceFunctionKeysand
T_OnF1GotoScreen, T_OnF2GotoScreen...
T_ChangeScreenFormat
int __stdcall T_ChangeScreenFormat(int ScreenFormat)
This option sets the font size for each LCD display line.
Line 1 --> (Big font) +1
Line 2 -->(Big font)) +2
Line 3 --> (Big font) +4
Line 4 --> (Big font) +8
Line 5 --> (Big font) +16
Line 6 --> (Big font) +32
Line 7 --> (Big font) +64
Line 8 --> (Big font) +128
A screen with a small font in every line has a screen formar value
of 0
If we want lines 1 and 4 with a bigger font the value is 1+8
T_DefineMultipleBases
int __stdcall T_DefineMultipleBases(int position,char *txt,char
*base_name)
Makes the terminal ask which antenna it should use at startup.
This can be used to make a terminal work with several PCs and several
diferent PC application softwares.
3. Goto Functions
T_GotoScreen
int __stdcall T_GotoScreen(char *ScreenName);
This function makes the termina execute the screen ScreenName from
cache or if a valid cache version is not found it'll ask the PC for a
ScreenName screen.
T_OnEscapeGotoScreen
int __stdcall T_OnEscapeGotoScreen(char *ScreenName);
This defines the screen that will be executed when the user presses the
ESC key.
T_OnF1GotoScreen
int __stdcall T_OnF1GotoScreen(char *ScreenName);
This defines the screen that will be executed when the user presses the
F1 key.
Function keys must be defined with the function T_SetFunctionKeysand
activated by an input function with the flag GetText_flag_ForceFunctionKeysset.
Simillar functions exsit for the F2, F3 and F4 keys.
T_IfVar1EqVar2Goto
int __stdcall T_IfVar1EqVar2Goto(char *VariableName1,char
*VariableName2,char *ScreenName);
If the contents of the variable1 equal the contents of variable2
the terminal executes the screen ScreenName
Simillar functions:
T_IfVar1GreaterVar2Goto
int __stdcall T_IfVar1GreaterVar2Goto(char *VariableName1,char
*VariableName2,char *ScreenName);
T_IfVar1LessVar2Goto
int __stdcall T_IfVar1LessVar2Goto(char *VariableName1,char
*VariableName2,char *ScreenName);
T_IfVar1NotEqVar2Goto
int __stdcall T_IfVar1NotEqVar2Goto(char *VariableName1,char
*VariableName2,char *ScreenName);
4. Interactive
Input Functions
T_Read
This function enters the interactive input mode so that the user
can edit the data for a set of fields defined by the previous T_Say and
T_Get functions. The user presses the Esc key to exit the T_Read
function. T_Read also exits if the user presses the Enter key over a
T_GetCheckEnter function.
The return value is the cursor line number at the time T_Read exits.
T_Say
int __stdcall T_Say(char *txt);
Prints out txt string as the label name for the following T_Getxxx
function.
At interactive input time the cursor stays over this string.
T_NoSay
int __stdcall T_NoSay(unsigned char size);
Used in place of T_Say when there's no label name for an imput field.
The cursor will stay over the input field data at interactive input
time
and its width at the time is defined by the size parameter.
T_Scroll
int __stdcall T_Scroll(char *txt,char *txt_rot);
The same as T_Say but the txt string will be replaced by the larger
txt_rot text that will scroll when the cursor is placed over it.
T_GetText
int __stdcall T_GetText(char *txt,int size,int
flags);
Text input function for T_Read. This function must be preceeded by a
T_Say or a T_NoSay function.
txt should be a pointer to a buffer with enough space for a size size
text string.
When using VB a variable of type string must be declared
initialized to hold at least size space characters. The terminal will
understand the string as empty if the first character is chr(0)
T_GetTextTemplate
int __stdcall T_GetTextTemplate(char *txt,char *templates,int
flags)
Text input function for T_Read. This function must be preceeded by a
T_Say or a T_NoSay function.
txt should be a pointer to a buffer with enough space for a size size
text string.
When using VB a variable of type string must be declared
initialized to hold at least size space characters. The terminal will
understand the string as empty if the first character is chr(0)
The template field is a mask defining valid input characters for the
string.
Example:
T_Say "5 Alpha "
T_GetTextTemplate barcode, "%%%%%", GetText_flag_Barcode
T_NewLine
T_Say "5 Alphanum "
T_GetTextTemplate barcode, "@@@@@", GetText_flag_Barcode
T_NewLine
T_Say "5 Num "
T_GetTextTemplate barcode, "#####", GetText_flag_Barcode
T_NewLine
T_Say "5 Q+4 Num"
T_GetTextTemplate barcode, "Q###", GetText_flag_Barcode
T_NewLine
T_GetTextFromList
int __stdcall T_GetTextFromList(int *number,int size,char
*ScreenName);
T_GetNumerical
int __stdcall T_GetNumerical(int *Number,int size,int
flags);
32 bits numerical input function. Size indicates the maximum
number of digits for the input value.
T_GetLink
int __stdcall T_GetLink(char *ScreenName,int Value,char FastKey);
This must also be preceeded by a T_Say or T_NoSay function. If the user
presses enter over this function's label name the screen ScreenName
will
be executed.
FastKey if not 0 defines a keyboard shortcut for this function.
Example
2
T_GetCheckEnter
int __stdcall T_GetCheckEnter();
It must be used with T_Say. Ex. T_Say "OK" T_GetCheckEnter
It makes, with the cursor on OK and the Enter key pressed, that
the screen is quitted.
T_GetEditDate
int __stdcall T_GetEditDate();
Allows the user to modify the current date on the terminal.
T_GetEditTime
int __stdcall T_GetEditTime();
Allows the user to modify the current time on the terminal.
T_GetOption
int __stdcall T_GetOption(int *value,char *List,int ListLen,int
NumberOfElements);
This function allows the user to select an element from a list.
For example, a "Yes" or "No"
int __stdcall T_GetOption(int *value,char *List,int LenList,int
NumberOfElements);
After execution of this function value will reflect the user's choice.
List is a pointer to a string containing a list of several elements
separated by chr(0)
LenList is the total string size.
NumberOfElements is the number options on the list
T_GetOptionGotoScreen
int __stdcall T_GetOptionGotoScreen(int *value,char *List,int
LenList,int NumberOfElements,char *ScreenList);
This function allows the user to select an element from a list and
execute a screen according to the selected element. The list
elements must be separated by Chr(0). Screen elements must also be
separated by Chr(0).
Example: T_GetOptionGotoScreen ( n, "Yes"+chr(0)+"No"+chr(0) , 8 , 2 ,
"Screen1" + chr(0) + "Screen2" +
chr(0) )
In this example, when exiting T_Read the terminal executes screen1
or the screen2 based on the selection of "Yes" or "No"
T_GetVariable
int __stdcall T_GetVariable(char *VariableName,int size,int
flags);
Simillar to T_GetNumerical but works with terminal local variables.
Allows the user to edit the value of a terminal local variable
.
T_StartRepeat
int __stdcall T_StartRepeat(int *times);
T_EndRepeat
int __stdcall T_EndRepeat();
T_GetRepeat
int __stdcall T_GetRepeat(unsigned char times);
T_PutTextOnList
int __stdcall T_PutTextOnList(char *txt,int Value,char FastKey);
T_GetExitNow
int __stdcall T_GetExitNow()
The terminal exits T_Read immediatelly if the cursor gets over this
line
4. Variable
Functions
T_ReserveVariable
int __stdcall T_ReserveVariable(char *VariableName);
T_WriteVariable
int __stdcall T_WriteVariable(char *VariableName,int value);
T_ReadVariable
int __stdcall T_ReadVariable(char *VariableName);
T_AddVariable
int __stdcall T_AddVariable(char *VariableNameDest,char
*VariableNameSrc1,char *VariableNameSrc2);
T_MulVariable
int __stdcall T_MulVariable(char *VariableNameDest,char
*VariableNameSrc1,char *VariableNameSrc2);
T_DivVariable
int __stdcall T_DivVariable(char *VariableNameDest,char
*VariableNameSrc1,char *VariableNameSrc2);
T_IfVar1EqVar2Goto
int __stdcall T_IfVar1EqVar2Goto(char *VariableName1,char
*VariableName2,char *ScreenName);
T_IfVar1GreaterVar2Goto
int __stdcall T_IfVar1GreaterVar2Goto(char
*VariableName1,char *VariableName2,char *ScreenName);
T_IfVar1LessVar2Goto
int __stdcall T_IfVar1LessVar2Goto(char *VariableName1,char
*VariableName2,char *ScreenName);
T_IfVar1NotEqVar2Goto
int __stdcall T_IfVar1NotEqVar2Goto(char *VariableName1,char
*VariableName2,char *ScreenName);
5. Lists'
Functions
T_PutTextOnList
int __stdcall T_PutTextOnList(char *txt,int Value,char
FastKey);
T_SetGetTextFromListFlags
int __stdcall T_SetGetTextFromListFlags(int flags)
Defines the appearance of future GetTextFromList function calls.
Example: T_SetGetTextFromListFlags GetText_flag_NotUnderline +
GetText_flag_DontShowZero
T_GetTextFromList
int __stdcall T_GetTextFromList(int *number,int size,char
*ScreenName);
T_CreateListIndex
int __stdcall T_CreateListIndex(char *ListName,int size);
Creates an index for a list on a terminal memory buffer. Size is the
maximum number of elements on the list. The terminal will use 8 bytes
of
RAM for each element on the list.
The command's sequence to create a list must be:
T_CreateListIndex "users",10
T_ActivateListIndex "users"
T_PutTextOnList
T_PutTextOnList
This function can be called from different screens.
After activation of a list all T_PutTextOnList calls will work on that
list.
T_GetTextFromList
Searches for a specified element in the active list.
T_DestroyListIndex
int __stdcall T_DestroyListIndex(char *ListName);
Destroys the list and releases its RAM buffer.
T_ActivateListIndex
int __stdcall T_ActivateListIndex(char *ListName);
Activates a specified list.
T_DeactivateListIndex
int __stdcall T_DeactivateListIndex();
It deactivates the active list.
T_CreateListIndex "MEAL LIST", 1000
T_ActivateListIndex "MEAL LIST"
The names for the lists should not be very large as they spend memory
space on the terminal.
Example, T_CreateListIndex "MEALS LIST", 1000
spends 8Kb of the RAM memory on the terminal to create 1000 index.
To enter some data in a list, first this list must be active.
T_ActivateListIndex "MEALS LIST"
After this, the function PutTextOnListmust
be used to enter the data.

T_Cls
T_PrintInverse "MENU"
T_NewLine
T_Say "1-Pedir"
T_GetLink "ORDER DATA", 0, Asc("1")
T_NewLine
T_Say "2-Conta"
T_GetLink "BILL", 0, Asc("2")
T_NewLine
T_Say "3-Anular"
T_GetLink "CANCEL", 0, Asc("3")
T_NewLine
T_Say "4-Horas"
T_GetLink "TIME", 0, Asc("4")
T_NewLine
T_Beep 50, 50
T_Read
int __stdcall T_GetLink(char *ScreenName,int Value,char FastKey);
int Value (Optional if 0 is not used) In order to be used in
combination with GetTextFromList, when pressing Enter in
GetTextFromList if the Value was the same, the Terminal places the
cursor on this field.
FastKey Fast Key to go to the menu.

T_Cls
T_PrintInverse "Ementa"
T_NewLine
T_NewLine
T_Say "1-Carne"
T_GetLink "CARNE", 10, Asc("1")
T_NewLine
T_Say "2-Peixe"
T_GetLink "PEIXE", 20, Asc("2")
T_NewLine T_Say "3-Vinhos"
T_GetLink "VINHOS", 30, Asc("3")
T_NewLine
T_Say "4-Bebidas"
T_GetLink "BEBIDAS", 40, Asc("4")
T_NewLine
T_Say "5-Sobremesas"
T_GetLink "SOBREMESAS", 50, Asc("5")
T_NewLine
T_Beep 50, 50
T_Read

T_Cls
T_PrintInverse "PEDIDO"
T_NewLine T_Say "Mesa :"
T_GetText mesa, 3, GetText_flag_Number
T_NewLine st = "NO" + Chr(0) + "YES" + Chr(0)
T_Say "Factura :"
T_GetOption factura, st, Len(st), 2
T_NewLine
T_Say "OK"
T_GetLink "PEDIDO", 0, 0
T_Beep 50, 50
T_Read


After the Enter key is pressed the name "Ze Carioca" is automatically
on the entered comming from the screen 'USERS', as 'Ze
Carioca' is the user number 1.
Password = Chr(0) + Space(10)
User = 0
T_Cls
T_ActivateListIndex "USEFUL LIST"
T_PrintInverse "LOGIN"
T_NewLine
T_Say "User:"
T_GetTextFromList User, 10, "USER"
T_NewLine
name = UsersList (User)
T_Say "Password:"
T_GetText Password, 10, GetText_flag_ExitEnter +
GetText_flag_Underline
T_NewLine
T_Beep 50, 50
T_Read
int __stdcall T_GetTextFromList(int *number,int size,char
*ScreenName);
number is a pointer to a list element
size is the size of the input field

hora = Time T_Cls T_PrintString ("Current time:") T_NewLine
T_PrintLarge time T_NewLine T_NewLine T_NewLine T_NewLine T_Beep 50, 50
key = T_WaitChar T_GotoScreen
"MENU"

T_Cls
T_PrintInverse "PERSONAL DATA"
T_NewLine
T_Say "Name: "
T_GetText nome, 10, GetText_flag_Underline
T_NewLine
T_NoSay 5
T_GetText tel, 10, GetText_flag_Underline
T_NewLine T_Read

T_Cls
T_PrintInverse "MEAT"
T_NewLine
T_NewLine
T_Say "1-Steak" T_GetLink "Steak", 0, Asc("1")
T_NewLine
T_PutTextOnList "Stew", 12, Asc("2")
T_NewLine
T_PutTextOnList "Eggs ", 13, Asc("3")
T_NewLine
T_PutTextOnList "Cutlets", 14, Asc("4")
T_NewLine
T_Beep 50, 50
T_Read

Pressing Enter over the (+++) field adds 3 lines to the screen.

T_Cls
T_PrintInverse "ORDER"
T_ActivateListIndex "MEALS LIST"
T_NewLine
T_PrintString "Dish quantity"
T_NewLine
T_StartRepeat Orders' number For n = 1 To Orders'
number
T_NoSay 15
T_GetTextFromList dishes(n), 15, "LIST"
T_PrintString " "
T_NoSay 4
T_GetNumerical qt(n), 4, 0
T_NewLine
T_EndRepeat Next
T_Say "(+++)"
T_GetRepeat 3
T_NewLine
T_Read
When selecting GetRepeat the code between StartRepeat and
EndRepeat is repeated n times.

Dim name As String
Dim tel As String
tel = Chr(0) + Space(10)
name= Chr(0) + Space(10)
T_InitScreen TerminalId, "TEST", scr_flag_execute, 0, 0
T_Cls
T_PrintInverse "PERSONAL DATA"
T_NewLine
T_Say "Name: "
T_GetText name, 10, GetText_flag_Underline
T_NewLine
T_Say "Tel : "
T_GetText tel, 10, GetText_flag_Underline
T_NewLine
T_Read
T_SendScreen
5. Screen
Flags
#define scr_flag_execute 1
A screen with this flag set is immediatelly executed by the terminal
after being received.
#define scr_flag_changed 2
Not Used
#define scr_flag_update_pc_if_possible 4
The terminal transmits the screen but tries only once. If it is not
successefull it saves the data on a buffer for later
transmission.
#define scr_flag_update_pc_now 8
The terminal transmits the screen and keeps on trying until it succeeds.
#define scr_flag_update_pc_later 16
Data should be saved in a buffer for later transmission.
#define scr_flag_auto_destroy 32
This flag removes the screen form the cache after transmission.
#define scr_flag_ask_pc_answer 64
Not Used.
#define scr_flag_ask_pc_update 128
Not Used.
#define scr_flag_restore_fields_after_send 256
When a screen with this flag set is transmitted all data is reseted to
its original content.
#define scr_flag_dont_stop 512
This option allows a screen to be executed without the terminal waiting
for any user input at the end.
6. Text
flags
#define text_flag_Protected -1
If this flag is set text data is not user changeable.
#define text_flag_AutoExit -2
If the cursor moves to the last string character the input function
ends automatically.
#define text_flag_Password -4
****
#define text_flag_Number -8
Only numerical chars will be allowed.
#define text_flag_ExitEnter -16
When the Enter key is pressed the screen interactive data input session
ends.
#define text_flag_ExitAlways -32
When the input function exits the screen interactive data input session
ends.
#define text_flag_Barcode -64
Enable the optional barcode laser scanner for barcode reading.
The user must press the ->key to beguin scanning.
#define text_flag_NotUnderline -128
Disables input field underlign on blank characters.
#define text_flag_Link -256
Not used
#define text_flag_NewText -512
Clears the string before input
#define text_flag_NumberRightAligned -1024
It aligns a number from the right
#define text_flag_DontShowZero -2048
Hides fields containing 0
#define text_flag_ForceFunctionKeys -4096
Makes the function keys appear on the screen. Function keys must be
defined with the T_SetFunctionKeys function. When a function key is
pressed the terminal executes the screen specified with functions
T_OnF1GotoScreen, T_OnF2GotoScreen, T_OnF3GotoScreen or T_OnF4GotoScreen
#define text_flag_NoFunctionKeys -8096
#define Text_flag_AutoexitfieldON -16384
The same as AutoExit but exits on the last character.
#define Text_flag_OnlyExitIfTemplateOK -32768
If a template is used with the laser scanner input only ends if the
characters read are OK

T_Cls
T_PrintInverse "VARIABLES"
T_NewLine
T_WriteVariable "VALUE1", 12
T_WriteVariable "UNITY", 1
T_AddVariable "VALUE1", "VALUE1", "UNITY"
T_Say "Result ."
T_GetVariable "VALUE1", 10, 0
T_Read
The variables used are local terminal variables not stored on the
screen. A variable is kept in RAM between terminal resets if it has
been
reserved on the first screen using the function T_ReserveVariable
Conditional functions can be used to have some simple internal
logic on the terminal without the need for any wireless
comunications and PC processing. For more complicated tasks complete C
programs can be embedded inside XRML screens.