1 #ifndef __SDR_POSAG_HH__
2 #define __SDR_POSAG_HH__
42 Message(uint32_t addr, uint8_t func);
54 inline uint8_t
function()
const {
return _function; }
68 std::string
asText()
const;
72 std::string
asHex()
const;
151 #endif // __SDR_POSAG_HH__
uint8_t _slot
The current slot.
Definition: pocsag.hh:122
int estimateText() const
Retruns the "likelihood" that the message is a text message (actually a log-likelihood).
Definition: pocsag.cc:344
A collection of configuration information that is send by a source to all connected sinks to properga...
Definition: node.hh:35
std::string asHex() const
Dumps the payload.
Definition: pocsag.cc:334
void _finish_message()
Add the (non-empty) message to the queue.
Definition: pocsag.cc:136
void handleMessages()
Dumps the received messages.
Definition: pocsag.cc:158
uint32_t _address
The address of the message.
Definition: pocsag.hh:76
std::string asText() const
Decodes the message as a text message.
Definition: pocsag.cc:297
Typed sink.
Definition: node.hh:192
Definition: autocast.hh:8
bool _empty
If true the message is empty.
Definition: pocsag.hh:80
std::vector< uint8_t > _payload
The actual payload.
Definition: pocsag.hh:84
uint32_t _bits
The number of payload bits in the message.
Definition: pocsag.hh:82
int estimateNumeric() const
Retruns the "likelihood" that the message is a numeric message (actually a log-likelihood).
Definition: pocsag.cc:360
std::ostream & _stream
The output stream.
Definition: pocsag.hh:145
Wait for the sync word for continuation.
Definition: pocsag.hh:92
void config(const Config &src_cfg)
Needs to be implemented by any sub-type to check and perform the configuration of the node...
Definition: pocsag.cc:22
A pocsag message.
Definition: pocsag.hh:37
uint32_t bits() const
Returns the number of data bits.
Definition: pocsag.hh:56
State
The possible states of the POGSAC receiver.
Definition: pocsag.hh:89
uint8_t _bitcount
The number of received bits.
Definition: pocsag.hh:120
void _process_word(uint32_t word)
Process a POGSAC word.
Definition: pocsag.cc:99
POCSAG()
Constructor.
Definition: pocsag.cc:15
POCSAGDump(std::ostream &stream)
Constructor.
Definition: pocsag.cc:151
void addPayload(uint32_t word)
Adds some payload from the given POGSAC word.
Definition: pocsag.cc:283
virtual void handleMessages()
Can be overwritten by any other implementation to process the received messages stored in _queue...
Definition: pocsag.cc:143
std::string asNumeric() const
Decodes the message as a numeric message.
Definition: pocsag.cc:317
Message & operator=(const Message &other)
Assignment operator.
Definition: pocsag.cc:273
State _state
The current state.
Definition: pocsag.hh:116
void _reset_message()
Clear the message.
Definition: pocsag.cc:131
Wait for a sync word.
Definition: pocsag.hh:90
uint64_t _bits
The last received bits.
Definition: pocsag.hh:118
uint8_t _function
The function of the message.
Definition: pocsag.hh:78
std::list< Message > _queue
The completed messages.
Definition: pocsag.hh:126
bool isEmpty() const
Retruns true if the message is empty (has no address).
Definition: pocsag.hh:50
A simple extention of the POCSAG node that prints the received messages to a std::ostream.
Definition: pocsag.hh:133
Message()
Empty constructor.
Definition: pocsag.cc:253
Message _message
The current message.
Definition: pocsag.hh:124
void process(const Buffer< uint8_t > &buffer, bool allow_overwrite)
Needs to be implemented by any sub-type to process the received data.
Definition: pocsag.cc:41
uint32_t address() const
Returns the address of the message.
Definition: pocsag.hh:52
Receive data.
Definition: pocsag.hh:91
Implements a POCSAG decoder.
Definition: pocsag.hh:23