NvRulesAPI: NV::Rules::IMetric Class Reference

# NV::Rules::IMetric Class Reference
[NvRules Python garbage-collected classes.]

Metric interface. More...

## Public Member Functions
virtual double | as_double (size_t instance)=0
| Get a value from the metric list as double.
virtual double | as_double ()=0
| Get the metric value as double.
virtual const char * | as_string (size_t instance)=0
| Get a value from the metric list as string.
virtual const char * | as_string ()=0
| Get the metric value as string.
virtual uint64_t | as_uint64 (size_t instance)=0
| Get a value from the metric list as 64bit integer.
virtual uint64_t | as_uint64 ()=0
| Get the metric value as 64bit integer.
virtual bool | has_value (ValueKind value_kind)=0
| Check if the metric has a value of a specific kind.
virtual bool | has_value ()=0
| Check if the metric has a non-instanced value.
virtual ValueKind | kind (size_t instance)=0
| Get the metric list entry value kind.
virtual ValueKind | kind ()=0
| Get the metric value kind.
virtual const char * | name ()=0
| Get the metric name.
virtual size_t | num_instances ()=0
| Get the number of values in the metric list.

## Detailed Description

Represents a single, named metric. A metric can carry one value or multiple, if it is an instanced metric.

## Member Function Documentation

virtual double NV::Rules::IMetric::as_double | ( | size_t | instance | ) | `[pure virtual]`

Get a value `instance` from the metric list as double

virtual double NV::Rules::IMetric::as_double | ( |  | ) | `[pure virtual]`

Get the metric value as double

virtual const char* NV::Rules::IMetric::as_string | ( | size_t | instance | ) | `[pure virtual]`

Get a value `instance` from the metric list as string

virtual const char* NV::Rules::IMetric::as_string | ( |  | ) | `[pure virtual]`

Get the metric value as string

virtual uint64_t NV::Rules::IMetric::as_uint64 | ( | size_t | instance | ) | `[pure virtual]`

Get a value `instance` from the metric list as 64bit integer

virtual uint64_t NV::Rules::IMetric::as_uint64 | ( |  | ) | `[pure virtual]`

Get the metric value as 64bit integer

virtual bool NV::Rules::IMetric::has_value | ( | ValueKind | value_kind | ) | `[pure virtual]`

Check if the metric has a value of a specific `value_kind`

virtual bool NV::Rules::IMetric::has_value | ( |  | ) | `[pure virtual]`

Check if the metric has a non-instanced value. If true, the metric may still have instance values, too.

virtual ValueKind NV::Rules::IMetric::kind | ( | size_t | instance | ) | `[pure virtual]`

Get the metric list entry value kind

virtual ValueKind NV::Rules::IMetric::kind | ( |  | ) | `[pure virtual]`

Get the metric value kind

virtual const char* NV::Rules::IMetric::name | ( |  | ) | `[pure virtual]`

Get the metric name

virtual size_t NV::Rules::IMetric::num_instances | ( |  | ) | `[pure virtual]`

Get the number of values in the metric list