Determine port connections between components at runtime

Does anyone know if there's a good way to determine the input / output port
connections between RTT components given either their names or pointers?

I can see how to get the list of port interfaces for a component, but I
couldn't find a way to determine their direction.

Thanks!
-jon

Determine port connections between components at runtime

Is the only option (in the context of c++) to attempt a dynamic cast and
catch the exceptions?
On Jul 28, 2013 8:02 PM, "Jonathan Bohren" <jonathan [dot] bohren [..] ...>
wrote:

> Does anyone know if there's a good way to determine the input / output
> port connections between RTT components given either their names or
> pointers?
>
> I can see how to get the list of port interfaces for a component, but I
> couldn't find a way to determine their direction.
>
> Thanks!
> -jon
>

Determine port connections between components at runtime

On Mon, Jul 29, 2013 at 3:27 AM, Jonathan Bohren
<jonathan [dot] bohren [..] ...>wrote:

> Is the only option (in the context of c++) to attempt a dynamic cast and
> catch the exceptions?
>
Hey Jon,

task_context->getPort(name) returns a pointer to a PortInterface, which
exposes the getTypeInfo() method. The type info might provide enough to do
what you want [1], it even has methods for downcasting to input/output
ports.

[1]
http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...

> On Jul 28, 2013 8:02 PM, "Jonathan Bohren" <jonathan [dot] bohren [..] ...>
> wrote:
>
>> Does anyone know if there's a good way to determine the input / output
>> port connections between RTT components given either their names or
>> pointers?
>>
>> I can see how to get the list of port interfaces for a component, but I
>> couldn't find a way to determine their direction.
>>
>> Thanks!
>> -jon
>>
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
>

Determine port connections between components at runtime

Hi,

I made a plugin to create a diagram over all my deplyoed components and
their connections. I have attached it to the mail. Load it in the
deplyoer and call generatePortDiagram. The it should generate a file
called peer-graph.gv. Use dot to convert it to a image (dot -Tpng
-otest-kim.png peer-graph.gv).

You can have a look at the code to find the code to determine
connections and their type.

Kim

On 07/30/2013 12:28 PM, Adolfo Rodríguez Tsouroukdissian wrote:
>
>
>
> On Mon, Jul 29, 2013 at 3:27 AM, Jonathan Bohren
> <jonathan [dot] bohren [..] ... <mailto:jonathan [dot] bohren [..] ...>> wrote:
>
> Is the only option (in the context of c++) to attempt a dynamic
> cast and catch the exceptions?
>
> Hey Jon,
>
> task_context->getPort(name) returns a pointer to a PortInterface,
> which exposes the getTypeInfo() method. The type info might provide
> enough to do what you want [1], it even has methods for downcasting to
> input/output ports.
>
> [1]
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>
>
> On Jul 28, 2013 8:02 PM, "Jonathan Bohren"
> <jonathan [dot] bohren [..] ... <mailto:jonathan [dot] bohren [..] ...>> wrote:
>
> Does anyone know if there's a good way to determine the input
> / output port connections between RTT components given either
> their names or pointers?
>
> I can see how to get the list of port interfaces for a
> component, but I couldn't find a way to determine their
> direction.
>
> Thanks!
> -jon
>
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> <mailto:Orocos-Users [..] ...>
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
>
>
>

Determine port connections between components at runtime

2013/7/30 Kim Mathiassen <kimmat [..] ...>

> Hi,
>
> I made a plugin to create a diagram over all my deplyoed components and
> their connections. I have attached it to the mail. Load it in the deplyoer
> and call generatePortDiagram. The it should generate a file called
> peer-graph.gv. Use dot to convert it to a image (dot -Tpng -otest-kim.png
> peer-graph.gv).
>
> You can have a look at the code to find the code to determine connections
> and their type.
>
> Kim
>
>
> On 07/30/2013 12:28 PM, Adolfo Rodríguez Tsouroukdissian wrote:
>
>
>
>
> On Mon, Jul 29, 2013 at 3:27 AM, Jonathan Bohren <
> jonathan [dot] bohren [..] ...> wrote:
>
>> Is the only option (in the context of c++) to attempt a dynamic cast and
>> catch the exceptions?
>>
> Hey Jon,
>
> task_context->getPort(name) returns a pointer to a PortInterface, which
> exposes the getTypeInfo() method. The type info might provide enough to do
> what you want [1], it even has methods for downcasting to input/output
> ports.
>
> [1]
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>
>
>> On Jul 28, 2013 8:02 PM, "Jonathan Bohren" <jonathan [dot] bohren [..] ...>
>> wrote:
>>
>>> Does anyone know if there's a good way to determine the input / output
>>> port connections between RTT components given either their names or
>>> pointers?
>>>
>>> I can see how to get the list of port interfaces for a component, but I
>>> couldn't find a way to determine their direction.
>>>
>>> Thanks!
>>> -jon
>>>
>>
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>
>>
>
>
> --
> Adolfo Rodríguez Tsouroukdissian
> Senior robotics engineer
> adolfo [dot] rodriguez [..] ...
> http://www.pal-robotics.com
>
> PAL ROBOTICS S.L
> c/ Pujades 77-79, 4º4ª
> 08005 Barcelona, Spain.
> Tel. +34.93.414.53.47
> Fax.+34.93.209.11.09
> Skype: adolfo.pal-robotics
> Facebook <http://www.facebook.com/palrobotics1> - Twitter<http://twitter.com/#%21/palrobotics>- PAL
> Robotics YouTube Channel <http://www.youtube.com/user/PALRobotics>
>
> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
> contener información privilegiada y/o confidencial que está dirigida
> exclusivamente a su destinatario. Si usted recibe este mensaje y no es el
> destinatario indicado, o el empleado encargado de su entrega a dicha
> persona, por favor, notifíquelo inmediatamente y remita el mensaje original
> a la dirección de correo electrónico indicada. Cualquier copia, uso o
> distribución no autorizados de esta comunicación queda estrictamente
> prohibida.
>
> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may
> contain confidential information which is privileged and intended only for
> the individual or entity to whom they are addressed. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution or use of this e-mail and/or accompanying document(s) is
> strictly prohibited. If you have received this e-mail in error, please
> immediately notify the sender at the above e-mail address.
>
>
>
> Do you know about that :
https://gitorious.org/rtt_dot_service/rtt_dot_service
?

You seemed to have recoded something "existing".

Does anything like this also exists in rock ?

>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
>

Determine port connections between components at runtime

On 07/30/2013 03:43 PM, Willy Lambert wrote:
> Does anything like this also exists in rock ?
>
AFAIK, the rtt_dot_service only works for (1) deployments that are
heavily using peers and (2) in-process communication. If you use
multi-process, you are on your own. Since, in Rock, multi-process is the
rule and not the exception, we don't use rtt_dot_service.

When using Ruby scripts to deploy the system(s) in rock, you don't have
an equivalent. Of course, your script is showing you your connection
graphs. Since we limit scripting for simple networks, that does the trick.

For more complex systems, syskit allows you to design your networks
offline and displays them graphically. It also logs modifications to the
connection graph in realtime, allowing you to display it afterwards. It
can do that because it *is* controlling the graph (i.e. it does not
query RTT, it logs instead which modifications it applies to the graph,
and verifies that RTT applies them by checking the return values to
connect_to). I have to work on integrating the live display with the
rest of syskit's live display as well.

Determine port connections between components at runtime

Hi,

I know. Unfortunately I found it after coding my own, but thanks for the
info.

Kim

On 07/30/2013 03:43 PM, Willy Lambert wrote:
>
>
>
> 2013/7/30 Kim Mathiassen <kimmat [..] ... <mailto:kimmat [..] ...>>
>
> Hi,
>
> I made a plugin to create a diagram over all my deplyoed
> components and their connections. I have attached it to the mail.
> Load it in the deplyoer and call generatePortDiagram. The it
> should generate a file called peer-graph.gv. Use dot to convert it
> to a image (dot -Tpng -otest-kim.png peer-graph.gv).
>
> You can have a look at the code to find the code to determine
> connections and their type.
>
> Kim
>
>
> On 07/30/2013 12:28 PM, Adolfo Rodríguez Tsouroukdissian wrote:
>>
>>
>>
>> On Mon, Jul 29, 2013 at 3:27 AM, Jonathan Bohren
>> <jonathan [dot] bohren [..] ... <mailto:jonathan [dot] bohren [..] ...>> wrote:
>>
>> Is the only option (in the context of c++) to attempt a
>> dynamic cast and catch the exceptions?
>>
>> Hey Jon,
>>
>> task_context->getPort(name) returns a pointer to a PortInterface,
>> which exposes the getTypeInfo() method. The type info might
>> provide enough to do what you want [1], it even has methods for
>> downcasting to input/output ports.
>>
>> [1]
>> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>>
>>
>> On Jul 28, 2013 8:02 PM, "Jonathan Bohren"
>> <jonathan [dot] bohren [..] ...
>> <mailto:jonathan [dot] bohren [..] ...>> wrote:
>>
>> Does anyone know if there's a good way to determine the
>> input / output port connections between RTT components
>> given either their names or pointers?
>>
>> I can see how to get the list of port interfaces for a
>> component, but I couldn't find a way to determine their
>> direction.
>>
>> Thanks!
>> -jon
>>
>>
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> <mailto:Orocos-Users [..] ...>
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>
>>
>>
>>
>> --
>> Adolfo Rodríguez Tsouroukdissian
>> Senior robotics engineer
>> adolfo [dot] rodriguez [..] ...
>> <mailto:adolfo [dot] rodriguez [..] ...>
>> http://www.pal-robotics.com <http://www.pal-robotics.com/>
>>
>> PAL ROBOTICS S.L
>> c/ Pujades 77-79, 4º4ª
>> 08005 Barcelona, Spain.
>> Tel. +34.93.414.53.47 <tel:%2B34.93.414.53.47>
>> Fax.+34.93.209.11.09 <tel:%2B34.93.209.11.09>
>> Skype: adolfo.pal-robotics
>> Facebook <http://www.facebook.com/palrobotics1> - Twitter
>> <http://twitter.com/#%21/palrobotics> - PAL Robotics YouTube
>> Channel <http://www.youtube.com/user/PALRobotics>
>>
>> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos
>> adjuntos, pueden contener información privilegiada y/o
>> confidencial que está dirigida exclusivamente a su destinatario.
>> Si usted recibe este mensaje y no es el destinatario indicado, o
>> el empleado encargado de su entrega a dicha persona, por favor,
>> notifíquelo inmediatamente y remita el mensaje original a la
>> dirección de correo electrónico indicada. Cualquier copia, uso o
>> distribución no autorizados de esta comunicación queda
>> estrictamente prohibida.
>>
>> CONFIDENTIALITY NOTICE: This e-mail and the accompanying
>> document(s) may contain confidential information which is
>> privileged and intended only for the individual or entity to whom
>> they are addressed. If you are not the intended recipient, you
>> are hereby notified that any disclosure, copying, distribution or
>> use of this e-mail and/or accompanying document(s) is strictly
>> prohibited. If you have received this e-mail in error, please
>> immediately notify the sender at the above e-mail address.
>>
>>
>
> Do you know about that :
> https://gitorious.org/rtt_dot_service/rtt_dot_service
> ?
>
> You seemed to have recoded something "existing".
>
> Does anything like this also exists in rock ?
>
>
>
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> <mailto:Orocos-Users [..] ...>
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
>

Determine port connections between components at runtime

Yeah, it looks like rtt_dot_service is also using dynamic_cast to do this,
and just checking if the result is null.

Thanks!
On Jul 30, 2013 9:43 AM, "Willy Lambert" <lambert [dot] willy [..] ...> wrote:

>
>
>
> 2013/7/30 Kim Mathiassen <kimmat [..] ...>
>
>> Hi,
>>
>> I made a plugin to create a diagram over all my deplyoed components and
>> their connections. I have attached it to the mail. Load it in the deplyoer
>> and call generatePortDiagram. The it should generate a file called
>> peer-graph.gv. Use dot to convert it to a image (dot -Tpng -otest-kim.png
>> peer-graph.gv).
>>
>> You can have a look at the code to find the code to determine connections
>> and their type.
>>
>> Kim
>>
>>
>> On 07/30/2013 12:28 PM, Adolfo Rodríguez Tsouroukdissian wrote:
>>
>>
>>
>>
>> On Mon, Jul 29, 2013 at 3:27 AM, Jonathan Bohren <
>> jonathan [dot] bohren [..] ...> wrote:
>>
>>> Is the only option (in the context of c++) to attempt a dynamic cast and
>>> catch the exceptions?
>>>
>> Hey Jon,
>>
>> task_context->getPort(name) returns a pointer to a PortInterface, which
>> exposes the getTypeInfo() method. The type info might provide enough to do
>> what you want [1], it even has methods for downcasting to input/output
>> ports.
>>
>> [1]
>> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>>
>>
>>> On Jul 28, 2013 8:02 PM, "Jonathan Bohren" <jonathan [dot] bohren [..] ...>
>>> wrote:
>>>
>>>> Does anyone know if there's a good way to determine the input / output
>>>> port connections between RTT components given either their names or
>>>> pointers?
>>>>
>>>> I can see how to get the list of port interfaces for a component, but I
>>>> couldn't find a way to determine their direction.
>>>>
>>>> Thanks!
>>>> -jon
>>>>
>>>
>>> --
>>> Orocos-Users mailing list
>>> Orocos-Users [..] ...
>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>>
>>>
>>
>>
>> --
>> Adolfo Rodríguez Tsouroukdissian
>> Senior robotics engineer
>> adolfo [dot] rodriguez [..] ...
>> http://www.pal-robotics.com
>>
>> PAL ROBOTICS S.L
>> c/ Pujades 77-79, 4º4ª
>> 08005 Barcelona, Spain.
>> Tel. +34.93.414.53.47
>> Fax.+34.93.209.11.09
>> Skype: adolfo.pal-robotics
>> Facebook <http://www.facebook.com/palrobotics1> - Twitter<http://twitter.com/#%21/palrobotics>- PAL
>> Robotics YouTube Channel <http://www.youtube.com/user/PALRobotics>
>>
>> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
>> contener información privilegiada y/o confidencial que está dirigida
>> exclusivamente a su destinatario. Si usted recibe este mensaje y no es el
>> destinatario indicado, o el empleado encargado de su entrega a dicha
>> persona, por favor, notifíquelo inmediatamente y remita el mensaje original
>> a la dirección de correo electrónico indicada. Cualquier copia, uso o
>> distribución no autorizados de esta comunicación queda estrictamente
>> prohibida.
>>
>> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may
>> contain confidential information which is privileged and intended only for
>> the individual or entity to whom they are addressed. If you are not the
>> intended recipient, you are hereby notified that any disclosure, copying,
>> distribution or use of this e-mail and/or accompanying document(s) is
>> strictly prohibited. If you have received this e-mail in error, please
>> immediately notify the sender at the above e-mail address.
>>
>>
>>
>> Do you know about that :
> https://gitorious.org/rtt_dot_service/rtt_dot_service
> ?
>
> You seemed to have recoded something "existing".
>
> Does anything like this also exists in rock ?
>
>
>
>>
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>
>>
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
>