[orocosusers] Get port value in deploy script


If you want to access the last value of an output port of a component in
your deploy script (let's say you need it in your FSM), how would you do it?
I only know of two options:

1 - If you are using rttlua, make a clone of the port

cloned_port = rttlib.port_clone_conn(component:getPort("output_port"))

and then call read on this new port. Maybe some would call it madness. ;-)

- Another option would be to make an operation inside the component which
returns the last value written on the output port.

Regardless of the concerns about timing sort of issues,
- Is there a difference between these two methods, performance-wise?
- Which one is more efficient? Data on the port could be a simple integer,
double, or any other object.
- Which one would you recommend? Maybe you even know a much better way...


Kind regards,
Keivan Zavari