Skip to content

Commit 7d38334

Browse files
authored
Document lan messages (Tlf#448)
* document used LAN message ID's and format of the messages
1 parent 0595992 commit 7d38334

File tree

1 file changed

+58
-11
lines changed

1 file changed

+58
-11
lines changed

src/lancode.h

+58-11
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,69 @@
1717
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
2120
#ifndef LANCODE_H
2221
#define LANCODE_H
2322

2423
#define MAXNODES 8
2524

26-
#define LOGENTRY '1'
27-
#define CLUSTERMSG '2'
28-
#define TLFSPOT '3'
29-
#define TLFMSG '4'
30-
#define FREQMSG '5'
31-
#define INCQSONUM '6'
32-
#define TIMESYNC '7'
33-
#define QTCRENTRY '8'
34-
#define QTCSENTRY '9'
35-
#define QTCFLAG ':'
25+
/* TLF can communicate with other TLF instances to form a net of distributed
26+
* logging stations. For that purpose it sends broadcast messages about
27+
* relevant events to other TLF nodes.
28+
* The following message types are supported:
29+
*/
30+
31+
#define LOGENTRY '1' // just logged QSO at that station
32+
#define CLUSTERMSG '2' // received messages from DX-cluster
33+
#define TLFSPOT '3' // DX-spot generated by operator itself
34+
#define TLFMSG '4' // Talk message for local chat
35+
#define FREQMSG '5' // actual QRG
36+
#define INCQSONUM '6' // last QSO nr used for serial exchange by node
37+
#define TIMESYNC '7' // actual time (if TIME_MASTER node)
38+
#define QTCRENTRY '8' // received QTC
39+
#define QTCSENTRY '9' // sent QTC
40+
#define QTCFLAG ':' // QTC flags
41+
42+
/* Each sent message is sent as UDP packet and consists of
43+
* - 1 character for the sending node ID, followed by
44+
* - 1 character for the above defined message ID, followed by
45+
* - a message specific string of characters as body
46+
*/
47+
48+
/* The format of the message specific string is as follows:
49+
*
50+
* LOGENTRY
51+
* Standard logline with LOGLINELEN characters (last one is \n)
52+
* CLUSTERMSG
53+
* max 78 characters from DX-cluster,
54+
* followed by \n
55+
* TLFSPOT
56+
* 77 characters self formatted cluster message,
57+
* e.g.
58+
* 'DX de TLF-B: 21.435 K3NBD 1041Z'
59+
* followed by \n\n
60+
* TLFMSG
61+
* Max 60 characters text (see talk()) followed by \n
62+
* FREQMSG
63+
* 7 characters actual QRG in kHz with one decimal,
64+
* left padded with spaces if with TRXcontrol
65+
* 7 characters band in meters with one decimal if without TRXcontrol
66+
* followed by \n in both cases
67+
* INCQSONR
68+
* QSO number with max. 4 digits,
69+
* followed by \n
70+
* TIMESYNC
71+
* actual time_t value as decimal number,
72+
* followed by one space
73+
* QTCRENTRY
74+
* QTC logline for RECV direction,
75+
* followed by \n\n
76+
* QTCSENTRY
77+
* QTC logline for SEND direction,
78+
* followed by \n\n
79+
* QTCFLAG
80+
* '<callsign>;L' or '<callsign;N,'
81+
* followed by \n\n
82+
*/
3683

3784
#include <hamlib/rig.h>
3885

0 commit comments

Comments
 (0)