Re: Some thoughts on Zephyr Console API


Flavio Santes <flavio.santes@...>
 

Hello Sergio,

Hi Flavio,

I wrote a shell based on the original one that uses a similar philosophy to what Paul is
describing.
This shell is for zephyr.js to be able to update the javascript code dynamically, execute
commands and run JS dynamically.

On this shell you can register callbacks to get the data in raw for later processing
Or just get the raw line so you can do any operation yourself.
https://github.com/jslaunchbox/ihex_uploader/

You can see our use case on this short video working on Arduino 101
https://www.youtube.com/watch?v=L2pF48BOPBc

In the video the shell on the right is the regular shell from Zephyr running in parallel
with the shell to run Javascript commands.
You can see how I evaluate Javascript and run commands on that terminal.
After a quick reading of the git hub repo, it seems you have a very good prototype with a lot of features. So, I wonder if this kind of applications could become a tool for more complex tasks. This use-case is new for me, so perhaps I am missing the big picture here.

The application can register a process to capture data streams and process them in
different ways.

My use case for this is:
Maybe you need a Intel HEX parser...
Maybe you need a JSON parser...
Maybe you want to talk to the Bluetooth interface...
...
So you can register dynamically the callbacks for the parser.

Sergio
Regards,
Flavio

-----Original Message-----
From: Flavio Santes [mailto:flavio.santes´╝áintel.com]
Sent: Wednesday, August 10, 2016 5:13 PM
To: devel(a)lists.zephyrproject.org
Subject: [devel] Re: Re: Re: Some thoughts on Zephyr Console API

Hello Paul,

I was thinking about this a few days ago. It seems fair to ask for that functionality
considering your view points. This feature could be very useful for rapid prototyping,
on-the-fly updates and debugging, as you comment. So, as soon the user base increases, I
think more developers will ask for something similar!

Regards,
Flavio

Join devel@lists.zephyrproject.org to automatically receive all group messages.