Oberon Community Platform Forum
November 21, 2019, 06:50:36 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Possible uses for AOS  (Read 12534 times)
Dave
Newbie
*
Posts: 9


« on: November 19, 2008, 11:34:05 PM »

Hi all, me again with more questions.

I've been toying with the idea of using AOS for the following applications/uses:

1) Some form of kiosk (user interaction via a web browser and html pages).
2) A home automation server again via a web browser connected via ethernet to an external module such as:

http://www.siteplayer.com/products.htm and
http://www.tigoe.net/pcomp/siteplayer/siteplayer-intro.shtml

My questions as follows:

1) Does AOS come with a web browser and if so, what scripting abilities does it have?

2) Does the built-in web server have the facility to run cgi-bin scripts of some sort?

3) How difficult would it be to modify or create a USB HID generic driver (with 1 or 2 end points)
    so one could use AOS to control USB based electronics projects via a dedicated pgm?
    (I see it does have support for RS232 interfacing and limited LPT access).

4) With the lack of support for directories, what would be the easiest way to copy external files
    such as html and gif files created on other computers?
   I'm thinking of running AOS from a USB flash drive which will always be connected and using a second
   USB flash drive to copy files over from my XP box.Is this possible?

I apologize for all the questions, but I like doing my research before commiting myself to learning a whole new OS.
Any help will be greatly appreciated.

Dave.
Logged
masta
Newbie
*
Posts: 19


empamedia.ethz.ch


« Reply #1 on: November 20, 2008, 08:17:08 AM »

Hi Dave,

Aos can access FAT based file systems, so this problem is eaten.

You can specify your own handler for a http-Request (Module WebHTTPServer.mod). In my master's thesis, I have proposed a modified Webserver that first looked up a container with objects implementing an interface, second the file system for a file matching the URL. Should this interrest you send me a mail to matthias d o t scheller a t lichtenauer d o t ch, I'll send you the code (by the end of the week).


 There is also code from Luc Blaeser implementing more or less what apache users call Server Side Includes.
Since you seem not to be familiar with modular languages: Modules are unique and stay resident, when loaded, while objects are the same as in other languages. You can, on the other hand, not state, that a module implements an interface.

And no, Oberon and its descendants are not scripting language. Nevertheless, it comes with garbage collection.

edit: forget -or better:extend Wink- the aos web browser for your purpose. It is a pure document viewer, except for hyperlinks.

There is an oberon to javascript compiler project (Ralph Sommerer, if I'm not mistaken)
« Last Edit: November 20, 2008, 08:22:15 AM by masta » Logged
cfbsoftware
Full Member
***
Posts: 107


WWW
« Reply #2 on: November 20, 2008, 12:51:34 PM »

There is an oberon to javascript compiler project (Ralph Sommerer, if I'm not mistaken)
Yes - Ralph's OberonScript is here:

http://www.ralphsommerer.com/obn.htm


Logged

Chris Burrows
Astrobe v7.0 (Feb 2019): Oberon for ARM Cortex-M3, M4 and M7 Microcontrollers
http://www.astrobe.com
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #3 on: November 20, 2008, 05:12:19 PM »

Yes - Ralph's OberonScript is here:
http://www.ralphsommerer.com/obn.htm
   
If you have any problems with access (I, for example, was unable to open a link)
It can be downloaded here.http://a2os.org.ua/forums/printfile.php?action=attach&f=11&t=3&id=2
Slightly modified version by SAGE:

Logged
Dave
Newbie
*
Posts: 9


« Reply #4 on: November 21, 2008, 12:12:57 AM »

Thanks guys.

Dave.
Logged
sage
Full Member
***
Posts: 170



WWW
« Reply #5 on: November 21, 2008, 07:04:09 AM »

A little test for Ralph's OberonScript:
Code:
<html>
<head>
<script src="oberon.js" type="text/javascript"></script>
<script type="text/x-oberonscript">
MODULE m1;
PROCEDURE Compute*(n: INTEGER): INTEGER;
VAR
i, a, b, c: INTEGER;
BEGIN
a := 1;
b := 1;
FOR i := 0 TO n - 1 DO
c := a + b;
a := b;
b := c;
END;
RETURN(b);
END Compute;
END m1.
</script>
<script type="text/x-oberonscript">
MODULE m2;
IMPORT
m1, HOST;
PROCEDURE Test*(n: INTEGER);

BEGIN
HOST.alert("n = " + n + ", Fibonacci number = " + m1.Compute(n));
END Test;
END m2.
</script>
</head>
<body OnLoad="Oberon.Init();">
<h1>body text</h1>
<input type="button" value="Test"
   onclick="m2.Test(10);">
</body>
</html>
Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #6 on: November 21, 2008, 09:00:16 AM »

1) Yes, see StartMenu->Applications->WebBrowser. Scripting facilities: None

2) The webserver supports Server Side Modified Pages (SSMP). See serverstate.ssamp attached below (source of http://www.bluebottle.ethz.ch/serverstate.ssmp). It uses procedures from the module WebDefaultSSMP.Mod (found in release).

3) Quite easy. I don't think that there is any system out there where it would be easier to write USB drivers than in A2  Roll Eyes

4) Yes. The only thing that you have to be aware of is that when you attach more than 1 USB mass storage device, you have to make sure that A2 will know which one is the boot device. To do this, you have to set the configuration string (see http://www.ocp.inf.ethz.ch/wiki/Documentation/Configuration) "SerialNumber" to the serial number of the boot device. To find out the serial number of the device, run StartMenu->Inspect->UsbViewer. Press the "Details" button. The serial number is shown in the device descriptor of the device.

* serverstate.ssmp (7.04 KB - downloaded 423 times.)
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #7 on: November 21, 2008, 10:56:24 AM »

3) Quite easy. I don't think that there is any system out there where it would be easier to write USB drivers than in A2  Roll Eyes
   
100% true.
In fact very simple.
Thank you very much developers A2!  Grin
Logged
Pat
Jr. Member
**
Posts: 69


« Reply #8 on: November 21, 2008, 09:28:52 PM »

Oberon script examples:
Firefox with Firebug says that Oberon.js is erroneous because OutStream (occuring in Oberon.js) is unknown, and in Sage's example, m2 is unknown.
Any successful examples of Oberon Script with Firefox ?
Greetings
Pat
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #9 on: November 21, 2008, 11:45:33 PM »

Hmm ... I have everything works ...
I checked in:
FireFox 3.0.4
IE6
GoogleChrome 0.3.154.9
ScreenShorts added

PS: Page for test and download http://a2os.org.ua/OberonScript/test.html


* FireFox.png (29.25 KB, 731x452 - viewed 834 times.)

* IE.png (30.97 KB, 605x415 - viewed 926 times.)

* chrome.png (21.2 KB, 542x321 - viewed 929 times.)
Logged
Dave
Newbie
*
Posts: 9


« Reply #10 on: November 21, 2008, 11:56:57 PM »

Hi everyone,

Thanks for all your valuable input, I was a bit dispondant after masta's posting thinking that my intended projects
were not do-able in A2, but you've given me renewed hope  Cheesy

I've been studing the serverstate.ssmp file and see that server variables are written as &&Server.<something>
or &&System.<something>

Are there any restrictions on &&System calls?

The reason I ask is that I intend to get the PC with A2 loaded on it to control external hardware via either
the LPT or USB ports (hence my question on Usb drivers) which will be invoked via a web page running under the A2 web server.
Security is not an issue as the network will be a private one with no path to the outside world.

As an interesting side note, I see that www.bluebottle.ethz.ch is running Aos HTTP Server/0.3a
whilst www.oberon.ethz.ch and www.ocp.inf.ethz.ch are running Apache under Linux.   Shocked

Dave.
Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #11 on: November 25, 2008, 03:16:39 PM »

Quote
Are there any restrictions on &&System calls?
Only procedures with the signature PROCEDURE SomeName(VAR request : WebHTTP.RequestHeader; VAR in : Streams.Reader; VAR out : Streams.Writer) can be called. Also, they have to be registered using the procedure WebSSMPPlugin.RegisterMethod. See WebDefaultSSMP.Install for an example. This means you have to write wrapper procedures. For this wrapper procedures, there are no restrictions - you can do/access whatever you want.

Quote
As an interesting side note, I see that www.bluebottle.ethz.ch is running Aos HTTP Server/0.3a
whilst www.oberon.ethz.ch and www.ocp.inf.ethz.ch are running Apache under Linux.   
www.oberon.ethz.ch is managed by different persons and uses a CMS, www.ocp.inf.ethz.ch uses PHP, so the Aos HTTP Server is not an option.
Logged
Dave
Newbie
*
Posts: 9


« Reply #12 on: November 26, 2008, 11:20:31 PM »

Thanks Sven.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!