Laserfiche WebLink
<br />OU0079 <br /> <br />25 <br /> <br />Saved Preferences <br /> <br />Data retrieval <br /> <br />The function SavePreferences () creates the file .rights.rc in the home direc- <br />tory of the user, storing all the information in the Preferences dialog. The format of <br />the preferences file is not presented here because it is not advised to modify the <br />contents of this file by editing it directly. <br /> <br />During system initialization, the function ReadPreferences () reads the saved <br />file and uses the contents to establish the initial state of preferences for the system. If <br />the file is not present in the home directory of the user, a default set of preferences is <br />used. The algorithm which parses the contents to the preferences file is unsophisti- <br />cated. so it is unwise to modify this file in any way. Corrupting the format of the pref- <br />erences file may prohibit the user from starting SPWRMS. <br /> <br />Hydrograph Data Retrieval <br /> <br />The following three DMI functions retrieve satellite-transmitted data from the data- <br />base and aggregate it according to the specified interval: <br /> <br />PLOT_DATA_PACKAGE *GetRealTimeStreamflow(char*station, <br />char*from_time,char*to_time) , <br /> <br />PLOT_DATA_PACKAGE *GetHourlyStreamflow(char*station,char* <br />from_time,char*to_time), <br /> <br />and <br /> <br />PLOT_DATA_PACKAGE *GetDailYStreamflow(char*station,cha~* <br />from_time,char*to_time) . <br /> <br />The following section describes the steps perfonned by these functions. <br /> <br />Retrieval of data for gauge(s) selected by the user is affected by the time interval indi- <br />cated in the Preferences dialog (and stored in the global variables start_date <br />and end_date), as well as by the averaging interval that the user has specified. <br /> <br />In all cases, the pair of functions <br /> <br />QueryStreamflowInit(char*station, char*from_date, <br />char*to_date) <br /> <br />and <br /> <br />QueryStreamflowNext(double*value, char*time) <br /> <br />are used to retrieve the raw data from the database_ The Ini t function checks to see <br />if any requested data is available in the database, and the Next function retrieves <br />these pieces of data, one per call to the function. All values present in the database <br />between from_date and to_date are retrieved for station. In all cases, the <br />time interval from the Preferences dialog is used as the base to construct <br />from_date and to_date. The averaging interval affects this in the following <br />ways: <br /> <br />1. If the user selected Real Time as the averaging interval, the s tart_da te and <br />end_date from the Preferences dialog are used for from_date and <br />