aboutsummaryrefslogtreecommitdiffstats
path: root/etisnoop.cpp
diff options
context:
space:
mode:
authorData Path <data2path@gmail.com>2015-05-12 19:42:55 +0200
committerData Path <data2path@gmail.com>2015-05-12 19:42:55 +0200
commitb030ce5512305b9b0a39cb97d25d33d16f2ebf70 (patch)
tree199ad5975c1524ca149f430326c35eaf3fe3b106 /etisnoop.cpp
parent6e82930326b9f30fe786b5ed3dd3b74a6e751f6c (diff)
downloadetisnoop-b030ce5512305b9b0a39cb97d25d33d16f2ebf70.tar.gz
etisnoop-b030ce5512305b9b0a39cb97d25d33d16f2ebf70.tar.bz2
etisnoop-b030ce5512305b9b0a39cb97d25d33d16f2ebf70.zip
Add FIG 0/24 decoding
Diffstat (limited to 'etisnoop.cpp')
-rw-r--r--etisnoop.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/etisnoop.cpp b/etisnoop.cpp
index e496209..910a73f 100644
--- a/etisnoop.cpp
+++ b/etisnoop.cpp
@@ -1432,6 +1432,59 @@ void decodeFIG(FIGalyser &figs,
}
}
break;
+ case 24: // FIG 0/24
+ {
+ unsigned long long key;
+ unsigned int SId;
+ unsigned short EId;
+ unsigned char i = 1, j, Number_of_EIds, CAId;
+ char tmpbuf[256];
+ bool Rfa;
+
+ while (i < (figlen - (((unsigned char)pd + 1) * 2))) {
+ // iterate over other ensembles services
+ if (pd == 0) {
+ SId = ((unsigned int)f[i] << 8) | (unsigned int)f[i+1];
+ i += 2;
+ }
+ else { // pd == 1
+ SId = ((unsigned int)f[i] << 24) | ((unsigned int)f[i+1] << 16) |
+ ((unsigned int)f[i+2] << 8) | (unsigned int)f[i+3];
+ i += 4;
+ }
+ Rfa = (f[i] >> 7);
+ CAId = (f[i] >> 4);
+ Number_of_EIds = (f[i] & 0x0f);
+ key = ((unsigned long long)oe << 33) | ((unsigned long long)pd << 32) | \
+ (unsigned long long)SId;
+ if (pd == 0) {
+ sprintf(desc, "SId=0x%04x, CAId=%d, Number of EId=%d, database key=%09llx", SId, CAId, Number_of_EIds, key);
+ }
+ else { // pd == 1
+ sprintf(desc, "SId=0x%08x, CAId=%d, Number of EId=%d, database key=%09llx", SId, CAId, Number_of_EIds, key);
+ }
+ if (Rfa != 0) {
+ sprintf(tmpbuf, ", invalid Rfa b7 0x%02x", f[i]);
+ strcat(desc, tmpbuf);
+ }
+ // CEI Change Event Indication
+ if (Number_of_EIds == 0) {
+ sprintf(tmpbuf, ", CEI");
+ strcat(desc, tmpbuf);
+ }
+ printbuf(desc, indent+1, NULL, 0);
+ i++;
+
+ for(j = i; ((j < (i + (Number_of_EIds * 2))) && (j < figlen)); j += 2) {
+ // iterate over EIds
+ EId = ((unsigned short)f[j] <<8) | (unsigned short)f[j+1];
+ sprintf(desc, "EId 0x%04x", EId);
+ printbuf(desc, indent+2, NULL, 0);
+ }
+ i += (Number_of_EIds * 2);
+ }
+ }
+ break;
}
}
break;