Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

px_retrieve_record(3) [debian man page]

PX_RETRIEVE_RECORD(3)					     Library Functions Manual					     PX_RETRIEVE_RECORD(3)

NAME
PX_retrieve_record -- Returns record in Paradox file SYNOPSIS
#include <paradox.h> pxval_t ** PX_retrieve_record(pxdoc_t *pxdoc, int recno) DESCRIPTION
Returns the record with the given number in a Paradox file. The first record has number 0, the last one has number_of_records-1. If you are accessing several records, do it in ascending order, because this is the most efficient way. The return value is an array of field values. Each value is stored in a structure like the following: typedef struct px_val pxval_t; struct px_val { char isnull; int type; union { long lval; double dval; struct { char *val; int len; } str; } value; }; The element isnull is set to 1 if the value is NULL otherwise it is set to 0. type is the type of the paradox field as defined in paradox.h. A field value can be either a long int, a double or a string, depending on the paradox field type. The paradox field types pxfShort, pxfLong, pxfDate, pxfTime, pxfLogical, and pxfAutoInc are returned as long int values. pxfTimestamp, pxfNumber, and pxfCurrency are returned as double values and all remaining paradox field types are stored as strings with the length in value.len. You can rely on strings being Null terminated. Blobs are stored as string but are not guarented to be Null terminated. The paradox field types pxfTimestamp, pxfTime, an pxfDate use an uncommon format which can be converted into a string with PX_time- stamp2string(3), PX_time2string(3), and PX_date2string(3). RETURN VALUE
Returns a pointer on success and NULL on failure. SEE ALSO
PX_update_record(3), PX_timestamp2string(3), PX_time2string(3), PX_date2string(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PX_RETRIEVE_RECORD(3)

Check Out this Related Man Page

EGD_CHANNEL_INFO(3)					       EEGDEV library manual					       EGD_CHANNEL_INFO(3)

NAME
egd_channel_info - Get various information about a particular channel SYNOPSIS
#include <eegdev.h> int egd_channel_info(const struct eegdev* dev, int stype, unsigned int index, int fieldtype, ...); DESCRIPTION
egd_channel_info() provides different type of information about the channel at the index index of the group specified by stype of the device referenced by dev. As described for egd_acq_setup(3), stype specifies the type of channel. It must one of the values returned by egd_sensor_type(3). The information returned by the function is defined by the variable list of argument. This list is composed of successive couple grouping one field type identifier specifying the feature to be get and a pointer to a value whose type depends on the previous field type. The list must finish by EGD_END. The field identifers can be the following (The expected corresponding pointer type is provided in parenthesis): EGD_LABEL (char*) Name of the channel. The pointed array should be long enough to hold 32 characters (including the null termination character). EGD_ISINT (int*) Indicates whether the data provided by the channel are integer or floating point. (zero indicates floating point, non-zero indicates integer). EGD_MM_I (int32_t*) Returns in an array of 2 int32_t the minimal and maximal values that the channel can deliver (If the channel deliver floating point data, these values can be underestimated due to overflow) EGD_MM_F (float*) Returns in an array of 2 float values the minimal and maximal values that the channel can deliver (If the channel deliver double floating point data, these values can be underestimated due to overflow) EGD_MM_D (double*) Returns in an array of 2 double values the minimal and maximal values that the channel can deliver. EGD_UNIT (char*) Unit in which the channel data is expressed. The pointed array should be long enough to hold 16 characters (including the null ter- mination character). EGD_TRANSDUCTER (char*) Transducter type of the sensor. The pointed array should be long enough to hold 128 characters (including the null termination char- acter). EGD_PREFILTERING (char*) Information about the filters already applied on data. The pointed array should be long enough to hold 128 characters (including the null termination character). RETURN VALUE
The function returns 0 in case of succes. Otherwise, -1 is returned and errno is set accordingly. ERRORS
egd_channel_info() will fail if: EINVAL dev is NULL, stype is an invalid sensor type, index is bigger than the maximal number of channel in the group, any field identifier is unknown or any pointer used is NULL. THREAD SAFETY
egd_channel_info() is thread-safe. SEE ALSO
egd_acq_setup(3), egd_sensor_type(3) EPFL
2010 EGD_CHANNEL_INFO(3)
Man Page