libsdr  0.1.0
A simple SDR library
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
sdr::POCSAG Class Reference

Implements a POCSAG decoder. More...

#include <pocsag.hh>

Inheritance diagram for sdr::POCSAG:
sdr::Sink< uint8_t > sdr::SinkBase sdr::POCSAGDump

Classes

class  Message
 A pocsag message. More...
 

Public Member Functions

 POCSAG ()
 Constructor. More...
 
void config (const Config &src_cfg)
 Needs to be implemented by any sub-type to check and perform the configuration of the node. More...
 
void process (const Buffer< uint8_t > &buffer, bool allow_overwrite)
 Needs to be implemented by any sub-type to process the received data. More...
 
virtual void handleMessages ()
 Can be overwritten by any other implementation to process the received messages stored in _queue. More...
 
- Public Member Functions inherited from sdr::Sink< uint8_t >
 Sink ()
 Constructor. More...
 
virtual ~Sink ()
 Drestructor. More...
 
virtual void handleBuffer (const RawBuffer &buffer, bool allow_overwrite)
 Re-implemented from SinkBase. More...
 
- Public Member Functions inherited from sdr::SinkBase
 SinkBase ()
 Constructor. More...
 
virtual ~SinkBase ()
 Destructor. More...
 

Protected Types

enum  State { WAIT, RECEIVE, CHECK_CONTINUE }
 The possible states of the POGSAC receiver. More...
 

Protected Member Functions

void _process_word (uint32_t word)
 Process a POGSAC word. More...
 
void _reset_message ()
 Clear the message. More...
 
void _finish_message ()
 Add the (non-empty) message to the queue. More...
 

Protected Attributes

State _state
 The current state. More...
 
uint64_t _bits
 The last received bits. More...
 
uint8_t _bitcount
 The number of received bits. More...
 
uint8_t _slot
 The current slot. More...
 
Message _message
 The current message. More...
 
std::list< Message_queue
 The completed messages. More...
 

Detailed Description

Implements a POCSAG decoder.

In conjecture with the FSKDetector or AFSDetector and the BitStream nodes, this node can be used to receive and process POCSAG (pages) messages.

The POCSAG protocol is defined as followig:

1) at least 576 bits of alternating value (1 0 1 0 ...) 2) a 32-bit sync word (0x7CD215D8) 3) 2x8 data words (each 32 bit) 4) If data left to send -> continue with step 2

Unused data words are send as 0x7A89C197. Each dataword is either a address word (bit 31 = 0) or message word (bit 31 = 1).

Constructor & Destructor Documentation

POCSAG::POCSAG ( )

Constructor.

Member Function Documentation

void POCSAG::_finish_message ( )
protected

Add the (non-empty) message to the queue.

void POCSAG::_process_word ( uint32_t  word)
protected

Process a POGSAC word.

void POCSAG::_reset_message ( )
protected

Clear the message.

void POCSAG::config ( const Config src_cfg)
virtual

Needs to be implemented by any sub-type to check and perform the configuration of the node.

Implements sdr::SinkBase.

void POCSAG::handleMessages ( )
virtual

Can be overwritten by any other implementation to process the received messages stored in _queue.

Reimplemented in sdr::POCSAGDump.

void POCSAG::process ( const Buffer< uint8_t > &  buffer,
bool  allow_overwrite 
)
virtual

Needs to be implemented by any sub-type to process the received data.

Implements sdr::Sink< uint8_t >.

Member Data Documentation

uint8_t sdr::POCSAG::_bitcount
protected

The number of received bits.

uint64_t sdr::POCSAG::_bits
protected

The last received bits.

Message sdr::POCSAG::_message
protected

The current message.

std::list<Message> sdr::POCSAG::_queue
protected

The completed messages.

uint8_t sdr::POCSAG::_slot
protected

The current slot.

State sdr::POCSAG::_state
protected

The current state.


The documentation for this class was generated from the following files: