Download the make utility from here. Follow the installation instructions. When the
installation procedure has ended you will need to add the binary path to the
Environment Variables. To do that follow the previous steps. The binary folder for
make utility is in C:\Program Files
NOTE: if you have the command shell (CMD) already opened when performing the
installation, you probably will need to close and re-open to use the tools.
Now you can download the qbAPI from here. In order to compile them, navigate to /src folder
and run the command make (or mingw32-make on Windows OS).
6.4.2
Integrating the functions
In order to integrate the functions within your code, it is necessary to include the commands.h
and qbmove_communications.h libraries and compile qbmove_communications.cpp with your
code.
Then is only necessary to call the functions when it is needed.
All the functions have an explanation, in form of comments, in "qbmove_communications.h".
Following here there will be a brief explanation of the functions and what are used for.
6.4.3
Basic Functions
In most cases these will be all the necessary functions that you will need to use the qbmove
within your system.
•
RS485ListPorts
•
Description: This function is used to retrieve the name of all serial ports
connected to the computer. If no serial ports are found, a '0' value is
returned. Otherwise the number of serial ports connected to the computer
is returned.
•
Arguments
•
OpenRS485
•
Description: This function, once a list of serial ports is defined, and a series
of file descriptors are created, is used to open the serial port and allow
communication with the device connected.
•
Arguments
•
CloseRS485
(x86)\GnuWin32\bin.
•
char
list_of_ports[10][255]: List of ports connected
•
comm_settings
about communication settings
•
const char
*port_s: String of the serial port path
•
int
BAUD_RATE: Default baud rate of the communication. By
default, is equal to 2MBaud
*comm_settings_t: Structure containing info
70
28 aprile 2021
Need help?
Do you have a question about the qbmove Advanced Kit and is the answer not in the manual?
Questions and answers