// HEAD.H - File for Header definition #ifndef HEAD_H #define HEAD_H #include #include "defines.h" // #include "utils.h" // Header for external driving - HEADLEN bytes typedef struct { unsigned short id; // Head identificator unsigned short sync; // Syncronise word ??? unsigned short hdlen; // Head length in byte unsigned short dtlen; // Data length in byte unsigned short ncmd; // Command code unsigned char nch; // Number of channel // In this pointer - 11 bytes ! (5*2+1) // !!! Reserved for futhure use !!! unsigned char misc[HEADLEN-11]; } HeadExt; // Internal Header - HEADLEN bytes typedef struct { unsigned int id; // Head identificator unsigned char sync; // Syncronise byte ??? unsigned int hdlen; // Head length in byte unsigned int dtlen; // Data length in byte int nch; // Number of channel int freq; // Sampes per second Time int_t; // Internal time structure Date int_d; // Internal date structure Time rtc_t; // Real time clock time structure Date rtc_d; // Real time clock date structure Time gps_t; // GPS clock time structure Date gps_d; // GPS clock date structure unsigned int gps_st; // GPS status unsigned char glfl; // Gain number of channel GainLowFreqLow unsigned char ghfl; // Gain number of channel GainHigFreqLow unsigned char glfh; // Gain number of channel GainLowFreqHig unsigned char ghfh; // Gain number of channel GainHigFreqHig // In this pointer - 47 bytes ! (11+3*6+3*4+6) // !!! Reserved for futhure use !!! //old unsigned char misc[HEADLEN-47]; unsigned char misc[HEADLEN-47-5]; // SyncrData to end of structure // because aplifier coeff. // may be expanded ! unsigned char sncRegim; int sncShift; unsigned int sncCounter; } Header; // Record Header - HEADREC bytes typedef struct { unsigned short label[4];// Head identify - 0xAAAA, 0xAAAA, ... short i_d,i_mo,i_y; // Internal date short i_h,i_mi,i_s; // Internal time short i_ms; // Internal time short St; // Stations presents word - in bits !!! short hdsz; // Header size in bytes <=> HEADREC short Ncomp; // Number of conponent in station short freq; // Frequency - Sample per second unsigned long offs; // Data block length short d_d,d_mo,d_y; // DOS(RealTimeClock) date short d_h,d_mi,d_s; // DOS(RTC) time short e_d,e_mo,e_y; // External date short e_h,e_mi,e_s; // External time short nch; // Number of channel in station <=> NCHANNEL // In this pointer - 60 bytes ! unsigned char gain[NCHANNEL]; // Gain for channel float lat, lon; // Station coordinate short alt; // --''-- char Name[4]; // Station name char ch[NCHANNEL]; // Physical Number of channel // In this pointer - 88 bytes ! short secInBlock; // In this pointer - 90 bytes ! // !!! Reserved for futhure use !!! unsigned char misc[HEADREC-108]; //?? unsigned char misc[HEADREC-90]; //?? unsigned char misc[HEADREC-88]; } Head_rec; #endif //