AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::utils::metrics::MetricEvent Class Reference

#include <MetricEvent.h>

Public Member Functions

 MetricEvent (const std::string &activityName, Priority priority, const std::unordered_map< std::string, DataPoint > &dataPoints, std::chrono::steady_clock::time_point timestamp)
 
std::string getActivityName () const
 
Priority getPriority () const
 
Optional< DataPointgetDataPoint (const std::string &name, DataType dataType) const
 
std::vector< DataPointgetDataPoints () const
 
std::chrono::system_clock::time_point getTimestamp () const
 
std::chrono::steady_clock::time_point getSteadyTimestamp () const
 

Detailed Description

This class represents the immutable MetricEvent object.

Constructor & Destructor Documentation

◆ MetricEvent()

alexaClientSDK::avsCommon::utils::metrics::MetricEvent::MetricEvent ( const std::string &  activityName,
Priority  priority,
const std::unordered_map< std::string, DataPoint > &  dataPoints,
std::chrono::steady_clock::time_point  timestamp 
)

Constructor

Parameters
activityNameis the activity name of the metric event.
priorityis the priority of the metric event
dataPointsis the collection of key value pairs from dataPoint id to dataPoint objects
timestampis the timestamp at which this metric event was created.

Member Function Documentation

◆ getActivityName()

std::string alexaClientSDK::avsCommon::utils::metrics::MetricEvent::getActivityName ( ) const

Getter method for the activity name of the metric event

Returns
the activity name of the metric event

◆ getDataPoint()

Optional<DataPoint> alexaClientSDK::avsCommon::utils::metrics::MetricEvent::getDataPoint ( const std::string &  name,
DataType  dataType 
) const

Gets dataPoint object from the current metric event

Parameters
nameThe name of the dataPoint to be retrieved
dataTypeThe dataType of the dataPoint to be retrieved
Returns
an optional dataPoint object

◆ getDataPoints()

std::vector<DataPoint> alexaClientSDK::avsCommon::utils::metrics::MetricEvent::getDataPoints ( ) const

Getter method for the dataPoints of the metric event

Returns
the dataPoints of the metric event

◆ getPriority()

Priority alexaClientSDK::avsCommon::utils::metrics::MetricEvent::getPriority ( ) const

Getter method for the priority of the metric event

Returns
the priority of the metric event

◆ getSteadyTimestamp()

std::chrono::steady_clock::time_point alexaClientSDK::avsCommon::utils::metrics::MetricEvent::getSteadyTimestamp ( ) const

Getter method for the timestamp of when the metric event was created as a steady clock time point.

Returns
the timestamp of the metric event

◆ getTimestamp()

std::chrono::system_clock::time_point alexaClientSDK::avsCommon::utils::metrics::MetricEvent::getTimestamp ( ) const

Getter method for the timestamp of when the metric event was created as a system clock time point.

Returns
the timestamp of the metric event

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

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0