00001 #ifndef Event_ZDD_CHANNEL_H 00002 #define Event_ZDD_CHANNEL_H 00003 00004 #include <vector> 00005 00007 typedef struct { 00008 int start_index; //the index of the 1st sample in this fragment 00009 int length; //the length (in bytes) of this fragment 00010 unsigned char* sample; //data samples in this fragment 00011 } 00012 // the data model for a ZDD fragment 00013 ZddFragment; 00014 00015 00017 class ZddChannel 00018 { 00019 public : 00020 00021 typedef std::vector<ZddFragment> Fragments; 00022 00023 ZddChannel(); 00024 virtual ~ZddChannel(); 00025 00026 int getChId() const { return m_chId; } 00027 00028 int getScanCode() const { return m_scanCode; } 00029 00030 const Fragments& fragments() const { return m_frags; } 00031 00032 void setChId(int chId) { m_chId = chId; } 00033 00034 void setScanCode(int scanCode) { m_scanCode = scanCode; } 00035 00036 void addFragments(const ZddFragment& frag) { m_frags.push_back(frag); } 00037 00038 private : 00039 00040 int m_chId; 00041 int m_scanCode; 00042 Fragments m_frags; 00043 }; 00044 00045 #endif