MOD54415 Web Server Errors

Discussion to talk about software related topics only.
Post Reply
jediengineer
Posts: 192
Joined: Mon Dec 17, 2012 6:24 am

MOD54415 Web Server Errors

Post by jediengineer »

Hi all, is there some trick to calling functions or varialbles with the web server of the 54415 unit? I have the function UNIT_INFO called in my index.html file, I have the function declared in htmlvar.h, and defined in main.cpp. I followed the example in the WebVariables project as best as I could to try to replicate the function call, but I keep getting this error:

htmldata.cpp:214: error: 'UNIT_INFO' was not declared in this scope

Anyone got any idea as to why?
jediengineer
Posts: 192
Joined: Mon Dec 17, 2012 6:24 am

Re: MOD54415 Web Server Errors

Post by jediengineer »

Anyone?
User avatar
Forrest
Posts: 289
Joined: Wed Apr 23, 2008 10:05 am

Re: MOD54415 Web Server Errors

Post by Forrest »

Hello,
Nothing changed with respect to function calls on the Web server on the MOD5441X device. Can you copy and paste your code both the html function call and the function in Cpp source into pastebin or gist so we can see your code? You don't need to copy and paste your entire project, just the relevant code
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
jediengineer
Posts: 192
Joined: Mon Dec 17, 2012 6:24 am

Re: MOD54415 Web Server Errors

Post by jediengineer »

User avatar
Forrest
Posts: 289
Joined: Wed Apr 23, 2008 10:05 am

Re: MOD54415 Web Server Errors

Post by Forrest »

You code appears correct. Where did you place htmlvar.h? It needs to be in the html directory, not the project root.

Does the HTMLVariable example in examples/web/HTMLVariables work for you?
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
jediengineer
Posts: 192
Joined: Mon Dec 17, 2012 6:24 am

Re: MOD54415 Web Server Errors

Post by jediengineer »

I resolved this, thanks guys. @Forrest, I was informed that the htmlvar.h file needed to be in the project root. When I did that, it worked. When it was in the html folder, nothing worked. Confirm with dciliske, my ticket was resolved with him. Thanks!!
Post Reply