Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ska::cheetah::rcpt::BeamFormerDataTraits Class Reference

Traits describing the BeamFormer Data Stream to the panda::PacketSream system. More...

#include <cheetah/rcpt/BeamFormerDataTraits.h>

Collaboration diagram for ska::cheetah::rcpt::BeamFormerDataTraits:
Collaboration graph

Public Types

typedef data::TimeFrequency< Cpu, uint8_t > DataType
 
typedef BeamFormerPacketInspector PacketInspector
 

Public Member Functions

template<typename ResizeContextType >
void resize_chunk (ResizeContextType &context)
 
template<typename ResizeContextType >
void resize_chunk (ResizeContextType &context)
 

Static Public Member Functions

static uint64_t sequence_number (PacketInspector const &packet)
 returns the sequential number of the chunk that the packet belongs to More...
 
static constexpr uint64_t max_sequence_number ()
 the maximum value a packet sequence number will reach
 
static std::size_t packet_size ()
 return the number of signal samples in a packet
 
static std::size_t chunk_size (DataType const &data)
 return the total number of samples (time_samples * channels) in the data
 
static bool align_packet (PacketInspector const &packet)
 ignore all packets other than the StokesI
 
template<typename ContextType >
static void resize_chunk (ContextType &data)
 return the total number of samples (time_samples * channels) in the data
 
template<typename ContextType >
static void deserialise_packet (ContextType &context, PacketInspector const &)
 function responsible for transfering data from the packet in to the data structure
 
template<typename ContextType >
static void process_missing_slice (ContextType &context)
 perform operations to compenste for a missing packet More...
 
static void packet_stats (uint64_t packets_received, uint64_t packets_expected)
 

Detailed Description

Traits describing the BeamFormer Data Stream to the panda::PacketSream system.

Definition at line 44 of file BeamFormerDataTraits.h.

Member Function Documentation

◆ process_missing_slice()

template<typename ContextType >
void ska::cheetah::rcpt::BeamFormerDataTraits::process_missing_slice ( ContextType &  context)
static

perform operations to compenste for a missing packet

currently this does nothing, but this is expected to change

Definition at line 54 of file BeamFormerDataTraits.cpp.

55 {
56  unsigned offset = context.offset();
57  auto it=context.chunk().begin() + offset;
58  PANDA_LOG_DEBUG << "processing missing packet: data=" << (void*)&*it << context;
59  for(std::size_t i=0; i < context.size() ; ++i) {
60  *it = 99;
61  assert(it!=context.chunk().end());
62  ++it;
63  }
64 }
Here is the call graph for this function:

◆ sequence_number()

uint64_t ska::cheetah::rcpt::BeamFormerDataTraits::sequence_number ( PacketInspector const &  packet)
static

returns the sequential number of the chunk that the packet belongs to

do not call this function before a call to packets_per_chunk has been made at least once

Definition at line 44 of file BeamFormerDataTraits.cpp.

45 {
46  return packet.packet().packet_count(); // * _scale_factor;
47 }
Here is the call graph for this function:

The documentation for this class was generated from the following files: