int drms_array2char ( arraylen_t  n,
DRMS_Type_t  src_type,
double  bzero,
double  bscale,
void *  src,
char *  dst 
)

Convert the first n values of src, interpreted as being of type src_type, to values of the destination data type (the data type of dst) and place the values in dst. The values are first scaled by bzero and bscale. If the scaled values are not within the range representable by the destination datatype, they are replaced by the destination-datatype-specific missing value; otherwise, the scaled values are placed in dst. (This is almost certainly a bug!) If src_type is DRMS_TYPE_STRING, the data strings are interpreted as character representations of numbers with strtod, and then scaled. If the resulting values are within the representable range for the destination datatype, they are placed in dst, otherwise the appropriate missing value is used. (This appears to be the only case for which these functions behave as expected.)

Parameters:
n Number of values to convert.
src_type Source datatype (see DRMS_Type_t).
bzero Offset by which raw data values are to be shifted to produce actual data values.
bscale Scaling factor by which raw data values are to be multiplied to produce actual data values.
src Source data, which is of type srctype.
dst Contiguous array of the destination data type into which the converted data are stored upon success.
Returns:
DRMS status (see drms_statuscodes.h). 0 if successful, non-0 otherwise.

Definition at line 354 of file drms_array.c.


Generated on Mon Mar 26 07:00:49 2018 for JSOC_Documentation by  doxygen 1.5.7.1