GeopsyCore/SyscomXmrHeader.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 SYSCOMXMRHEADER_H
00029 #define SYSCOMXMRHEADER_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 SyscomXmrHeader : public SyscomHeader
00039 {
00040 public:
00041   SyscomXmrHeader();
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[8];     // 0
00050       qint32 NB_SAMPLES;   // 8
00051       char UNUSED2[10];
00052       qint32 SYNC_OFFSET;  // 22
00053       Time SYNC_TIME;      // 26
00054       uchar SYNC_OK;
00055       qint16 INT_OFFSET;   // 33
00056       Time INT_TIME;       // 35
00057       char UNUSED3[13];
00058       qint16 SAMPLING;     // 54
00059       uchar NB_CHANNEL;    // 56
00060       char UNUSED4;
00061       qint16 SW_REVISION;  // 58
00062       char UNUSED5[11];
00063       char S_NUMBER[5];    // 71
00064       char SS_NUMBER[5];   // 76
00065       char UNUSED6[2];
00066       Lsb LSB[3];          // 83
00067       char CH_UNIT_X[5];     // 92
00068       char CH_UNIT_Y[5];
00069       char CH_UNIT_Z[5];
00070       char CH_NAME_X[3];     // 107
00071       char CH_NAME_Y[3];
00072       char CH_NAME_Z[3];
00073       char UNUSED7[140];     // 116
00074     } field;
00075   };
00076 };
00077 
00078 #pragma pack()   // restore original alignment
00079 
00080 } // namespace GeopsyCore
00081 
00082 #endif // SYSCOMXMRHEADER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines