Fluke 2635A Lawn Mower User Manual


 
Appendices
Memory Card File Formats
F
F-7
Now that the configuration has been processed and the number of valid channels has
been determined, the scan data can be processed.
/* Measurements are stored in scan records of variable size.
** This C structure is the decoded version of a scan record,
** and is of fixed size (unused measurement values are not set).
*/
struct scan_record {
/* Timestamp */
unsigned char bcd_hours;
unsigned char bcd_minutes;
unsigned char bcd_seconds;
unsigned char bcd_month;
unsigned char bcd_day;
unsigned char bcd_year;
/* Digital (alarm) outputs */
unsigned char dout;
/* Digital input/outputs */
unsigned char dio;
/* Totalizer value */
float total;
/* Measurement per channel */
float meas[21];
} scan;
/*
-* convert_scan_record(): Convert a scan record into usable data
**
** In each data file, after the 730 bytes of configuration data, an
** array of scan records may be found (it is possible for data files
** to have no scan data). This routine converts a single scan record
** and places it in the given destination buffer.
**
** Note that convert_config() must be called before this routine!
**
** Inputs:
** hydra File configuration data.
** max_index number of channels in scan record and
** index_to_chan the table of non-off channels
** file_data A single scan record from the same data file.
** that was last processed by convert_config().
** Note that this routine assumes that the
** number of bytes in this buffer is exactly the
** number of bytes per scan record.
** scan Pointer to destination scan record buffer.
**
** Outputs:
** scan Set to converted version of scan record.
*/
void
convert_scan_record(unsigned char * file_data, struct scan_record * scan)
{
int index;
int ch;