2011-10-01 18:45:20 +00:00
|
|
|
/*!
|
|
|
|
* \file control_message_factory.h
|
2011-12-28 21:36:45 +00:00
|
|
|
* \brief Interface of a factory for control messages.
|
2011-10-01 18:45:20 +00:00
|
|
|
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2018-05-13 20:49:11 +00:00
|
|
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
2011-10-01 18:45:20 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2015-01-08 18:49:59 +00:00
|
|
|
* (at your option) any later version.
|
2011-10-01 18:45:20 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-05-13 20:49:11 +00:00
|
|
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2011-10-01 18:45:20 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GNSS_SDR_CONTROL_MESSAGE_FACTORY_H_
|
|
|
|
#define GNSS_SDR_CONTROL_MESSAGE_FACTORY_H_
|
|
|
|
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <gnuradio/message.h>
|
2014-04-13 00:51:00 +00:00
|
|
|
#include <memory>
|
2014-01-12 20:07:38 +00:00
|
|
|
#include <vector>
|
2011-10-01 18:45:20 +00:00
|
|
|
|
2013-01-28 23:50:09 +00:00
|
|
|
//! Message described by who sent it and what it says
|
2011-10-01 18:45:20 +00:00
|
|
|
typedef struct ControlMessage_
|
|
|
|
{
|
|
|
|
unsigned int who;
|
|
|
|
unsigned int what;
|
2018-03-03 01:03:39 +00:00
|
|
|
} ControlMessage;
|
2011-10-01 18:45:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief This class implements a factory for Control Messages.
|
|
|
|
*
|
|
|
|
* It encapsulates the complexity behind getting Queue Messages and associated Control Messages
|
|
|
|
*/
|
|
|
|
class ControlMessageFactory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! Constructor
|
|
|
|
ControlMessageFactory();
|
|
|
|
|
|
|
|
//! Virtual destructor
|
|
|
|
virtual ~ControlMessageFactory();
|
|
|
|
|
2017-12-21 12:05:21 +00:00
|
|
|
gr::message::sptr GetQueueMessage(unsigned int who, unsigned int what);
|
2018-12-02 04:29:11 +00:00
|
|
|
std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> GetControlMessages(const gr::message::sptr& queue_message);
|
2011-10-01 18:45:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /*GNSS_SDR_CONTROL_MESSAGE_FACTORY_H_*/
|