#define NCHANNEL 16 #define NGROUP 6 #define NSTREAM 2 #define NSCEDULE 2 #include typedef struct date Date; typedef struct { unsigned char ti_min; unsigned char ti_hour; unsigned char ti_hund; unsigned char ti_sec; unsigned char ti_ms; unsigned char ti_hlth; } Time; typedef struct { /* Channel parameters */ char glob_stat; // Global status (1-Channel on,0-off) char name[8]; // Channel's Name char alg_stat; // Satus in algoritm ( 1-use, 0-not ) // Events algoritm parameters float STA, LTA, KOEF; short WEIGTH; } ChPrm; typedef struct { /* Stream Parameters */ char Type; // Type of Stream (P-Permanent,T-Trigger) char iRec_len; // Record length in second short iFile_size; // File size in sec (0 - limited SysPrm.Tlim) char N_ch; // Numbers of channel in Stream char chan[NCHANNEL]; // Channel's number } Stream; typedef struct { /* Group Parameters */ char Type[40]; // Type of Group (description) short Freq; // Group Frequency char Gain; // Group Gain char N_ch; // Numbers of channel in Group char chan[NCHANNEL]; // Channel's number } Group; typedef struct { /* Scedule parameter structure */ Date da_on; // Date of Scedule's start Time ti_on; // Time of Scedule's start short iDuration; // Duration in sec (if 0 - not limited) short iRepeate; // Repeate (if 0 - not limited) short iDelay; // Delay before Repeate (if 0 - not limited) char sCalib[40]; // Calibration file name (if 0 - not calib) } Scedule; typedef struct { /* System Parameters */ short Freq; // System Frequency of discretisation short Tpos, Tpre; // Time of Pre- and Pos-Events write(sec) short Ntrig, Tlim; // Number of triggers, MAX Time limits(sec) short Tset_h, Tset_m; // Time of Preset write to disk short Tset_s; // (every day) char N_ch; // Number of channel used in detection char chan[NCHANNEL]; // Channel's number } SysPrm; typedef struct { /* Common Parameters */ unsigned short CS; // Control Summ (summ all word must be 0) short hd_len; // Header Size short data_offs; // Offset to data char SysType[64]; // System description - ASCI text char SysName[8]; // System Name ( OBN, Telem, ... ) float lat, lon, alt; // System coordinate char N_ch; // Number of channel char N_grp; // Number of group char N_sced; // Number of sceduler char N_str; // Number of stream SysPrm sysprm; Group grp[NGROUP]; Stream str[NSTREAM]; Scedule sced[NSCEDULE]; ChPrm prm[NCHANNEL]; } CmnPrm;