git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@404 b431acfa-c32f-4a4a-93f1-934dc6c82436
48 lines
789 B
C++
48 lines
789 B
C++
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
/*
|
|
* File: PocsagDecoder.hpp
|
|
* Author: jens
|
|
*
|
|
* Created on 11. Januar 2019, 17:20
|
|
*/
|
|
|
|
#ifndef POCSAGDECODER_HPP
|
|
#define POCSAGDECODER_HPP
|
|
|
|
#include <cstdlib>
|
|
#include <cstdio>
|
|
#include <cstdint>
|
|
|
|
class PocsagDecoder
|
|
{
|
|
public:
|
|
PocsagDecoder();
|
|
PocsagDecoder(const PocsagDecoder& orig);
|
|
virtual ~PocsagDecoder();
|
|
size_t process(uint8_t const *pData, size_t size);
|
|
|
|
private:
|
|
enum State
|
|
{
|
|
Sync,
|
|
Data
|
|
};
|
|
|
|
State state = Sync;
|
|
size_t dataCount;
|
|
size_t msgPos = 0;
|
|
uint8_t msgWord = 0;
|
|
uint32_t func = 0;
|
|
bool msgActive = 0;
|
|
|
|
void messageFinish();
|
|
};
|
|
|
|
#endif /* POCSAGDECODER_HPP */
|
|
|