EasyManua.ls Logo

Fluke Hydra Series II - Page 257

Fluke Hydra Series II
268 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Appendices
Memory Card File Formats
F
F-5
The following function will copy the configuration information from the data file into
the ‘hydra’ structure, keeping track of the number of configured channels and filling the
channel index table as it goes. It assumes that the first 730 bytes of the file have already
been read into memory using the read () library function, or similar.
/*
-* convert_config(): Convert the file configuration data into C variables.
**
** Inputs:
** file_data Pointer to the first 730 bytes of data
** from a Hydra Data Bucket file.
** Outputs:
** hydra Global variable set to the configuration
** found in the file data.
** max_index number of channels in scan record and
** index_to_chan the table of non-off channels
**
** Returns:
** number of bytes per scan record.
*/
int
convert_config(unsigned char * file_data)
{
int ch;
/* Must be a data file (file_type must = 1) */
hydra.file_type = *file_data++;
/* Must be version 0 format */
hydra.file_format = *file_data++;
/* Copy tag */
memcpy(hydra.tag, file_data, 80);
file_data += 80;
/* Must be configuration format zero */
hydra.setup_format = *file_data++;
/* Convert global configuration */
hydra.system = *file_data++;
hydra.rate = *file_data++;
hydra.trigger = *file_data++;
hydra.format = *file_data++;
hydra.total_debounce = *file_data++;
hydra.interval_bcd_hours = *file_data++;
hydra.interval_bcd_minutes = *file_data++;
hydra.interval_bcd_seconds = *file_data++;
hydra.ese = *file_data++;
hydra.sre = *file_data++;
hydra.iee = *file_data++;
hydra.log_status = *file_data++;
hydra.log_filter = *file_data++;
hydra.log_dest = *file_data++;
hydra.lock = *file_data++;
/* Convert channel configurations */
/* Count number of non-off channels during conversion */
max_index = 0;
for (ch=0; ch < 21; ch++) {

Table of Contents

Related product manuals