Page 1 of 2

Comphtml supports C++ calls

Posted: Tue May 21, 2013 9:31 am
by dciliske
This is a kind of minor announcement, but I figure people might find it nice to know: you can use C++ functions in dynamic content pages using the CPPCALL tag. This feature has actually been in comphtml since last fall, but it remained undocumented. CPPCALL functions have the same signature (arguments and return type) as normal FUNCTIONCALL functions.

The documentation now reflects this addition.

-Dan

Re: Comphtml supports C++ calls

Posted: Mon Oct 14, 2013 10:21 pm
by roland.ames
dciliske wrote: The documentation now reflects this addition.

-Dan

Can you tell me where this documentation is please.

Re: Comphtml supports C++ calls

Posted: Tue Oct 15, 2013 8:52 am
by Forrest
roland.ames wrote:
Can you tell me where this documentation is please.

Section 10.2 of the programmers manual is entitled "The CPPCALL tag". If you are not running the latest NNDK, it may not be present.

Re: Comphtml supports C++ calls

Posted: Tue Oct 15, 2013 7:00 pm
by roland.ames
Thanks Forrest,

I have not used the web server feature in my previous NetBurner projects, so this is all new to me.

Are there any other docs which cover specifically web server related information, or can you suggest any other quick intro to using the web server features on NetBurner?

Thanks,
Roland.

Re: Comphtml supports C++ calls

Posted: Wed Oct 16, 2013 9:27 am
by Forrest
Actually that programmers manual offers a pretty good introduction to all of the main features. Section 8,9,10 cover the web server. Or, if you are more of a learn by example type, nburn/examples/StandardStack/Web offers several specific examples.

Was there anything in particular you wanted to accomplish that is not covered by the docs or examples?

Re: Comphtml supports C++ calls

Posted: Wed Oct 16, 2013 6:31 pm
by roland.ames
I'm not sure yet as I am only just starting the web server part of the project and don't yet know what will be required. I'm not expecting to have to do anything very complicated, it's more a question of knowing what is possible so the doco and examples should be plenty.

Roland

Re: Comphtml supports C++ calls

Posted: Mon Oct 28, 2013 7:40 pm
by roland.ames
I have been reading the docos and examples, and brushing up on HTML. This is good for the simple stuff, and I have been experimenting with some basic web pages.

I would like to have a web page, onto which a file can be drag-and-dropped to trigger transfer of that file into the NetBurner.

Any ideas on how this could be done?

thanks
Roland

Re: Comphtml supports C++ calls

Posted: Wed Oct 30, 2013 12:46 pm
by Forrest
Well, first I'd get the FilePost example working to your liking. No matter what in the end, dragging and dropping or filling out a form, you are going to post that file to the web server.

As for the drag and drop bit, that would be handled by javascript or, from what I just googled, HTML5 supports it as well. This aspect of the process should not be affected by the NetBurner. JS is run by your browser. If you found an example online on using drag and drop, you could just paste it into your netburner html files.

Re: Comphtml supports C++ calls

Posted: Tue Nov 05, 2013 1:27 am
by roland.ames
thanks Forrest, I will implement file post first, and then worry about the drag and drop feature later.

I have another question. I want to be able to display images in the browser window, but the image file is not preloaded in html directory, it is generated by the NB application at run-time and is in a RAM buffer. I am using bmp format.

I guess it is a similar problem to attaching a camera to the NB and then being able to capture images and display them via the web server??

Re: Comphtml supports C++ calls

Posted: Tue Nov 05, 2013 11:00 am
by pbreed
Take a look at the bargraph example this has the code to gerneate arbitrary jpg images at run time...

Paul