A general point: in virtually all communications protocols the
(descriptive) header comes before the data block, since the receiver
usually needs to decode the header to be sure what to do with the
data. This also makes it possible to vary the length of the data
block, if desired (for instance, to tune to FFT block sizes or
sampling hardware word length).
> - I would want a timestamp in there somewhere. It might be derived
from block_no, but why not make it explicit ?
I do not see what it would be good for. Why do you want the clock
from the master while there is another one in the slave?
Array processing. It would be very useful for a situation where you
have multiple masters on one network (either during a contest, or -in
my case- with a few servers each connected to an antenna+receiver).
Time sync is not hard over either GPS/TAC or ntp.
Even in one-master situations it could be useful: with timestamps, it
is very easy to make something similar to the Time Machine.
> - how is the sampling rate communicated ?
The slave(client) asks the server for the meaning of the data.
Number of channels, nominal sampling rate, whether the format is
real or complex etc.
That, too, makes it harder for dedicated hardware receivers; ideally
these would not need _any_ communication from the slave to the
master. As I see it, encoding this information in the header of each
package is a low-overhead way to reduce ambiguity, too.
> - if you are not doing so already, please please _please_ use the
functions htons() / ntohs() and friends to convert between host byte
order and network byte order (or forever determine that linrad
communicates with either little endian (IA32) or big endian (Alpha,
PowerPC etc) byte order. I would want to be able to use a PC as the
server and my PowerBook as the client, for instance.
I do not see how it matters. Linrad does not put port numbers or
addresses in the packages, that is done by the operating system
and the inner workings of Linrad is not visible from the network.
Byte ordering is not restricted to port numbers or addresses. Every
time you put an integer which is larger than one byte into a packet,
the transmitter and receiver need to agree on the byte order. See
http://en.wikipedia.org/wiki/Endianness
for details. Taking my example, if the master runs on an Intel
machine and the slave on my PowerBook, if the master transmits a
block_no of 0x01020304, my PowerBook will see that as 0x04030201. Not
good.
JDB.
--
Years from now, if you are doing something quick and dirty,
you imagine that I am looking over your shoulder and say to
yourself, "Dijkstra would not like this," well that would be
immortality for me. -- Edsger Dijkstra, 1930 - 2002
#############################################################
This message is sent to you because you are subscribed to
the mailing list <linrad@antennspecialisten.se>.
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]>
To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]>
Send administrative queries to <[EMAIL PROTECTED]>