[Bug 623] New: DataPort and BufferPort do not cause to emit events when added as EventPort.

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=623>
Summary: DataPort and BufferPort do not cause to emit events when
added as EventPort.
Product: RTT
Version: 1.8.0
Platform: AMD 64bit
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Real-Time Toolkit (RTT)
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

The Event emitting port implementation is incomplete for the DataPort and
BufferPort
classes. The emission of the event is omitted from the Set() and Push()
functions.

The workaround is to use WriteDataPort and WriteBufferPort, which do have the
event
emission.

[Bug 623] DataPort and BufferPort do not cause to emit events wh

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=623>

--- Comment #2 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-26 13:07:26 ---
Another note concerning event based data ports:

Doing multiple start/stop cycles will cause your component to be woken up two,
three,... times for each event port, because the registration is re-done
(accumulates) upon each start(). I'll fix this for 1.8.1 by only registering
during the first start() and add this note to the manual:

"In the current implementation, addEventPort() must happen before you
start() the TaskContext the first time.
Any ports added after your component has been started
the first time will not cause them to wake up your component.
So even stopping and starting wil not solve this. Therefor,
it is recommended to only use addEventPort in your component's
contructor. This issue is being looked at."

The event registration should have happened during configure() and
not during start() in my opinion. This would imply that after addEventPort()
has been used, configure() is mandatory OR that addEventPort does the
event connection setup right away for the TaskContext. Which is probably
the most desirable solution.

[Bug 623] DataPort and BufferPort do not cause to emit events wh

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=623>

Peter Soetens <peter [dot] soetens [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.8.1
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #1 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-26 12:34:47 ---
Fixed and added unit test on svn trunk. I also updated the manual to clarify
the use
of addEventPort vs addPort. It says:

Only ReadDataPort, DataPort, ReadBufferPort and BufferPort added with
addEventPort() will cause your component to be triggered (ie wake up and call
updateHook).
Adding a WriteDataPort or WriteBufferPort with addEventPort() is allowed but
has no influence on the event being emitted or not. The rule of thumb is to
only use addEventPort() for ports which are for reading data, and use addPort()
for ports which are for writing data.

Peter