GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> TRD / V0-0-3 > trd / rad750
#include <ctype.h>
#include <string.h>
#include <MDB/MDB_pubdefs.h>
#include <PBS/FFS.ih>
#include <TRD/TRD_msgs.h>
#include <TRD_prvdefs.h>
Functions | |
static unsigned int | validRoutineName (const char *rtn, const char *fnc) |
Validate a routine name. | |
static int | validRowHandle (TRD_Control *tcb, TRD_Row *row, const char *fnc) |
Validate a row handle. | |
unsigned int | TRD_rowCreate (TRD_Row **hnd, const char *rtn, unsigned short fmt, unsigned short len, const void *dat) |
Create a row in the database. | |
unsigned int | TRD_rowDelete (TRD_Row *row) |
Delete a row in the database. | |
unsigned int | TRD_rowModifyData (TRD_Row *row, unsigned short fmt, unsigned short len, const void *dat) |
Modify a row in the database. |
CVS $Id: TRD_row.c,v 1.2 2011/03/28 21:41:08 apw Exp $
unsigned int TRD_rowCreate | ( | TRD_Row ** | hnd, | |
const char * | rtn, | |||
unsigned short | fmt, | |||
unsigned short | len, | |||
const void * | dat | |||
) |
Create a row in the database.
hnd | (in/out) Row handle | |
rtn | (in) Name of a callback routine | |
fmt | (in) Format of data to follow | |
len | (in) Length (bytes) of data to follow | |
dat | (in) Data |
References _TRD_Control::bit, _TRD_Row::buf, _TRD_RowHeader::chk, _TRD_Control::cnt, _TRD_Control::db, _TRD_RowHeader::fmt, _TRD_Row::hdr, _TRD_RowHeader::idx, _TRD_RowHeader::len, _TRD_Control::mtx, _TRD_RowHeader::off, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_tcb, and validRoutineName().
unsigned int TRD_rowDelete | ( | TRD_Row * | row | ) |
Delete a row in the database.
row | (in) Row (handle) to delete |
References _TRD_Control::bit, _TRD_RowHeader::chk, _TRD_Row::hdr, _TRD_Control::mtx, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_tcb, and validRowHandle().
unsigned int TRD_rowModifyData | ( | TRD_Row * | row, | |
unsigned short | fmt, | |||
unsigned short | len, | |||
const void * | dat | |||
) |
Modify a row in the database.
row | (in) Row handle | |
fmt | (in) Format of data to follow | |
len | (in) Length (bytes) of data to follow | |
dat | (in) Data |
References _TRD_Row::buf, _TRD_Control::cnt, _TRD_RowHeader::fmt, _TRD_Row::hdr, _TRD_RowHeader::idx, _TRD_RowHeader::len, _TRD_Control::mtx, _TRD_RowHeader::off, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_tcb, and validRowHandle().
static unsigned int validRoutineName | ( | const char * | rtn, | |
const char * | fnc | |||
) | [static] |
Validate a routine name.
rtn | (in) Routine name | |
fnc | (in) Name of calling routine |
TRD_SUCCESS | Success | |
x | Otherwise |
Referenced by TRD_rowCreate().
static int validRowHandle | ( | TRD_Control * | tcb, | |
TRD_Row * | row, | |||
const char * | fnc | |||
) | [static] |
Validate a row handle.
tcb | (in) TRD control block | |
row | (in) TRD database row handle | |
fnc | (in) Name of calling routine |
-1 | Row handle is invalid | |
x | Index of database entry |
References _TRD_RowHeader::chk, _TRD_Control::db, and _TRD_Row::hdr.
Referenced by TRD_rowDelete(), and TRD_rowModifyData().