help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Also learning about Listen


From: Paul Kienzle
Subject: Re: Also learning about Listen
Date: Mon, 20 Mar 2006 23:02:24 -0500


My question is:

What should I expect to see comming back when I send a 'send" command????
What I do see back is    !!!m
should i now read a number and then a string?

From listen.txt, here is what you will receive from octave:

!!!m length rows columns namelength name data

        recieve matrix from server.
length,rows,columns,namelength are 32-bit network order integers.
        name is a string (without zero-terminator).
        data is an array of rows*columns server order double values.

        This is sent in response to a !!!m matrix request or a
        send('name',matrix) command.

The first thing I do when I open a connection is request a matrix
        containing 1.0.  If the result is not 1.0, I know that I need to
swap the data to convert from server order to client order doubles.

!!!s length strlen namelen name str

        receive string from server.
        length, strlen, namelen are 32-bit network order integers.
        name is a string (without zero-terminator).
        str is a string (without zero-terminator).

        This is sent in response to a send('name',string) command.

!!!x length str

        evaluate string in client.
        length is a 32-bit network order integer.
        str is a string (without zero-terminator).

        This is sent in response to a send('str').  The contents of str
are completely arbitrary (and may indeed contain binary data). It is up to the client to decide how they want to interpret these strings.

!!!e length error

        receive error from octave.
        length is a 32-bit network order integer.
        error is a string (without zero-terminator).

This is sent in response to a !!!x command which produced an error.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]