ewdb_api_CreateArrival()

Prototype: |
int ewdb_api_CreateArrival( | EWDB_ArrivalStruct * pArrival);
Description: | Function creates an arrival from the caller supplied information in pArrival. The function assumes that the caller has supplied all information for an arrival including origin-phase information. The pArrival->idOrigin must be a valid existing origin DB ID. Upon successful completion, the function writes the DB ID of the newly created phase pick(Pick) and the newly created OriginPick to pArrival->idPick and pArrival->idOriginPick respectively.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pArrival | EWDB_ArrivalStruct * | Pointer to a EWDB_ArrivalStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_CreateEvent()

Prototype: |
int ewdb_api_CreateEvent( | EWDB_EventStruct * pEvent);
Description: | Function creates an event in the DB using the information provided by the caller in pEvent. Upon successful completion, the function writes the DB ID of the newly created event to pEvent->idEvent. If the caller specifies a Source and a SourceEventID, and there is an existing Event with that same Source/SourceEventID, then the idEvent of the existing event will be returned, instead of creating a new event. The function will return success in this case even though it has not actually created a new Event. If a matching Event already exists, then the Comment passed by the caller is ignored.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pEvent | EWDB_EventStruct * | Pointer to an EWDB_EventStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_CreateMagnitude()

Prototype: |
int ewdb_api_CreateMagnitude( | EWDB_MagStruct * pMag);
Description: | Function creates a magnitude in the DB using the information provided by the caller in pMag. If pMag->bBindToEvent is set to TRUE, then the function will attempt to associate the new magnitude with an existing event(pMag->idEvent). If both pMag->bBindToEvent and pMag->bSetPreferred are TRUE, then the function will attempt to set the magnitude as the preferred one for the Event. Upon successful completion, the function writes the DB ID of the newly created magnitude to pMag->idMag. The call will fail under any of the following circumstances: If bBindToEvent is TRUE, and idEvent is not a valid existing idEvent in the DB If idOrigin is set to a non-zero value, and it does not match an existing idOrigin in the DB szSource is not a valid source/author string.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pMag | EWDB_MagStruct * | Pointer to an EWDB_MagStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_CreateOrigin()

Prototype: |
int ewdb_api_CreateOrigin( | EWDB_OriginStruct * pOrigin);
Description: | Function creates an origin in the DB using the information provided by the caller in pOrigin. If pOrigin->BindToEvent is set to TRUE, then the function will attempt to associate the new origin with an existing event(pOrigin->idEvent). If both pOrigin->BindToEvent and pOrigin->SetPreferred are TRUE, then the function will attempt to set the origin as the preferred one for the Event. Upon successful completion, the function writes the DB ID of the newly created origin to pOrigin->idOrigin.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pOrigin | EWDB_OriginStruct * | Pointer to an EWDB_OriginStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_CreateOriginPick()

Prototype: |
int ewdb_api_CreateOriginPick( | EWDB_ArrivalStruct * pArrival);
Description: | Function creates an association between a pick and an origin. The information must be supplied by the caller in pArrival.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pArrival | EWDB_ArrivalStruct * | Pointer to a EWDB_ArrivalStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_CreatePick()

Prototype: |
int ewdb_api_CreatePick( | EWDB_ArrivalStruct * pArrival);
Description: | Function creates an unassociated pick from the caller supplied information in pArrival. This function creates a Pick in the DB but it does not associate the Pick with an Origin. To associate Picks with an Origin, either call ewdb_api_CreateArrival() to create the entire arrival at once, or call ewdb_api_CreateOriginPick() after creating a naked pick..
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pArrival | EWDB_ArrivalStruct * | Pointer to a EWDB_ArrivalStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_DeleteEvent()

Prototype: |
int ewdb_api_DeleteEvent( | int IN_idEvent, int IN_bDeleteTraceOnly);
Description: | Deletes trace and/or parametric data for an event from the database. Note that this means that the deleted data is permanently gone.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success
PARAMETER INFO
Parameter | Type | Description
IN_idEvent | int | DB id of the event to delete.
IN_bDeleteTraceOnly | int | If set to TRUE, delete only trace, otherwise delete both trace and parametric data for this event.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetAmpsByEvent()

Prototype: |
int ewdb_api_GetAmpsByEvent( | EWDBid idEvent, AMPLITUDE_TYPE iAmpType, EWDB_PeakAmpStruct * pAmpBuffer, EWDB_StationStruct * pStationBuffer, int * pNumAmpsFound, int * pNumAmpsRetrieved, int iBufferLen);
Source File: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h
Description: | Function retrieves a list of amplitudes of a given type that are associated with a given DB Event. Use idEvent to define the DB Event for which you want a list of associated amplitudes. If you want station information for the channel associated with each amplitude, allocate space for pStationBuffer, otherwise set pStationBuffer to NULL, and station information will not be retrieved.
Note: | This function only retrieves amplitudes that are directly associated with an Event. It will not retrieve amplitudes that have been associated with an Event via a Magnitude.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
EWDB_RETURN_WARNING | Partial success. A list of amplitudes was retrieved, but the caller's buffer was not large enough to accomadate all of the amplitudes found. See pNumAmpsFound for the number of arrivals found and pNumAmpsRetrieved for the number of amplitudes placed in the caller's buffer.
PARAMETER INFO
Parameter | Type | Description
idEvent | EWDBid | DB identifier of the Event for which the caller wants a list of associated amplitudes.
iAmpType | AMPLITUDE_TYPE | Type of amplitude the caller is searching for. "Amplitude Type" constants are defined in .
pAmpBuffer | EWDB_PeakAmpStruct * | Buffer allocated by the caller, where the function will write the list of amplitudes retrieved.
pStationBuffer | EWDB_StationStruct * | Buffer allocated by the caller, where the function will write the list of station/channel info associated with the amplitudes retrieved. If pStationBuffer is set to NULL by the caller, then the function will not attempt to retrieve Station information for the retrieved amplitudes. If pStationBuffer is NOT NULL, then the function will fill out an EWDB_StationStruct for the channel associated with each amplitude.
pNumAmpsFound | int * | Pointer to an integer where the function will write the number of amplitudes found.
pNumAmpsRetrieved | int * | Pointer to an integer where the function will write the number of amplitudes retrieved and placed in the caller's buffer(pAmpBuffer).
iBufferLen | int | Size of the pAmpBuffer buffer in as a multiple of EWDB_PeakAmpStruct. (example: 15 structs) If pStationBuffer is not NULL, then it must also contain space for this many EWDB_StationStruct records.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetAmpsByOrigin()

Prototype: |
int ewdb_api_GetAmpsByOrigin( | EWDBid idOrigin, AMPLITUDE_TYPE iAmpType, EWDB_PeakAmpStruct * pAmpBuffer, EWDB_StationStruct * pStationBuffer, int * pNumAmpsFound, int * pNumAmpsRetrieved, int iBufferLen);
Source File: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h
Description: | Function retrieves a list of amplitudes of a given type that are associated with a given DB Origin. Use idOrigin to define the DB Origin for which you want a list of associated amplitudes. If you want station information for the channel associated with each amplitude, allocate space for pStationBuffer, otherwise set pStationBuffer to NULL, and station information will not be retrieved.
Note: | This function only retrieves amplitudes that are directly associated with an Origin, or the Event with which that Origin is associated. It will not retrieve amplitudes that have been associated with an Origin via a Magnitude.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
EWDB_RETURN_WARNING | Partial success. A list of amplitudes was retrieved, but the caller's buffer was not large enough to accomadate all of the amplitudes found. See pNumAmpsFound for the number of arrivals found and pNumAmpsRetrieved for the number of amplitudes placed in the caller's buffer.
PARAMETER INFO
Parameter | Type | Description
idOrigin | EWDBid | DB identifier of the Origin for which the caller wants a list of associated amplitudes.
iAmpType | AMPLITUDE_TYPE | Type of amplitude the caller is searching for. "Amplitude Type" constants are defined in .
pAmpBuffer | EWDB_PeakAmpStruct * | Buffer allocated by the caller, where the function will write the list of amplitudes retrieved.
pStationBuffer | EWDB_StationStruct * | Buffer allocated by the caller, where the function will write the list of station/channel info associated with the amplitudes retrieved. If pStationBuffer is set to NULL by the caller, then the function will not attempt to retrieve Station information for the retrieved amplitudes. If pStationBuffer is NOT NULL, then the function will fill out an EWDB_StationStruct for the channel associated with each amplitude.
pNumAmpsFound | int * | Pointer to an integer where the function will write the number of amplitudes found.
pNumAmpsRetrieved | int * | Pointer to an integer where the function will write the number of amplitudes retrieved and placed in the caller's buffer(pAmpBuffer).
iBufferLen | int | Size of the pAmpBuffer buffer in as a multiple of EWDB_PeakAmpStruct. (example: 15 structs) If pStationBuffer is not NULL, then it must also contain space for this many EWDB_StationStruct records.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetAmpsByTime()

Prototype: |
int ewdb_api_GetAmpsByTime( | time_t tStart, time_t tEnd, AMPLITUDE_TYPE iAmpType, EWDB_PeakAmpStruct * pAmpBuffer, EWDB_StationStruct * pStationBuffer, int * pNumAmpsFound, int * pNumAmpsRetrieved, int iBufferLen);
Source File: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h
Description: | Function retrieves a list of amplitudes of a given type for a given time window. Use tStart and tEnd to specify the time window for which you are interested in amplitudes. If you want station information for the channel associated with each amplitude, allocate space for pStationBuffer, otherwise set pStationBuffer to NULL, and station information will not be retrieved.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
EWDB_RETURN_WARNING | Partial success. A list of amplitudes was retrieved, but the caller's buffer was not large enough to accomadate all of the amplitudes found. See pNumAmpsFound for the number of arrivals found and pNumAmpsRetrieved for the number of amplitudes placed in the caller's buffer.
PARAMETER INFO
Parameter | Type | Description
tStart | time_t | Start time of criteria window. (Secs since 1970)
tEnd | time_t | End time of criteria window. (Secs since 1970)
iAmpType | AMPLITUDE_TYPE | Type of amplitude the caller is searching for. "Amplitude Type" constants are defined in .
pAmpBuffer | EWDB_PeakAmpStruct * | Buffer allocated by the caller, where the function will write the list of amplitudes retrieved.
pStationBuffer | EWDB_StationStruct * | Buffer allocated by the caller, where the function will write the list of station/channel info associated with the amplitudes retrieved. If pStationBuffer is set to NULL by the caller, then the function will not attempt to retrieve Station information for the retrieved amplitudes. If pStationBuffer is NOT NULL, then the function will fill out an EWDB_StationStruct for the channel associated with each amplitude.
pNumAmpsFound | int * | Pointer to an integer where the function will write the number of amplitudes found.
pNumAmpsRetrieved | int * | Pointer to an integer where the function will write the number of amplitudes retrieved and placed in the caller's buffer(pAmpBuffer).
iBufferLen | int | Size of the pAmpBuffer buffer in as a multiple of EWDB_PeakAmpStruct. (example: 15 structs) If pStationBuffer is not NULL, then it must also contain space for this many EWDB_StationStruct records.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetArrivals()

Prototype: |
int ewdb_api_GetArrivals( | EWDBid idOrigin, EWDB_ArrivalStruct * pArrivals, int * pNumArrivalsFound, int * pNumArrivalsRetrieved, int BufferLen);
Description: | The function retrieves a list of arrivals that are associated with a given origin. See EWDB_ArrivalStruct for a description of the information retrieved for each associated arrival.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
EWDB_RETURN_WARNING | Partial success. A list of arrivals was retrieved, but the caller's buffer was not large enough to accomadate all of the arrivals found. See pNumArrivalsFound for the number of arrivals found and pNumArrivalsRetrieved for the number of arrivals placed in the caller's buffer.
PARAMETER INFO
Parameter | Type | Description
idOrigin | EWDBid | This function retrieves a list of arrivals associated with an origin. idOrigin is the database ID of the origin for which the caller wants a list of arrivals.
pArrivals | EWDB_ArrivalStruct * | Buffer allocated by the caller, where the function will write the list of arrivals.
pNumArrivalsFound | int * | Pointer to an integer where the function will write the number of found arrivals.
pNumArrivalsRetrieved | int * | Pointer to an integer where the function will write the number of arrivals placed in the callers buffer(pArrivals).
BufferLen | int | Size of the pArrivals buffer as a multiple of EWDB_ArrivalStruct. (example: 15 structs)
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetEventForOrigin()

Prototype: |
int ewdb_api_GetEventForOrigin( | EWDBid idOrigin, EWDBid * idEvent);
Source File: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h
Description: | Function returns the DB ID of the Event associated with the given Origin. If "zero" or "more than one" Events are associated with the given origin, then an error is returned.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
idOrigin | EWDBid | The DB identifier of the Origin for which the caller wants to obtain the DB Event.
idEvent | EWDBid * | Pointer to an EWDBid value, where the function will write the DB ID of the Event associated with the given Origin.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetEventInfo()

Prototype: |
int ewdb_api_GetEventInfo( | EWDBid idEvent, EWDB_EventStruct * pEvent);
Description: | Function retrieves information about the Event identified by idEvent. See EWDB_EventStruct for a description of the information provided.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
idEvent | EWDBid | The DB identifier of the Event for which the caller wants information.
pEvent | EWDB_EventStruct * | Pointer to a EWDB_EventStruct allocated by the caller, where the function will write the information about the Event.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetEventList()

Prototype: |
int ewdb_api_GetEventList( | EWDB_EventListStruct * pBuffer, int len, int StartTime, int EndTime, EWDB_EventListStruct * pCriteria, EWDB_EventListStruct * pMaxEvent, int * pNumEvents);
Description: | Returns the list of all events in the database, in a given time range, that meet the criteria specified in pCriteria. For each Event found to meet the given criteria, an EWDB_EventListStruct is returned. This is the primary function used for searching for a subset of the events in the DB.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_SUCCESS | A list of events was successfully retrieved.
EWDB_RETURN_FAILURE | The function experienced a fatal error while retrieving a list of events.
-x < -1 | (-x) is returned where x > 1 when the size of the caller's buffer is insufficient to hold all of the events that matched the caller's criteria. x is the size of the buffer required to retrieve all of the events that were found. The function places as many events as possible into the caller's existing buffer. This is not a failure condition, just a warning that the caller did not receive all of the requested data.
PARAMETER INFO
Parameter | Type | Description
pBuffer | EWDB_EventListStruct * | Buffer allocated by the caller, in which the function will place the list of events matching the caller's criteria.
len | int | Length of pBuffer as a multiple of EWDB_EventListStruct.
StartTime | int | Minimum(oldest) time acceptable for an event. Expressed as seconds since 1970(time_t).
EndTime | int | Maximum(youngest) time acceptable for an event. Expressed as seconds since 1970(time_t).
pCriteria | EWDB_EventListStruct * | Pointer to the EWDB_EventListStruct that contains part of the selection criteria for the list, including: minimum lattitude, minimum longitude, minimum depth, minimum magnitude, and source limitations. Source criteria is: "*" events from all sources "**" events from only human sources "" (blank string)all automatic sources Any other string will be matched against the source identifier, such as the logo of the earthworm module that created a solution, or the dblogin of a human reviewer.
pMaxEvent | EWDB_EventListStruct * | Pointer to the EWDB_EventListStruct that contains part of the selection criteria for the list, including: maximum lattitude, maximum longitude, maximum depth, and maximum magnitude.
pNumEvents | int * | Pointer to an integer where the function writes the number of events it put in pBuffer.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetMagnitude()

Prototype: |
int ewdb_api_GetMagnitude( | EWDBid idMag, EWDB_MagStruct * pMag);
Description: | Function retrieves information about the Magnitude identified by idMag. See EWDB_MagStruct for a description of the information provided.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
idMag | EWDBid | The DB identifier of the Magnitude for which the caller wants information.
pMag | EWDB_MagStruct * | Pointer to an EWDB_MagStruct allocated by the caller, where the function will write the information about the Magnitude.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetMagsForOrigin()

Prototype: |
int ewdb_api_GetMagsForOrigin( | EWDBid IN_idOrigin, EWDB_MagStruct * pMags, int * pNumMagsFound, int * pNumMagsRetrieved, int IN_BufferRecLen);
Source File: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h
Description: | Optionally, write a description of what the function does and how it behaves.
Note: | Optionally, write a note about the function here.
RETURN CODE INFO
Return Type: | int
Return Value | Description
Default_Return_Value | Description of the default return value
PARAMETER INFO
Parameter | Type | Description
IN_idOrigin | EWDBid | Optional description of (IN_idOrigin)
pMags | EWDB_MagStruct * | Optional description of (pMags)
pNumMagsFound | int * | Optional description of (pNumMagsFound)
pNumMagsRetrieved | int * | Optional description of (pNumMagsRetrieved)
IN_BufferRecLen | int | Optional description of (IN_BufferRecLen)
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetOrigin()

Prototype: |
int ewdb_api_GetOrigin( | EWDBid idOrigin, EWDB_OriginStruct * pOrigin);
Description: | Function retrieves information about the Origin identified by idOrigin. See EWDB_OriginStruct for a description of the information provided.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
idOrigin | EWDBid | The DB identifier of the Origin for which the caller wants information.
pOrigin | EWDB_OriginStruct * | Pointer to a EWDB_OriginStruct allocated by the caller, where the function will write the information about the Origin.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetOriginsForEvent()

Prototype: |
int ewdb_api_GetOriginsForEvent( | EWDBid IN_idEvent, EWDB_OriginStruct * pOrigins, int * pNumOriginsFound, int * pNumOriginsRetrieved, int IN_BufferRecLen);
Description: | This function retrieves information for each Origin that is associated with the event(idEvent) given by the caller.
Note: | Then entire EWDB_OriginStruct is not filled! Only the following fields are filled by this function: idOrigin, tOrigin, dLat, dLon, dDepth, iAssocPh, iUsedPh, iFixedDepth, sSource, and sRealSource.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success
EWDB_RETURN_WARNING | Origin records found successfully, but one or more records were unable to be retrieved. Most likely indicates that the caller's buffer is not large enough to hold all of the records found.
PARAMETER INFO
Parameter | Type | Description
IN_idEvent | EWDBid | Event for which the caller wishes to retrieve origins.
pOrigins | EWDB_OriginStruct * | Pointer to a buffer (allocated by the caller) where the function will put information for the Origins found for the given Event.
pNumOriginsFound | int * | Pointer to an integer (caller allocated) where the function will write the number of origins found for the given idEvent. Note: this is not the number actually retrieved.
pNumOriginsRetrieved | int * | Pointer to an integer (caller allocated) where the function will write the number of origins retrieved into the caller's buffer for the given idEvent
IN_BufferRecLen | int | The size of the pOrigins buffer allocated by the caller. (In terms of number of EWDB_OriginStruct records)
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetPreferredSummaryInfo()

Prototype: |
int ewdb_api_GetPreferredSummaryInfo( | EWDBid idEvent, EWDBid * pidOrigin, EWDBid * pidMagnitude, EWDBid * pidMech);
Description: | Function retrieves the DB IDs for the preferred summary information(origin, magnitude, and mechanism) for the Event identified by idEvent.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
idEvent | EWDBid | The DB identifier for the Event for which the caller wants summary info.
pidOrigin | EWDBid * | Pointer to a EWDBid where the function will write the DB ID of the preferred origin for the Event. 0 will be written as the ID if there is no preferred origin for the given Event.
pidMagnitude | EWDBid * | Pointer to a EWDBid where the function will write the DB ID of the preferred magnitude for the Event. 0 will be written as the ID if there is no preferred magnitude for the given event.
pidMech | EWDBid * | Pointer to a EWDBid where the function will write the DB ID of the preferred mechanism for the Event. 0 will be written as the ID if there is no preferred mechanism for the given event. (Note: Mechanism are currently only supported in a trivial manner)
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetStaMags()

Prototype: |
int ewdb_api_GetStaMags( | EWDBid idMagnitude, EWDB_StationMagStruct * pStaMags, int * pNumStaMagsFound, int * pNumStaMagsRetrieved, int BufferLen);
Description: | The function retrieves a list of station magnitudes that are associated with a given summary magnitude. See EWDB_StationMagStruct for a description of the information retrieved for each associated station magnitude.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
EWDB_RETURN_WARNING | Partial success. A list of station magnitudes was retrieved, but the caller's buffer was not large enough to accomadate all of the station magnitudes found. See pNumStaMagsFound for the number of station magnitudes found and pNumStaMagsRetrieved for the number of station magnitudes placed in the caller's buffer.
PARAMETER INFO
Parameter | Type | Description
idMagnitude | EWDBid | This function retrieves a list of station magnitudes associated with an summary magnitude. idMagnitude is the database ID of the magnitude for which the caller wants a list of station magnitudes.
pStaMags | EWDB_StationMagStruct * | Buffer allocated by the caller, where the function will write the list of station magnitudes.
pNumStaMagsFound | int * | Pointer to an integer where the function will write the number of station magnitudes found.
pNumStaMagsRetrieved | int * | Pointer to an integer where the function will write the number of station magnitudes placed in the caller's buffer(pStaMags).
BufferLen | int | Size of the pStaMags buffer as a multiple of EWDB_StationMagStruct. (example: 15 structs)
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_InsertCodaWithMag()

Prototype: |
int ewdb_api_InsertCodaWithMag( | EWDB_StationMagStruct * pCodaDur);
Source File: | src/oracle/schema-working/src/parametric/ewdb_api_InsertcodaWithMag.c
Description: | Function creates a coda duration based station magnitude from the caller supplied information in pCodaDur. The function assumes that the caller has supplied all station magnitude information including summary magnitude data in the EWDB_StationMagStruct. The caller need not fill in PeakAmp related information as it is inappropriate. The pCodaDur->idMagnitude and pCodaDur->StaMagUnion.CodaDur.idPick values must be valid existing Magnitude and Pick DB IDs respectively. The pCodaDur->idChan value must also be filled in with the DB ID of a valid existing channel. Upon successful completion, the function writes the DB IDs of the newly created coda duration, coda termination, and station magnitude to pCodaDur->idCodaDur, pCodaDur->idTCoda, and pCodaDur->idMagLink respectively. This function performs a full insertion of a coda, complete with how that coda (duration) contributed to an overall duration magnitude.
Note: | You should use this function instead of using ewdb_internal_CreateTCoda(), ewdb_internal_CreateCodaDur, and ewdb_internal_CreateStaMag(), unless you are VERY SURE that you know what you are doing, and know exactly how to use those functions.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pCodaDur | EWDB_StationMagStruct * | Pointer to a EWDB_StationMagStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_InsertPeakAmpWithMag()

Prototype: |
int ewdb_api_InsertPeakAmpWithMag( | EWDB_StationMagStruct * pPeakAmp);
Source File: | src/oracle/schema-working/src/parametric/ewdb_api_InsertPeakAmpWithMag.c
Description: | Function creates a peak amplitude based station magnitude from the caller supplied information in pPeakAmp. The function assumes that the caller has supplied all station magnitude information including summary magnitude data in the EWDB_StationMagStruct. The caller need not fill in CodaDur related information as it is inappropriate. This function performs a full insertion of an amplitude, complete with how that amplitude contributed to an overall magnitude.
Note: | You should use this function instead of using ewdb_internal_CreatePeakAmp(), and ewdb_internal_CreateStaMag(), unless you are VERY SURE that you know what you are doing, and know exactly how to use those functions.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success.
PARAMETER INFO
Parameter | Type | Description
pPeakAmp | EWDB_StationMagStruct * | Pointer to a EWDB_PhaseAmpStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_UpdateComment()

Prototype: |
int ewdb_api_UpdateComment( | char * szFieldTypeName, EWDBid idCore, char * szUpdatedComment);
Description: | Updates a comment for any record in the DB. Enter the tablename and the record ID for the table that the comment belongs to, and the function will update the comment for that record. This requires that the caller know DB layout, which is a bad thing. What we need is a lookup table for the comment types, and we can perform a conversion from the lookup table to the actual DB table type within the DB.
RETURN CODE INFO
Return Type: | int
Return Value | Description
EWDB_RETURN_FAILURE | Fatal error. See logfile for details.
EWDB_RETURN_SUCCESS | Success
PARAMETER INFO
Parameter | Type | Description
szFieldTypeName | char * | Name of the table to updated
idCore | EWDBid | id of the record to update
szUpdatedComment | char * | Text of the updated comment.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h