Option b sounds easiest. I went with that. Found the test_pps_input.cpp
file and added the following line to it.
"make test" and "sudo make install". After that, I ran the executable but
did not see the unix timestamp on the output. Don't know if I am doing
anything wrong.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Venkatesh,
Post by Venkatesh SandilyaI am not modifying the example(test_pps_input) in the UHD source tree.
Then you have to configure your compiler/linker yourself to find the
headers of UHD and Boost. This is usually a build toolkit's job.
Since UHD has a working build system, I'd assume it is easiest to just
use that.
So: how do you compile it then?
Post by Venkatesh Sandilyaf not, you need to set up a compilation environment. Depending on
your needs, the best way to do that is to use the IDE of your
choice, and point it to the UHD headers and boost includes.
I am not using a IDE. Just using the Gnu edit program. Is it
recommended to use one?
I don't think there is a program called GNU edit; maybe you're
referring to Emacs? However, it is most probably but a text editor,
which is very fine for programming - however you still have to figure
out how to build your code.
a) set up a build system for your modified example, and supply it with
all the files test_pps_input.cpp needs. Since doing this from scratch
demands some experience this will be *much* easier if you use an IDE
that suits you well and add a new project with includes and linkings
correctly set, OR
b) just move the modified example back into the UHD source tree where
you took it from, and rebuild that like you did when building UHD the
first time. All the files it needs are where the compiler expects them
to be.
I'd take b), since you don't need to install anything when testing
these examples and thus won't break anything, and it greatly
simplifies your efforts.
Greetings,
Marcus
Post by Venkatesh SandilyaHi Venkatesh,
if you just modify the example in the UHD source tree and build it
"normally" there, it should run from the build directory... Are
you doing that? If not, you need to set up a compilation
environment. Depending on your needs, the best way to do that is to
use the IDE of your choice, and point it to the UHD headers and
boost includes.
Hope that helped you progress, greetings,
Marcus
PS: please always reply to the list as whole :)
Thanks Marcus. I am writing an application for the first time
using uhd. Should I store and compile the source code in any
specific path in my system? Just compiling from my home
directory does not work. Please let me know when you have a
chance.
On Thu, Feb 6, 2014 at 5:11 PM, Marcus Müller
Hi Venkatesh,
you probably just want to use usrp->get_time_now().
Greetings, Marcus
Post by Venkatesh SandilyaPost by Venkatesh SandilyaHello
I have a Ettus N200 with a GPSDO (782779-01) module
installed. I am connecting to the Ettus device using
my laptop thats running Fedora 17 with Gnuradio
(3.7.2.1) and UHD (3.6).
I can run the sample (example) programs such as
test_pps_input that came with the package but not able
to run a custom program that I wrote.
I took most of the code from test_pps_input.cpp and
commented the last few lines
//set the time at an unknown pps (will throw if no
pps) std::cout << std::endl << "Attempt to detect the
PPS and set the time..." << std::endl << std::endl;
usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
std::cout << std::endl << "Success!" << std::endl <<
std::endl; return EXIT_SUCCESS;
and replaced it by
std::cout << usrp -> get_mboard_sensor("gps_time");
return EXIT_SUCCESS;
I get a whole bunch of errors. I may be doing a
trivial mistake like not running the code from the
right place. Would appreciate any insight on this.
Thanks Venkatesh
_______________________________________________
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
_______________________________________________
Post by Venkatesh SandilyaPost by Venkatesh Sandilyahttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
_______________________________________________ USRP-users mailing
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJS9Sb0AAoJEAFxB7BbsDrL/4oIAJaxj8aQKQq3D5Fs4EwcIESd
2Ick6dwvjSzPQpfY/2FFH3ZUt+VmdOvNmjgOGj4p08pZ+wONnUKtmPq1o3kTOfug
HSIe0dC/rCqlP2LYPUtlbJobpGHwR4uGbdo8WA6MQd7dREIB/FMg10SsrnqgePhP
Tus1SDiuiduB5AnaTYKT4ZoaB/M+zVuHzYOAGj2BJ4q33JfNnDt4V9X7IoIDeDds
oa5Xma/WaZzd/LXrAOpwNGzGZQvVakgxUO+KEISyKc5VfqBvavpFXFuXUoqFD8HC
/A7X+ZkKHzmT6hb0Dbk0/+jQ1UWH1xHR748DOJ2hsO0hTo+gB5Pbq8ziEN+oZxw=
=HWf2
-----END PGP SIGNATURE-----
_______________________________________________
USRP-users mailing list
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com