Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
About how to get the remote display like Cyclone COntrol GUI
. Dec 7, 2020 at 02:47 AM (02:47 hours)
Staff: Johnny N.

  • Dear Support:
    Im a C sharp (C#) programmer and i have a problem about how to get the remote display like Cyclone Control GUI from CycloneFX when it works.i have noticed that there is a function in "Cyclone\cycloneControl\controlsdk\examples\msvcsharp\msvcsharp.sln" named "dynamicReadBytes" .and it seemed to used for get the display screen of the FX.But i have no idea about the params are, will you provide an example on how to get it?
    Thanks
    wangq




    Comments

    • Greetings,

      What are you trying to do exactly in your C# application?

      dynamicReadBytes has nothing to do with remote display on the Cyclone. It is for reading the DUT after programming dynamic data like serial numbers. This is what the function does precisely (per the Cyclone FX manual).

      8.2.10.4.4 dynamicReadBytes

      bool dynamicReadBytes(uint32_t cycloneHandle, uint32_t targetAddress, uint16_t dataLength, char *buffer);

      This function reads a specified number of bytes from a specified memory address of the target
      processor. This call is only valid after first having made a call to the “startImageExecution” function
      in the sequence of commands.

      @parameter cycloneHandle The handle of the Cyclone that will perform the dynamic read.
      @parameter targetAddress The first memory address of the target processor where the data will be read.
      @parameter dataLength The number of total bytes to read from the target processor
      @parameter buffer A pointer to the array where the data read will be stored. This array must have been allocated prior to calling this function.
      @returnvalue True if the data was successfully read False otherwise

      Regards,
      Johnny
      PEmicro

      • Greetings,

        Considering that FX may be placed in some unknown position, I hope to gathering display of FX to the cocmputer screen real time when programming .
        I have noticed that CYCLONE have SPECIAL feature like
        PE_CYCLONE_GET_CYCLONE_SCREEN_BITMAP_BUFFER whose address is 0xA5001101.I wondering how to use this feature.

        Regards
        wang

        • Greetings Wang,

          The PE_CYCLONE_GET_CYCLONE_SCREEN_BITMAP_BUFFER features tells the Cyclone FX to return a pointer to a stream object of class TStream.

          http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Classes_TStream.html

          Then we get the stream object from the pointer and create a bitmap from it. Then the bitmap is displayed in the CycloneControlGUI screen.

          You can use this feature if you want to display the Cyclone FX screen in real time in your application. You will just need to have C# code to be able to manipulate the stream object.

          cycloneSpecialFeatures(PE_CYCLONE_GET_CYCLONE_SCREEN_BITMAP_BUFFER, false, 0, 0, 0, @bufferPtr, @screenSize);
          @bufferPtr is the pointer to the stream object returned by the DLL and where the bitmap is
          @screenBufferSize is pointer to a 32 bit unsigned long representing the length of bufferPtr returned by the DLL

          cycloneSpecialFeatures  returns true on success

          If you don't need the display to be real time, the DLL can just generate a screenshot "Cyclone_Display.bmp". This is how you do it.

          IntPtr bufferPtr = Marshal.AllocHGlobal(8);
          IntPtr screenSize = Marshal.AllocHGlobal(8);
          cyclone_control_api.unmanaged_cycloneSpecialFeatures(cyclone_control_api.PE_CYCLONE_GET_CYCLONE_SCREEN_BITMAP_BUFFER, True, 0, 0, 0, bufferPtr, screenSize);

          Regards,
          Johnny
          PEmicro Support

          • Greetings,
            Thank you for your reply, it helps a lot and i can obtain the FX screen now , however,it occured anther problem。
            Considering the FX Programmer may be working for days,so i run my app for times while the Computer memory continuous decreasing. then i position this question and it seems there may be some memory leakage in this function---"cyclone_control_api.getNumberOfErrors".
            will you confirm it for me ,thanks a lot!
            Regards,
            wang

            • I was able to confirm that there might be a memory leak in the  getNumberOfErrors function. I am trying to track down the exact cause now. I will update you once I have more information. It is recommended that you restart the application occasionally to free up memory until we are able to provide you a DLL fix.

              • I emailed you a new cycloneControlSDK.DLL with a fix. Can you try it and let me know if you see any other issues?

                • Greetings 
                  Thank you for your reply,it works and i have not find other issues for now. I will consult you if i have any other problem.

                  Regards
                  wang

Add comment


   Want to comment? Please login or create a new PEmicro account.







© 2021 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement