Setup Command


Menu ...

Version 6:14

Print: 96,195
1 6 7 1 4 5 Number Changes Command
2 2 6 4 2 6 4 Amendment to License Number

3
+1 Light (bit 0)
+2 Receiver (bit 1)
+4 Calls for place (bit 2)
+8 Does not Reset (does not update the blocks reserved)
+16 Calls Visa Cash ATM
+32 Print (Y / N)
+64 Calls waste (Y / N)
+128 0-Canceling partial, 1 full-Cancellation
4 Number of Access Points defect 0
+8 Does not protect keypad
+16 Does not allow directly to edit the plus
+32 Volume default to 0
+64 Send message whenever active

Receive 5 PLUS


Version 6:24

Print: 96,195
1 6 7 1 4 5 Alter Command Number
2 2 6 4 2 6 4 Alter License Number

3
+1 Light (bit 0)
+2 Receiver (bit 1)
+4 Asks for People (bit 2)
+8 Does not Reset (does not update the blocks reserved)
+16 Calls Visa Cash ATM
+32 Print (Y / N)
+64 Calls waste (Y / N)
+128 0-Canceling partial, 1 full-Cancellation


4

Number of interface defect 0
+8 Does not protect keypad
+16 Does not Let directly edit the plus
+32 Volume default to 0
+64 Send message whenever active
+128 Calls for place

5 Receive PLUS

Version x.9123
Press 96195
1 6 7 1 4 5 Number Changes Command
2 2 6 4 2 6 4 Amendment to License Number

3 Change the configuration (Enter to view options)
+1- Lighting on the LCD?
+2- Receive messages from PC?
+4- Asks number of people at the table?
+8- It doesn't restore menus (turn to 0 to restore original menus)
+16- Asks for what kind of payment?
Example: 1-Money-2 Visa
+32- Asks for what type of bill?
Example: 1-Non-Print 2 Prints
+64- Asks for what type of cancellation?
Example: 1-With waste 2-Without waste
+128- The cancellation is total or needs to know what articles to cancel?

4 Change Configuration B (Enter to view options)
+ n-Number of repeater antennas
+8- Do Not lock keypad
+16- The list of orders comes always from the PC rather than an empty start
+32- Not completed quantity is equal 0, and not 1
+64- PC receives a notification when a terminal is connected
+128- Asks for the place the person is at the table

5 Change Configuration C (Enter to view options)
+1- Whan asking the bill also asks the place?
+2- font size big
+4- 8 digits in the table with a bar code reading
+8- 8 digits in place with a bar code reading
+16- Allows for antennas with new software (September 2002) to have no limit on the number of articles to request
+32- Automatically checks if the value written in the form of payment and type of account correspond to the values of the descriptive text Ex: 1-money 2-visa-> only accepts 0, 1 or 2

Configuration without DLL

Direct connection with Antenna Vers. 6 and without DLL


With the Antenna version 6, the communication between the PC and the antenna is made both ways. The protocol used is the same but by packets.

Communication between the PC and the antenna is done by packets and not by bytes.
Once the antenna is initialized, it will always be in reception. To configure the antenna to work with packets you must send the following:

With the antenna in 'Menu'

('-') + chr chr chr ('<') + ( 'P') + chr (2)
To disable it if you should send
('-') + chr chr chr ('<') + ( 'P') + chr (0)
Note that this string should be sent as a packet.
From this point on the antenna will not get back to 'Menu'

The packets are composed as follows:

('-')+ chr chr chr ('>')+ (size) (byte) + DATA (byte) + chr (Number of the message) (byte) + chr (checksum) (byte)

Size: Size of data
checksum: Includes size, data, and the number of the message.

The answer to each packet is always' -> OK '+ chr (number of message)

Packets are numbered, the antenna is always waiting for response from the PC and it will not get new messages while the PC does not respond. This effect is desired in case the serial cable gets umplugged, the commands will then stop working.

The data are the same as used in previous versions.

Example: To send a message to the command I should send:

chr ('-')
chr ('>')
chr (36) Size of the message
chr (Num. send the message Command Low Byte)
chr (Num. High Command to send message Byte)
chr (Num. Licensing Low byte)
chr (Num. Licensing High byte)
32 Bytes (Text of message)
chr (number of message) for example 1
chr (checksum) Byte 1 with the sum of all bytes of the message included the size and number of the message.

The antenna will respond with:
chr ('-')
chr ('>')
chr ( 'O')
chr ( 'K')
chr (number of message)

Then the message will be sent by radio.

In the opposite direction the same happens.
The only state to have in mind is that if the antenna sends a request to the PC and the PC is waiting for a response to a message, the application should be interpreted as a request.

The Example in VB shows this situation quite well.


RS232 receive by:
('-')+ Chr Chr Chr ('>')+ (Size) +
Chr (®) + Chr (®)

Chr (Function)
P Request Num People
The annular
S subtotal Payment Type
C account + Payment Type Invoice (Y / N)
T Transfer Mesa2
G pag_parc
D discount% Discount
A Response to the Confirmation message.
Chr (Num Command Low Byte)
Chr (Num Command High Byte)
Chr (License Number Low Byte)
Chr (License Number High Byte)
Chr (Num Message Low Byte)
Chr (Num Message High Byte)
Chr (Number Plates Low Byte)
Chr (Number Plates High Byte)
Chr (Num Table Low Byte)
Chr (Num Mesa High Byte)
Chr (Helping Low Byte)
Chr (Assistant High Byte)

. Chr (Place 1 Low Byte) ONLY IN PROTOCOLO_DADOS 2
. Chr (Place 1 High Byte) ONLY IN PROTOCOLO_DADOS 2
. Chr (Place 2 Low Byte) ONLY IN PROTOCOLO_DADOS 2
. Chr (Place 2 High Byte) ONLY IN PROTOCOLO_DADOS 2

For n = 1 to Num.Pratos
Chr (Prato Low Byte)
Chr (Prato High Byte)
Chr (Number Low Byte)
Chr (Number High Byte)
next
+ Chr (Number Message)
+ Chr (Checksum)

PC must respond with '-> OK' + chr (number of message)

C Code Equivalent

* Function = msg [0];
* Terminal = msg [1] + msg [2] * 256;
* License = msg [3] + msg [4] * 256;
* Msg_number = msg [5] + msg [6] * 256;
* Plates = msg [7] + msg [8] * 256;
* Mesa1 = msg [9] + msg [10] * 256;
* AuxData = msg [11] + msg [12] * 256;
Ct = 13;
If (ActiveProtocolo == 2)
(
* Lugar1 = msg [13] + msg [14] * 256;
* Lugar2 = msg [15] + msg [16] * 256;
Ct + = 4;
)
If (ActiveProtocolo> = 3)
(
* Mesa1 =* ((int *) & (msg [13]));
* Mesa2 =* ((int *) & (msg [17]));
* Lugar1 =* ((int *) & (msg [21]));
* Lugar2 =* ((int *) & (msg [25]));
Ct + = 16;
)

If (ActiveProtocolo> = 4)
(
Memcpy (st_mesa1, & (msg [ct]), 13);
Memcpy (st_mesa2, & (msg [ct +13]), 13);
Ct + = 26;
)


Command Antenna Version 6
"- <S" + chr (1) Protocolo_dados 1
"- <S" + chr (2) Protocolo_dados 2

"- <P" + chr (0) Without Packed Data, No Header

"- <P"+chr(1) Without dados, Packed With Header "-->"

"- <P" + chr (2) packets of data, active


"-<?" Asks for version of the antenna. The response is a byte. In older versions the answer is "Menu .."

send Plu to the command
chr (1)
chr (Num. block the plan Low byte)
chr (Num. Block plan to High byte)
chr (Num. Licensing Low byte)
chr (Num. Licensing High byte)
16 Bytes (text) (If the last 4 bytes are digits it means it is a family. "MEAT 0100)
In mode of packets to send a second PLU the command should be repeated .


Send a message
chr (3)
chr (Num. send the message Command Low Byte)
chr (Num. High Command to send message Byte)
chr (Num. Licensing Low byte)
chr (Num. Licensing High byte)
32 Bytes (Text of message)

Send a special message to put it in mode for upload a plus
(Inside the message)
chr (1)
chr (6)

Send a special message to put it in mode for upload PLUs and to clear all PLUS

(Version> 6918)
(Inside the message)

chr (1)
chr (8)

Send a special message to configure the hardware byte
(Inside message)
chr (1)
chr (3)
chr (byte hardware)
Description of the bits of the byte hardware

+1 Connect the light
+2 Receiver (bit 1)
+4 Asks for the place (bit 2)
+8 Does not do the reset (does not update the blocks reserved)
+16 Asks for Visa Cash ATM
+32 Print  (Y / N)
+64 Asks for waste (Y / N)
+128 0-Canceling partial, 1 full-Cancellation

Send a special message to configure hardware byte B
(Inside the message)
chr (1)
chr (7)
chr (byte hardware)
Description of the bits of the byte hardware
0 + Number of interface defect
+8 Does not protect the keypad
+16 Does not let directly edit the plus
+32 Volume default to 0
+64 Send message whenever active
+128 Asks for place


Send the limits of the base, Licensing number and Command
chr (8)
chr (Low Byte (License lower limit))
chr (High Byte (License lower limit))
chr (Low Byte (Upper limit License)
chr (High Byte (Upper limit License))
chr (Low Byte (Lower limit N. Command))
chr (High Byte (Lower limit N. Command))
chr (Low Byte (Upper limit N. Command))
chr (High Byte (Upper limit N. Command))

Send data from one table to a command
chr (10)
chr (Num. command to configure Low Byte)
chr (Num. command to configure High Byte)
chr (Num. Licensing Low byte)
chr (Num. Licensing High byte)

chr (Num.Pratos)
chr (Table Low byte)
chr (Mesa High Byte)


if (ActiveProtocolo <2)
(
memcpy (BackMessage [BackMessageWrite & 0xff]. message +8, & AuxData, 1);
memcpy (BackMessage [BackMessageWrite & 0xff]. message +9, & MsgCt, 1);
)
if (ActiveProtocolo == 2)
(
memcpy (BackMessage [BackMessageWrite & 0xff]. message +8, & AuxData, 2);
memcpy (BackMessage [BackMessageWrite & 0xff]. +10 message, & Lugar1, 2);
memcpy (BackMessage [BackMessageWrite & 0xff]. +12 message, & Lugar2, 2);
memcpy (BackMessage [BackMessageWrite & 0xff]. +14 message, & MsgCt, 1);
)

if (ActiveProtocolo == 3)
(
memcpy (BackMessage [BackMessageWrite & 0xff]. message +8, & AuxData, 2);
memcpy (BackMessage [BackMessageWrite & 0xff]. +10 message, & table, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +14 message, & table, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +18 message, & Lugar1, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +22 message, & Lugar2, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +26 message, & MsgCt, 1);
)

if (ActiveProtocolo == 4)
(
memcpy (BackMessage [BackMessageWrite & 0xff]. message +8, & AuxData, 2);
memcpy (BackMessage [BackMessageWrite & 0xff]. +10 message, & table, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +14 message, & table, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +18 message, & Lugar1, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +22 message, & Lugar2, 4);
memcpy (BackMessage [BackMessageWrite & 0xff]. +26 message, & MsgCt, 1);

memcpy (BackMessage [BackMessageWrite & 0xff]. +27 message, st_mesa1, 13);
memcpy (BackMessage [BackMessageWrite & 0xff]. +40 message, st_mesa2, 13);

)


for N = 1 to Number Plates
chr (Prato Low Byte)
chr (Prato High Byte)
chr (Qt Low Byte)
chr (Qt High Byte)
next

Direct Connection Without DLL (Using Port)


Direct connection without DLL Version 6


Installation:

Connect the base to the PC using the serial port.

Communicate with the base "19200, N, 8,2"


Base:

After connected it boots in reception mode.
To exit the reception mode simply send a character by RS232.

Enter in the "Menu"
Everytime the base enters into Menu mode, it sends "Menu" to the PC

Configuration of the database:

Send via RS232:

Chr ('-')+ Chr ('-')+ Chr ('>') (Bytes of sync)


Chr (1)

Enter into the Upload mode
Loop1

chr (Num. block the plan Low byte)
chr (Num. Block plan to High byte)
chr (Num. Licensing Low byte)
chr (Num. Licensing High byte)
16 Bytes (text) (Only the first 13 are visible)
BREAK
To exit the mode, Upload Chr (2) should be sent
in any position of the text.
GOTO Loop1

Chr (2)
Enter into the Reception mode
Chr (3)
Send a Message
chr (Num. Command to send message Low Byte)
chr (Num. High Command to send message Byte)
chr (Num. Licensing Low byte)
chr (Num. Licensing High byte)
32 Bytes (Text of message)

The database automatically enters into reception, receiving
confirmation of the message.

Chr (1) SPECIAL MESSAGE (1st character of the text of the message)


Chr (3)

Conf. Hardware to Chr (

+1 Light (bit 0)

+2 Receiver (bit 1)
+4 Calls N. People (2 bit)
+8 Reset does not (does not update the blocks reserved)
+16 Asks for Visa Cash ATM
+32 Print  (Y / N)
+64 Asks for waste (Y / N)
+128 0-Canceling partial, 1 full-Cancellation
)

Chr (6)

Enter in Download

+ Trash to complete the 32 bytes
---
The database automatically enters into reception, receiving
confirmation of the configuration.
Chr (4)
Send details from a table
chr (Num. command to configure Low Byte)
chr (Num. command to configure High Byte)
chr (Num. Licensing Low byte)
chr (Num. Licensing High byte)

chr (Num.Dishes)
chr (Table Low byte)
chr (Table High Byte)
chr (Num. People)

for N = 1 to Number Plates
chr (DishLow Byte)
chr (Dish High Byte)
chr (Qt Low Byte)
chr (Qt High Byte)
next

Chr (8)
Upload Limit
8 bytes format:

Low Byte (Lower limit License)
High Byte (Lower limit License)
Low Byte (Upper limit License)
High Byte (Upper limit License)

Low Byte (Lower limit N. Command)
High Byte (Lower limit N. Command)
Low Byte (Upper limit N. Command)
High Byte (Upper limit N. Command)

The database automatically enters into reception

RS232 receive by:

Chr (®) + Chr (®)

Chr (Function)
P Request Num People
A Quit

S subtotal Payment Type
C Bill + Payment Type Invoice (Y / N)
T Transfer Mesa2
G pag_parc
D discount% Discount
A Response to the Confirmation message.
Chr (Num Command Low Byte)
Chr (Num Command High Byte)
Chr (License Number Low Byte)
Chr (License Number High Byte)
Chr (Num Message Low Byte)
Chr (Num Message High Byte)
Chr (Number Plates Low Byte)
Chr (Number Plates High Byte)
Chr (Num Table Low Byte)
Chr (Num Mesa High Byte)
Chr (Helping Low Byte)
Chr (Assistant High Byte)

For n = 1 to Num.Pratos
Chr (Prato Low Byte)
Chr (Prato High Byte)
Chr (Number Low Byte)
Chr (Number High Byte)
next


Important

When a command sends a message to a base, if the command does not receive a confirmation of the base, the command automatically re-sends the request.

The other way is a little more complicated.

1.The command only accepts messages in seconds after having sent a request
2.If the command receives a message it will send to the base a confirmation (Function 'R')
3.If the command does not receive the message nothing happens. This means that if the PC program is not receiving a confirmation for each message it must repeat the transmission within reasonable intervals.
4.Bare in mind that the environment should not be saturated with the constant send process.

Connection with the RioCom.DLL



The DLL was programmed using a language of 32 bits. Hence, all the arguments of type int should be considered 32-bit integers. Languages that use 16-bit integers must prototype the functions using long int instead of int.

All functions described, always return an integer error code.

0 -> OK, operation successful
1 -> NO_MESSAGE, there are no messages to read from buffer)
2 -> INVALID_COM_PORT, serial port does not exist or is currently being used by another program
3 -> GENERIC_ERROR, generic error
4 -> NO_RESPONSE the DLL received no response from the antenna

int __stdcall radio_init (int com_no, first_terminal int, int last_terminal, license_no int, int protocolo_dados)

Description:

This Function updates the image that the DLL has in memory from the radio terminal apenas just for a single position. This updating must be done for all the positions which will be sent using the function radio_upload_entries. (see below)

Function:




int radio_set_entry(

int entry_no,

char far *name);

Parameters:




entry_no: Position to be updated

name: Text to be saved in that position. This could have up to 16 characteres.

Positions Map:



0


OK


operation well suceeded


1


NO_MESSAGE


There are no messages to be read from the buffer


2


INVALID_COM_PORT


Serial port does not exist or is currently being used by another program


3


GENERIC_ERROR


generic error



4


NO_RESPONSE


the DLL did not obtain a response from the antenna



int __stdcall radio_set_entry( int entry_no, char *name)

Description :

This function updates the image which the DLL has in the radio terminal rmemory just for a single position. This updating must be done for all position which will be sent using the function radio_upload_entries. (see below)

Function:


int radio_set_entry(

int entry_no,

char far *name);

Parameters:


entry_no: Position to be updated

name: Text to be saved in that position. This could have up to 16 characters.



Positions Map:



0 a 9


Reserved


11 a 13


Not used


14


"table"


15


"Dish Qty"


16


"Sending"


17


Not used


18


Not used


19


"Nº of people" or "place"


20


"Other"


21 a 27


Functions name "other"


28 a 29


"Reservados"


30


Payment Methods


31


"Print y/n"


32


Prompt "?" ( by default )


33 a 3071


Description of articles from 1 to 3039


3072


1 - Order



3073


2 - Cancelation



3074


3 - Subtotal


3075


4 - Bill


3076


5 - Transactions



3077


6 - Partial Payment



3078


7 - Other


3079


8 - Discount


9


9 - Configuration


3080


1 - Comand


3081


2 - License


3082


3 - Config.A


3083


4 - Config.B


3084


5 – Config.C


3085


6 - Receive PLUs



3086


7 - Erase PLUs


10


8 - Send PLUs+C



3087


Quit [Enter]


3088


Array of Pages

(type of)
bytes 0 to 15


(...)


(...)


3103


bytes 240 to 255


3104


Array  of Pages
(pointer to )
integer of 32 bits 0 to 3



(...)


(...)




3167


integer of 32 bits 252 to 255

3168


Index no array of pages for each article

bytes 0 to 15


(...)


(..)




3358


bytes 1024 to 1039


3999


4 bytes w/ o nº of descriptives to receive



int __stdcall radio_upload_entry(int first_entry,int last_entry)



Description :



This function sends all entrances (previously introduced with radio_set_entry) to the radio terminals. So that the terminals receive, it is necessary to previously do 96195 6 when the terminal is in the main menu, so that the terminal goes into download mode. As an alternative, you can put the terminal in download mode by sending a message.


This function does not have error correction. It may happen that a terminal all the entrances (inserted data). to avoid this situation , you can send 2 times the message.

Function:

int radio_upload_entries(

int first_entry,

int last_entry);

Parameters:

*  
o  
+ first_entry: First entrance to be sent
last_entry: Last entrance to be sent. To send all entrances altered you should do first_entry = 10 and last_entry = 3079.



int __stdcall radio_init(int com_no,int first_terminal,int last_terminal,int license_no,int protocolo_dados)


Description :

This function initializes the antenna, detecting automatically the version and putting it into reception mode for orders. This inicialization takes about  1 second.

Function:

int radio_init(

int com_no,

int first_terminal,

int last_terminal,

int license_no,

int protocolo_dados);

Parameters:

com_no: Number of the COM port to which the antenna is connected

(i.e. 1 to COM1)



first_terminal:first radio terminal that this antena should accept as valid. The terminals will only quit sending  a message when receiving a confirmation from the antenna. The antenna just confirms messages that  have the same number of license of hardware (see license_no below), and that have a terminal number first_terminal and last_terminal inclusive.



last_terminal: Last radio terminal which the antena should accept as valid (see first_terminal)



license_no: Number of hardware license (programmed on the terminals) which the antenna should accept as valid. This  value serves to permit that neighbouring establishments using the sames sistem of radio terminals can use a license number different, avoiding conflicts between messages.



protocolo_dados: Antenna Version 1 to 5 should use a value of 1, Antenna version 6 or above can use 2 within this parameter. Permits the receiving of some more fields.
Antennas version 7 ( beep 4 times at the beginnig) , they can use the protocal 3. With this protocol  the table number and the place number starts to come in 32 bits.



int __stdcall radio_close()



Description :



This function sets the serial port free and gives the antenna back to the default mode so that it will not receive any more transmittions coming from radio terminals.

Function :

int radio_close( void );



PROTOCOLO_DADOS 1

int __stdcall radio_send_list(int terminal,int pratos, int mesa,int NumPessoas,char *lista)



This function sends a message to the radio terminal. The terminal after receiving the message enters into edition mode. After editing, a message is sent from the terminal to the pc with type='E'.



The list is a sequence of 4 bytes * dish number. It's equivalent to the list received when and order is sent.



PROTOCOLO_DADOS 2

int __stdcall radio_send_list2(int terminal,int pratos, int mesa,int AuxData,int Lugar1,int Lugar2,char *lista)



his function sends a message to the radio terminal. The terminal after receiving the message enters into edition mode. After editing, a message is sent from the terminal to the pc with type='E'.



The list is a sequence of 4 bytes * dish number. It's equivalent to the list received when and order is sent.



PROTOCOLO_DADOS 3

int __stdcall radio_send_list3(int terminal,int pratos, int mesa,int AuxData,int Lugar1,int Lugar2,int *plus,int *qtds)

This function sends a message to the radio terminal. The terminal after receiving the message enters into edition mode. After editing, a message is sent from the terminal to the pc with type='E'.



Plus and Qty point to an array of integers of 32 bits.



PROTOCOLO_DADOS 4

int __stdcall radio_send_list4(int terminal,int pratos, int mesa,int AuxData,int Lugar1,int Lugar2,int *plus,int *qtds,unsigned char *mesa1,unsigned char *mesa2)           



This function should only be used if you want to have the field 'table' with more than 8 digits.

This function sends a message to the radio terminal. The terminal after receiving the message enters into edition mode. After editing, a message is sent from the terminal to the pc with type='E'.



Plus e Qty point to an array of integers of 32 bits..

mesa1 points to a string of 13 bytes.
mesa2 points to a string of 13 bytes.

int __stdcall radio_send_message(int terminal,char *msg)

Description :



This function sends a message to the radio terminal. The message should not occupy more that 32 characteres and it should be completely composed by international characteres. Note that the radio terminal will only receive the message if it is in the main menu, so that the message sent process can only be performed by the terminal's user.

The DLL will make sure that unconfirmed messages not re-sent to the terminal will indeed be re-sent. This is done every 5 seconds (approximatelly). If the terminal does not receive a message in 30 seconds, the DLL will ignore it. The messages are treated by arriving order (FIFO). You can find out if the message was sent or not by using the function radio_send_message_get_status.

Parameters:

terminal: Terminal number to which the message should be sent.
msg: pointer to the address where the message is being sent. (Many languages make the automatic conversion of string to this pointer)

int __stdcall radio_send_big_message_auto_run_menu(int terminal,char *msg , int menuoption)

Description :

This function sends a message to the radio terminal. The message should not occupy more that 64 characteres and it should be completely composed by international characteres. Note that the radio terminal will only receive the message if it is in the main menu, so that the message sent process can only be performed by the terminal's user. Once the message has been received, the terminal should go directly to the menu 'menuoption'.

The DLL will make maquinas de slots sure that unconfirmed messages not re-sent to the terminal will indeed be re-sent. This is done every 5 seconds (approximatelly). If the terminal does not receive a message in 30 seconds, the DLL will ignore it. The messages are treated by arriving order (FIFO). You can find out if the message was sent or not by using the function radio_send_message_get_status.



Parameters :


terminal: Terminal number to which the message should be sent.
msg: pointer to the address where the message is being sent. (Many languages make the automatic conversion of string to this pointer)

menuoption: Menu which the terminal will show once the message has been received.



int __stdcall radio_send_big_message(int terminal,char *msg )

Description :

This function sends a message to the radio terminal. The message should not occupy more that 64 characteres and it should be completely composed by international characteres. Note that the radio terminal will only receive the message if it is in the main menu, so that the message sent process can only be performed by the terminal's user.

The DLL will make sure that unconfirmed messages not re-sent to the terminal will indeed be re-sent. This is done every 5 seconds (approximatelly). If the terminal does not receive a message in 30 seconds, the DLL will ignore it. The messages are treated by arriving order (FIFO). You can find out if the message was sent or not by using the function radio_send_message_get_status.

Parameters:

terminal: Terminal number to which the message should be sent.
msg: pointer to the address where the message is being sent. (Many languages make the automatic conversion of string to this pointer)



int __stdcall radio_send_message_auto_run_menu(int terminal,char *msg , int menuoption)

Description :

This function sends a message to the radio terminal. The message should not occupy more that 32 characteres and it should be completely composed by international characteres. Note that the radio terminal will only receive the message if it is in the main menu, so that the message sent process can only be performed by the terminal's user. Once the message has been received, the terminal should go directly to the menu 'menuoption'.

The DLL will make sure that unconfirmed messages not re-sent to the terminal will indeed be re-sent. This is done every 5 seconds (approximatelly). If the terminal does not receive a message in 30 seconds, the DLL will ignore it. The messages are treated by arriving order (FIFO). You can find out if the message was sent or not by using the function radio_send_message_get_status.

Parameters:

terminal: Terminal number to which the message should be sent.
msg: pointer to the address where the message is being sent. (Many languages make the automatic conversion of string to this pointer)

menuoption: Menu displayed on the terminal once the message has been received.


int __stdcall radio_message_upload_plus(int terminal)

This function sends a message to the terminal and then the terminal waits to receive the PLUS.

int __stdcall radio_message_clear_upload_plus(int terminal)

Equivalent to the above function, but in addition, this one also clears all PLUS.



int __stdcall radio_message_hardware_A(int terminal,int valor)

This function sends a message and configures the option A of the terminal with its value.

+1 Light(bit 0)
+2 Receiver (bit 1)

+4 Ask for People (bit 2)

+8 Does not do Reset ( Does not update the reserved blocks )

+16 Ask for cash Visa or ATM

+32 Print (Y/N)

+64 Ask for waste (Y/N)

+128 0-Partial Cancellation; 1-Complete Cancellation



int __stdcall radio_message_hardware_B(int terminal,int valor)

This function sends a message and configures the option B of the terminal with its value.

+ Number of access points 0 Default
+8 Does not protect key pad
+16 Does not allow direct edition of the plus
+32 Default quantities 0
+64 Sends message everytime that it is active

+128 asks for place

int __stdcall radio_message_hardware_C(int terminal,int valor)

This fucntion sends a message and configures the option C of the terminal with its value.

+1- when asking for bill asks also the place?
+2- Font big size
+4- 8 digits in the table with barcode reading

+8- 8 digits in the place with bacode reading
+16- Allows antennas with recent software (September 2002) to have not a limit number of an order

+32- Verifies automatically if the value of the payment and the value of the type of bill corresponds to the values of the desctription text i.e. 1-cash 2-visa --> only accepts 0, 1 ou 2



int __stdcall radio_message_hardware_ABC(int terminal,int valorA,int valorB,int ValorC)

This function sends a message and configures the option A,B and C of the terminal with its value.


int __stdcall radio_message_hardware_ABCDEF(int terminal,int valor1,int valor2,int valor3,int valor4,int valor5,int valor6)

This function sends a message and configures the option A,B,C,D,E and F of the terminal with its value.



int __stdcall radio_get_send_status(int msg_number)

This feature allows you to check if a message has reached a terminal (the DLL is still trying for about an hour in case of the the terminal being switched off or in case there is no coverage)

Returns:
0 if the message was received

1 if the DLL is still trying to send the message
2 if the sending failed (after one hour trying)

Parametros:

msg_number: Value returned by the function radio_send_message, radio_send_lista, radio_message_upload_plus ou radio_message_clear_upload_plus

int __stdcall radio_recv3(int *Funcao,int *Terminal, int *Licenca,int *MsgNumber,int *Pratos,int *Mesa1,int *Mesa2, int *AuxData,int *lugar1,int *lugar2,int *plus,int *qtds)

Descrição :

ATTENTION, it can only be used with the protocolo_dados 3 active

This function checks if there is any message sent by a terminal in the input buffer to be read by the program. If there is any message the function makes a copy of this and sends to the variables passed as parameters.

This function is equivalent to a radio_recv , but it is easier to use.
int *plus is a pointer to an array of integers of 32 bits.
int *qtds is a pointer to an array of integers of 32 bits.

int __stdcall radio_recv4(int *Funcao,int *terminal,int *licenca,int *msg_number,int *pratos,int *mesa1,int *mesa2,int *AuxData,int *lugar1,int *lugar2,int *plus,int *qtds,unsigned char *st_mesa1,unsigned char *st_mesa2)

Description :

ATTENTION, it can only be used with the protocolo_dados 4 active

Function identical to radio_recv3, but permites receiving 13 bytes from the field mesa1 and mesa2.

Must be used when it is necessary to use the field mesa to read barcodes with 13 digits.


int __stdcall radio_recv5(int *Funcao,int *terminal,int *licenca,int *msg_number,int *pratos,int *mesa1,int *mesa2,int *AuxData,int *lugar1,int *lugar2,int *plus,int *qtds,unsigned char *st_mesa1,unsigned char *st_mesa2)

Description :

ATTENTIOM, it can only be used with the protocolo_dados 4 active
This Function is identical to the radio_recv4, but when receiving decimal numbers, it returns a quantity in negative multiplied by 1000. Example 0.1, will return the quantity of -100.


int __stdcall radio_recv(char *msg)


Description :

This function checks if there are any messages sent by a terminal in the buffer, that needs to be read by the program. If there is some message, the function makes a copy of this message to msg and returns ok.

Function:

int radio_recv(

char *msg);

Parameters:

msg: Pointer to the address where the message received should be placed



PROTOCOLO_DADOS 1


0


1


2


3


4


5


6


7


8


9


10


11


12




Tipo


Terminal


License


Nº of Order


Dishes


Table


Aux


1º Article


1º Qty


2ª article


2º Qty


3º...


3º...




1B


2B


2B


2B


2B


2B


2B


2B


2B


2B


2B


2B


2B



PROTOCOLO_DADOS 2


0


1


2


3


4


5


6


7


8


9


10


11


12




Tipo


Terminal


License


Nº of Order


Dishes


Table


Aux


Place 1


Place 2


1ª Artigo


1º Qty


2º...


2º...




1B


2B


2B


2B


2B


2B


2B


2B


2B


2B


2B


2B


2B



PROTOCOLO_DADOS 3


0


1


2


3


4


5


6


7


8


9


10


11


12




Tipo


Terminal


License


Nº of Order


Dishes


Table


Aux


Place 1


PLace 2


Table 1


Table 2


1º Article


1º Qty




1B


2B


2B


2B


2B


2B


2B


4B


4B


4B


4B


2B


2B

Functions of the complements




The functions that follow create the map positions of an association between the plus and their complements. This information is only sent to the terminal when it calls the function radio_upload_entry.

int __stdcall radio_set_modifier_start( int first_modifier_number)

Description:

Indicates the first position of the 'positions map ' to where the Dll automatically will place the complements.

int __stdcall radio_set_modifier_name( char *modifier_name)

Description:

Name of the components list in which we will input next. Example "type of coffee ", followed by the "short" e "full".

int __stdcall radio_set_modifier_entry( char *name)

Description:

This function should be used for inputting all the items of this components list.


int __stdcall radio_set_modifier_end()

Description:

Use this function to terminate the insertion of components.

int __stdcall radio_set_entry_with_modifier( int entry_no, char *name,char *modifier_name,int modifier_type)

Description:

The association between the plus and their supplements is done with this function. For the same Plu to which you want to associate the various lists of complements, you must call this function several times.
This feature also introduces the Plu on the map of positions, thus avoiding to call the function: radio_set_entry.


Example:
radio_set_entry_with_modifier 850 + 32, "COFFEE", "Temperature of the Cup", 1
radio_set_entry_with_modifier 850 + 32, "COFFEE", "Type of coffee", 1

Parametros:

entry_no:Position to be utilized

name:Text to be saved in that position. This could have up to 16 characters.
modifier_name: Name of one of the pages of complements which could be used with this plu.
modifier_type:

1 - Can only choose one complete of this page                             5 - Various complements can be chosen from this page                             129 - Only one complement can be chosen from this page (automatic)
133 - Various complements can be chosen from this page (automatic)



Example in VB:

radio_set_modifier_start 2000

radio_set_modifier_name "type of coffee"
radio_set_modifier_entry "full"
radio_set_modifier_entry "short"

radio_set_modifier_name "Temperature of the cup"
radio_set_modifier_entry "Cold cup"
radio_set_modifier_entry "Hot cup"
radio_set_modifier_entry "Warm cup"

radio_set_modifier_end

radio_set_entry_with_modifier 850 + 32, "COFFEE", "Temperature of the cup", 1
radio_set_entry_with_modifier 850 + 32, "COFFEE", "Type of coffee", 1

radio_set_entry_with_modifier 800 + 32, "BARLEY", "Temperature of the cup", 5

radio_set_entry_with_modifier 801 + 32, "MILK", "Temperature of the cup", 5

radio_set_entry_with_modifier 860 + 32, "COKE", "Temperature of the cup", 5
radio_set_entry_with_modifier 860 + 32, "COKE", "Type of coffee", 5



Functions of Introduction in Tree

 

Functions of Introduction in Tree



With these functions it is possible to create a structure of families, sub-families, complements and so forth with simplicity.

This systems brings the advantage of not having to memorise codes.


On the terminal, option G, 'Arvore PLUS' ( Value 1 ) should be active. Valid in versions >= 7.9370.
The functions are the following:

VB

'Tree
Public Declare Function radio_make_tree_mkdir Lib "RioCom" (ByVal directory_name As String) As Long        ' Optional
Public Declare Function radio_make_tree_cd_back Lib "RioCom" () As Long
Public Declare Function radio_make_tree_entry Lib "RioCom" (ByVal entry_number As Long, ByVal entry_name As String) As Long
entry_number:  Value of the plu which the dll must return if this plu is chosen.
entry_name:    Name of the plu.
Returns:       Indicating value of the code with which this plu will stay on the terminal.


Public Declare Function radio_make_tree_cd Lib "RioCom" (ByVal directory_name As String) As Long
Public Declare Function radio_upload_tree Lib "RioCom" () As Long
Send all Plus to the terminal.

Public Declare Function radio_upload_tree2 Lib "RioCom" (Byval Configurações As String,ByVal NumParametros As Long,ByVal RearrangeTree as Long) As Long
Send all Plus to the terminal.
The configurations are a string which permits configure directly the terminal.
Configuration 1 = Option A
Configuration 2 = Option B
Configuration 3 = Option C
etc...

NumParametros: Byte size of the configurations.
RearrangeTree: 1(enables) ou 0(disables), allows setting the behaviour of the tree in situations of branch having more than 8 items.
If 1, the dll automatically creates a new sub-branch in a way that there will never be a branch with more than 8 items.



' Tree modifiers
Public Declare Function radio_make_tree_modifier_entry Lib "RioCom" (ByVal entry_number As Long, ByVal name As String) As Long
entry_number:  Value of the plu which the dll should return if this plu is chosen.
entry_name:    Name of the plu.
Returns:       Indicating Value of the code with which this plu will stay on the terminal.

Public Declare Function radio_make_tree_modifier Lib "RioCom" (ByVal group_name As String, ByVal automatic As Boolean, ByVal multiple_choice As Boolean) As Long
Method for creating complement types.
group_name:    Group of complements to use.
automatic:     True, Obligatory question.
multiple_choice:True, Permit chosing several items.          

Public Declare Function radio_make_tree_modifier2 Lib "RioCom" (ByVal group_name As String, ByVal automatic As int, ByVal multiple_choice As int) As Long
Equivalent to the previous function.


C Language

int __stdcall radio_make_tree_mkdir(char *name);                                                     // Optional
int __stdcall radio_make_tree_cd_back();
int __stdcall radio_make_tree_entry( int entry_no, char *name);
int __stdcall radio_make_tree_cd(char *name);
void radio_make_tree_modifier_name( char *group_name,int first_complement_number);
int __stdcall radio_make_tree_modifier( char *group_name,bool automatic,bool multiple_choice);
int __stdcall radio_make_tree_modifier_entry(int entry_no, char *name);


Example:





To create the plus of the above example, you should use this code here.

codigo.

radio_make_tree_mkdir "Cafe"           ' Optional
radio_make_tree_cd "Cafe"

radio_make_tree_entry 1, "Coffee"
radio_make_tree_modifier "Temperature of Cup", False, False
radio_make_tree_modifier "Type of Coffee", False, False
radio_make_tree_entry 2, "Tea"
radio_make_tree_modifier "Temperature of Cup", True, True
radio_make_tree_entry 8, "Water"
radio_make_tree_entry 9, "Toast"
radio_make_tree_entry 10, "Mixed Toast"
radio_make_tree_entry 11, "Cheese Sandwich"
radio_make_tree_entry 12, "Mixed Sandwich"
radio_make_tree_entry 13, "Bread w/ cheese"
' If number of elements > 8 Tree will be auto rebuild
'    radio_make_tree_entry 14, "Bread w/ butter"
'    radio_make_tree_entry 15, "Plain Bread"

radio_make_tree_cd_back  
radio_make_tree_cd "Ice cream"
radio_make_tree_mkdir "Cup"                ' Optional
radio_make_tree_mkdir "Bowl"                ' Optional
radio_make_tree_cd "Glass"
radio_make_tree_entry 3, "2 scoops"
radio_make_tree_entry 4, "3 scoops"
radio_make_tree_cd_back
radio_make_tree_cd "bowl"
radio_make_tree_entry 5, "Chocolate"
radio_make_tree_entry 6, "Vanilla"
radio_make_tree_cd_back
radio_make_tree_cd_back

radio_make_tree_mkdir "Other"
radio_make_tree_cd "Other"
radio_make_tree_entry 7, "Tobbacco"
radio_make_tree_cd_back

radio_make_tree_mkdir "Compl."
radio_make_tree_cd "Compl."
radio_make_tree_mkdir "Type of Coffee"
radio_make_tree_cd "Type of Coffee"
radio_make_tree_modifier_entry 500, "Full"
radio_make_tree_modifier_entry 501, "Short"
radio_make_tree_cd_back

radio_make_tree_mkdir "Temperature of the Cup"
radio_make_tree_cd "Temperature of the Cup"
radio_make_tree_modifier_entry 600, "Cold Cup"
radio_make_tree_modifier_entry 601, "Hot Cup"
radio_make_tree_modifier_entry 602, "Warm Cup"
radio_make_tree_cd_back