aboutsummaryrefslogtreecommitdiffstats
path: root/figs.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-15 15:15:23 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-15 15:15:23 +0100
commit78b7759ff40c691f09ccc6151de8fc127b361e20 (patch)
treeb1184e862673bbb34d65567e2dba90ace714eae6 /figs.hpp
parent3576bfcd68ff58e022efc07ef8e1f1b757ccf6fb (diff)
downloadetisnoop-78b7759ff40c691f09ccc6151de8fc127b361e20.tar.gz
etisnoop-78b7759ff40c691f09ccc6151de8fc127b361e20.tar.bz2
etisnoop-78b7759ff40c691f09ccc6151de8fc127b361e20.zip
Refactor FIG 1
Diffstat (limited to 'figs.hpp')
-rw-r--r--figs.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/figs.hpp b/figs.hpp
index 0e2efb8..7dd92eb 100644
--- a/figs.hpp
+++ b/figs.hpp
@@ -52,6 +52,21 @@ struct fig0_common_t {
uint16_t ext(void) { return f[0] & 0x1F; }
};
+struct fig1_common_t {
+ fig1_common_t(
+ uint8_t* fig_data,
+ uint16_t fig_len) :
+ f(fig_data),
+ figlen(fig_len) {}
+
+ uint8_t* f;
+ uint16_t figlen;
+
+ uint8_t charset() { return (f[0] & 0xF0) >> 4; }
+ uint8_t oe() { return (f[0] & 0x08) >> 3; }
+ uint8_t ext() { return f[0] & 0x07; }
+};
+
// FIG 0/11 and 0/22 struct
struct Lat_Lng {
double latitude, longitude;
@@ -94,3 +109,5 @@ void fig0_27(fig0_common_t& fig0, int indent);
void fig0_28(fig0_common_t& fig0, int indent);
void fig0_31(fig0_common_t& fig0, int indent);
+void fig1_select(fig1_common_t& fig1, int indent);
+