[omniORB] Sequences of short transfered via strings...

Renzo Tomaselli renzo.tomaselli@tecnotp.it
Wed Nov 13 16:59:00 2002


Laurant,
    I'm interested into this subject too. I noticed that both strings and
sequence<octet> are mapped to python strings, so I think the latter is
better for managing binary data. I always go along that way by a "typedef
sequence<octet> Block".
But I still wonder about how you deal with endianness in a clean way, e.i.
by forcing a specific little/big normalization or by sending out an extra
boolean value to inform the receiver.
Regards,

Renzo Tomaselli

----- Original Message -----
From: "Laurent Pointal" <laurent.pointal@lure.u-psud.fr>
To: <omniorb-list@omniorb-support.com>
Sent: Wednesday, November 13, 2002 4:09 PM
Subject: [omniORB] Sequences of short transfered via strings...


> 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
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list