useorocos: fixed recursive orocos_find_package() for rosbuild packages

This is a regression of 5c14c5d6291375d9e790a92d01a766d4bdc9b2b9.

Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
Do not reset the caller engine in OperationCaller assignment

Use case:
    RTT::OperationCaller<bool()> op("bar", this->engine());
    op = this->getPeer("foo")->getOperation("bar");
    assert(op.mcaller);

Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
tests: relax timer tests in order to avoid false failures.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
config: allow user to also define BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG on a global level

If the user includes posix time headers himself, he'll need to define
BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG in order to enable these features
for our code as well.

Alternatively, we could modify the RTT code to work in both cases, if this is possible.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
scripting: fix bug where SM was installing synchronous operation callbacks

this->getEngine() is still null when building the SM, so the intent
of the code never happened.
Added extra argument to createEventTransition to get the target EE
where this SM wil run in, such that an asynchronous callback is
created.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
os: also cleanup the TypeInfoRepository in __os_exit

When parts of the TIR use TLSF, the TIR would be cleaned up after
the TLSF cleanup, causing asserts / segfaults.
fixes #49 on github

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
timers: use rtos_get_time_ns() directly bypassing the TimeService

TimeService normally counts time from zero, while rtos_get_time_ns() uses CLOCK_REALTIME directly.
Timers are using semaphores internally which can only handle CLOCK_REALTIME.

Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
revert the removal of the GlobalEngine bookkeeping. This belongs in another patch

This reverts one hunk of commit 00e748c5498865d210074d6fd618fca49941d355.
revert change caused by commit 2c7c2c8e until we have a solution.

This reverts the behavior of getNSecs so to always return rtos_get_time_ns(),
like it did before.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
docs: fix bug in documenting port reads + add section on level events with ports.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
scripting: more robust state change scheduling in order to avoid races

When evenTransition comes into a state machine, this may cause re-writing
of the entry/running/exit programs currently being executed, becaues the
event sets these hooks immediately, instead of letting the FSM finish
the current (entry or exit) program.

This patch lets changeState schedule a state change, and makes enterstate/
leavestate effectively do the state change and switch the new state programs in.

Since changeState now only schedules, in a number of places, the executePending()
function needs to be called to effectively execute SM statements.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
scripting: correctly implement asynchronous events in eventTransition

Before this patch, only the last eventTransition of two consecutive ones took effect,
since the event data was shared among all subscribers. This patch makes eventTransition
synchronous again such that each eventTransition evaluates its own data. This requires
some proper locking in the SM.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
ports: add clear() to inputport operation object.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
extras/slaveactivity: fix potential segfault if no master activity is set

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
cmake: Support configuring executables for Orocos

Instead of forcing the ADD_EXECUTABLE() and INSTALL() calls on the user,
this allows them to configure an existing executable. This also supports
configuring tests that require Orocos.
cmake: add all standard rpaths for all kind of targets to all kind of targes

Since the rpath_use_link_paths cmake option does not work on OSX with cmake < 3.0 this is a way to make sure that in-project targets can link with eachother.

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
Merge remote-tracking branch 'meyerj/operationcaller-assignment-fix' into HEAD
Merge remote-tracking branch 'origin/slave_activity_fix' into HEAD
Merge remote-tracking branch 'origin/toolchain-2.7' into HEAD
Merge remote-tracking branch 'meyerj/fix-timers'