aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-01-12 18:59:47 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-01-12 18:59:47 +0100
commitc004b44ad7d0dba8e602875e8a367cd7c4008df1 (patch)
tree7b54c8d73a1b18b9f44b9e4570a72821e88d3d20 /src
parent9a510ee0e34eebe79c5626b66e7493191b555cef (diff)
downloaddabmux-c004b44ad7d0dba8e602875e8a367cd7c4008df1.tar.gz
dabmux-c004b44ad7d0dba8e602875e8a367cd7c4008df1.tar.bz2
dabmux-c004b44ad7d0dba8e602875e8a367cd7c4008df1.zip
Remove union, set defaults for DabComponent fields
Diffstat (limited to 'src')
-rw-r--r--src/MuxElements.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 6607c20..a061bc6 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -189,6 +189,10 @@ public:
struct dabAudioComponent {
+ dabAudioComponent() :
+ uaType(0xFFFF) {}
+
+ uint16_t uaType; // User Application Type
};
@@ -201,6 +205,12 @@ struct dabFidcComponent {
struct dabPacketComponent {
+ dabPacketComponent() :
+ id(0),
+ address(0),
+ appType(0xFFFF),
+ datagroup(false) { }
+
uint16_t id;
uint16_t address;
uint16_t appType;
@@ -222,12 +232,11 @@ class DabComponent : public RemoteControllable
uint8_t subchId;
uint8_t type;
uint8_t SCIdS;
- union {
- dabAudioComponent audio;
- dabDataComponent data;
- dabFidcComponent fidc;
- dabPacketComponent packet;
- };
+
+ dabAudioComponent audio;
+ dabDataComponent data;
+ dabFidcComponent fidc;
+ dabPacketComponent packet;
bool isPacketComponent(std::vector<dabSubchannel*>& subchannels);