CIRCT 24.0.0git
Loading...
Searching...
No Matches
esi::services::TelemetryService::Metric Class Reference

A telemetry port which gets attached to a service port. More...

#include <Services.h>

Inheritance diagram for esi::services::TelemetryService::Metric:
Collaboration diagram for esi::services::TelemetryService::Metric:

Public Member Functions

void connect ()
 Connect to a particular telemetry port. Offset should be non-nullopt.
std::future< MessageData > read ()
uint64_t readInt ()
virtual std::optional< std::string > toString (bool oneLine=false) const override
Public Member Functions inherited from esi::services::ServicePort
virtual ~ServicePort ()=default
 BundlePort (AppID id, const BundleType *type, PortMap channels)
 Construct a port.
Public Member Functions inherited from esi::BundlePort
 BundlePort (AppID id, const BundleType *type, PortMap channels)
 Construct a port.
virtual ~BundlePort ()=default
AppID getID () const
 Get the ID of the port.
WriteChannelPort & getRawWrite (const std::string &name) const
 Get access to the raw byte streams of a channel.
ReadChannelPort & getRawRead (const std::string &name) const
const PortMap & getChannels () const
template<typename T>
T * getAs () const
 Cast this Bundle port to a subclass which is actually useful.
bool poll ()
 Calls poll on all channels in the bundle and returns true if any of them returned true.

Private Member Functions

 Metric (AppID id, const BundleType *type, PortMap channels, const TelemetryService *telemetryService, std::optional< uint64_t > offset)

Private Attributes

const TelemetryService * telemetryService
MMIO::MMIORegion * mmio
std::optional< uint64_t > offset

Friends

class TelemetryService

Additional Inherited Members

Static Public Member Functions inherited from esi::BundlePort
static bool isWrite (BundleType::Direction bundleDir)
 Compute the direction of a channel given the bundle direction and the bundle port's direction.
Protected Attributes inherited from esi::BundlePort
AppID id
const BundleType * type
PortMap channels

Detailed Description

A telemetry port which gets attached to a service port.

Definition at line 502 of file Services.h.

Constructor & Destructor Documentation

◆ Metric()

TelemetryService::Metric::Metric ( AppID id,
const BundleType * type,
PortMap channels,
const TelemetryService * telemetryService,
std::optional< uint64_t > offset )
private

Member Function Documentation

◆ connect()

void TelemetryService::Metric::connect ( )

Connect to a particular telemetry port. Offset should be non-nullopt.

Definition at line 481 of file Services.cpp.

References assert(), mmio, offset, telemetryService, and esi::toString().

Referenced by aggregateHostmemBandwidthTest(), bandwidthWriteTest(), hostmemReadBandwidthTest(), hostmemWriteBandwidthTest(), and NB_MODULE().

◆ read()

std::future< MessageData > TelemetryService::Metric::read ( )

Definition at line 488 of file Services.cpp.

References esi::MessageData::from(), and readInt().

Referenced by NB_MODULE().

◆ readInt()

uint64_t TelemetryService::Metric::readInt ( )

◆ toString()

virtual std::optional< std::string > esi::services::TelemetryService::Metric::toString ( bool oneLine = false) const
inlineoverridevirtual

Reimplemented from esi::services::ServicePort.

Definition at line 514 of file Services.h.

References esi::ChannelType::getInner(), esi::Type::toString(), and esi::BundlePort::type.

◆ TelemetryService

friend class TelemetryService
friend

Member Data Documentation

◆ mmio

MMIO::MMIORegion* esi::services::TelemetryService::Metric::mmio
private

Definition at line 523 of file Services.h.

Referenced by connect(), Metric(), and readInt().

◆ offset

std::optional<uint64_t> esi::services::TelemetryService::Metric::offset
private

Definition at line 524 of file Services.h.

Referenced by connect(), Metric(), readInt(), and TelemetryService.

◆ telemetryService

const TelemetryService* esi::services::TelemetryService::Metric::telemetryService
private

Definition at line 522 of file Services.h.

Referenced by connect(), Metric(), and TelemetryService.


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