ewdb_api_CreateOrAlterExternalStation()

Prototype: |
int ewdb_api_CreateOrAlterExternalStation( | EWDB_External_StationStruct * pStation);
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 External Station to pStation->StationID. This function ignores the pStation->idComp parameter.
Note: | If station with the scnl is already in the table, its STATIONID will be set in the pStation struct, AND all non-zero, and non-empty character values will be updated. If this is a new record, all values from the pStation struct will be stored in the table.
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_API_LIB
Sub Group: | EXTERNAL_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h

ewdb_api_GetIdChanFromStationExternal()

Prototype: |
int ewdb_api_GetIdChanFromStationExternal( | EWDBid * pidChan, int IN_StationID);
Description: | Given the DB StationID of the external station(component), the function will return find and return the idChan for it.
Note: | This function uses a "cheater table" mechanism to convert from a StationID to an idChan. This "cheater table" has theoretically been setup beforehand by the DB operator, to map the names on the data channels coming in, to idChans. This is a task that must be done by the operator, because it usually requires a priori knowledge about what names refer to what channels(since more than one channel may have the same name).
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
pidChan | EWDBid * | Pointer to EWDBid where the function will write the idChan for this external station.
IN_StationID | int | Database StationID of the external station.
Group: | EWDB_API_LIB
Sub Group: | EXTERNAL_API
Language: | C
Location: | ./src/oracle/schema-working/src/include/ewdb_ora_api.h