1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Add "byte" (char) as another data type that pass_through can handle

This commit is contained in:
Carles Fernandez 2014-11-24 22:50:33 +01:00
parent fb68a3d49d
commit 59bfa75e01

View File

@ -4,11 +4,10 @@
* output. * output.
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
* *
* Detailed description of the file here if needed.
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2014 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -18,7 +17,7 @@
* GNSS-SDR is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* at your option) any later version. * (at your option) any later version.
* *
* GNSS-SDR is distributed in the hope that it will be useful, * GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +32,6 @@
#include "pass_through.h" #include "pass_through.h"
#include <iostream> #include <iostream>
//#include <gnuradio/io_signature.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "configuration_interface.h" #include "configuration_interface.h"
@ -61,6 +59,10 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
{ {
item_size_ = sizeof(short); item_size_ = sizeof(short);
} }
else if(item_type_.compare("byte") == 0)
{
item_size_ = sizeof(char);
}
else else
{ {
LOG(WARNING) << item_type_ << " unrecognized item type. Using float"; LOG(WARNING) << item_type_ << " unrecognized item type. Using float";