Güralp Compressed Format
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.
8.2.1 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.
A client should continue issuing
GCFSEND
packets periodically while it still wants
to be sent data. If a client does not issue a
GCFSEND
packet for a long period, the
server will stop sending data to it.
If the server has active clients when it shuts down, it sends a packet containing the
string
GCFNOSV
to all of the clients.
8.2.2 Data packets
Once the client has sent a
GCFSEND
packet, the server will start sending it GCF
blocks, each in a single UDP packet. There are two formats used, “Version 31” and
“Version 40”.
8.2.2.1 Version 31 data packets
1024 octets – The GCF block as described above.
1 octet – The version number (decimal 31)
1 octet – The length of the following string, in octets
32 octets – A string describing the source of the data, padded to length 32 with zeros.
The string takes the form STREAM-ID/COMxx/HOSTNAME where COMxx is the
name of the serial port (COM1, etc.) and STREAM-ID is as in the GCF block (see above)
2 octets – The sequence number, in the byte order specified below (same as for data)
1 octet – A code for the byte order, 1 = big-endian (default), 2 = little-endian
117
Issue U - December, 2021