A representation of a ChargingStation, inherited from EntityBase It stores the ChargingStation's name, ID, version, position, direction, and dynamic mode.
More...
#include <charging_station.h>
|
std::string | name |
|
int | ID |
|
std::vector< float > | position |
|
std::vector< float > | direction |
|
bool | dynamic |
|
int | version |
|
float | radius |
|
std::string | type |
|
picojson::object | details |
|
A representation of a ChargingStation, inherited from EntityBase It stores the ChargingStation's name, ID, version, position, direction, and dynamic mode.
◆ ChargingStation() [1/2]
csci3081::ChargingStation::ChargingStation |
( |
const picojson::object & |
val | ) |
|
◆ ChargingStation() [2/2]
csci3081::ChargingStation::ChargingStation |
( |
ChargingStation & |
chargingStation | ) |
|
Copy Constructor. This creates a new instance of ChargingStation that has the same content as the chargingStation argument.
- Parameters
-
[in] | chargingStation | chargingStation instance that wants to be copied |
◆ AddChargingDrone()
bool csci3081::ChargingStation::AddChargingDrone |
( |
RechargeDrone * |
chargingDrone | ) |
|
This adds a unique charging drone to the charging station only if the distance between the two is close together.
- Parameters
-
[in] | chargingDrone | A charging drone to be added to the charging station. |
- Returns
- bool Returns true if the charging drone was successfully added. False otherwise.
◆ AddDeadCarrier()
void csci3081::ChargingStation::AddDeadCarrier |
( |
Carrier * |
carrier | ) |
|
This adds a new dead carrier to a deadCarriers vector.
- Parameters
-
[in] | carrier | A new carrier to be added to deadCarriers vector. |
◆ HasDeadCarrier()
bool csci3081::ChargingStation::HasDeadCarrier |
( |
Carrier * |
carrier | ) |
|
This function checks if the charging station has already stored the dead carrier.
- Parameters
-
[in] | carrier | Dead carrier to be checked if noted in the charging station |
- Returns
- bool True if the charging station has already stored the dead carrier. False otherwise.
◆ RemoveChargingDrone()
void csci3081::ChargingStation::RemoveChargingDrone |
( |
RechargeDrone * |
chargingDrone | ) |
|
This removes a charging drone from the charging station. This is due to a charging drone leaving the station to charge for a dead carrier.
- Parameters
-
[in] | chargingDrone | A charging drone to be removed from the charging station. |
The documentation for this class was generated from the following files:
- /home/user/repo/project/include/charging_station.h
- /home/user/repo/project/src/charging_station.cc