geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
geopm_agent.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef GEOPM_AGENT_H_INCLUDE
7 #define GEOPM_AGENT_H_INCLUDE
8 
9 #include <stddef.h>
10 
11 #include "geopm_public.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
24 int GEOPM_PUBLIC
25  geopm_agent_supported(const char *agent_name);
26 
37 int GEOPM_PUBLIC
38  geopm_agent_num_policy(const char *agent_name, int *num_policy);
39 
58 int GEOPM_PUBLIC
59  geopm_agent_policy_name(const char *agent_name, int policy_idx,
60  size_t policy_name_max, char *policy_name);
61 
79 int GEOPM_PUBLIC
80  geopm_agent_policy_json(const char *agent_name, const double *policy_array,
81  size_t json_string_max, char *json_string);
82 
103 int GEOPM_PUBLIC
104  geopm_agent_policy_json_partial(const char *agent_name, size_t policy_array_size,
105  const double *policy_array, size_t json_string_max,
106  char *json_string);
107 
118 int GEOPM_PUBLIC
119  geopm_agent_num_sample(const char *agent_name, int *num_sample);
120 
138 int GEOPM_PUBLIC
139  geopm_agent_sample_name(const char *agent_name, int sample_idx,
140  size_t sample_name_max, char *sample_name);
141 
149 int GEOPM_PUBLIC
150  geopm_agent_num_avail(int *num_agent);
151 
168 int GEOPM_PUBLIC
169  geopm_agent_name(int agent_idx, size_t agent_name_max, char *agent_name);
170 
178 int GEOPM_PUBLIC
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 #endif
int GEOPM_PUBLIC geopm_agent_supported(const char *agent_name)
Query if system supports an agent type.
Definition: Agent.cpp:230
int GEOPM_PUBLIC geopm_agent_name(int agent_idx, size_t agent_name_max, char *agent_name)
The name of a specific agent.
Definition: Agent.cpp:427
int GEOPM_PUBLIC geopm_agent_num_avail(int *num_agent)
The number of available agents.
Definition: Agent.cpp:448
int GEOPM_PUBLIC geopm_agent_num_sample(const char *agent_name, int *num_sample)
The number of sampled parameters provided by agent.
Definition: Agent.cpp:270
int GEOPM_PUBLIC geopm_agent_policy_name(const char *agent_name, int policy_idx, size_t policy_name_max, char *policy_name)
Get the name of a policy parameter.
Definition: Agent.cpp:291
int GEOPM_PUBLIC geopm_agent_policy_json_partial(const char *agent_name, size_t policy_array_size, const double *policy_array, size_t json_string_max, char *json_string)
Create a json file to control agent policy statically.
Definition: Agent.cpp:378
int GEOPM_PUBLIC geopm_agent_num_policy(const char *agent_name, int *num_policy)
Get number of policy parameters supported by agent.
Definition: Agent.cpp:249
int GEOPM_PUBLIC geopm_agent_enforce_policy(void)
Enforce a static implementation of the agent's policy. The agent and the policy are chosen based on t...
Definition: Controller.cpp:133
int GEOPM_PUBLIC geopm_agent_policy_json(const char *agent_name, const double *policy_array, size_t json_string_max, char *json_string)
Create a json file to control agent policy statically.
Definition: Agent.cpp:364
int GEOPM_PUBLIC geopm_agent_sample_name(const char *agent_name, int sample_idx, size_t sample_name_max, char *sample_name)
The name of the indexed sample value.
Definition: Agent.cpp:327