namespace:page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| namespace:page [2018/03/21 14:10] – ilias | namespace:page [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======= 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 [[eubrewnet@aemet.es|administrator]](eubrewnet@aemet.es) and ensure that his Brewer has been included in the[[http:// | ||
| - | |||
| - | __1< | ||
| - | |||
| - | 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. | ||
| - | |||
| - | ● [[https:// | ||
| - | |||
| - | ● [[https:// | ||
| - | |||
| - | ● [[https:// | ||
| - | |||
| - | ● [[https:// | ||
| - | |||
| - | ● 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, [[http:// | ||
| - | |||
| - | __2< | ||
| - | |||
| - | In this case, the [[http:// | ||
| - | (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 [[https:// | ||
| - | |||
| - | 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: | ||
| - | |||
| - | 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**: | ||
| - | |||
| - | ● **working_dir**: | ||
| - | |||
| - | ● **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 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: | ||
| - | |||
| - | 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 ** “****$ ./ | ||
| - | |||
| - | | **Example 2:** The refresh.py options\\ ** $ ./ | ||
| - | |||
| - | 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**: | ||
| - | |||
| - | ===== 1.3. Communication with the server ===== | ||
| - | |||
| - | Open a browser and try access [[http:// | ||
| - | |||
| - | ** $>python refresh.py -b XXX -vvv\\ - XXX: Id of a brewer** | ||
| - | |||
| - | If you want to save the errors and log, define log and error files: | ||
| - | |||
| - | ** $>python refresh.py 1> | ||
| - | |||
| - | The two files (client.log and client_error.log) should not contain error messages after the execution of the client software. In case of errors in the communication, | ||
| - | |||
| - | ===== 1.4. Schedule the data sending ===== | ||
| - | |||
| - | The Brewer data can be sent to Eubrewnet either directly from the operational Brewer PC or by using another computer which has access to the data. | ||
| - | |||
| - | __From the Brewer computer:__ | ||
| - | |||
| - | Sending the Brewer data to Eubrewnet in regular time intervals can be achieved by adding a routine in your Brewer schedule. The routine is executed in desired time intervals and calls the client software. | ||
| - | |||
| - | In W2k W7 the brewer software waits until the execution of each command is finished so if the communication is slow or fails it takes too much time to send the data, and may block or delay the brewer software. This does not happen if DOSBOX is used. The old MSDOS/ | ||
| - | |||
| - | Thus, it is recommended to send the data in two steps: | ||
| - | |||
| - | 1. Inside the brewer software or a task scheduler run a routine to copy the bdata directory content in another place/ | ||
| - | |||
| - | ** set DEST_DIR=e: | ||
| - | |||
| - | 2. Run the data sending software from this directory as scheduled task | ||
| - | |||
| - | **$> | ||
| - | |||
namespace/page.1521641416.txt.gz · Last modified: 2018/03/21 14:10 by ilias