Re: [Gnoga-list] justGage plugin is there !
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 !
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
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
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
Re: [Gnoga-list] justGage
> 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
[Gnoga-list] justGage
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