Add new port commands

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Add new port commands

Nghiem Xuan Truong
Hi all,

I am a newbie to YARP.  From the documentation, I know that ports can receive commands (http://wiki.icub.org/yarpdoc/yarp_protocol.html, when a flag CHAR is not ‘d').  A few commands are already defined by YARP, e.g. /, !, ~.  Can I add a new port command without having to change the YARP source code and recompile everything?

To give the context, I’m building a domain-specific framework on top of YARP, and would like ports to exchange several system commands.  Of course, I can define a data message that embed the system command, but the solution would be cleaner and safer if the system commands could be hidden from the users.  That’s why I want new port commands.

Thanks.
--
Truong (Tim) Nghiem
[hidden email]




------------------------------------------------------------------------------
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Add new port commands

paulfitz
Administrator
Hi Truong,

The YARP administrative interface is close to what you want.  It
duplicates the lower level commands you already found, and is easier to
add commands to:

   http://wiki.icub.org/yarpdoc/port_admin.html

You can currently send admin messesages by calling setAdminMode(true) on
a port and using the normal write commands. However, there's no way to
catch those messages currently without modifying YARP (specifically the
PortCore::adminBlock method).  If you open an issue I'd be happy to help
with adding a callback for this -

   https://github.com/robotology/yarp/issues/new

Cheers,
Paul

On 08/13/2014 01:31 PM, Nghiem Xuan Truong wrote:

> Hi all,
>
> I am a newbie to YARP.  From the documentation, I know that ports can receive commands (http://wiki.icub.org/yarpdoc/yarp_protocol.html, when a flag CHAR is not ‘d').  A few commands are already defined by YARP, e.g. /, !, ~.  Can I add a new port command without having to change the YARP source code and recompile everything?
>
> To give the context, I’m building a domain-specific framework on top of YARP, and would like ports to exchange several system commands.  Of course, I can define a data message that embed the system command, but the solution would be cleaner and safer if the system commands could be hidden from the users.  That’s why I want new port commands.
>
> Thanks.
> --
> Truong (Tim) Nghiem
> [hidden email]
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Robotcub-hackers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/robotcub-hackers


------------------------------------------------------------------------------
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Add new port commands

Nghiem Xuan Truong
Hi Paul,

I opened an issue on github for this: https://github.com/robotology/yarp/issues/215.  Thanks for your help!

Best,
--
Truong (Tim) Nghiem
[hidden email]


On 13 Aug 2014, at 15:48, Paul Fitzpatrick <[hidden email]> wrote:

> Hi Truong,
>
> The YARP administrative interface is close to what you want.  It
> duplicates the lower level commands you already found, and is easier to
> add commands to:
>
>   http://wiki.icub.org/yarpdoc/port_admin.html
>
> You can currently send admin messesages by calling setAdminMode(true) on
> a port and using the normal write commands. However, there's no way to
> catch those messages currently without modifying YARP (specifically the
> PortCore::adminBlock method).  If you open an issue I'd be happy to help
> with adding a callback for this -
>
>   https://github.com/robotology/yarp/issues/new
>
> Cheers,
> Paul
>
> On 08/13/2014 01:31 PM, Nghiem Xuan Truong wrote:
>> Hi all,
>>
>> I am a newbie to YARP.  From the documentation, I know that ports can receive commands (http://wiki.icub.org/yarpdoc/yarp_protocol.html, when a flag CHAR is not ‘d').  A few commands are already defined by YARP, e.g. /, !, ~.  Can I add a new port command without having to change the YARP source code and recompile everything?
>>
>> To give the context, I’m building a domain-specific framework on top of YARP, and would like ports to exchange several system commands.  Of course, I can define a data message that embed the system command, but the solution would be cleaner and safer if the system commands could be hidden from the users.  That’s why I want new port commands.
>>
>> Thanks.
>> --
>> Truong (Tim) Nghiem
>> [hidden email]
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Robotcub-hackers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Robotcub-hackers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/robotcub-hackers


------------------------------------------------------------------------------
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers