0

I am currently developing a C++ program that does all the mathematical calculations, prints items to the screen that is scanned in by an RFID Reader, and allows the user to select a payment method. (Basically using RFID tags to replace barcodes)

I have started writing my C++ code for a keyboard entry and have no idea how to take an input from my RFID reader into my program. My RFID Reader is a DLP-RFID1 from it comes with some demo software and drivers. I got it working with windows 7 last week on the demo software(a GUI using Microsoft Visual Studio).

My question is can I take the input from my Demo GUI and some how use that as my input for my C++ program? If I can can some one push me in the right direction by links, pointers, reading material?

Also I have basic C++ experience. I am teaching myself how to program in C++ and right now only know print statements, while loops, switch/case, math functions, and etc.

ajaustin12
  • 111
  • 1
  • 3
  • 10
  • probably the best start would be to read ["The C++ Programming Language"](http://www2.research.att.com/~bs/3rd.html) – Andriy Tylychko Oct 26 '11 at 20:43
  • Tackling a project such as this with only limited knowledge of c++ is a daunting task to say the least. I would advise you to learn more about c++ before tackling this. At least learn classes and how to use arrays and pointers. – NickLH Oct 26 '11 at 20:44
  • Thank you. I own the book [C++ How to Program](http://www.deitel.com/Books/C/CPlusPlHowtoProgram8eEarlyObjectsVersion/tabid/3624/Default.aspx) ,but it doesn't help with this specific problem. – ajaustin12 Oct 26 '11 at 20:53
  • @AndyT: I think that book is the best choice for reference and an excellent choice for experienced C++ programmers, but I would not recommend it as a tutorial to new C++ programmers. Anyhow, [The Definitive C++ Book Guide and List](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) has a list. – Brian Oct 26 '11 at 21:07
  • @Brian Thank you for the link that helps. I also have several other books in PDF format but the only one that I can recall right now is a book by [Ivor Horton](http://www.amazon.com/Ivor-Hortons-Beginning-Visual-Programmer/dp/0470500883) – ajaustin12 Oct 26 '11 at 21:44

3 Answers3

2

That is a very specific question about hardware and software of that vendor an not really general knowledge. However, those types of devices, in my past experience with bar code readers and such, usually have a driver that comes with them which allows you to set them up as an actual keyboard (for example, you could even go into a text editor and capture the codes). If you can set them up like that, then reading them is nothing more than reading stdin. For example, cin >> stringVariable;

MartyTPS
  • 530
  • 2
  • 5
  • I was on the phone with tech support last week trying to set up the RFID reader and to get it to work with Windows 7 and asked him the same question on how to incorporate their demo software into my software, but of course he had no idea. I have looked at the source code for the demo software but was unable to understand it with my limited knowledge of C++ and I was at line 200 before I stopped looking at it. – ajaustin12 Oct 26 '11 at 20:49
  • Ok I am home now and will give the site [Source Code](http://www.dlpdesign.com/rfrdr/) The one that I am using is the link labeled VC++ source code. any help understanding it would be greatly appreciated. – ajaustin12 Oct 27 '11 at 03:50
  • Ok. I'll take look (in the morning, can't look from phone) – MartyTPS Oct 27 '11 at 04:06
  • I have looked this over. It is a pretty straight forward but very low-level bit-twiddling api. I have an analysis which is too big to post here. I'm new here so I'm trying to figure out how to do that... – MartyTPS Oct 27 '11 at 16:11
  • There are few ways we can communicate your results. You can create a google document and post the link here or you can post your analysis on another website and post that link here. I am at work and IE 7 is being a pain with trying to set up a google site on my google account. – ajaustin12 Oct 27 '11 at 19:47
  • I never shared a google doc,so let me know ifthis works https://docs.google.com/document/d/1sy8RqvDJzcKf-q4rhmQqWpfLTTNGscTH2FhtF-yTyHs/edit?hl=en_US – MartyTPS Oct 27 '11 at 20:18
  • I was able to open it, but of course my work computer and IE 7 doesn't like google docs. I will try to read what I can at work and finish it up at home in 8 hours. I just finished playing with the key emulator on the web site I posted. It works but not the way i need it to. I need to read multiple tags simultaneously or close to that. Plus I would like to try and develope my own code and program or incorporate theirs. – ajaustin12 Oct 27 '11 at 20:46
1

Assuming that you have demo software in C++:

The demo software should link against one or more libraries that comes with the demo, and include a header that declares the functions in the library. You have to (at minimum) include this header and link against that same library, and use those libraries. The demo will help you understand which functions you need to call and how.

Mooing Duck
  • 64,318
  • 19
  • 100
  • 158
1

As already said it is very dependent on how they want you to use it but some general guide lines.

Look for header file that came with their demo ( ends in ".h" or ".hpp") you will need to #include that in your project at the very minimum

Look for a .lib file. you will need to link that to your file. With gcc you would type something like G++ -l[libname]. With MSVS there are two ways i know of. You will need to right click the project in the sidebar. Click something like options or preferences. Expand linker options. Add the library. or you can type #pragma comment(lib, "filename.lib") in your file near your includes

If there is a .dll (windows) or .so(Linux) file you can dynamically link it. There are many ways to do this. Google search for C++ Dynamic link libraries should be some help. As a newbie try to stick with Static Linking first. that would be another good keyword to search for. The best tutorial on dynamic linking for windows i have found is actually in assembly. but its all Win32 function calls anyways so its not hard to understand. Icz DLL tutorial

Joe McGrath
  • 1,481
  • 10
  • 26
  • McGarth Thank you that is getting me closer to helping me and for me to understand. I wish I was at home with the program to look right now. I do remember there are some .dll files associated with the demo software and in the driver folder I had to download from the manufacturer. – ajaustin12 Oct 26 '11 at 21:41