This is an old revision of the document!
Table of Contents
Eubrewnetuser’s manual
1. Setup and data sending
Each Brewer spectrophotometer communicates with a local PC where the raw data are recorded. For uploading the raw data from the client PC to the Eubrewnet database a set of routines written in python has to be installed on the local PC (or any other computer which has access to the Brewer raw data). When these routines are executed the local (client) PC is connected to the Eubrewnet server. Then, the local brewer files and all relative information (file size, modification date etc.) are listed and compared to the corresponding information for the files that have been already stored in the server. Only the files which are either new or have changed, are transferred from the former to the later. This process is repeated in regular time intervals (prefferably ~15 mins). In sections 1.1 - 1.4, the software installation and application processes are analytically described. A fast installation guide is available in section 1.5.
1.1. Software installation
Before the installation of the software the operator has to communicate with the administrator(eubrewnet@aemet.es) and ensure that his Brewer has been included in theEubrewnet Brewer list. Then, there are two possible methods to install the client software:
1st method(recommended): Install the python interpreter and download the python client
For Windows and Mac, Python 2.7 is recommended while for Linux, the Python Version should come bundled with the Linux distribution. Below is a list of the appropriate interpreters for Windows and Mac.
● Python 2.7 Windows x86 MSI Installer (Windows binary)
● Python 2.7 Windows X86-64 MSI Installer(Windows AMD64 / Intel 64 /X86-64 binary)
● Python 2.7 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.5 and later, if needed)
● Python 2.7 Mac OS X 32-bit i386/PPC Installer(for Mac OS X 10.3 and later, if needed)
● Linux Version should come bundled with your Linux distribution.
You have to be sure that your python interpreter is callable from every path in your system (Open a console and try python, exit() for exit).
Then, client_python.zipshould be downloaded and uncompressed in the system.
2nd method(not fully tested): Download the exe client
In this case, the client_exe.zip should be downloaded and uncompressed in the client PC system. After unzipping the compressed folder, try: $>refresh.exe (in dist folder) in a console to test if client is working properly. No error message should appear.
1.2. Client configuration file
The client configuration file (client.ini) is used by the refresh.py program. The later is the routine used to transfer the files from the client PC to the database. Depending on the installation method, these two files can be found either in client_python\source (1st installation method) or in client_exe\dist (2nd installation method). Client.ini is a plain ASCII INI file which consists of a global section and several server sections (one section for each server to which the files are sent).
In the following example, the content of a client.ini file is presented. The lines in bold should not be changed by the operator since they provide information relative to the database server. The information in the remaining (regular font) lines should be defined by the operator.
| Example 1: The content of a client.ini file [global] brewerid=157 working_dir=. input=c:\brewer\data servers=iberonesia3 proxy=proxy.xxx.xxx:port [iberonesia3] url=http://rbcce.aemet.es/refresh db=iberonesia3.db noproxy=yes serverport=8081 |
In the global section of the client.ini file the following parameters should be declared:
● brewerid : brewer identifier (i.e. the brewer serial number).
● input: the directory which contains the files produced by the Brewer.
● servers: comma separated list of server aliases. The files are sent to each server in this list.
● working_dir: the directory where the local refresh database is stored.
● proxy: proxy url, if required. If not required, this property should be commented (add # at the beginning of the line).
A server section is identified by the server alias (i.e. the alias is the name between the brackets - iberonesia3 in the case of Example 1), and has the following properties:
● url : server url.
● db : a local database (a simple data file) is created the first time that client software is executed. This line defines the name of this file.
● noproxy : if a proxy is specified in the global section, noproxy may be set to yes to use a direct connection (avoiding the proxy) to access the server.
● serverport: the used port in the server (8081)
The lines that are not used should be commented (i.e. the proxy property if no proxy is used). The easiest way to configure the client is to properly specify all options in the client.ini file and then execute refresh.py without arguments. However, if desired, some of the above properties can be overridden using command line parameters when executing refresh.py or alive.py. If for example, the client.ini file of Example 1 is used, a different Brewer id and a different input path can be defined in the command line:
$>python refresh.py -b 086 -i c:\brewer086\data
Though, it is preferable to specify the Brewer id and the input path (as well as any other parameters) in the client.ini file instead of using the -b and -i commands.
As already described, most of the refresh.py options may be configured though command line arguments or client.ini configuration file. Any option specified in command line overrides the option in client.ini. All options are shown when the the command “$ ./refresh.py -h” is used (see Example 2):
| Example 2: The refresh.py options $ ./refresh.py -h Usage: refresh.py [options] Options: -h, –help show this help message and exit -i FILE, –input=FILE File to process. If the given file is a directory, all files within will be processed. -s SERVERS, –servers=SERVERS Comma separated list of xmlrpc server aliases -b BREWERID, –brewerid=BREWERID Brewerid of file/s to process -c FILE, –config=FILE Configuration file path -v, –verbose Verbosity level. The more '-v' the more verbose is the program. |
The mandatory options are:
● working_dir :This option must be specified in client.ini. It defines the directory where the local refresh database is stored.
● input: Defines the file which will be processed. If a directory is defined, then all files in the particular directory will be processed.
● brewerid : Brewer identifier.
● servers: Comma separated list of server aliases. The files are sent to each server in this list.