summaryrefslogtreecommitdiffstats
path: root/src/EtiReader.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-03-16 11:28:49 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-03-16 11:28:49 +0100
commit50fd88f82b8dc2fb7d5f188baed03300eebdc099 (patch)
treeed5d2ebbad749e1486360f1758a3a2796f379aab /src/EtiReader.h
parent7a16e387eef015092c49b9c0a947239ff67153eb (diff)
downloaddabmod-50fd88f82b8dc2fb7d5f188baed03300eebdc099.tar.gz
dabmod-50fd88f82b8dc2fb7d5f188baed03300eebdc099.tar.bz2
dabmod-50fd88f82b8dc2fb7d5f188baed03300eebdc099.zip
Make the ETI reader state a class enum
Diffstat (limited to 'src/EtiReader.h')
-rw-r--r--src/EtiReader.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/EtiReader.h b/src/EtiReader.h
index 28fb2ac..cda181d 100644
--- a/src/EtiReader.h
+++ b/src/EtiReader.h
@@ -72,6 +72,25 @@ protected:
std::shared_ptr<FicSource> myFicSource;
};
+enum class EtiReaderState {
+ // For Framed input format
+ NbFrame,
+
+ // For Streamed input format
+ FrameSize,
+
+ // ETI Sync
+ Sync,
+ Fc,
+ Nst,
+ Eoh,
+ Fic,
+ Subch,
+ Eof,
+ Tist,
+ Pad
+};
+
/* The EtiReader extracts the necessary data for modulation from an ETI(NI) byte stream. */
class EtiReader : public EtiSource
{
@@ -95,7 +114,7 @@ private:
/* Transform the ETI TIST to a PPS offset in units of 1/16384000 s */
uint32_t getPPSOffset();
- int state;
+ EtiReaderState state = EtiReaderState::Sync;
uint32_t nb_frames;
uint16_t framesize;
eti_SYNC eti_sync;