Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Types | Static Public Member Functions | Public Attributes | List of all members
ska::cheetah::rcpt_low::BeamFormerDataTraits< PacketDataType, TimeSamplesPerPacket, ChannelsPerPacket > Class Template Reference

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

#include <cheetah/rcpt_low/BeamFormerDataTraits.h>

Collaboration diagram for ska::cheetah::rcpt_low::BeamFormerDataTraits< PacketDataType, TimeSamplesPerPacket, ChannelsPerPacket >:
Collaboration graph

Public Types

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

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 PacketNumberType 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 (Arun: Need to rename)
 
static std::size_t data_size ()
 size of the data in the packet excluding header and weights
 
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)
 

Public Attributes

decltype(ska::cbf_psr_interface::CbfPsrHeader::packet_sequence_number) typedef PacketNumberType
 

Detailed Description

template<typename PacketDataType, unsigned TimeSamplesPerPacket, unsigned ChannelsPerPacket>
class ska::cheetah::rcpt_low::BeamFormerDataTraits< PacketDataType, TimeSamplesPerPacket, ChannelsPerPacket >

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 PacketDataType , unsigned TimeSamplesPerPacket, unsigned ChannelsPerPacket>
template<typename ContextType >
void ska::cheetah::rcpt_low::BeamFormerDataTraits< PacketDataType, TimeSamplesPerPacket, ChannelsPerPacket >::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 110 of file BeamFormerDataTraits.cpp.

111 {
112  //essentially replacing the data corresponding to the missing packet to 0. (Dont know what is the best approch here.)
113  unsigned offset = context.offset();
114  auto it=context.chunk().begin() + offset;
115  PANDA_LOG_DEBUG << "processing missing packet: data=" << (void*)&*it << context;
116  for(std::size_t i=0; i < context.size() ; ++i) {
117  *it = 0;
118  assert(it!=context.chunk().end());
119  ++it;
120  }
121 }
Here is the call graph for this function:

◆ sequence_number()

template<typename PacketDataType , unsigned TimeSamplesPerPacket, unsigned ChannelsPerPacket>
uint64_t ska::cheetah::rcpt_low::BeamFormerDataTraits< PacketDataType, TimeSamplesPerPacket, ChannelsPerPacket >::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 45 of file BeamFormerDataTraits.cpp.

46 {
47  return packet.sequence_number();
48 }
Here is the call graph for this function:

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