[Bug 511] New: Error when creating TimerComponent

For more infomation about this bug, visit
Summary: Error when creating TimerComponent
Product: OCL
Version: 1.4.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Timer
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...
Estimated Hours: 0.0

Created an attachment (id=234)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=234)
renames isActive to isArmed in scripting interface.

When a TimerComponent is created, the method interface complains with:

2.804 [ ERROR ][MethodRepository] Failed to addMethod: 'isActive' already
added.

bool Timer::isActive(TimerId id) checks if a timer with id has been armed,
while bool TaskContext::isActive() checks the state of the Taskcontext. The
Timer's method could be renamed to isArmed(TimerId id).

The isActive name comes from the RTT::Timer class (RTT 1.4). That name should
be deprecated and replaced by isArmed (RTT 1.6)

A fast-fix (OCL 1.4.1) is by registering the method isActive as isArmed in the
MethodRepository, such that it becomes available.

[Bug 511] Error when creating TimerComponent

For more infomation about this bug, visit

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

What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-03-13 16:43:41 ---
This bug was fixed on trunk and back-ported to OCL 1.4.1:

r28977 | psoetens | 2008-02-15 17:21:30 +0100 (vr, 15 feb 2008) | 3 lines

Fix bug #511: Error when creating TimerComponent
Rename isActive to isArmed in scripting API. Must fix C++ API in 1.6.0

These patches fixe the C++ API on trunk/rtt (RTT 1.6.0):

$ svn ci src/ -m"Fix bug #511: Error when creating TimerComponent. Rename
isActive() to isArmed()."
Sending src/Timer.cpp
Sending src/Timer.hpp
Transmitting file data ..
Committed revision 29051.

And on trunk/ocl (OCL 1.6.0):

$ svn ci timer/ -m"Fix bug #511: Error when creating TimerComponent. Rename
isActive() to isArmed()."
Sending timer/TimerComponent.cpp
Transmitting file data .
Committed revision 29052.

This breaks v1.6.x backwards compatibility with the v1.4.x RTT::Timer class,
but since this was a new class in RTT/OCL 1.4, not much user code can depend on
it.

[Bug 511] Error when creating TimerComponent

For more infomation about this bug, visit

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

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
Target Milestone|--- |1.4.1

--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-02-15 17:20:02 ---
Patch applied on trunk.

$ svn ci TimerComponent.cpp -m"Fix bug #511: Error when creating TimerComponent
> Rename isActive to isArmed in scripting API. Must fix C++ API in 1.6.0
> "
Sending TimerComponent.cpp
Transmitting file data .
Committed revision 28977.