Hi all,
I'm trying to figure out how to access data from the input webpage. I know that the data is stored in the http socket. but, which part of the program deals with it? how is it stored? Please do give me some guidance.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi all,
I'm trying to figure out how to access data from the input webpage. I know that the data is stored in the http socket. but, which part of the program deals with it? how is it stored? Please do give me some guidance.
We have a demonstration guide for image processing. the link is below.
http://processors.wiki.ti.com/index.php/MCSDK_Image_Processing_Demonstration_Guide
Please let me know if this helps. If you need additional information on this please let me know and i will try to add the info in the page.
Thanks,
Arun.
The function serve_result_page() (from mcsdk_2_00_04_16\demos\image_processing\ipc\master\src) is called back from NDK when it receives the HTML message with image data, and it have the socket information. Then the post message is read from socket in function cgiParseMulti(), and parsed for further processing.
Regards
Sajesh
thank you all. Your reply was informative. But we have some more doubts.
cgiparsemulti() returns input image length. But for processing image, its width and height parameters are required. how is that obtained.
which function is invoked when we type the IP address in the browser .
which event is invoked when process.cgi is hit in the input web page
thanks in advance
Sohal
And also I want to know that how can I get this image data into the 4GB SDRAM/DDR3 from the socket rather than going into the buffer.
Regards
Sohal
Sohal,
Following are my inputs
[Q] cgiparsemulti() returns input image length. But for processing image, its width and height parameters are required. how is that obtained.
[A] The image pointer to image buffer and image length is passed to a function called mc_process_bmp() which is in file mcsdk_2_00_04_16\demos\image_processing\ipc\master\src\mcip_process.c. This function parses the image header (see function bmp_read_header()) to get height and width of the image.
[Q] which function is invoked when we type the IP address in the browser
[A] It is taken care in NDK module. The application provides the index page, see function image_processing_webfiles_add().
[Q] which event is invoked when process.cgi is hit in the input web page
[A] I don't know about the event but, in function image_processing_webfiles_add(), there is a function call efs_createfile("process.cgi", 0, (UINT8 *) pFxn); to install callback function serve_result_page(). When process.cgi is hit, the NDK calls back the function serve_result_page() with socket id to read the POST data.
[Q] And also I want to know that how can I get this image data into the 4GB SDRAM/DDR3 from the socket rather than going into the buffer.
[A] The image data is read to DDR3 directly from socket. There is a Memory_alloc call, which allocates memory from DDR3, and this buffer pointer is passed in the socket call to read the post data which have the image.
Regards
Sajesh
Dear Sajesh,
Thanks for the detailed explanation.
Can DDR3 be accessed by 1 master and 7 slaves simultaneously?
If so, how?
Sohal,
All processors can access DDR3 memory simultaneously. In the demo all 8 cores access DDR3 memory simultaneously. The DDR3 start address for all cores is 0x8000 0000. So all cores can use this address to read and write data.
In the demo, all 8 cores use DDR3 memory simultaneously.
Regards
Sajesh
Sajesh,
Can you just point out to me which part in the code tells about storing the image onto the DDR3. i want to know exactly which function deals with it. How to take the data from the socket to the 4GB external memory. Please shower some light on that.
Also I want to know
The function call len = recv( htmlSock, pBuf, ContentLength, MSG_WAITALL ); from mcsdk_2_00_04_16\demos\image_processing\ipc\master\src\mcip_webpage_utils.c reads the post message which have the image. The *pBuf points to a memory in DDR3. The memory is allocated in serve_result_page() function.
You can use NDK to transfer the data to device memory. Please see the NDK users guide for details.
Regards
Sajesh
Hi sajesh,
That was what I was looking for. Now got some more doubts:
I f the data in DDR3 is large say more than 500 MB and if each of the cores is accessing it and processing it simultaneously it might get slow right?
Hello
Me to dealing with same example project. My task is need to send the "hello.txt " from index.html then i need to open the hello.txt at core side then i need to edit the .txt file then need to send back to browser.
I've the following questions
1. How to get the hello.txt at core side. which function have the socket data and how to get it for my processing?
2. Does the PHP file convert the hello.txt to hexformat?, if its how to handle this?