ewdb_apps_ArcFile2DB()

Prototype:
int ewdb_apps_ArcFile2DB( char * ArcFileName, char * author, char * szEventID);
Source File: oracle/apps/src/libsrc/ewdb_apps_ArcFile2DB.c
Description: Reads the hypoinverse arc file, converts it into DB event format and inserts it into he database.

RETURN CODE INFO
Return Type: int
Return Value Description
EW_SUCCESS Successful operation
EW_FAILURE Failure -- see logfile for details.

PARAMETER INFO
Parameter Type Description
ArcFileName char * Name of Hypoinverse arc file to insert.
author char * Author to be assigned to the event.
szEventID char * External author ID.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_DB2ArcFile()

Prototype:
int ewdb_apps_DB2ArcFile( EWDBid idEvent, char * ArcFileName);
Source File: oracle/apps/src/libsrc/ewdb_apps_DB2ArcFile.c
Description: Writes all information about the event in Hypoinverse archive format to the file.

RETURN CODE INFO
Return Type: int
Return Value Description
EW_SUCCESS Successful operation
EW_FAILURE Failure -- see logfile for details.

PARAMETER INFO
Parameter Type Description
idEvent EWDBid Database ID of the event to retrieve.
ArcFileName char * Name of Hypoinverse arc file to write.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_GetDBEventInfo()

Prototype:
int ewdb_apps_GetDBEventInfo( EWEventInfoStruct * pEventInfo, EWDBid idEvent);
Source File: oracle/apps/src/libsrc/ewdb_apps_GetDBEventInfo.c
Description: This is a convenient function for retrieving an Event from the DB. Most data for an event is retrieved from the DB and stuffed into an EWEventInfoStruct. There are other low level functions that may be used to rerieve data from the DB, this one just provides a very convenient interface for retrieving DB Event data.
Note: This function is the official way to get an Event out of the DB and into an EWEventInfoStruct. This is important because many review tools utilize this struct.
Please also see ewdb_apps_GetDBEventInfoII().

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
pEventInfo EWEventInfoStruct * Pointer to an event info struct. This struct must be alloced by the caller, but the function will alloc any neccessary dynamic storage that is pointed to by the struct.
idEvent EWDBid The EWDB ID of the Event for which the caller wishes to retrieve data.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_GetDBEventInfoII()

Prototype:
int ewdb_apps_GetDBEventInfoII( EWEventInfoStruct * pEventInfo, EWDBid idEvent, EWDBid idOrigin, int Flags);
Source File: oracle/apps/src/libsrc/ewdb_apps_GetDBEventInfo.c
Description: This function is similar to ewdb_apps_GetDBEventInfo(), however it provides control over what types of data are retrieved for an Event, thus making it much more flexible. This is a convenient function for retrieving an Event from the DB. Most data for an event is retrieved from the DB and stuffed into an EWEventInfoStruct. There are other low level functions that may be used to rerieve data from the DB, this one just provides a very convenient interface for retrieving DB Event data.
Note: This function is the official way to get an Event out of the DB and into an EWEventInfoStruct. This is important because many review tools utilize this struct.
Please also see ewdb_apps_GetDBEventInfoII().

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
pEventInfo EWEventInfoStruct * Pointer to an event info struct. This struct must be alloced by the caller, but the function will alloc any neccessary dynamic storage that is pointed to by the struct.
idEvent EWDBid The EWDB ID of the Event for which the caller wishes to retrieve data.
idOrigin EWDBid If >0, this is the EWDB ID of the Origin which will be saved as the prefered origin. Otherwise, the origin from the Prefer table will be returned. If the origin matching idOrigin is not bound with idEvent, an error is returned.
Flags int Flags describing what types of data to retrieve for the given event. The following flags are supported, and should be OR'd together into Flags. (GETDBEVENTINFO_PICKS, GETDBEVENTINFO_STAMAGS, GETDBEVENTINFO_COMPINFO, GETDBEVENTINFO_COOKEDTF, GETDBEVENTINFO_WAVEFORM_DESCS, GETDBEVENTINFO_WAVEFORMS) Summary info is always retrieved!!!!!

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_PutDBEventInfo()

Prototype:
int ewdb_apps_PutDBEventInfo( EWEventInfoStruct *pEventInfo, char *author, char *szEventID, int NewEvent);
Source File: oracle/apps/src/libsrc/ewdb_apps_PutDBEventInfo.c
Description: Function inserts the Event data from pEventInfo into the DB and associates it with either a new event or with an existing event, depending on the value of the NewEvent flag.
Note: When NewEvent is set to TRUE, the function creates an event, otherwise the function associates the event information with the DB Event identified by pEventInfo->Event.idEvent.

RETURN CODE INFO
Return Type: int
Return Value Description
Default_Return_Value Description of the default return value

PARAMETER INFO
Parameter Type Description
*pEventInfo EWEventInfoStruct Pointer to an event info struct, that the caller has allocated and filled with information for the event that they wish to insert into the DB.
*author char The author of the Event. This should be the caller, or the login of a human operating the calling program.
*szEventID char The EventID given to the event by the author.
NewEvent int Flag indicating whether the function should create a new Event or associate the information with an existing one.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_RetrieveIdChanExternal()

Prototype:
int ewdb_apps_RetrieveIdChanExternal( EWDB_External_StationStruct * pStation);
Source File: oracle/apps/src/libsrc/ewdb_apps_RetrieveIdChanExternal.c
Description: Function creates or updates a component and associated channel in the DB using an external station table and a a cheater table to go from external station to chan. Upon successful completion it writes the DB ID of the new/update channel to pStation->idChan. This function ignores the pStation->idComp parameter. This function provides a convenient way to retrieve an idChan from an Earthworm SCN. There is nothing official or exclusive about it. It is merely a convenience function that calls two others.

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
pStation EWDB_External_StationStruct * Pointer to an EWDB_External_StationStruct filled by the caller.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_Set_GetDBEventInfo_Debug()

Prototype:
int ewdb_apps_Set_GetDBEventInfo_Debug( int bDebug);
Source File: oracle/apps/src/libsrc/ewdb_apps_GetDBEventInfo.c
Description: Turns debugging info on and off for ewdb_apps_GetDBEventInfoII() and ewdb_apps_GetDBEventInfoII().

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
bDebug int Flag indicating the level of debugging information that the ewdb_apps_GetDBEventInfoII() function should provide. Currently only TRUE and FALSE are supported.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_putaway_CloseSnippetEvent()

Prototype:
int ewdb_apps_putaway_CloseSnippetEvent( void);
Source File: oracle/apps/src/libsrc/ewdb_apps_putaway.c
Description: Function is a do nothing placeholder routine that exists so the API waveform insertion routines(see note under EWDB_ewdb_apps_putaway_StartSnippetEvent) can resemble the Earthworm XXX_trace_save putaway routines.

RETURN CODE INFO
Return Type: int
Return Value Description
EWDB_RETURN_SUCCESS Success.

PARAMETER INFO

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_putaway_NextSnippetForAnEvent()

Prototype:
int ewdb_apps_putaway_NextSnippetForAnEvent( EWDBid idEvent, EWDB_EW_SnippetStruct * pSnippet, EWDBid * OUT_pidWaveform, EWDBid * INOUT_pidChan);
Source File: oracle/apps/src/libsrc/ewdb_apps_putaway.c
Description: Function inserts a waveform snippet along with descriptor information, into the DB. It associates the snippet with the Event identified by idEvent. It returns the DB identifier of the new Waveform along with the DB identifier of the Waveform's associated channel.

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 database ID of an existing Event with which the caller wishes to associate a new waveform snippet.
pSnippet EWDB_EW_SnippetStruct * A pointer to waveform snippet structure, that includes parametric data describing a waveform snippet along with the actual waveform snippet.
OUT_pidWaveform EWDBid * A pointer to a EWDBid where the function will write The DB identifier of the waveform snippet it created.
INOUT_pidChan EWDBid * A pointer to a EWDBid where the function will write The DB channel identifier of the channel of the waveform snippet it created. If you already know the idChan for the channel of the snippet, you can set (*INOUT_pidChan) to the proper idchan, otherwise WARNING!!!! (*INOUT_pidChan) should be set to 0, or the function will attempt to treat it as a valid idchan.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h



ewdb_apps_putaway_StartSnippetEvent()

Prototype:
int ewdb_apps_putaway_StartSnippetEvent( EWDBid * pidEvent, char * sSourceEventID, char * sAuthor, int Debug);
Source File: oracle/apps/src/libsrc/ewdb_apps_putaway.c
Description: Function creates a new event in the DB, and returns the idEvent DB identifier for the new Event.
Note: EWDB_ewdb_apps_putaway_StartSnippetEvent(), EWDB_ewdb_apps_putaway_NextSnippetForAnEvent() and EWDB_ewdb_apps_putaway_CloseSnippetEvent() are modeled after the Earthworm trace disposal routines for use with XXX_trace_save Earthworm programs like ora_trace_save, trig2disk, and waveman2disk. The logic behind the routines, is to call a StartEvent() function to open the processing of an event. Next, NextSnippetForAnEvent() is called repeatedly for each of the snippets associated with the event. Finally CloseEvent() is called to end processing for an Event. Although the 3 aforementioned API functions support this processing model, they are not limited to it. The caller can thus call EWDB_ewdb_apps_putaway_NextSnippetForAnEvent() to add a snippet to a previous event. The caller does not have to call EWDB_ewdb_apps_putaway_StartSnippetEvent() before calling EWDB_ewdb_apps_putaway_NextSnippetForAnEvent(). As long as the caller provides a valid existing idEvent to EWDB_ewdb_apps_putaway_NextSnippetForAnEvent()

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
pidEvent EWDBid * A pointer to an EWDBid where the function will write The DB identifier of the Event it created.
sSourceEventID char * The identifier given to the Event by the author, in string format. This is an identifier external to the DB, not to be confused with idEvent which is the identifier given by the DB.
sAuthor char * The name of the author(source) of the new Event.
Debug int Flag indicating whether or not debug messages should be written to the log file. Set Debug to TRUE for debug log messages.

Group: EWDB_APPS_LIB
Sub Group: DB_LIB
Language: C
Location: ./src/oracle/apps/src/include/ewdb_apps_utils.h