com.kuka.nav.battery
Interface BatteryManager


public interface BatteryManager

Interface of the battery manager. Allows configuration of different thresholds in the state of charge for all or individual robots and registration of listeners when the battery level changes.
The installed default BatteryLevels consists of the three levels: LOW, MID and HIGH.

Note:
Since the Battery Manager is a single global component, it keeps it's configuration state during the lifetime of the VMS and therefore may survive the life-cycle of an application.


Method Summary
 void addBatteryListener(BatteryListener listener)
          Adds a listener to be notified of any changes in the state of charge of any robot.
 BatteryLevels.BatteryLevel getBatteryLevel(com.kuka.nav.robot.MobileRobot robot)
          Query the current state of charge level based on the current state of charge and the currently configured battery levels.
 BatteryLevels getBatteryLevels()
           
 BatteryLevels getBatteryLevels(com.kuka.nav.robot.MobileRobot robot)
           
 Collection<com.kuka.nav.robot.MobileRobot> getRobotsWithLevel(String levelName)
           
 void removeBatteryListener(BatteryListener listener)
          Removes a listener to stop receiving events.
 void reset()
          Completely resets the battery manager to the state of instance creation.
 void resetBatteryLevels()
          Resets the global battery levels configuration to the default one (LOW, MID, HIGH) with the default thresholds.
 void resetBatteryLevels(com.kuka.nav.robot.MobileRobot robot)
          Removes the robot specific BatteryLevels configuration for the given robot.
 void setBatteryLevels(BatteryLevels levels)
          Sets the global battery levels.
 void setBatteryLevels(com.kuka.nav.robot.MobileRobot robot, BatteryLevels levels)
          Sets robot specific battery levels.
 

Method Detail

reset

void reset()
Completely resets the battery manager to the state of instance creation.
Removes all robot specific battery level configurations and resets the global battery level configuration to the default.


setBatteryLevels

void setBatteryLevels(BatteryLevels levels)
Sets the global battery levels. These levels are used by any robot as a fall-back if no robot specific levels are set.

Parameters:
levels - the state of charge levels configuration

resetBatteryLevels

void resetBatteryLevels()
Resets the global battery levels configuration to the default one (LOW, MID, HIGH) with the default thresholds.


getBatteryLevels

BatteryLevels getBatteryLevels()
Returns:
the fall-back state of charge levels configuration

setBatteryLevels

void setBatteryLevels(com.kuka.nav.robot.MobileRobot robot,
                      BatteryLevels levels)
Sets robot specific battery levels. These levels are used over the fall-back configuration.

Parameters:
robot - the robot these levels apply to
levels - the state of charge levels configuration

resetBatteryLevels

void resetBatteryLevels(com.kuka.nav.robot.MobileRobot robot)
Removes the robot specific BatteryLevels configuration for the given robot.
After execution, the fall-back state of charge levels configuration will be valid again for the given robot.

Parameters:
robot - the robot to remove the BatteryLevels configuration for.

getBatteryLevels

BatteryLevels getBatteryLevels(com.kuka.nav.robot.MobileRobot robot)
Parameters:
robot - the robot whose state of charge levels are queried
Returns:
the state of charge levels of the specified robot

getBatteryLevel

BatteryLevels.BatteryLevel getBatteryLevel(com.kuka.nav.robot.MobileRobot robot)
Query the current state of charge level based on the current state of charge and the currently configured battery levels.

Parameters:
robot - the robot whose battery level is to be queried
Returns:
the current state of charge level of the specified robot

getRobotsWithLevel

Collection<com.kuka.nav.robot.MobileRobot> getRobotsWithLevel(String levelName)
Parameters:
levelName - the name of a battery level
Returns:
all robots whose current battery level has the specified name

addBatteryListener

void addBatteryListener(BatteryListener listener)
Adds a listener to be notified of any changes in the state of charge of any robot.

Parameters:
listener - a listener

removeBatteryListener

void removeBatteryListener(BatteryListener listener)
Removes a listener to stop receiving events.

Parameters:
listener - a listener


Copyright © 2019. All rights reserved.