From 40e384772aac959e3800744dad23ede40e76af2d Mon Sep 17 00:00:00 2001 From: Hannes Matuschek Date: Tue, 2 Jun 2015 18:28:53 +0200 Subject: [PATCH] Fixed docs. --- src/pocsag.hh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pocsag.hh b/src/pocsag.hh index 158ff25..1a48bfb 100644 --- a/src/pocsag.hh +++ b/src/pocsag.hh @@ -23,7 +23,17 @@ namespace sdr { class POCSAG: public Sink { public: - /** A posac message. */ + /** A pocsag message. + * A pocsag message can be either a numeric message (i.e. phone numbers) or a text message. + * The transmitter knows which type a certain receiver expects, hence there is no information + * embedded into the actual message that determines the type. Hence a heuristic needs to be + * used in order to select the message type by the contents of the message. This is done using + * the @c estimateText and @c estimateNumeric functions. They return a weight in favor of one of + * the types. I.e. if estimateText() > estimateNumeric(), the message is likely to be a text + * message. Like any heuristic, this approach may fail. + * The message text is returned by @c asText() and the numeric data is returned by + * @c asNumeric(). Both methods return a @c std::string as the numeric message may also contain + * a very limited set of non-number symbols. */ class Message { public: /** Empty constructor. */ @@ -48,7 +58,10 @@ public: /** Adds some payload from the given POGSAC word. */ void addPayload(uint32_t word); + /** Retruns the "likelihood" that the message is a text message (actually a log-likelihood). */ int estimateText() const; + /** Retruns the "likelihood" that the message is a numeric message + * (actually a log-likelihood). */ int estimateNumeric() const; /** Decodes the message as a text message. */