ifw-ccf 5.0.2
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ifw::ccf::common::FrameStatistics Class Reference

Class used by the threads to store info for generating performance statistics. More...

#include <utilities.hpp>

Public Member Functions

 FrameStatistics ()
 
 ~FrameStatistics ()
 
void Reset (double deferred_start_time=0.)
 
void SetNbOfSamples (const uint16_t nb)
 Set the number of samples to keep in the sliding window.
 
void Update (const double fr_recv_timestamp, const double fr_handling_time, const uint32_t fr_size)
 
void SetLostFramesCounter (const uint64_t lost_frames)
 Set the lost frames counter.
 
uint64_t IncSkippedFramesCounter ()
 Increment the frames handled counter.
 
void GetDataSnapshot (FrameStatistics &trg_obj) const
 Get a snapshot of the data in the object.
 
std::string GetId () const
 Get the ID of the object.
 
uint16_t GetNbOfSamples () const
 Get the number of samples used in the sliding window.
 
double GetStartTime () const
 Get the start time for the recording.
 
double GetLastUpdate () const
 Get the time for the last update of the samples.
 
double GetTimeFirstFrame () const
 Get the time stamp of the first frame status registered.
 
uint64_t GetFrameCount () const
 Get the number of frames handled.
 
uint64_t GetTotalFrameCount () const
 Get the total number of frames handled.
 
uint64_t GetVolume () const
 Get the volume (in bytes) of the frames handled.
 
uint64_t GetSkippedFrames () const
 Get the number of skipped frames.
 
uint64_t GetLostFrames () const
 Get the number of lost frames.
 
const std::vector< double > & GetFrRecvTimestamps () const
 Get a vector with the timestamps for receiving the frames.
 
const std::vector< uint64_t > & GetFrRecvFrCounts () const
 Get the frame counts of each frame for which data is stored in the object.
 
const std::vector< double > & GetFrHandlingTimes () const
 Get vector with the timestamp for handling the frames.
 
std::string ToString () const
 Generate a string summery of the contents of the object.
 
FrameStatisticsoperator= (const FrameStatistics &source)
 

Protected Attributes

std::string p_id
 
uint16_t p_nb_samples
 
double p_start_time {0}
 
double p_last_update {p_start_time}
 
uint64_t p_frame_count {0}
 
uint64_t p_total_frame_count {0}
 
uint64_t p_volume {0}
 
uint64_t p_lost_frames {0}
 
uint64_t p_skipped_frames {0}
 
std::vector< double > p_fr_recv_timestamps
 
double p_first_recv_time
 
std::vector< uint64_t > p_fr_recv_fr_counts
 
std::vector< double > p_fr_handling_times
 

Detailed Description

Class used by the threads to store info for generating performance statistics.

Constructor & Destructor Documentation

◆ FrameStatistics()

ifw::ccf::common::FrameStatistics::FrameStatistics ( )

◆ ~FrameStatistics()

ifw::ccf::common::FrameStatistics::~FrameStatistics ( )

Member Function Documentation

◆ GetDataSnapshot()

void ifw::ccf::common::FrameStatistics::GetDataSnapshot ( FrameStatistics & trg_obj) const

Get a snapshot of the data in the object.

◆ GetFrameCount()

uint64_t ifw::ccf::common::FrameStatistics::GetFrameCount ( ) const

Get the number of frames handled.

◆ GetFrHandlingTimes()

const std::vector< double > & ifw::ccf::common::FrameStatistics::GetFrHandlingTimes ( ) const

Get vector with the timestamp for handling the frames.

◆ GetFrRecvFrCounts()

const std::vector< uint64_t > & ifw::ccf::common::FrameStatistics::GetFrRecvFrCounts ( ) const

Get the frame counts of each frame for which data is stored in the object.

◆ GetFrRecvTimestamps()

const std::vector< double > & ifw::ccf::common::FrameStatistics::GetFrRecvTimestamps ( ) const

Get a vector with the timestamps for receiving the frames.

◆ GetId()

std::string ifw::ccf::common::FrameStatistics::GetId ( ) const

Get the ID of the object.

◆ GetLastUpdate()

double ifw::ccf::common::FrameStatistics::GetLastUpdate ( ) const

Get the time for the last update of the samples.

◆ GetLostFrames()

uint64_t ifw::ccf::common::FrameStatistics::GetLostFrames ( ) const

Get the number of lost frames.

◆ GetNbOfSamples()

uint16_t ifw::ccf::common::FrameStatistics::GetNbOfSamples ( ) const

Get the number of samples used in the sliding window.

◆ GetSkippedFrames()

uint64_t ifw::ccf::common::FrameStatistics::GetSkippedFrames ( ) const

Get the number of skipped frames.

◆ GetStartTime()

double ifw::ccf::common::FrameStatistics::GetStartTime ( ) const

Get the start time for the recording.

◆ GetTimeFirstFrame()

double ifw::ccf::common::FrameStatistics::GetTimeFirstFrame ( ) const

Get the time stamp of the first frame status registered.

◆ GetTotalFrameCount()

uint64_t ifw::ccf::common::FrameStatistics::GetTotalFrameCount ( ) const

Get the total number of frames handled.

◆ GetVolume()

uint64_t ifw::ccf::common::FrameStatistics::GetVolume ( ) const

Get the volume (in bytes) of the frames handled.

◆ IncSkippedFramesCounter()

uint64_t ifw::ccf::common::FrameStatistics::IncSkippedFramesCounter ( )

Increment the frames handled counter.

◆ operator=()

FrameStatistics & ifw::ccf::common::FrameStatistics::operator= ( const FrameStatistics & source)

◆ Reset()

void ifw::ccf::common::FrameStatistics::Reset ( double deferred_start_time = 0.)

Reset the frame statistics object.

Parameters
deferred_start_timedeferred start time if any

◆ SetLostFramesCounter()

void ifw::ccf::common::FrameStatistics::SetLostFramesCounter ( const uint64_t lost_frames)

Set the lost frames counter.

◆ SetNbOfSamples()

void ifw::ccf::common::FrameStatistics::SetNbOfSamples ( const uint16_t nb)

Set the number of samples to keep in the sliding window.

◆ ToString()

std::string ifw::ccf::common::FrameStatistics::ToString ( ) const

Generate a string summery of the contents of the object.

◆ Update()

void ifw::ccf::common::FrameStatistics::Update ( const double fr_recv_timestamp,
const double fr_handling_time,
const uint32_t fr_size )

Update the frame handling status with the reception time for the frame, the time it took to handle the frame and the size of the frame.

Member Data Documentation

◆ p_first_recv_time

double ifw::ccf::common::FrameStatistics::p_first_recv_time
protected

◆ p_fr_handling_times

std::vector<double> ifw::ccf::common::FrameStatistics::p_fr_handling_times
protected

◆ p_fr_recv_fr_counts

std::vector<uint64_t> ifw::ccf::common::FrameStatistics::p_fr_recv_fr_counts
protected

◆ p_fr_recv_timestamps

std::vector<double> ifw::ccf::common::FrameStatistics::p_fr_recv_timestamps
protected

◆ p_frame_count

uint64_t ifw::ccf::common::FrameStatistics::p_frame_count {0}
protected

◆ p_id

std::string ifw::ccf::common::FrameStatistics::p_id
protected

◆ p_last_update

double ifw::ccf::common::FrameStatistics::p_last_update {p_start_time}
protected

◆ p_lost_frames

uint64_t ifw::ccf::common::FrameStatistics::p_lost_frames {0}
protected

◆ p_nb_samples

uint16_t ifw::ccf::common::FrameStatistics::p_nb_samples
protected

◆ p_skipped_frames

uint64_t ifw::ccf::common::FrameStatistics::p_skipped_frames {0}
protected

◆ p_start_time

double ifw::ccf::common::FrameStatistics::p_start_time {0}
protected

◆ p_total_frame_count

uint64_t ifw::ccf::common::FrameStatistics::p_total_frame_count {0}
protected

◆ p_volume

uint64_t ifw::ccf::common::FrameStatistics::p_volume {0}
protected

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