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 device_is_electronic_menu() // USE WITH X64 SMART MEU


Description:

Use this function to inform DLL that the program wants to send plu codes to the X64 Smart Menu. Send Plu codes to the X64 Smart Menu and to the X64 Terminal is not possible at the same time in this version.


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

Description:

This function initializes the antenna, making the automatic detection of the version and putting it in receipt mode for orders. This initialization takes about 1 second.

Function:

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

Parameters:

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

(Ex. 1 for COM1)



first_terminal: 1 radio that the antenna terminal shall accept as valid. The terminal drop only to send a message when they receive a confirmation of the antenna. The antenna only confirms that messages have the same license number of hardware (license_nomais see below), and have a number of terminal between first_terminalelast_terminal inclusive.
last_terminal: Last radio terminal that the antenna must accept as valid (see first_terminal)
license_no: License number of hardware (programmed in the terminals) to the antenna shall accept as valid. This figure serves to neighboring establishments that use the same system of radio terminals may use a number of different license, thus avoiding conflicts between the posts

protocolo_dados: 4

int __stdcall radio_close ()

Description:

This function frees the serial port and return the dish to the default mode so that it does not receive more transmissions from the radio terminal.
c / PROTOCOLO_DADOS 4

int __stdcall radio_recv5 (int * function, int * end, int * permission, int * msg_number, dishes int *, int * mesa1, mesa2 int *, int * AuxData, lugar1 int *, int * lugar2, plus int *, int * qtds, st_mesa1 unsigned char *, unsigned char * st_mesa2)

Description:
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 it to the variables passed as parameters.

Function identical to radio_recv3, but can receive 13 bytes of the field mesa1 and mesa2.

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.
Function identical to radio_recv4, but when receives decimal numbers it turns to the negative quantity and multiplies it by 1000. Example 0.1, the quantity returns -100.

ATTENTION the function copies the reply to an address of their respective variables. The field st_mesa1 and st_mesa2 have to be initialized with blank spaces, resulting in the program block.
c / PROTOCOLO_DADOS 4

int __stdcall radio_send_list4 (int end, int plate, int table, int AuxData, Lugar1 int, int Lugar2, plus int *, int * qtds, mesa1 unsigned char *, unsigned char * mesa2)

Description:

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

This function sends a message to a radio terminal. The terminal after receiving the message enter into edit mode. After editing a message is sent to the terminal with the PC type = 'E'.

Plus Qtds and 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 end, char * msg)

Description:
This feature sends a text message to a radio terminal. The message should not occupy more than 32 characters and should be entirely composed of international characters. Note that the radio terminal receives the message only if you are in the main menu, so that the sending of messages should only be made in response to an action of the terminal's user.

The DLL is responsible for trying to relay messages not confirmed by the terminal. This retransmission is done every 5 seconds (approximately). If the terminal does not receive a message in 1 hour, the DLL ignores it. Messages are processed in order of arrival (FIFO). You can tell if a message was sent or not using the function radio_send_message_get_status.

Parameters:

terminal: the terminal number to which the message should be sent.
msg: pointer to the address where you send the message. (Many languages do the automatic conversion of string to the pointer)

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

Description:
This feature sends a text message to a radio terminal. The message should not occupy more than 64 characters and should be entirely composed of international characters. Note that the radio terminal receives the message only if you are in the main menu, so that the sending of messages should only be made in response to an action of the terminal's user.

After the terminal receives this message automatically goes to the menu menuoption '

The DLL is responsible for trying to relay messages not confirmed by the terminal. This retransmission is done every 5 seconds (approximately). If the terminal does not receive a message in 1 hour, the DLL ignores it. Messages are processed in order of arrival (FIFO). You can tell if a message was sent or not using the function radio_send_message_get_status.

Parameters:

terminal: the terminal number to which the message should be sent.
msg: pointer to the address where you send the message. (Many languages do the automatic conversion of string to the pointer)
menuoption: Menu for which the terminal will after receiving a message.


int __stdcall radio_send_big_message (int end, char * msg)

Description:
This feature sends a text message to a radio terminal. The message should not occupy more than 64 characters and should be entirely composed of international characters. Note that the radio terminal receives the message only if you are in the main menu, so that the sending of messages should only be made in response to an action of the user of the terminal.

The DLL is responsible for trying to relay messages not confirmed by the terminal. This retransmission is done every 5 seconds (approximately). If the terminal does not receive a message in 1 hour, the DLL ignores it. Messages are processed in order of arrival (FIFO). You can tell if a message was sent or not using the function radio_send_message_get_status.

Parameters:

terminal: the terminal number to which the message should be sent.
msg: pointer to the address where you send the message. (Many languages do the automatic conversion of string to the pointer)

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

Description:
This feature sends a text message to a radio terminal. The message should not occupy more than 32 characters and should be entirely composed of international characters. Note that the radio terminal receives the message only if you are in the main menu, so that the sending of messages should only be made in response to an action of the user of the terminal.

After the terminal receives this message automatically goes to the menu menuoption '

The DLL is responsible for trying to relay messages not confirmed by the terminal. This retransmission is done every 5 seconds (approximately). If the terminal does not receive a message in 1 hour at DLL ignores it. Messages are processed in order of arrival (FIFO). You can tell if a message was sent or not using the function radio_send_message_get_status.

Parameters:

terminal: the terminal number to which the message should be sent.
msg: pointer to the address where you send the message. (Many languages do the automatic conversion of string to the pointer)
menuoption: Menu for which the terminal will after receiving a message.


int __stdcall radio_message_hardware_ABCDEF (int end, int value1, int value2, int value3, int valor4, valor5 int, int valor6)

This function sends a message and set the option A, B, C, D, E and F of the terminal with the respective 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 if the terminal is switched off or no coverage)

Returns:
0 if the message arrived
1 if the DLL is still trying to send a message
2 if the transmission failed (after about 1 hour trying)

Parameters:

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

int __stdcall radio_set_entry (entry_no int, char * name)

Description:

This function updates the image that the DLL is in memory of the terminal radio only for a position. This update should be made for all the positions that will be sent using the function radio_upload_entries. (see below)

With the new functions to send plus tree in, this function is not used and is obsolete.

You must only use this function if you want to change the text of the menus of the terminal.

Function:

int radio_set_entry (
int entry_no,
char far * name);

Parameters:

entry_no: Position to be updated
name: Text to write in that position. This may take up to 16 characters.


int __stdcall radio_upload_entry (first_entry int, int last_entry)

Description:

This function sends all entries (previously introduced with radio_set_entry) to the radio terminals. To that end, we must type in 96195 6 when the terminal is in the main menu to put the terminal in download mode. Alternatively you can put the terminal in download mode by sending a message.
This function has no correction of errors. It may be that a terminal does not receive all entries. To avoid this you can send the message 2 times.

With the new functions to send plus tree, this one gets to not be used and becomes obsolete.

Function:

int radio_upload_entries ( int casino first_entry, last_entry int);

Parameters:

+ First_entry: First entry to be sent
last_entry: Last entry to be sent. To send all entries to change first_entry = 10 = last_entry and 3079.


Functions to create more in the tree.


int __stdcall radio_make_tree_mkdir (char * name), / / Optional

Description:

Equivalent to the MSDOS mkdir, create a branch in the tree.

Returns:

Parameters:

* name: Name of class to create.

int __stdcall radio_make_tree_cd_back ();

Description:

Equivalent to the cd .. of MSDOS, lets move to the previous branch.

Returns:
Parameters:


int __stdcall radio_make_tree_entry (entry_no int, char * name);

Description:

Lets introduce a multiannual a particular branch of the tree.

Returns:

The value of the position of the tree where it was placed Plu.

Parameters:

entry_no: Value that is intended to be sent to the PC when it is selected Plu.
* name: Description of Plu.

int __stdcall radio_make_tree_entry2 (entry_no int, char * name, char *price, int position); // USE WITH X64 SMART MENU

Description:

Lets introduce a multiannual a particular branch of the tree.

Returns:

The value of the position of the tree where it was placed Plu.

Parameters:

entry_no: Value that is intended to be sent to the PC when it is selected Plu.
* name: Plu Description.

* price: Plu Price.
position: Plu page number * 24 + plu line number.


int __stdcall radio_make_tree_cd (char * name);

Description:

Equivalent to the MSDOS cd, allows changing industry.

Returns:
Parameters:

* name: Name of the branch to where you want to change. If there is automatically created.

int __stdcall radio_make_tree_modifier (char * group_name, bool automatic, multiple_choice bool);
OR
int __stdcall radio_make_tree_modifier2 (char * group_name, int automatic, multiple_choice int);

Description:

To add the latest additions Plu introduced.
radio_make_tree_modifier "temperature of the cup", False, False

Would add a supplement called "temperature of the cup," which would not be automatic and would not have multiple choices.

Returns:
Parameters:

* group_name: Group name supplements.
automatic: It requires the introduction of these supplements, for example if you want to ask for coffee has to say it is hot or cold cup.
multiple_choice: It would say that if you want coffee in a hot and cold cup.

int __stdcall radio_make_tree_modifier_min_max( char *group_name,int automatic,int min,int max,int default_value); // USE WITH X64 SMART MENU


Description:
Assigns a modifier group to a menu item. More than one modifier group can be assigned to an item by calling this function repeatedly.
Parameters:
group_name: Title of the modifier group to be assigned.

automatic: It requires the introduction of these supplements, for example if you want to ask for coffee has to say it is hot or cold cup.
min: Minimum number of items that the end user must select in the group.
max: Maximum number of items that the end user must select in the group.
default_value: Each bit of this code makes the corresponding modifier in the group pre-selected by default.


int __stdcall radio_make_tree_modifier_entry (entry_no int, char * name);

Description:

The previous directory becomes the name of the group of supplements.
With this instruction we add elements to the group.
Example:

radio_make_tree_cd "temperature of the cup"
radio_make_tree_modifier_entry 600, "Cold Chevena"
radio_make_tree_modifier_entry 601, "Hot cup"
radio_make_tree_modifier_entry 602, "Morna cup"

We would create a new group called "temperature of the cup", with 3 elements.
If used on a return request 601,602 and 603 respectively.

Returns:

The value of the position of the tree where it was placed Plu.

Parameters:


int __stdcall radio_upload_tree2 (char * Settings, NumParametros int, int RearrangeTree);

Description:

Send all to the plus terminal.
The settings are a string that allows you to configure the terminal directly.

Parameters:

Configuration Option 1 = A
Configuration Option 2 = B
Setup Option 3 = C
etc ...

NumParametros: Size in bytes of the settings.
RearrangeTree: 1 (Enable) or 0 (Disable), it defended the behaviour of a tree branch in situations that are more than 8 elements.
If 1, automatically creates a new dll subbranch so that there is never an industry with more than 8 elements.

Example of a tree:




To create more of the above example should be used the following code.

radio_make_tree_cd "Cafeteria"

radio_make_tree_entry 1, "Cafe"
radio_make_tree_modifier "temperature of the cup", False, False
radio_make_tree_modifier "Type of Coffee", False, False

radio_make_tree_entry 2, "Cha"
radio_make_tree_modifier "temperature of the cup", True, True

radio_make_tree_entry 8, "Water"
radio_make_tree_entry 9, "Torres"
radio_make_tree_entry 10, "Tosta mixed"
radio_make_tree_entry 11 "Sande of cheese"
radio_make_tree_entry 12, "mixed Sande"
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, "Simple Bread"

radio_make_tree_cd_back
radio_make_tree_cd "Gelato"
radio_make_tree_mkdir "Glass" 'Optional
radio_make_tree_mkdir "Taca" 'Optional
radio_make_tree_cd "Glass"
radio_make_tree_entry 3, "2 Balls"
radio_make_tree_entry 4 "Balls 3"
radio_make_tree_cd_back
radio_make_tree_cd "Taca"
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, "Tobacco"
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 Chevena"
radio_make_tree_modifier_entry 601, "Hot cup"
radio_make_tree_modifier_entry 602, "Morna cup"
radio_make_tree_cd_back


Functions introduced in trees.

With these functions you can create a structure of families, subfamilies, accessories etc ... with great simplicity.
This has the advantage of not needing the official store codes.

Option in the terminal G, 'Plus tree' (value 1) has to be active. Valid in versions> = 7.9370.

The functions are:

VB

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
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 to the plus terminal.
Public Declare Function radio_upload_tree2 Lib "RioCom" (ByVal Settings As String, NumParametros ByVal As Long, ByVal RearrangeTree the Long) As Long

Map of the positions of the memory of the terminal

Map of positions:

0 to 9 RESERVED
11-13 NOT USED
14 "Table"
15 "Dish Qty"
16 "Sending"
17 NOT USED
18 NOT USED
19 "No. of People" or "PLACE"
20 "Other"
21-27 Function Name "Other"
28-29 "Reserved"
30 Methods of Payment
31 "Print Y / N"
32 Prompt "?" (Default)
33-3071 Description of Articles 1 to 3039
3072 1 - Order
3073 2 - Cancellation
3074 3 - Subtotal
3075 4 - Bill
3076 5 - Transfers
3077 6 - Partial Payment
3078 7 - Other
3079 8 - Discount
9 9 - Configuration
3080 1 - Command
3081 2 - License
3082 3 - Config.A
3083 4 - Config.B
3084 5 - Config.C
3085 6 - Receive PLUS
3086 7 - Delete PLUS
10 8 - Send Plus + C
3087 Quit[Enter]
3088 Array of pages (sort of)
bytes 0 to 15

(...)
(...)

3103
240 to 255 bytes
3104 Array of pages
(pointing to)
32-bit integers from 0 to 3

(...)
(...)

3167 Integers of 32 bits from 252 to 255
3168 Index in the array of pages for each article
bytes 0 to 15

(...)
(..)

3358 1024 to 1039 bytes

3999 4 bytes c / descriptive paragraph of receiving