23   uint32_t dom_status = 0;
 
   29     const CLBCommonHeader* 
const clb_header = it->second->getCLBCommonHeader();
 
   30     dom_status = dom_status | clb_header->
domStatus(i);
 
   38   uint32_t 
const frame_length = frame.size();
 
   45     InfoWord 
const*
const iw = static_cast<const InfoWord*>(
 
   48     const unsigned int audiowordsize = iw->audioWordSize();
 
   50     nitems = (frame_length
 
   55     throw std::runtime_error(
"Unknown data type");
 
   66   container_t::const_iterator 
const it = 
m_container.find(idx);
 
   69     LOG_DEBUG << 
"Datagram collision. idx: " << idx << 
'\n' 
   70               << 
"container.size(): " << 
m_container.size() << 
'\n' 
   93   std::size_t 
const previous_packets_size =
 
   97   std::size_t 
const chunk_in_previous = previous_packets_size % 6;
 
   99   unsigned int const head =
 
  101         ? 6 - chunk_in_previous
 
  104   unsigned int const tail =
 
  107   return std::make_pair(head, tail);
 
  124           || c.begin()->second->getCLBCommonHeader()->udpSequenceNumber() == 0
 
  126       && 
"Precondition failed." 
  129   uint32_t current_seq_number = 0;
 
  130   unsigned int previous_chunk = 0;
 
  132   std::size_t 
const max_size = c.begin()->second->size();
 
  137       PuzzledFrame::container_t::const_iterator it = c.begin(), et = c.end();
 
  150                 << current_seq_number
 
  151                 << 
" not present in optical frame " 
  153                 << 
". Packet loss(?)";
 
  157       char* 
const dest = &frame.front() + size - previous_chunk;
 
  159       std::size_t 
const write_size = dg.
getPayloadSize() - bounds.first;
 
  161       std::memcpy(dest, dg.
getPayload() + bounds.first, write_size);
 
  163       size += write_size - previous_chunk;
 
  165       char* 
const dest = &frame.front() + size;
 
  169       std::memcpy(dest, dg.
getPayload(), write_size);
 
  175     previous_chunk = bounds.second;
 
  181   if (previous_chunk != 0) {
 
  182     LOG_DEBUG << 
"Missing last datagram(s) in optical frame " 
  184               << 
". Packet loss (?).";
 
  187     size -= previous_chunk;
 
  192   if (!
isTrailer(*c.rbegin()->second->getCLBCommonHeader())) {
 
  193     LOG_DEBUG << 
"Missing trailer in optical frame " 
  204     std::size_t max_size,
 
  205     std::size_t item_size)
 
  207   unsigned int head = 0;
 
  208   unsigned int tail = 0;
 
  211     std::size_t 
const previous_audio_size =
 
  216     std::size_t 
const chunk_in_previous = previous_audio_size % item_size;
 
  218     head = chunk_in_previous ? item_size - chunk_in_previous : 0;
 
  226   return std::make_pair(head, tail);
 
  239   uint32_t current_seq_number = 0;
 
  240   unsigned int previous_chunk = 0;
 
  242   std::size_t 
const max_size = c.begin()->second->size();
 
  246   InfoWord 
const& iw = *static_cast<const InfoWord*>(
 
  247       static_cast<const void*>(c.begin()->second->getPayload()));
 
  249   unsigned int const audio_word_size = iw.audioWordSize();
 
  252       PuzzledFrame::container_t::const_iterator it = c.begin(), et = c.end();
 
  266                 << current_seq_number
 
  267                 << 
" not present in acoustic frame " 
  269                 << 
". Packet loss(?)";
 
  273       size -= previous_chunk;
 
  276       char* 
const dest = &frame.front() + size;
 
  285     ++current_seq_number;
 
  286     previous_chunk = bounds.second;
 
  292   if (previous_chunk != 0) {
 
  293     LOG_DEBUG << 
"Missing last datagram(s) in acoustic frame " 
  295               << 
". Packet loss (?).";
 
  298     size -= previous_chunk;
 
  310       = 
m_container.begin()->second->getCLBCommonHeader();
 
  316   if (frame_length < 0) {
 
  317     LOG_DEBUG << 
"Anomalous frame size: " << frame_length       << 
'\n' 
  327   frame.resize(frame_length);
 
  353     ->getCLBCommonHeader()
 
  354     ->udpSequenceNumber();
 
  365             || 
m_container.begin()->second->getCLBCommonHeader()->udpSequenceNumber() == 0
 
  370                 << 
" contains too few data to be assembled. Ignored.";
 
  378     if (
m_container.begin()->second->getUDPSequenceNumber() != 0) {
 
  381                 << 
" without infoword. Ignored.";
 
  391     throw std::runtime_error(
"Unknown data type");