EWDB_SnippetRequestStruct

Type: struct _EWDB_SnippetRequestStruct
Description: Structure for storing parameters for a waveform request. This structure is used to store (in the database) a request for waveform data. Requests are presumably later gathered by a concierge type program that recovers as many desired waveforms as possible. This structure describes a time interval of interest for which it is interested in data from a particular channel. It defines the channel whose data it is interested in, the time interval for which it wants data, how many attempts should be made to retrieve the data, how often each attempt should be made, and what DB idEvent if any that the data should be associated with when retrieved.
Note:
Field Type Description
idSnipReq EWDBid DB ID of the waveform request(SnipReq) that this structure's data is associated with.
idChan EWDBid DB ID of the sesimic data channel for which the request wants data.
tStart double Starting time of the desired time interval.
tEnd double Ending time of the desired time interval.
idEvent EWDBid DB ID of the Event with which the desired data should be associated.
iNumAttempts int Number of attempts that should be made to retrieve the desired data.
tNextAttempt time_t This field has a dual purpose. When retrieving a list of Snippet Requests from the DB, this field will contain the time that the current snippet request is scheduled for a retrieval attempt. When used in the reverse manner (updating a snippet request), the "data retriever"/scheduler should put the "time till next attempt" in this field, meaning the time that the scheduler wants the request to be attempted minus the current time. (The deltaT). The number is done as a delta to ensure that updated requests are not scheduled for the past.
idExistingWaveform EWDBid DB ID of a Waveform in the DB that contains partial data for the original request.
tInitialRequest time_t Time of the initial snippet request. That is the time that it is created in the DB. Seconds since 1970.
iRequestGroup int Request Group of the snippet request. Requests can be placed in a Request Group so that different requests can be handled differently, or can be handled by separate data retrievers(like ora_trace_fetch).
iNumAlreadyAtmptd int Number of times that a data retriever has already attempted to retrieve the subject of the request. It is up to the retriever to update this number. This number field is used for informational purposes. It is up to the data retriever to delete the snippet request when it feels it has been attempted enough times. Theoretically, a request could be attempted 100 times, even if iNumAttempts was only set to 5, since it is up to the retriever to delete the request.
iRetCode int This is the return code that the retriever gives to the request after it attempts to process it. There are currently no generally agreed upon return codes.
iLockTime int The Lock value associated with the snippet request. In order to provide a mechanism for concurrent data retrievers, snippet requests must be locked before being processed. iLockTime is the key to the Lock for the snippet request. After the request has been processed, the key must be used to access the locked snippet request, so that the request can be updated.
szNote char[100] This is a note that the retriever may include with the snippet request. It is free to put whatever it likes in this field, such as its name, strategy params, a log, etc.
ComponentInfo EWDB_StationStruct Station/Component information for the channel associated with this snippet request.

Group: EWDB_API_LIB
Sub Group: WAVEFORM_REQUEST_API
Language: C
Location: ./src/oracle/schema-working/src/include/ewdb_ora_api.h