ewdb_internal_CreateCodaDur()

Prototype: |
int ewdb_internal_CreateCodaDur( | EWDB_CodaDurationStruct * pCodaDur);
Source File: | src/oracle/schema-working/src/parametric/ewdb_internal_CreateCodaDur.c
Description: | Function creates a coda duration measurement (the basis for a station duration magnitude) by linking a pair of caller supplied P-Pick(idPick) and coda termination(idTCoda) records. The function ignores all other members of the EWDB_CodaDurationStruct. Upon successfull completion, the function writes the DB ID of the newly created coda duration back to pCodaDur->idCodaDur.
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_CodaDurationStruct * | Pointer to an EWDB_CodaDurationStruct filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC-INTERNAL
Language: | C
Location: | ./src/oracle/schema-working/src/include/internal/ewdb_internal_functions.h

ewdb_internal_CreatePeakAmp()

Prototype: |
int ewdb_internal_CreatePeakAmp( | EWDB_StationMagStruct * pPeakAmp);
Source File: | src/oracle/schema-working/src/parametric/ewdb_internal_CreatePeakAmp.c
Description: | Inserts the following information from a StationMag structure into the Database: the Channel from which the amplitude was recorded(idChan), the first amplitude measurement(dAmp1), the time of the first amplitude measurement(tAmp1), the wave period of the first amplitude measurement (tPeriod1), the second amplitude measurement(dAmp2), the time of the second amplitude measurement(tAmp2), the wave period of the second amplitude measurement(tPeriod2), and the Magnitude type associated with the amplitude. All other fields from the EWDB_StationMagnitudeStruct are ignored. Upon Successfull completion, the DB ID of the new Peak Amplitude record is written back to pPeakAmp->idDatum and pPeakAmp->StaMagUnion.PeakAmp.idPeakAmp.
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 the Station Magnitude structure filled with Peak Amplitude information to be inserted into the DB.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC-INTERNAL
Language: | C
Location: | ./src/oracle/schema-working/src/include/internal/ewdb_internal_functions.h

ewdb_internal_CreateStaMag()

Prototype: |
int ewdb_internal_CreateStaMag( | EWDB_StationMagStruct * pStaMag);
Source File: | src/oracle/schema-working/src/parametric/ewdb_internal_CreateStaMag.c
Description: | Links a Summary Magnitude with a supporting amplitude from a station, based on the information in the EWDB_StationMagStruct passed by the caller. The magnitude types of the summary magnitude(idMagnitude) and the amplitude/duration measurement(idDatum) must match, or the function will fail. The function ignores the contents of the StaMagUnion in the EWDB_StationMagStruct.
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
pStaMag | EWDB_StationMagStruct * | Station Magnitude structure filled by the caller
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC-INTERNAL
Language: | C
Location: | ./src/oracle/schema-working/src/include/internal/ewdb_internal_functions.h

ewdb_internal_CreateTCoda()

Prototype: |
int ewdb_internal_CreateTCoda( | EWDB_CodaDurationStruct * pTCoda);
Source File: | src/oracle/schema-working/src/parametric/ewdb_internal_CreateTCoda.c
Description: | Creates a coda termination record based upon the EWDB_CodaDurationStruct passed by the caller. The function ignores all parameters of the CodaDuration structure except the data channel(idChan), the coda termination time (tCodaTermXtp), and the observed coda termination time (tCodaTermObs) if applicable . It does not look at the average amplitude values(pCodaAmp), so that pointer may be left as NULL!
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
pTCoda | EWDB_CodaDurationStruct * | CodaDuration structure filled by the caller.
Group: | EWDB_API_LIB
Sub Group: | PARAMETRIC-INTERNAL
Language: | C
Location: | ./src/oracle/schema-working/src/include/internal/ewdb_internal_functions.h

ewdb_internal_GetStaMagsForCodaDur()

Prototype: |
int ewdb_internal_GetStaMagsForCodaDur( | EWDBid idMagnitude, EWDB_StationMagStruct * pStaMags, int * pNumStaMagsFound, int * pNumStaMagsRetrieved, int BufferLen);
Source File: | src/oracle/schema-working/src/parametric/ewdb_internal_GetStaMagsForCodaDur.c
Description: | The function retrieves a list of "Coda Duration" based station magnitudes that support a single summary duration magnitude(Md) for an Event. See EWDB_StationMagStruct for a description of the information retrieved for each associated stamag. Because this function deals with only duration measurements, it will never fill in the StaMagUnion.PeakAmp information
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. The call executed successfully, but the caller's buffer was not large enough to accommodate all of the StaMags found.
PARAMETER INFO
Parameter | Type | Description
idMagnitude | EWDBid | DB ID of the summary magnitude for which the caller wants to retrieve associated station magnitudes. (The caller wants to retrieve station magnitudes for this summary magnitude.)
pStaMags | EWDB_StationMagStruct * |
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 callers 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-INTERNAL
Language: | C
Location: | ./src/oracle/schema-working/src/include/internal/ewdb_internal_functions.h