LuaRPC and Lua Shell in parallel

classic Classic list List threaded Threaded
4 messages Options
Markus Korber Markus Korber
Reply | Threaded
Open this post in threaded view
|

LuaRPC and Lua Shell in parallel

Hi,

is it somehow possible to use luarpc and a standard Lua shell at the
same time on two different physical UART ports?  If I start the RPC
server in the Lua shell (rpc.server()) it blocks the shell forever.
However, I'd like to use the shell normally in addition to doing RPC
calls from the PC.

Thanks for your help!

Regards,
Markus Korber
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: LuaRPC and Lua Shell in parallel

Hi,

On Wed, Dec 14, 2011 at 5:07 PM, Markus Korber <[hidden email]> wrote:
Hi,

is it somehow possible to use luarpc and a standard Lua shell at the
same time on two different physical UART ports?  If I start the RPC
server in the Lua shell (rpc.server()) it blocks the shell forever.
However, I'd like to use the shell normally in addition to doing RPC
calls from the PC.

That is not possible at the moment. It could be implemented, but it may lead to some interesting concurrency problems :)

Best,
Bogdan
 

Thanks for your help!

Regards,
Markus Korber
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Thiago Naves Thiago Naves
Reply | Threaded
Open this post in threaded view
|

Re: LuaRPC and Lua Shell in parallel

You may wanna have a look at the rpc.peek / rpc.listen / rpc.dispatch functions:
http://www.eluaproject.net/doc/v0.8/en_refman_gen_rpc.html

You'll not be able to use that with the shell but you can have an application running and send rpc commands at the same time...


Best,
Thiago



On Wed, Dec 14, 2011 at 1:14 PM, Bogdan Marinescu <[hidden email]> wrote:
Hi,

On Wed, Dec 14, 2011 at 5:07 PM, Markus Korber <[hidden email]> wrote:
Hi,

is it somehow possible to use luarpc and a standard Lua shell at the
same time on two different physical UART ports?  If I start the RPC
server in the Lua shell (rpc.server()) it blocks the shell forever.
However, I'd like to use the shell normally in addition to doing RPC
calls from the PC.

That is not possible at the moment. It could be implemented, but it may lead to some interesting concurrency problems :)

Best,
Bogdan
 

Thanks for your help!

Regards,
Markus Korber
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev<span onmouseout="cancel = false; window.setTimeout(WRCHideContent, 1000); clearTimeout(showTimer);" onmouseover=" var self = this; showTimer = window.setTimeout(function(){WRCShowContent({&#39;rating&#39;:{&#39;value&#39;:100,&#39;weight&#39;:13},&#39;flags&#39;:{},&#39;single&#39;:false,&#39;ttl&#39;:3600,&#39;expireTime&#39;:&#39;20111128171534&#39;}, self.className)},600);" class="wrc11" style="padding-right:16px;width:16px;height:16px">


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev<span onmouseout="cancel = false; window.setTimeout(WRCHideContent, 1000); clearTimeout(showTimer);" onmouseover=" var self = this; showTimer = window.setTimeout(function(){WRCShowContent({&#39;rating&#39;:{&#39;value&#39;:100,&#39;weight&#39;:13},&#39;flags&#39;:{},&#39;single&#39;:false,&#39;ttl&#39;:3600,&#39;expireTime&#39;:&#39;20111128171534&#39;}, self.className)},600);" class="wrc11" style="padding-right:16px;width:16px;height:16px">



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: LuaRPC and Lua Shell in parallel

On Wed, Dec 14, 2011 at 12:19 PM, Thiago Naves <[hidden email]> wrote:
> You may wanna have a look at the rpc.peek / rpc.listen / rpc.dispatch
> functions:
> http://www.eluaproject.net/doc/v0.8/en_refman_gen_rpc.html
>
> You'll not be able to use that with the shell but you can have an
> application running and send rpc commands at the same time...

One could modify the shell to be non-blocking and have a common
dispatcher handle input when its ready for either RPC or a shell
command, but as bogdan mentions there could be some complexities to
handle.

>
>
> Best,
> Thiago
>
>
>
>
> On Wed, Dec 14, 2011 at 1:14 PM, Bogdan Marinescu
> <[hidden email]> wrote:
>>
>> Hi,
>>
>> On Wed, Dec 14, 2011 at 5:07 PM, Markus Korber <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> is it somehow possible to use luarpc and a standard Lua shell at the
>>> same time on two different physical UART ports?  If I start the RPC
>>> server in the Lua shell (rpc.server()) it blocks the shell forever.
>>> However, I'd like to use the shell normally in addition to doing RPC
>>> calls from the PC.
>>
>>
>> That is not possible at the moment. It could be implemented, but it may
>> lead to some interesting concurrency problems :)
>>
>> Best,
>> Bogdan
>>
>>>
>>>
>>> Thanks for your help!
>>>
>>> Regards,
>>> Markus Korber
>>> _______________________________________________
>>> eLua-dev mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>
>>
>>
>> _______________________________________________
>> eLua-dev mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev