For my project, I worked with a Spectrum Analyzer made by the company ThinkRF. They are a small company based in Canada and they are growing bigger because of a device they made called the WSA5000. Their product has really great capabilities that are better than many of the other bigger companies and they are selling it for a fraction of the cost. Normally a spectrum analyzer would put you down fifty to a hundred thousand dollars, depending on which one you buy, but this one ranges from three thousand to ten thousand.
This device has open source coding in C/C++, Matlab, and PyRF. PyRF is there own variation of the Python coding language. For my project we used the C/C++ API Libraries. My job was to create a functioning library (.lib file) for this machine so we could take advantage of the many functions that ThinkRF had provided us. A library is basically a collection of Object files (.obj). An object file is made up of multiple Header (.h) and Include (.c or .cpp) files. We combine all of these together into a library so the computer can see all of these files together and then can easily reference them throughout the code. This was a very good challenge for me because I had done a few projects with Python but this was my first experience with coding in C/C++.
After a few days of learning the language, I dove in and attempted to make a working static library. With the help of the online coding community of Stackoverflow's website, I was able to create a .lib file. The only problem was that I could not get the code to call a function from the library. I then contacted customer ThinkRF's customer support to fix the errors that were discovered. The reason we need a library so bad was because ThinkRF included a library in their C API's but it was designed for the Linux operating system, we were using windows 7. So after talking with customer support, we learned how to take advantage of the Linux library they included for us. In the settings of Microsoft Visual C++ 2010 Express, there are ways to treat the included .a file as if it where a .lib file. I was excited when I thought that my code would finally start working until I soon discovered yet another error. With the help of ThinkRF and one of the Computer Engineers here at SPAWAR, we took an example function they gave us and tested it on the library we had, and it worked!
It was really exciting when our code worked, because we can now actually use this machine whenever we need to. It also allows us the ability to create custom applications with their API Libraries. A wise man once said "There are only two ways to write error-free programs; only the third one works." This was a quote that was displayed in my classroom when I first started programming. At first I thought it was a funny joke and did not think much about it, but I truly understand what it means. There is never an easy way around a tough challenge. You have to discover and learn along the way to be successful in the end. If you want something to be done, you have to find a way and go do it.