I would solve this by finding an implementation in C (googling for osc
implementation gives me this: http://liblo.sourceforge.net/) and then
write an interface to OZ. That's usually easier than doing everything
yourself. In this case you get the added bonus of being able to cast
between 32 bit and 64 bit values whenever you need.
/pavel
On Wed, 15 Aug 2007 18:32:26 +0200, Torsten Anders
<[EMAIL PROTECTED]> wrote:
Dear all,
currently, I am trying to talk to other applications via some
communication protocol (more specifically, it is OpenSound Control, see
http://www.cnmat.berkeley.edu/OpenSoundControl/). The syntax of this
protocol requires that I send/receive data of formats such as 32-bit
integer (big-endian) and 32-bit floats (big-endian). The communication
itself happens via sockets.
Oz floats are internally 64 bits (according to CTM). Their print
representation (Float.toString) is less, but not fixed in size (BTW: it
does not use Oz syntax, the negation sign is - instead of ~). Oz
integers can be of any size. I assume BitArray or BitString don't help
me either, because I can not output them. Also, ByteString is intended
for textual data.
Any idea how I can control the size of integers and floats send across a
socket?
Thank you!
Best
Torsten
--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
strasheela.sourceforge.net
www.torsten-anders.de
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users