fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/gpsoncore/gpsclockmessage.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           gpsclockcmds.h  -  description
00003                              -------------------
00004     begin                : Fr Apr 21 2006
00005     copyright            : (C) 2006 by 
00006     email                : 
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef GPSCLOCKMESSAGE_H
00019 #define GPSCLOCKMESSAGE_H
00020 
00021 #include <string>
00022 
00023 
00027 class GpsClockMessage  {
00028 public:
00029    
00031   GpsClockMessage();  
00032 
00034   GpsClockMessage(unsigned char *msg, int len);
00035 
00037   GpsClockMessage(int fd);
00038     
00040   GpsClockMessage(int n, ...);
00041     
00042   ~GpsClockMessage();
00043   
00044     
00046   GpsClockMessage &operator+=(GpsClockMessage const &msg);
00047 
00052   GpsClockMessage &splitMessage(int pos);  
00053   
00055   GpsClockMessage &splitFirstMessage();
00056 
00059   int findNextMessage(int pos=0);
00060     
00063   int findNextMessage(std::string *name, int pos=0);
00064   
00068   int sendToGpsClock(int fd);
00069   
00071   void display(FILE *fout, int debug=0);
00072 
00073     
00074 //private:  
00075   unsigned char *data;  
00076   
00077   unsigned int len;
00078 };
00079 
00080 #endif