3 Replies Latest reply on Mar 14, 2018 3:21 PM by gfoersler_2625781

    Building Example Applications with Visual Studio 2017




      I tried to build the Streamer example application from the USB Suite 3.4.7 with VS 2017 Community, but I get a lot of errors.


      It does not recognize the System::Windows namespaces, expects or misses tons of declarations and so on.


      Can anyone point me to a walk through guide for building these examples with VS 2017 Community?


      I don't know if they are buildable with any other VS version, because I only have that one.


      Thanks in advance

        • 1. Re: Building Example Applications with Visual Studio 2017

          Hello Frank Zander,


          - Please use the Streamer application that comes with the EZ-USB FX3 Software Development Kit.

          - Also, let us know if you are using the C++ version or the C# version of the streamer application.


          Best regards,

          Srinath S

          • 2. Re: Building Example Applications with Visual Studio 2017



            Thanks for the quick reply.


            Does the Streamer application from the FX3 DVK really work with the FX2LP?


            Anyways, I installed VS 2010 and got the Streamer application from the USB Suite 3.4.7 built with success.


            I did a little modification, because I wanted to store the transferred data into a file instead of displaying it, so where the code usually callls the display function I added this:




               std::ofstream outfile;
               outfile.write(reinterpret_cast<const char *>(buffers[i]),sizeof(buffers[i]));



            This code works and I get a file with data in ist, but it makes the application go soooooo slooooow.

            I think this is (at least partly) because I open and close the file again for each transfer. I tried to move the


               std::ofstream outfile;


            to where the start button is pressend, and the






            to where the stop button is pressed, but then I get errors at the outfile.write command, because my outfile object seem not to be known where i do the write.

            I am very new to C++, so that might be obvious to someone being familiar with it.


            Could anyone help me and tell me how I have to program this in order to get the streamed data written to a file without sacrificing too much bandwidth. I need about 6MB/s whule the ISOC IN with 3072 Bytes gives me 24MBs with just skipping the data and about 50kB/s with wrinting the data to the file.

            • 3. Re: Building Example Applications with Visual Studio 2017




              after i moved the std::ofstream outfile; towards the beginning of streamer.h, directly after the includes, I could move the open to Form1_Load and the close to Form1_Closed, and now I get 24MB/s also with writing the data to a file.


              I moved the write upwards from the package to the transfer level and now the code looks like this:



              if (EndPt->FinishDataXfer(buffers[i], rLen, &inOvLap[i], contexts[i], isoPktInfos[i]))


                  if (bShowData)//modified: insertion

                      outfile.write(reinterpret_cast<const char *>(buffers[i]),rLen);//modified: insertion


                  CCyIsoPktInfo *pkts = isoPktInfos[i];



              Unfortunately, rLen seems to be 48986 all the time, instead of 49152 (16*3072).

              Any idea, why the FX2LP does not send 16 times 3 packages of 1024 bytes each with the alternate 3 setting of the streamer firmware?