git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@404 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-01-11 16:39:37 +00:00
parent aad7bcb355
commit 02b4c2c209
2 changed files with 214 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
/*
* 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 */