Comphtml supports C++ calls

Discussion to talk about software related topics only.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Comphtml supports C++ calls

Post 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
Dan Ciliske
Project Engineer
Netburner, Inc
roland.ames

Re: Comphtml supports C++ calls

Post by roland.ames »

dciliske wrote: The documentation now reflects this addition.

-Dan

Can you tell me where this documentation is please.
User avatar
Forrest
Posts: 287
Joined: Wed Apr 23, 2008 10:05 am

Re: Comphtml supports C++ calls

Post 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.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
roland.ames

Re: Comphtml supports C++ calls

Post 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.
User avatar
Forrest
Posts: 287
Joined: Wed Apr 23, 2008 10:05 am

Re: Comphtml supports C++ calls

Post 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?
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
roland.ames

Re: Comphtml supports C++ calls

Post 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
roland.ames

Re: Comphtml supports C++ calls

Post 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
User avatar
Forrest
Posts: 287
Joined: Wed Apr 23, 2008 10:05 am

Re: Comphtml supports C++ calls

Post 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.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
roland.ames

Re: Comphtml supports C++ calls

Post 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??
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Comphtml supports C++ calls

Post by pbreed »

Take a look at the bargraph example this has the code to gerneate arbitrary jpg images at run time...

Paul
Post Reply