Re: [Gnoga-list] justGage plugin is there !

2021-12-04 Thread Stéphane LOS

Hello there,

I've played with some more JavaScript libraries in addition to :
https://toorshia.github.io/justgage/

Chart.js :
https://www.chartjs.org/
https://nagix.github.io/chartjs-plugin-streaming/

D3 Liquid Fill Gauge :
http://bl.ocks.org/brattonc/5e5ce9beee483220e2f6/

Apache ECharts :
https://echarts.apache.org/

Please feel free to pick what you want there :
https://gitlab.com/ada-for-automation/ada-for-automation/-/commits/master

These are again small plugins.

There is a live demo here :
https://a4a-k0-s7.demo.ada4automation.org/
https://demo.ada4automation.org/app3.html

Comments and suggestions are welcome as usual.

Stéphane LOS
https://www.ada4automation.org/
Le 15/11/2021 à 23:08, Stéphane LOS a écrit :

Hello there,

This commit has everything in it :
https://gitlab.com/ada-for-automation/ada-for-automation/-/commit/1b62805a77cc486d748e25bf48b2eb02e815ccd4 



Please feel free to pick what you want there.

Comments are welcome of course.

It's a little plugin, sufficient for my use case.
Hope it helps.

There is a live demo here :
https://a4a-k0-s7.demo.ada4automation.org/
https://demo.ada4automation.org/app3.html

Stéphane LOS
https://www.ada4automation.org/



___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list





___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] justGage plugin is there !

2021-11-15 Thread Stéphane LOS

Hello there,

This commit has everything in it :
https://gitlab.com/ada-for-automation/ada-for-automation/-/commit/1b62805a77cc486d748e25bf48b2eb02e815ccd4

Please feel free to pick what you want there.

Comments are welcome of course.

It's a little plugin, sufficient for my use case.
Hope it helps.

There is a live demo here :
https://a4a-k0-s7.demo.ada4automation.org/
https://demo.ada4automation.org/app3.html

Stéphane LOS
https://www.ada4automation.org/



___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] justGage

2021-11-07 Thread Stéphane LOS

Le 02/11/2021 à 23:05, Stéphane LOS a écrit :

Le 31/10/2021 à 10:41, Blady via Gnoga-list a écrit :

Le 26 oct. 2021 à 11:50, Stéphane LOS  a écrit :

Hello there,

justGage in one of the libraries used by the Node-RED Dashboard :
https://flows.nodered.org/node/node-red-dashboard
https://toorshia.github.io/justgage/

It looks pretty simple and it should not be too difficult to create a Gnoga 
plugin but I've looked the other plugins and I miss some guidelines on the low 
level mechanisms of Gnoga.

I won't give up any soon but a little help would be nice.

I'm looking also on adding charting library. justGage is my first attempt.

Hello Stéphane,

That's nice plugin outcome ;-)

There isn't any standalone guidelines but when writing Pixi plugin I was 
inspired by those written by David.

When creating the PIXI plugin I went through the following steps:

First I wrote the complete specification at once, for instance with sprites:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads

The Load_PIXI procedure is used to load the needed stuff for the Javascript 
part of the plugin.
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.ads#l53

The chosen type of your plugin object may be:
- Gnoga.Gui.Base.Base_Type
- Gnoga.Gui.Element.Element_Type
- Gnoga.Gui.View.View_Type
It depends on which set of API you want to inherit to write the implementation 
part of the plugin.

I chose Gnoga.Gui.Element.Element_Type:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.ads#l60
  but it might be Gnoga.Gui.Base.Base_Type:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.ads#l64

Then comes the creation procedure of the GUI 
object.https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads#l70

All specific API subroutines which follow are split in properties:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads#l70
and methods:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads#l264

Let be inspired by your Javascript API:
https://github.com/toorshia/justgage#methods

On the implementation side:
The Load_PIXI procedure is implemented with the plugin script.
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l46

The Create procedure is somewhat special :
- set the object ID with a new one
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l68
- set the connection ID to the window ID (seem not needed with next step)
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l69
- attach the object to message system
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l70
- initialize the object on Javascript side
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l72
- fire the message child added to the parent
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l80

Then implements your API using the ones of Gnoga.

If you want to use the message system, ask me.

HTH, Pascal.
https://blady.pagesperso-orange.fr




___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Hello Pascal,

Thank you very much for your kind support.

I'll dig into this as time permits.

To take a shortcut, if I take this example :
https://toorshia.github.io/justgage/examples/update-object.html

which code is here :
https://github.com/toorshia/justgage/blob/master/docs/examples/update-object.html

I'm wondering how to call :
g1.refresh(myValue)from the Ada side.

Any hint welcome.

Stéphane LOS
https://www.ada4automation.org/



___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Hello there,

Answering myself :

    declare
   Result : String :=
 Gnoga.Server.Connection.Execute_Script
   (ID => App_Data.Main_Window.Connection_ID,
    Script => Escape_Quotes
  ("MW0_Gauge.refresh('"
   & Integer'Image (Integer (Word_To_Int (TestMW0)))
   & "');"));
    begin
   null;
    end;

Works !

Stéphane LOS
https://www.ada4automation.org/
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] justGage

2021-11-02 Thread Stéphane LOS

Le 31/10/2021 à 10:41, Blady via Gnoga-list a écrit :

Le 26 oct. 2021 à 11:50, Stéphane LOS  a écrit :

Hello there,

justGage in one of the libraries used by the Node-RED Dashboard :
https://flows.nodered.org/node/node-red-dashboard
https://toorshia.github.io/justgage/

It looks pretty simple and it should not be too difficult to create a Gnoga 
plugin but I've looked the other plugins and I miss some guidelines on the low 
level mechanisms of Gnoga.

I won't give up any soon but a little help would be nice.

I'm looking also on adding charting library. justGage is my first attempt.


Hello Stéphane,

That's nice plugin outcome ;-)

There isn't any standalone guidelines but when writing Pixi plugin I was 
inspired by those written by David.

When creating the PIXI plugin I went through the following steps:

First I wrote the complete specification at once, for instance with sprites:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads

The Load_PIXI procedure is used to load the needed stuff for the Javascript 
part of the plugin.
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.ads#l53

The chosen type of your plugin object may be:
- Gnoga.Gui.Base.Base_Type
- Gnoga.Gui.Element.Element_Type
- Gnoga.Gui.View.View_Type
It depends on which set of API you want to inherit to write the implementation 
part of the plugin.

I chose Gnoga.Gui.Element.Element_Type:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.ads#l60
  but it might be Gnoga.Gui.Base.Base_Type:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.ads#l64

Then comes the creation procedure of the GUI 
object.https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads#l70

All specific API subroutines which follow are split in properties:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads#l70
and methods:
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi-sprite.ads#l264

Let be inspired by your Javascript API:
https://github.com/toorshia/justgage#methods

On the implementation side:
The Load_PIXI procedure is implemented with the plugin script.
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l46

The Create procedure is somewhat special :
- set the object ID with a new one
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l68
- set the connection ID to the window ID (seem not needed with next step)
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l69
- attach the object to message system
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l70
- initialize the object on Javascript side
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l72
- fire the message child added to the parent
https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/components/pixi/src/gnoga-gui-plugin-pixi.adb#l80

Then implements your API using the ones of Gnoga.

If you want to use the message system, ask me.

HTH, Pascal.
https://blady.pagesperso-orange.fr




___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Hello Pascal,

Thank you very much for your kind support.

I'll dig into this as time permits.

To take a shortcut, if I take this example :
https://toorshia.github.io/justgage/examples/update-object.html

which code is here :
https://github.com/toorshia/justgage/blob/master/docs/examples/update-object.html

I'm wondering how to call :
g1.refresh(myValue)from the Ada side.

Any hint welcome.

Stéphane LOS
https://www.ada4automation.org/
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] justGage

2021-10-26 Thread Stéphane LOS

Hello there,

justGage in one of the libraries used by the Node-RED Dashboard :
https://flows.nodered.org/node/node-red-dashboard
https://toorshia.github.io/justgage/

It looks pretty simple and it should not be too difficult to create a 
Gnoga plugin but I've looked the other plugins and I miss some 
guidelines on the low level mechanisms of Gnoga.


I won't give up any soon but a little help would be nice.

I'm looking also on adding charting library. justGage is my first attempt.

Thanks a lot.

Stéphane LOS
https://www.ada4automation.org/



___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Add mime type svg+xml

2021-10-26 Thread Stéphane LOS

On 25/10/2021 21:31, Blady via Gnoga-list wrote:

Le 4 sept. 2021 à 09:51, Stéphane LOS  a écrit :

Hello there,

Would it be possible to add :

  elsif Ext = "svg" then
 return "image/svg+xml";

to "gnoga-server-mime.adb" please ?

I'm using dev_1.6 branch at the moment for the demos and there are many :
https://ada-for-automation.gitlab.io/ada-for-automation/docu/ReadMe/README.html

So, I would like to stick to this version for now.

Thanks a lot.

Hello Stéphane,

This have been added in mas commit:
https://sourceforge.net/p/gnoga/code/ci/75147ea8875b68ada462a14e13672468b4de8cb2/

As it is a functional change, version was increased on dev_1.7 branch.

Regards, Pascal.
https://blady.pagesperso-orange.fr






___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Hello Pascal,

Fine ! Thanks !

Stéphane LOS
https://www.ada4automation.org/



___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] Add mime type svg+xml

2021-09-04 Thread Stéphane LOS

Hello there,

Would it be possible to add :

  elsif Ext = "svg" then
 return "image/svg+xml";

to "gnoga-server-mime.adb" please ?

I'm using dev_1.6 branch at the moment for the demos and there are many :
https://ada-for-automation.gitlab.io/ada-for-automation/docu/ReadMe/README.html

So, I would like to stick to this version for now.

Thanks a lot.

Stéphane LOS
https://www.ada4automation.org/



___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Gnoga on Raspberry Pi 1 Model B+

2017-03-11 Thread Stéphane LOS

Le 08/03/2017 à 11:59, stephane@laposte.net a écrit :

Hello Tony,

I have tried assigning apache2 port 8080 on raspbian and it works also.
So I don't think it is related to port number or firewall.


*De: *"tony gair" 
*À: *"Gnoga support list" 
*Envoyé: *Mercredi 8 Mars 2017 09:58:41
*Objet: *Re: [Gnoga-list] Gnoga on Raspberry Pi 1 Model B+

oh I'll take a look laater on


On Tue, Mar 7, 2017 at 10:46 PM, LOS Stéphane 
mailto:stephane@laposte.net>> wrote:


Thanks for the answer but iptables config is empty. Should not
block any connection as far as I can tell.

Cordialement,
Stéphane LOS

Le 07/03/2017 à 23:35, tony gair a écrit :

I know for a fact gnoga works fine on raspbian. Its probably a
firewall setting.

On Tue, Mar 7, 2017 at 9:47 PM, LOS Stéphane
mailto:stephane@laposte.net>>
wrote:

Hello there,

I am using this Raspberry Pi 1 Model B+:
https://www.raspberrypi.org/products/model-b-plus/

It runs Raspbian Jessie up to date and I have used git to
get a fresh
Gnoga to play with.

I have issued command "make release", and after some hours
got it compiled.
Then "sudo su", "make install" and after some more time
got it installed.

Trying to compile "Ada for Automation" works also but the
applications
fail to answer to http requests although they run fine for
what I can
tell. Of course, I have some other targets, PC based
Debian, where there
is not such problem.

One can even play with :
http://ada4automation.slo-ist.fr/

I have compiled the first tutorial fine and it runs BUT it
does not
respond as well to http requests.

It says the usual stuff about directories and waits on
port 8080.

The Firefox on my PC complains that the connection is
reinitialized.

Wireshark running on the PC sees the connection, the http
request and
the closing of the connection from Raspberry Pi side.

Of course, I can ping the Pi, the Modbus TCP connection
works as
expected, and Apache can serve pages on port 80.

So only Gnoga / Simple Components seem to have some kind
of problem. Any
idea ?

Thanks for your hard work and kind support.

        --
Best Regards,
Cordialement,
Stéphane LOS
http://slo-ist.fr/ada4autom



Hello there,

Since "Gnoga" uses "Simple Components" and this one has tests available 
I have compiled and run "test_http_server" and got the log file attached 
which may shed some light on the problem I'm facing on the Raspberry Pi.


It looks like some parts of the request are lost somewhere since it says :
192.168.0.206:52790 > |GET / HTTP/1.1%0D%0AHost: 
192.168.0.252:8080%0D%0AUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; 
rv:51.0) Gecko/20100101 Firefox/51.0%0D%0AAccept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8%0D%0AAccept-Language: 
fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3%0D%0AAccept-Encoding: gzip, 
deflate%0D%0AConnection: keep-alive%0D%0AUpgrade-Insecure-Requests: 
1%0D%0AIf-Modified-Since: Tue, 07 Mar 2017 10:53:47 
GMT%0D%0AIf-None-Match: "29cd-54a21d3953252-gzip"%0D%0ACache-Control: 
max-age=0%0D%0A%0D%0A| 0..460

Processing received: Exception name: ADA.IO_EXCEPTIONS.DATA_ERROR
Message: Method / is not supported

where there are 4 NUL characters in :
Message: Method NULNULNULNUL/ is not supported

Anyone else running "Gnoga" or "Simple Components" on Raspberry Pi 1 
Model B+ / Debian Jessie ?


BR,
Stéphane
http://slo-ist.fr/ada4autom
HTTP server started
192.168.0.206:52790 > |GET / HTTP/1.1%0D%0AHost: 
192.168.0.252:8080%0D%0AUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; 
rv:51.0) Gecko/20100101 Firefox/51.0%0D%0AAccept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8%0D%0AAccept-Language:
 fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3%0D%0AAccept-Encoding: gzip, 
deflate%0D%0AConnection: keep-alive%0D%0AUpgrade-Insecure-Requests: 
1%0D%0AIf-Modified-Since: Tue, 07 Mar 2017 10:53:47 GMT%0D%0AIf-None-Match: 
"29cd-54a21d3953252-gzip"%0D%0ACache-Control: max-age=0%0D%0A%0D%0A| 0..460
Processing received: Exception name: ADA.IO_EXCEPTIONS.DATA_ERROR
Message: Method / is not supported

192.168.0.206:52790 < --- Stop polling, dropping connection
192.168.0.206:52791 > |GET / HTTP/1.1%0D%0AHost: 
192.168.0.252:8080%0D%0AUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; 
rv:51.0