GeopsyCore/SyscomSVmrxHeader.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of GeopsyCore.
00004 **
00005 **  This library is free software; you can redistribute it and/or
00006 **  modify it under the terms of the GNU Lesser General Public
00007 **  License as published by the Free Software Foundation; either
00008 **  version 2.1 of the License, or (at your option) any later version.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00013 **  License for more details.
00014 **
00015 **  You should have received a copy of the GNU Lesser General Public
00016 **  License along with this library; if not, write to the Free Software
00017 **  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 **
00019 **  See http://www.geopsy.org for more information.
00020 **
00021 **  Created : 2009-08-26
00022 **  Authors :
00023 **    Marc Wathelet
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef SYSCOMSVMRXHEADER_H
00029 #define SYSCOMSVMRXHEADER_H
00030 
00031 #include "SyscomHeader.h"
00032 #include "GeopsyCoreDLLExport.h"
00033 
00034 namespace GeopsyCore {
00035 
00036 #pragma pack(1)     // set alignment to 1 byte boundary
00037 
00038 class GEOPSYCORE_EXPORT SyscomSVmrxHeader : public SyscomHeader
00039 {
00040 public:
00041   SyscomSVmrxHeader();
00042 
00043   QDateTime startTime() const {return SyscomHeader::startTime(field.SYNC_TIME);}
00044   double countPerVolt(int channel) const {return SyscomHeader::countPerVolt(field.LSB[channel] );}
00045 
00046   union {
00047     char raw [256];
00048     struct {
00049       char UNUSED1[6];     // 0
00050       qint32 NB_SAMPLES;   // 6
00051       qint16 SAMPLING;     // 10
00052       uchar NB_CHANNEL;    // 12
00053       char UNUSED2[12];
00054       uchar CHECK_SUM;     // 25
00055       uchar SW_REVISION;   // 26
00056       char SS_NUMBER[5];   // 27
00057       qint32 SYNC_OFFSET;  // 32
00058       Time SYNC_TIME;      // 36
00059       uchar SYNC_OK;
00060       qint16 INT_OFFSET;   // 43
00061       Time INT_TIME;      // 45
00062       char UNUSED3[13];
00063       char REC_NAME[7];    // 64
00064       char S_NUMBER[5];    // 71
00065       char UNUSED4[18];
00066       Lsb LSB[3];          // 94
00067       char UNUSED5[9];
00068       char CH_UNIT_X[5];     // 112
00069       char CH_UNIT_Y[5];
00070       char CH_UNIT_Z[5];
00071       char UNUSED6[15];
00072       char CH_NAME_X[3];     // 142
00073       char CH_NAME_Y[3];
00074       char CH_NAME_Z[3];
00075       char UNUSED7[99];     // 151
00076       char ENGG_MODE;       // 250  Always 0 for SMR, 0 to 6 for VMR/VMX
00077       char UNUSED8[5];
00078     } field;
00079   };
00080 };
00081 
00082 #pragma pack()   // restore original alignment
00083 
00084 } // namespace GeopsyCore
00085 
00086 #endif // SYSCOMSVMRXHEADER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines