
hale-aloha-cli-backr
Hale-Aloha-CLI-BackR is a command line interface program to understand various aspects of energy use in the Hale Aloha residence halls at the University of Hawaii at Manoa. These following six commands are available to use while running this program:
- current-power (tower | lounge)
- Returns the current power in kW for the associated tower or lounge.
- Returns the current power in kW for the associated tower or lounge.
- daily-energy (tower | lounge) (date)
- Returns the energy in kWh used by the tower or lounge for the specified date (yyyy-mm-dd).
- Returns the energy in kWh used by the tower or lounge for the specified date (yyyy-mm-dd).
- energy-since (tower | lounge) (date)
- Returns the energy used since the date (yyyy-mm-dd) to now.
- Returns the energy used since the date (yyyy-mm-dd) to now.
- rank-towers (start) (end)
- Returns a list in sorted order from least to most energy consumed between the (start) and (end) date (yyyy-mm-dd)
- Returns a list in sorted order from least to most energy consumed between the (start) and (end) date (yyyy-mm-dd)
- set-baseline (tower | lounge) (date)
- Defines date(yyyy-mm-dd) as the "baseline" day for (tower | lounge).
- Defines date(yyyy-mm-dd) as the "baseline" day for (tower | lounge).
- monitor-power (tower | lounge) (interval)
- Prints out a timestamp and the current power for (tower | lounge) every (interval) seconds. (interval) is an optional integer greater than 0 and defaults to 10 seconds. Entering any character (such as a carriage return) stops this monitoring process and returns the user to the command loop.
- Prints out a timestamp and the current power for (tower | lounge) every (interval) seconds. (interval) is an optional integer greater than 0 and defaults to 10 seconds. Entering any character (such as a carriage return) stops this monitoring process and returns the user to the command loop.
- monitor-goal (tower | lounge) (goal) (interval)
- Prints out a timestamp, the current power being consumed by the (tower | lounge), and whether or not the lounge is meeting its power conservation goal. (goal) is an integer between 1 and 99. It defines the percentage reduction from the baseline for this (tower | lounge) at this point in time. (interval) is an integer greater than 0.
- Prints out a timestamp, the current power being consumed by the (tower | lounge), and whether or not the lounge is meeting its power conservation goal. (goal) is an integer between 1 and 99. It defines the percentage reduction from the baseline for this (tower | lounge) at this point in time. (interval) is an integer greater than 0.
- quit
- Terminates execution.
- Terminates execution.
- help
- Provides a list of commands to the user.
This program involves checking the user input for correctness. It checks to make sure that the command is legal, and then if the command is legal, that the correct number of arguments for that command is passed and that the arguments are also legal. It also provides helpful feedback to the user when a problem occurs and allow the user to enter a new command.
This system was built such that it could be extended to add additional commands in future revisions. It has a modular system where a central command processor class parses the user input, figures out what the command is, and dispatches to an instance of another class that has the code to handle the command. This development of an appropriate design means that new commands can be implemented with very few changes to existing classes.
Project Information
The project was created on Nov 11, 2011.
- License: Apache License 2.0
- svn-based source control