Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d6d7e2c036b56e0e51f1099fee77176c20a24653
[simgrid.git] / include / simgrid / plugins / battery.hpp
1 /* Copyright (c) 2023. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5 #ifndef SIMGRID_PLUGINS_BATTERY_H_
6 #define SIMGRID_PLUGINS_BATTERY_H_
7
8 #include <simgrid/config.h>
9 #include <simgrid/forward.h>
10 #include <xbt/base.h>
11
12 SG_BEGIN_DECL
13
14 XBT_PUBLIC void sg_battery_plugin_init();
15
16 XBT_PUBLIC void sg_battery_set_state(const_sg_host_t host, bool state);
17 XBT_PUBLIC void sg_battery_set_power(const_sg_host_t host, double power);
18
19 XBT_PUBLIC bool sg_battery_is_active(const_sg_host_t host);
20 XBT_PUBLIC double sg_battery_get_power(const_sg_host_t host);
21 XBT_PUBLIC double sg_battery_get_state_of_charge(const_sg_host_t host);
22 XBT_PUBLIC double sg_battery_get_state_of_charge_min(const_sg_host_t host);
23 XBT_PUBLIC double sg_battery_get_state_of_charge_max(const_sg_host_t host);
24 XBT_PUBLIC double sg_battery_get_state_of_health(const_sg_host_t host);
25 XBT_PUBLIC double sg_battery_get_capacity(const_sg_host_t host);
26 XBT_PUBLIC double sg_battery_get_cumulative_cost(const_sg_host_t host);
27 XBT_PUBLIC double sg_battery_get_next_event_date(const_sg_host_t host);
28
29 SG_END_DECL
30
31 #endif