scooke
-Interested User-
Posts: 30
Joined: Jan 8, 2013
|
Posted: Aug 14, 2013 02:38 PM
Msg. 1 of 6
Can you tell me what the simplest way is to request and receive data in the console with a single CPP file? I wasn't sure if you had a sample app like this. I am trying to avoid socket programming if possible. I am new to C++ and I just want to practice subscribing, receiving and parsing the data out to a text file. I have a programmer doing it for me now but I would like to start learning. Thanks Guys.
scooke
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Aug 27, 2013 09:11 AM
Msg. 2 of 6
Hello, sorry I missed this before. You will need to do either sockets or COM programming to read data from the feed (it doesn't write to disk natively).
With that said, I would recommend you take a look at the ConsoleBenchmarkTool example application. It is a very basic app that launches the feed and reads a list of commands from a file that it sends to the feed and then does some very basic parsing of the data that comes back.
|
scooke
-Interested User-
Posts: 30
Joined: Jan 8, 2013
|
Posted: Aug 27, 2013 04:45 PM
Msg. 3 of 6
Thanks for the reply. If I am reading this correctly, I need to add this text to the ConsoleCommands.txt file:
S,SET PROTOCOL,5.1 w@ES#
With this in the file, shouldn't I see quote activity in Console window?
Also, is there any chance that anyone has converted this to VS2010? I tried converting but it's throwing all sorts of errors. Thanks Steve.
scooke
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Aug 27, 2013 05:44 PM
Msg. 4 of 6
The Console app won't show you the data itself (although you could modify it to do that), it simply counts the number of each type of message and prints the current totals to the screen each time it receives a timestamp message from the feed (once a second).
The code certainly should convert automatically without error and without modification. Can you give me a idea of the error messages you are getting?
|
scooke
-Interested User-
Posts: 30
Joined: Jan 8, 2013
|
Posted: Aug 28, 2013 07:25 AM
Msg. 5 of 6
Here is the Conversion report (see image attached).
scooke
File Attached: ConversionReport.png (downloaded 1348 times)
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Aug 28, 2013 04:35 PM
Msg. 6 of 6
It looks like your copy of visual studio doesn't have the x64 platform libraries installed which is causing the conversion to not work properly.
Are you using the express version of Visual Studio? If so, that would be one possible explanation since I know that at least some of the Express versions don't have x64 support and our projects include those settings along with the x86 settings.
|