[omniORB] Sequences of short transfered via strings...
Laurent Pointal
laurent.pointal@lure.u-psud.fr
Wed Nov 13 15:10:01 2002
Hello,
I'm back with my problem of moving an image from a C++ CORBA server to a
Python OmniORBpy client.
The image is coded as a sequence<short>, and the conversion from the ORB
internal buffer to the mapped Python type (list of integers - and back to a
compressed Numeric.array) cost really too much time (image is around
1200x1200 pixels of 16 bits).
Do you thing it is reasonable to transfert the image as one large
CORBA::string ?
-Numeric.fromstring can directly get a binary string to build an array,
-there will be again memory copy, but no construction of the temporary list
of 1440000 objects,
-i know that it is a hack, far from normal use (I may encounter byte
swapping problems), but I dont see another solution.
Another possible problem, can CORBA strings contain caracters with code 0 ?
And how can I build such a string (giving buffer start and bytes length) ?
(...in Orbacus :-))
Thanks.
Laurent.
PS. I may not be the only one with this problem, is a there a project to
use an alternate Python binding for sequences (at least as an array.array),
where can I do such a proposition?
---
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email : laurent.pointal@lure.u-psud.fr ou laurent.pointal@laposte.net