[openrtm-users 01220] Re: Howto check for data port buffer full error

Ando Noriaki n-ando @ aist.go.jp
2010年 5月 18日 (火) 13:59:49 JST


Dear Steffen-san

Please use new callbacks defined in ConnectorListener.h in that case.
Two types of callback (listener) are provided in this scheme.  One is
ConnectorDataListener, which receives data from somewhere, and other
is ConnectorListener, which does not receive any data.

ConnecotrDataListener is as follows.
   * - ON_BUFFER_WRITE:          At the time of buffer write
   * - ON_BUFFER_FULL:           At the time of buffer full
   * - ON_BUFFER_WRITE_TIMEOUT:  At the time of buffer write timeout
   * - ON_BUFFER_OVERWRITE:      At the time of buffer overwrite
   * - ON_BUFFER_READ:           At the time of buffer read
   * - ON_SEND:                  At the time of sending to InPort
   * - ON_RECEIVED:              At the time of finishing sending to InPort
   * - ON_RECEIVER_FULL:         At the time of bufferfull of InPort
   * - ON_RECEIVER_TIMEOUT:      At the time of timeout of InPort
   * - ON_RECEIVER_ERROR:        At the time of error of InPort

ConnectorListener is as follows.
   * - ON_BUFFER_EMPTY:       At the time of buffer empty
   * - ON_BUFFER_READTIMEOUT: At the time of buffer read timeout
   * - ON_BUFFER_EMPTY:       At the time of empty of OutPort
   * - ON_SENDER_TIMEOUT:     At the time of timeout of OutPort
   * - ON_SENDER_ERROR:       At the time of error of OutPort
   * - ON_CONNECT:            At the time of connection
   * - ON_DISCONNECT:         At the time of disconnection

However, ON_BUFFER_FULL and other _FULL callbacks are never called by
default.  Because overwrite mode is enabled in the default ring
buffer.  So DataPort never returns buffer-full error.

RTSystemEditor, which will be released soon, will provide
functionality in order to specify detail DataPort connector's
properties.

Please newest version of RTsystemEditor from
http://www.openrtm.org/pub/OpenRTM-aist/dailybuild/tools/1.0.0/rtmtools-r114-1005061834.zip
and try it.


Best regards,
Noriaki Ando


2010/4/27 Steffen Wittmeier <wittmeis @ in.tum.de>:
> Hi,
>
> I was looking for the onOverflow callback method as I know it from OpenRTM
> 0.42 but I could not find it in version 1.0. Did it move to some other
> class?
>
> Maybe I will try the 2nd option using the connectors in the meantime.
>
>
> Steffen
>
> On 04/27/2010 12:28 AM, Geoffrey Biggs wrote:
>>
>> One possibility is using the OnOverflow callback on your port. When a
>> buffer overflow occurs, this callback should be called. You can register
>> a functor to this callback for the port in your component.
>>
>> Aside from that, it's possible the status is not being propagated
>> correctly. The buffer is not held directly in the port object. It is
>> held in the connection between the two ports - think of it as the buffer
>> floating in the ether mystically. You could try exposing the connectors
>> and checking their status directly to see if it's being propagated
>> properly.
>>
>> Geoff
>>
>> On 26/04/10 22:17, Steffen Wittmeier wrote:
>>>
>>> Hi,
>>>
>>> how can I check whether a data port buffer is full and sleep for a retry?
>>>
>>> I tried to get the DataPortStatusList and iterated over the list to
>>> check the individual status. However, I always received PORT_OK, even
>>> when the buffer must have been full as I did not receive all data on the
>>> other end of the connection. I also received PORT_OK when there was no
>>> connection between the provider and the consumer data port.
>>>
>>> Any help is appreciated.
>>>
>>>
>>> Cheers
>>> Steffen Wittmeier
>>>
>>>
>>
>
>



-- 
安藤慶昭@独立行政法人産業技術総合研究所 知能システム研究部門
    統合知能研究グループ 主任研究員, 博士(工学)
    〒305-8568 つくば市梅園1-1-1 中央第2
    e-mail: n-ando @ aist.go.jp, web: http://staff.aist.go.jp/n-ando
    OpenRTM-aist: http://www.openrtm.org

Noriaki Ando, Ph.D.
    Senior Research Scientist, RT-Synthesis R.G., ISRI, AIST
    AIST Tsukuba Central 2, Tsukuba, Ibaraki 305-8568 JAPAN
    e-mail: n-ando @ aist.go.jp, web: http://staff.aist.go.jp/n-ando
    OpenRTM-aist: http://www.openrtm.org
-------------- next part --------------
テキスト形式以外の添付ファイルを保管しました...
ファイル名: DataPortConnection.png
型:         image/png
サイズ:     12443 バイト
説明:       無し
URL:        <http://www.openrtm.org/pipermail/openrtm-users/attachments/20100518/8af273f0/attachment-0001.png>


openrtm-users メーリングリストの案内