UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Net::TSampleProducer< ConsumerType > Class Template Reference

#include <NetStatsUtils.h>

+ Inheritance diagram for UE::Net::TSampleProducer< ConsumerType >:

Public Member Functions

void SetConsumer (ConsumerType *InConsumer)
 

Protected Member Functions

void OutputSample (double Value)
 
template<typename InnerConsumerType = ConsumerType, typename = typename TEnableIf<TModels_V<CPeekMeasurements, InnerConsumerType>>::Type>
void PeekMeasurement (double TimeVal, double Value)
 
template<typename InnerConsumerType = ConsumerType, typename = typename TEnableIf<!TModels_V<CPeekMeasurements, InnerConsumerType>>::Type, int32 UnusedParamForODR = 0>
void PeekMeasurement (double TimeVal, double Value)
 

Detailed Description

template<typename ConsumerType>
class UE::Net::TSampleProducer< ConsumerType >

Inherited class for a sample producer, which outputs samples to a consumer of the specified class.

The consumer must implement: void AddSample(double Val)

If the consumer wants to peek at each individual measurement that makes up the sample (for e.g. determining Min/Max measurements), then the consumer must implement: void PeekMeasurement(double TimeVal, double Val)

Parameters
ConsumerTypeThe type which will be used for consuming samples.

Member Function Documentation

◆ OutputSample()

template<typename ConsumerType >
void UE::Net::TSampleProducer< ConsumerType >::OutputSample ( double  Value)
inlineprotected

Called by subclasses to output a sample to the consumer.

Parameters
ValueThe sample value being output

◆ PeekMeasurement() [1/2]

template<typename ConsumerType >
template<typename InnerConsumerType = ConsumerType, typename = typename TEnableIf<TModels_V<CPeekMeasurements, InnerConsumerType>>::Type>
void UE::Net::TSampleProducer< ConsumerType >::PeekMeasurement ( double  TimeVal,
double  Value 
)
inlineprotected

Called by subclasses to let the consumer peek at individual measurements

Parameters
ValueThe measurement value being collected for sampling

◆ PeekMeasurement() [2/2]

template<typename ConsumerType >
template<typename InnerConsumerType = ConsumerType, typename = typename TEnableIf<!TModels_V<CPeekMeasurements, InnerConsumerType>>::Type, int32 UnusedParamForODR = 0>
void UE::Net::TSampleProducer< ConsumerType >::PeekMeasurement ( double  TimeVal,
double  Value 
)
inlineprotected

◆ SetConsumer()

template<typename ConsumerType >
void UE::Net::TSampleProducer< ConsumerType >::SetConsumer ( ConsumerType InConsumer)
inline

Sets the consumer object to output samples to.

Parameters
InConsumerThe consumer object

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