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 = *fi+;
/* Must be version 0 format */
hydra.file_format = *fi+;
/* Copy tag */
memcpy(hydra.tag, file_data, 80);
fil= 80;
/* Must be configuration format zero */
hydra.setup_format = *fi+;
/* Convert global configuration */
hydra.system = *fi+;
hydra.rate = *fi+;
hydra.trigger = *fi+;
hydra.format = *fi+;
hydra.total_debounce = *fi+;
hydra.interval_bcd_hours = *fi+;
hydra.interval_bcd_minutes = *fi+;
hydra.interval_bcd_seconds = *fi+;
hydra.ese = *fi+;
hydra.sre = *fi+;
hydra.iee = *fi+;
hydra.log_status = *fi+;
hydra.log_filter = *fi+;
hydra.log_dest = *fi+;
hydra.lock = *fi+;
/* Convert channel configurations */
/* Count number of non-off channels during conversion */
max_index = 0;
for (ch=0; ch < 21; ch++) {
Содержание 2635A
Страница 8: ...2635A Users Manual vi...
Страница 26: ...2635A Users Manual xxiv...
Страница 29: ...Preparation for Use Introduction 1 1 3...
Страница 50: ...2635A Users Manual 1 24...
Страница 53: ...Front Panel Operations Summary of Front Panel Operations 2 2 3...
Страница 88: ...2635A Users Manual 2 38...
Страница 180: ...2635A Users Manual 5 10...
Страница 212: ......
Страница 234: ...2635A Users Manual B 4...
Страница 250: ...2635A Users Manual D 8...
Страница 251: ...E 1 Appendix E 8 Bit Binary Coded Decimal Table...
Страница 264: ...Hydra Memory Card Record DATA FILES SET UP FILES DATxx Application Note SETxx Application Note...
Страница 268: ...2635A Users Manual 4...