ewdb_api_CreateWaveform()

Prototype:
int ewdb_api_CreateWaveform( EWDB_WaveformStruct * pWaveform, EWDBid idEvent);
Description: Function inserts a waveform into the database, including both descriptor information and the actual binary snippet. Optionally (if idEvent is not 0), the function will associate the new Waveform with the existing DB 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
pWaveform EWDB_WaveformStruct * Pointer to an EWDB_WaveformStruct filled by the caller with both waveform descriptor information and the actual binary waveform.
idEvent EWDBid DB ID of an existing Event in the database that the caller wishes to associate with the new Waveform.

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



ewdb_api_GetWaveformDesc()

Prototype:
int ewdb_api_GetWaveformDesc( EWDB_WaveformStruct pWaveformDesc);
Description: Retrieve information about the waveform descriptor pointed to by pWaveformDesc->idWaveform from the database.

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
pWaveformDesc EWDB_WaveformStruct Structure containing information about the waveform descriptor. The function will read pWaveformDesc->idWaveform, and attempt to retrieve information about that descriptor. Upon successfull completion, the function will write the retrieved information into the pWaveformDesc struct. The structure pointed to by pWaveformDesc must be allocated by the client.

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



ewdb_api_GetWaveformListByEvent()

Prototype:
int ewdb_api_GetWaveformListByEvent( EWDBid IN_idEvent, EWDB_WaveformStruct pWaveformBuffer, EWDB_WaveformStruct pStationBuffer, int bIncludeStationInfo, int * pWaveformDescsFound, int * pWaveformDescsRetrieved, int BufferRecLen);
Description: The function retrieves a list of waveforms that are associated with a given event. See EWDB_WaveformStruct for a description of the information retrieved for each associated waveform. If bIncludeStationInfo is set to TRUE, then the function also retrieves station/component information for each waveform and writes it into the pStationBuffer buffer, in matching order with the waveforms.
Note: This function only retrieves the waveform DESCRIPTORS, it does not actually retrieve the binary waveform.

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 EWDBid Database ID of the Event whose waveform snippets the caller is interested in.
pWaveformBuffer EWDB_WaveformStruct Pointer to a caller allocated buffer of waveform structs which will be filled by this function.
pStationBuffer EWDB_WaveformStruct Pointer to a caller allocated buffer of station structs which will be filled by this function. NOTE: This buffer is only filled if bIncludeStationInfo is set to TRUE. This param can be set to NULL if bIncludeStationInfo is FALSE.
bIncludeStationInfo int Flag(TRUE/FALSE) indicating whether the function should retrieve station/component information for each waveform found.
pWaveformDescsFound int * Pointer to an integer where the function will write the number of waveforms found.
pWaveformDescsRetrieved int * Pointer to an integer where the function will write the number of waveform descriptors placed in the caller's buffer(pWaveformBuffer).
BufferRecLen int Size of the pWaveformBuffer buffer as a multiple of EWDB_WaveformStruct. (example: 15 structs) The pStationBuffer is also assumed to be of atleast this size if bIncludeStationInfo is set to TRUE.

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



ewdb_api_GetWaveformSnippet()

Prototype:
int ewdb_api_GetWaveformSnippet( EWDBid IN_idWaveform, char * IN_pWaveform, int IN_WaveformLength);
Description: Retrieves the snippet associated with IN_idWaveform and returns it in the IN_pWaveform buffer.

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 The Actual Length of the snippet retrieved was 0 bytes. (empty snippet)

PARAMETER INFO
Parameter Type Description
IN_idWaveform EWDBid Database ID of the waveform descriptor whose snippet the caller is interested in.
IN_pWaveform char * Buffer allocated (prior to calling this function) by the caller to hold the retrieved snippet. The function writes the retrieved snippet to the buffer.
IN_WaveformLength int Length of the IN_pWaveform buffer.

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



ewdb_api_UpdateWaveform()

Prototype:
int ewdb_api_UpdateWaveform( EWDB_WaveformStruct * pWaveform);
Description: Function updates an existing waveform in the database, including both descriptor information and the actual binary snippet.

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
pWaveform EWDB_WaveformStruct * Pointer to an EWDB_WaveformStruct filled by the caller with both waveform descriptor information and the actual binary waveform.

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