Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
4c4a719e
Commit
4c4a719e
authored
Sep 07, 2018
by
Julian Zobel
Browse files
Added function to all batteries, to retrieve the maximum possible capacity.
parent
1de811e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/energy/Battery.java
View file @
4c4a719e
...
...
@@ -29,6 +29,13 @@ package de.tud.kom.p2psim.impl.energy;
*/
public
interface
Battery
extends
Cloneable
{
/**
* Returns the maximum energy level in uJ.
*
* @return the maximum capacity of the battery in uJ
*/
public
double
getMaximumEnergyLevel
();
/**
* Returns the current status of the Battery as a Percentage-Value
*
...
...
src/de/tud/kom/p2psim/impl/energy/SimpleBattery.java
View file @
4c4a719e
...
...
@@ -107,4 +107,9 @@ public class SimpleBattery implements Battery {
return
new
SimpleBattery
(
capacity
/
1000000
,
initialEnergy
/
1000000
);
}
@Override
public
double
getMaximumEnergyLevel
()
{
return
initialEnergy
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment