Problems with transport kit implementation

Hi orocos developers,

I'm having some problems with my ros transport implementation.

The most important part of the code is attached. I'm counting on the fact that
ChannelElement<T>::signal() is being called to let my ChannelElement know that
there is new data. But apparently this function is not being called when new
data is being written on the port. I've been looking to the code but do not
find the place where signal is being called in the OutputPort.write channel
chain.

Can I rely on the signal() function, or should I rely on the
ChannelElement<T>::write function?

Ruben

AttachmentSize
ros_msg_transporter.hpp5.38 KB

Problems with transport kit implementation

On Thursday 09 September 2010 20:52:05 Ruben Smits wrote:
> Hi orocos developers,
>
> I'm having some problems with my ros transport implementation.
>
> The most important part of the code is attached. I'm counting on the fact
> that ChannelElement<T>::signal() is being called to let my ChannelElement
> know that there is new data. But apparently this function is not being
> called when new data is being written on the port. I've been looking to
> the code but do not find the place where signal is being called in the
> OutputPort.write channel chain.
>
> Can I rely on the signal() function, or should I rely on the
> ChannelElement<T>::write function?

A write() becomes a signal() after a storage object has been encountered, ie
the classes ChannelDataElement and ChannelBufferElement store the result of the
write() and call signal().

If you rely on signal, it means you need an storage object before your code in
your channel-element chain.

Peter