beautypg.com

2 sending gcf streams over a network – Guralp Systems CMG-DM24 User Manual

Page 108

background image

CMG-DM24

truncate the 32 bit differences to 24 bits by omitting the top byte of

each difference. This does not apply to true 32-bit data, even for blocks
where the differences would fit into 24 bits.

This optimization is made purely to use the serial link more

efficiently, and is not part of the GCF file format. When such data is
stored on a disk or transmitted over a network using TCP or UDP, it

must be expanded back to the full 32 bits.

Because 24-bit values have a range of 16 million (±8 million),
differences between them must be able to indicate ±16 million, which

is 25 bits. However, the serial compression code discards the 25th bit.
When decompressing the data, you will need to reconstitute this bit.

You can check that you have correctly reconstituted the sign bits by

comparing the value you obtain at the end of the GCF block with the
RIC.

7.2 Sending GCF streams over a network

GCF blocks can be embedded in TCP or UDP packets for transmission
over a network to other Güralp instruments or computers running

GCF-compatible software such as Scream!.

A GCF server is expected to understand control messages, and to
respond with data as appropriate. This allows clients to start and stop

data transfer and to request that any missing blocks be re-transmitted.

Initiating a connection

The default behaviour of a GCF server is to listen for UDP packets

containing GCF commands. A client sends a command as a null-
terminated string in a single UDP packet. The commands a client can

issue and the expected responses are:

GCFPING : acknowledge this packet;

GCFSEND:B : start sending data in big-endian ("network") byte order;

GCFSEND:L : start sending data in little-endian ("Intel") byte order;

GCFSEND : start sending data, in default byte order (Scream! interprets
this as GCFSEND:B).

The server responds to any of these with a packet containing the string
GCFACKN, again null-terminated.

108

Issue N