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

Interface to packing/unpacking rcpt from the BeamFormer rcpt stream UDP packet. More...

#include <cheetah/rcpt_low/BeamFormerPacket.h>

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

Public Types

enum  PacketType { PssLow, PssMid, PstLow, PstMid }
 

Public Member Functions

void packet_count (PacketNumberType)
 set the counter in the header
 
PacketNumberType packet_count () const
 get the counter info from header
 
void packet_type (PacketType const)
 set the type of packet
 
PacketType packet_type () const
 return the packet type
 
void insert (std::size_t sample_number, Sample s)
 insert a sample
 
Sample const & sample (std::size_t sample) const
 return the named sample
 
const Samplebegin () const
 Pointers to the begin and end of the data in the packet.
 
const Sampleend () const
 
const WeightsType * begin_weights () const
 Pointers to the begin and end of the weights in the packet.
 
const WeightsType * end_weights () const
 
ChannelNumberType first_channel_number () const
 the number of the first channel in the packet
 
void first_channel_number (ChannelNumberType number)
 
ScanIdType scan_id () const
 scan ID of the packet stream
 
void scan_id (ScanIdType number)
 
BeamNumberType beam_number () const
 beam id of the packet stream
 
void beam_number (BeamNumberType number)
 
boost::units::quantity< data::MegaHertz, double > first_channel_frequency () const
 First channel frequency in the packet in MHz.
 
void first_channel_frequency (boost::units::quantity< data::MegaHertz, double > value)
 
DataPrecisionType data_precision () const
 Data precision.
 
void data_precision (DataPrecisionType number)
 
MagicWordType magic_word () const
 scaling factor float scale() const; float scale(float number); More...
 
void magic_word (MagicWordType number)
 
auto channels_per_packet () const -> decltype(PacketHeader::channels_per_packet)
 Number of channels in each packet.
 
void channels_per_packet (decltype(PacketHeader::channels_per_packet) number)
 
auto timestamp_seconds () const -> decltype(PacketHeader::timestamp_seconds)
 Timestamp in seconds.
 
void timestamp_seconds (decltype(PacketHeader::timestamp_seconds) number)
 
auto timestamp_attoseconds () const -> decltype(PacketHeader::timestamp_attoseconds)
 Timestamp in attoseconds.
 
void timestamp_attoseconds (decltype(PacketHeader::timestamp_attoseconds) number)
 
ChannelSeperationType channel_separation () const
 channel_separation
 
void channel_separation (ChannelSeperationType number)
 
void set_unit_weights ()
 set all weights to unity
 

Static Public Member Functions

static constexpr std::size_t header_size ()
 the total size of the udp packets header
 
static constexpr std::size_t footer_size ()
 the total size of the udp packets footer
 
static constexpr std::size_t payload_size ()
 the total size in bytes of the channel rcpt
 
static constexpr std::size_t data_size ()
 the total size in bytes of the channel rcpt
 
static std::size_t number_of_time_samples ()
 the total number of time samples in the packet
 
static constexpr std::size_t number_of_samples ()
 the total number of samples in the rcpt payload
 
static std::size_t number_of_channels ()
 the total number of frequencey channels in the rcpt payload
 
static constexpr std::size_t size ()
 the total size of the packet (header + payload + footer)
 
static constexpr PacketNumberType max_sequence_number ()
 return the maximum value the packet_count can take
 

Detailed Description

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

Interface to packing/unpacking rcpt from the BeamFormer rcpt stream UDP packet.

Definition at line 47 of file BeamFormerPacket.h.

Member Function Documentation

◆ magic_word()

template<typename PacketDataType , unsigned TimeSamplesPerPacket, unsigned ChannelsPerPacket>
BeamFormerPacket< PacketDataType, TimeSamplesPerPacket, ChannelsPerPacket >::MagicWordType ska::cheetah::rcpt_low::BeamFormerPacket< PacketDataType, TimeSamplesPerPacket, ChannelsPerPacket >::magic_word ( ) const

scaling factor float scale() const; float scale(float number);

Magic word used for consistency checks.

Definition at line 227 of file BeamFormerPacket.cpp.

228 {
229  return _header.magic_word;
230 }
Here is the call graph for this function:

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