Pavel Pisa [Wed, 11 Sep 2013 08:34:30 +0000 (10:34 +0200)]
Restore ORTE specific modifications to uLUt.
ORTE defines FREE macro to cover different systems
implementations and uses "orte_all.h" to cover different
set and names of system provided header files.
Michal Sojka [Mon, 9 Sep 2013 22:58:29 +0000 (00:58 +0200)]
Fix warning about implicit declaration of umask()
I'm not yet sure whether the autoconf generated
orte/include/orte/orte_config.h is created correctly because
ORTE_PACKAGE and ORTE_VERSION is missing. But everything compiles
correctly so I leave it as it is.
Martin Vajnar [Mon, 5 Aug 2013 21:37:29 +0000 (23:37 +0200)]
ROBOT_DEMO: fix sync. problems in publisher for "motion_speed"
Don't use synchronized(), because it may block the setSpeed() and prevent
receiving new data from accelerometer. The isSent variable is now used
to determine whether we need new data.
Add robot's IP address to the list of fellow managers.
Martin Vajnar [Mon, 5 Aug 2013 19:26:29 +0000 (21:26 +0200)]
ROBOT_DEMO: fix sync. problems in HokuyoView
Set new data only if the previous batch has been drawn and clone the newly
arrived data array. This prevents concurrent access problems when
the previous batch is being drawn on the UI thread and new data arrives
through ORTE's receive thread.
Martin Vajnar [Fri, 26 Jul 2013 08:44:46 +0000 (10:44 +0200)]
JORTE: improve ByteOrder handling
Store the ByteOrder of MessageData's ByteBuffer in receive callback
structure in C (in case someone reuses already created MessageData instance
with new subscriber).
Martin Vajnar [Thu, 25 Jul 2013 12:45:43 +0000 (14:45 +0200)]
JORTE: switch from deserialize function to endianness callback
Yesterday's attempt at setting the byte order of ByteBuffer through
a deserialize function has one significant drawback and that is if more
than one data type is defined under one VM instance (thus accessible by
other threads) and subscribers are then registered for these data types
the deserialize function will stop working correctly, because there are
no parameter structures being passed to it, except for the CDR_Codec,
thus it had to use a global reference to a byte buffer which is
unfortunately overwritten the moment a new data type is registered.
If the deserialize function for the previously registered data type
is invoked it then tampers with ByteBuffer settings of a newly registered
data type.
Martin Vajnar [Thu, 25 Jul 2013 12:38:26 +0000 (14:38 +0200)]
ORTE: add support for param structure in TypeRegister
This adds support for user defined callback function processEndianness()
with processParam structure being set at Type creation and passed
to processEndianness().
The processEndianness() function is called if defined and if there is no
deserialization function and thus no other way for the user application to
know the byte order of received issue.
Martin Vajnar [Tue, 23 Jul 2013 09:09:39 +0000 (11:09 +0200)]
JORTE: fix memory leak and add DomainEvents to DomainMgr
Memory leaks in jORTEDomainAppCreate() and jORTEDomainMgrCreate()
(domain events callback structure) are fixed. Domain events callbacks
are placed in a separate file. Their prototypes are placed in "jorte/
/jorte_protos_api.h". This way they could be used by DomainApp
and DomainMgr.
Native functions in both DomainApp.java and DomainMgr.java are now non-
static. This allows native domain destructor to free the memory allocated
to domain events callback structure.
It is now also possible to pass null for DomainEvents or DomainProp to
DomainApp and DomainMgr constructors.
The header file onLoad.h is removed and the findClass() prototype is placed
into "jorte/jorte_protos_api.h".
Martin Vajnar [Sun, 21 Jul 2013 08:25:50 +0000 (10:25 +0200)]
JORTE: remove unused code
Since the domain is started (receiving and sending threads) either by
calling ORTEDomainAppCreate() or ORTEDomainMgrCreate(), there is no need
to have DomainStart() on the Java side.
Martin Vajnar [Fri, 19 Jul 2013 09:37:04 +0000 (11:37 +0200)]
ROBOT_DEMO: completely rewritten
This adds complete rewrite of the demo application. Buttons are now removed
from views and are instead placed to a menu. At the start a domain manager
and an application domain are created under which every subscriber
and publisher is launched. Support for hokuyo_scan is added.
Martin Vajnar [Fri, 19 Jul 2013 09:20:39 +0000 (11:20 +0200)]
JORTE: fix subscription destruction
Destroy subscription first, then destroy references to objects
in subscription callback. This prevents SEGFAULTs from the receiving
thread, that tries to save received instance to a non-existent object.
DeleteLocalReference was replaced with DeleteGlobalReference, since we are
destroying a global reference. This prevents dvmAbort() being called
on Android. This also fixes a memory leak (the ctx->msg reference was not
deleted).