xlog-discussion
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xlog-discussion] description of the message format


From: Joop Stakenborg
Subject: [Xlog-discussion] description of the message format
Date: Tue, 8 Jan 2002 19:08:45 +0100

Here is an example how xlog parses a message received by a second
application. Let's take a message which looks like this:

"program:sendtoxlog\1version:1\1call:wa0eir"

First of all the sting is split into an array
with the help of g_strsplit (part of glib) and the
following array is created:

remoteinfo[0]="program:sendtoxlog"
remoteinfo[1]="version:1"
remoteinfo[2]="call:wa0eir"

Then the resulting array is searched for 'field descriptors',
like "program:", "version:" and "call:". The colon is included
in this search. With this example, only the string "wa0eir" is
added to the log, date an time are added by xlog.

So, if we want to add time we use: "time:1231" in the message,
but we also could use: "time:12:31" or "time:12.31", xlog
really does not care about another colon in the message
and the time can be added in any format you like.

The code is in src/remote.c. For an example, see remote/sendtoxlog.c.
Be sure to read remote/README.

Regards,

Joop PA4TU



reply via email to

[Prev in Thread] Current Thread [Next in Thread]