From beb5024130216e8bf8f6d327cbb098177c52193a Mon Sep 17 00:00:00 2001 From: Thomas Beierlein Date: Tue, 22 Oct 2024 12:40:33 +0200 Subject: [PATCH 1/3] document used LAN message ID's --- src/lancode.h | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/lancode.h b/src/lancode.h index c9114ccb..65a9abba 100644 --- a/src/lancode.h +++ b/src/lancode.h @@ -23,16 +23,29 @@ #define MAXNODES 8 -#define LOGENTRY '1' -#define CLUSTERMSG '2' -#define TLFSPOT '3' -#define TLFMSG '4' -#define FREQMSG '5' -#define INCQSONUM '6' -#define TIMESYNC '7' -#define QTCRENTRY '8' -#define QTCSENTRY '9' -#define QTCFLAG ':' +/* TLF can communicate with other TLF instances to form a net of distributed + * logging stations. For that purpose it sends broadcast messages about + * relevant events to other TLF nodes. + * The following message types are supported: + */ + +#define LOGENTRY '1' // just logged QSO at that station +#define CLUSTERMSG '2' // received messages from DX-cluster +#define TLFSPOT '3' // DX-spot generated by operator itself +#define TLFMSG '4' // Talk message for local chat +#define FREQMSG '5' // actual QRG +#define INCQSONUM '6' // last QSO nr used for serial exchange by sending + // node +#define TIMESYNC '7' // actual time (if TIME_MASTER node) +#define QTCRENTRY '8' // received QTC +#define QTCSENTRY '9' // sent QTC +#define QTCFLAG ':' // QTC flags + +/* Each sent message is sent as UDP packet and consists of + * - 1 character for the sending node ID, followed by + * - 1 character for the above defined message ID, followed by + * - a message specific string of characters as body + */ #include From f5ccbb42082da4e7f75c0d271848b47e12b1be2f Mon Sep 17 00:00:00 2001 From: Thomas Beierlein Date: Tue, 22 Oct 2024 12:58:56 +0200 Subject: [PATCH 2/3] document format of LAN messages --- src/lancode.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/lancode.h b/src/lancode.h index 65a9abba..5ecf67a8 100644 --- a/src/lancode.h +++ b/src/lancode.h @@ -47,6 +47,42 @@ * - a message specific string of characters as body */ +/* The format of the message specific string is as follows: + * + * LOGENTRY + * Standard logline with LOGLINELEN characters (last one is \n) + * CLUSTERMSG + * max 78 characters from DX-cluster, + * followed by \n + * TLFSPOT + * 77 characters self formatted cluster message, + * e.g. + * 'DX de TLF-B: 21.435 K3NBD 1041Z' + * followed by \n\n + * TLFMSG + * Max 60 characters text (see talk()) followed by \n + * FREQMSG + * 7 characters actual QRG in kHz with one decimal, + * left padded with spaces if with TRXcontrol + * 7 characters band in meters with one decimal if without TRXcontrol + * followed by \n in both cases + * INCQSONR + * QSO number with max. 4 digits, + * followed by \n + * TIMESYNC + * actual time_t value as decimal number, + * followed by one space + * QTCRENTRY + * QTC logline for RECV direction, + * followed by \n\n + * QTCSENTRY + * QTC logline for SEND direction, + * followed by \n\n + * QTCFLAG + * ';L' or ' extern char bc_hostaddress[MAXNODES][16]; From 18503be9232f9b2d55f3e0be4883a509af5c3dfd Mon Sep 17 00:00:00 2001 From: Thomas Beierlein Date: Tue, 22 Oct 2024 19:51:23 +0200 Subject: [PATCH 3/3] astyle --- src/lancode.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lancode.h b/src/lancode.h index 5ecf67a8..94774f44 100644 --- a/src/lancode.h +++ b/src/lancode.h @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - #ifndef LANCODE_H #define LANCODE_H @@ -34,8 +33,7 @@ #define TLFSPOT '3' // DX-spot generated by operator itself #define TLFMSG '4' // Talk message for local chat #define FREQMSG '5' // actual QRG -#define INCQSONUM '6' // last QSO nr used for serial exchange by sending - // node +#define INCQSONUM '6' // last QSO nr used for serial exchange by node #define TIMESYNC '7' // actual time (if TIME_MASTER node) #define QTCRENTRY '8' // received QTC #define QTCSENTRY '9' // sent QTC