Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHello Users,
Thanks for the fast answer. @ Slaker, thanks for the Project of Webserver with Ajax, that what i was looking for. I've got it to run on the DBC3C40 Board. But i don't understand all of the Send function to the Webpage. I will make a little example for this. it should be a counter on the website. I have search for all "Progress" entries in the "Webserver.c" and this are too many for me to understand this. on Line 460-464 is an Struktur that initializing the values. on line 952 is an strcpy(...) Function ? why ? need i this too? and on line 1051 is a get_funcs progress_field=.... and on the line 1440 is a big Function for the sendprogress.... Can you pleas Help me, and make me a little example or tell me what i must be implement or note to make a easy function to Display somthing on the website about the webserver.c file. thanks for the Help. Sincerely, W.Szyja I have edit this files and i tries to implement a counter and display this on the website but this unhappily not Work. my changes on the webserver.c : on line 460:
struct
{
int dbcounter;
} dbcount;
on line 1067:
/* GET func mapping. */
get_funcs dbcount_field =
{
"/DBCOUNT",
send_dbcount
};
on line 963:
void test_counter( http_conn* conn )
{
unsignedint dbcounter;
dbcounter = 0;
if (dbcounter >= 32)
{
dbcounter = 1;
}
else
{
dbcounter = dbcounter << 1;
}
usleep(20000);
dbcount.dbcounter = dbcounter;
}