rds_type_0a_decoder.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           rds_decoder_0a.h  -  description
00003                              -------------------
00004     begin                : Feb 2009
00005     copyright            : (C) 2009 Ernst Martin Witte
00006     email                : emw-kradio@nocabal.de
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 KRADIO_V4LRADIO_RDS_DECODER_0A_H
00019 #define KRADIO_V4LRADIO_RDS_DECODER_0A_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <kdemacros.h>
00026 
00027 #include "rds_type_decoder.h"
00028 
00029 #include <QtCore/QString>
00030 
00031 #define RDS_0A_POS_BLOCK          RDS_BLK_B
00032 #define RDS_0A_POS_SHIFT          0
00033 #define RDS_0A_POS_MASK           0x0003
00034 
00035 #define RDS_STATIONNAME_MAX_LEN   8
00036 
00037 enum RDS_0A_State { RDS_0A_WAIT4GRP, RDS_0A_COMPLETE };
00038 
00039 class KDE_EXPORT RDS_Type0A_Decoder : public RDSTypeDecoder
00040 {
00041 public:
00042     RDS_Type0A_Decoder();
00043 
00044     virtual void addGroup(const RDSGroup &g);
00045     virtual bool isComplete() const;
00046 
00047     const QString &getStationName() const;
00048 
00049 protected:
00050     void           addChar(unsigned char c);
00051     void           clear();
00052 
00053     char         m_stationName[RDS_STATIONNAME_MAX_LEN+1];
00054     QString      m_stationNameComplete;
00055 
00056     unsigned int m_next_expected_position;
00057 
00058     RDS_0A_State m_state;
00059 };
00060 
00061 
00062 
00063 
00064 #endif
00065 

Generated on Tue Jun 2 19:19:57 2009 for kradio4 by  doxygen 1.5.8