codes:accessfunctions
This is an old revision of the document!
Table of Contents
ACCESS FUNCTIONS
Definition of the access functions that are developed in Eubrewnet There is Table with a summary of the available functions and their links as example.
For security purposes user authentication has been added to this tools. Examples of connections in matlab and python are provided for understanding.
FUNCTION TABLE
| Function | Short Description | Long Description | Link |
|---|---|---|---|
| getETC | Returns the ETC on Ozone ratio from ICFS | getETC | Get ETC |
| getConfig | Returns the Configurations of a brewer | getConfig | Get Config |
| getDS | Returns the DS measures of a brewer for a date | getDS | Get DS |
| getDSinterval | Returns the DS measures of a brewer for a range of dates | getDSinterval | Get DSinterval |
| getZS | Returns the ZS measures of a brewer for a date | getZS | Get ZS |
| getSL | Returns the SL measures of a brewer for a date | getSL | Get SL |
| getConfigbyDate | Returns the available Configuration of a brewer for a date | getConfigbyDate | Get Config by Date |
| getDSS | Returns the DS summaries of a brewer for a date | getDSS | Get DSS |
| getZSS | Returns the ZS summaries of a brewer for a date | getZSS | Get ZSS |
| getSLS | Returns the SL summaries of a brewer for a date | getSLS | Get SLS |
| getHG | Returns the mercury lamp tests of a brewer for a date | getHG | Get HG |
| getFileStatus | Returns the status of the received files | getFileStatus | Get FileStatus |
| getUmkehr | Returns the Umkehr measures for a date | getUmkehr | Get Umkehr |
| getBfileAvailable | Returns the available B files for a year | getBfileAvailable | Get BfileAvailable |
—-
Descriptions
getETC
- Function: getETC
- Inputs:
- brewerid: Id of Brewer
- Outputs: A list of (brewerid, date('YYYY-MM-DD'), etc) that comes from the ICF that are stored in the Eubrewnet Database.
getConfig
- Function: getConfig
- Inputs:
- brewerid: Id of Brewer
- Outputs: A dictionary with the Configurations that are stored for a brewer. The key is the date('YYYY-MM-DD') and the value is a dictionary formed by pairs of <constant name, constant value>.
getDS
- Function: getDS
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A list where the first element is the list of parameters and the rest of them are the DS measures with some extra fields as temperature or number of summary for a day.
getDSinterval
- Function: getDSinterval
- Inputs:
- brewerid: Id of Brewer
- date: start date('YYYY-MM-DD') of the range of measures
- enddate: end date('YYYY-MM-DD') of the range of measures
- Outputs: A list where the first element is the list of parameters and the rest of them are the DS measures with some extra fields as temperature or number of summary for the whole range of dates.
getZS
- Function: getZS
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A dictionary with the ZS measures that for a brewer and a day. The key is the datetime('YYYY-MM-DD HH:MM:SS') and the value is a dictionary formed by pairs of <value name, value>.
getSL
- Function: getSL
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A dictionary with the SL measures that for a brewer and a day. The key is the datetime('YYYY-MM-DD HH:MM:SS') and the value is a dictionary formed by pairs of <value name, value>.
getConfigbyDate
- Function: getConfigbyDate
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the available configuration
- Outputs: A dictionary with the available Configuration for a brewer and a day formed by pairs of <constant name, constant value>. The available configuration is the last configuration stored or the information of the header of the bfile for that day.
getDSS
- Function: getDSS
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A list where the first element is the list of parameters and the rest of them are the DS summaries for a day.
getZSS
- Function: getZSS
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A list where the first element is the list of parameters and the rest of them are the ZS summaries for a day.
getSLS
- Function: getSLS
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A list where the first element is the list of parameters and the rest of them are the SL summaries for a day.
getHG
- Function: getHG
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A list where the first element is the list of parameters and the rest of them are the mercury lamp test for a day.
getFileStatus
- Function: getFileStatus
- Inputs:
- file: Name of the file for status check
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') or start date if end date is provided
- enddate: end date('YYYY-MM-DD') of the date range
- Outputs: A list where the first element is a list with the fields and the rest are the status of a file with full information if file is provided or a short information with file name, process time and status for all the files between dates.
getUmkehr
- Function: getUmkehr
- Inputs:
- brewerid: Id of Brewer
- date: date('YYYY-MM-DD') of the measures
- Outputs: A list where the first element is the list of measure fields and the rest of them are the umkehr measures for a day from the B files.
getBfileAvailable
- Function: getBfileAvailable
- Inputs:
- brewerid: Id of Brewer
- year: date('YYYY')
- Outputs: A list whit the dates of the received B files in Eubrewnet.
EXAMPLES
MATLAB
A matlab function is available for users for understanding the Authentication method.
- |t get_dss_auth.m
extern> http://rbcce.aemet.es/svn/matlab/get_dss_auth.m
PYTHON
A python script is available for users for understanding the Authentication method.
- |t connect_example.py
extern> http://rbcce.aemet.es/svn/python/connect_example.py
codes/accessfunctions.1427205567.txt.gz · Last modified: 2015/03/24 13:59 by bhcruz