LCOV - code coverage report
Current view: top level - src/guisim - GUIChargingStation.h (source / functions) Coverage Total Hit
Test: lcov.info Lines: 0.0 % 1 0
Test Date: 2024-10-24 15:46:30 Functions: - 0 0

            Line data    Source code
       1              : /****************************************************************************/
       2              : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3              : // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
       4              : // This program and the accompanying materials are made available under the
       5              : // terms of the Eclipse Public License 2.0 which is available at
       6              : // https://www.eclipse.org/legal/epl-2.0/
       7              : // This Source Code may also be made available under the following Secondary
       8              : // Licenses when the conditions for such availability set forth in the Eclipse
       9              : // Public License 2.0 are satisfied: GNU General Public License, version 2
      10              : // or later which is available at
      11              : // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
      12              : // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
      13              : /****************************************************************************/
      14              : /// @file    GUIChargingStation.h
      15              : /// @author  Daniel Krajzewicz
      16              : /// @author  Jakob Erdmann
      17              : /// @author  Michael Behrisch
      18              : /// @author  Tamas Kurczveil
      19              : /// @author  Pablo Alvarez Lopez
      20              : /// @date    20-12-13
      21              : ///
      22              : // A lane area vehicles can halt at (gui-version)
      23              : /****************************************************************************/
      24              : #pragma once
      25              : #include <config.h>
      26              : 
      27              : #include <vector>
      28              : #include <string>
      29              : #include <utils/common/Command.h>
      30              : #include <utils/common/VectorHelper.h>
      31              : #include <utils/geom/PositionVector.h>
      32              : #include <microsim/trigger/MSChargingStation.h>
      33              : #include <guisim/GUIBusStop.h>
      34              : #include <utils/gui/globjects/GUIGlObject.h>
      35              : #include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>
      36              : #include <utils/gui/globjects/GUIGLObjectPopupMenu.h>
      37              : #include <utils/geom/Position.h>
      38              : #include <gui/GUIManipulator.h>
      39              : 
      40              : 
      41              : // ===========================================================================
      42              : // class declarations
      43              : // ===========================================================================
      44              : class MSNet;
      45              : class MSLane;
      46              : class GUIManipulator;
      47              : 
      48              : 
      49              : // ===========================================================================
      50              : // class definitions
      51              : // ===========================================================================
      52              : /**
      53              :  * @class GUIChargingStation
      54              :  * @brief A lane area vehicles can halt at (gui-version)
      55              :  *
      56              :  * This gui-version of a bus-stop extends MSChargingStation by methods for displaying
      57              :  *  and interaction.
      58              :  *
      59              :  * @see MSChargingStation
      60              :  * @see GUIGlObject_AbstractAdd
      61              :  * @see GUIGlObject
      62              :  */
      63              : class GUIChargingStation : public MSChargingStation, public GUIGlObject_AbstractAdd {
      64              : public:
      65              :     /** @brief Constructor
      66              :      * @param[in] id The id of the Charging Station
      67              :      * @param[in] lane The lane the charging station is placed on
      68              :      * @param[in] frompos Begin position of the charging station on the lane
      69              :      * @param[in] topos End position of the charging station on the lane
      70              :      * @param[in] chargingPower energy charged in every timeStep
      71              :      * @param[in] efficiency efficiency of the charge
      72              :      * @param[in] chargeInTransit enable or disable charge in transit
      73              :      * @param[in] chargeDelay delay in the charge
      74              :      * @param[in] chargeType charge type (normal, electric or fuel)
      75              :      * @param[in] waitingTime waiting time until start charging
      76              :      */
      77              :     GUIChargingStation(const std::string& id, MSLane& lane, double frompos, double topos,
      78              :                        const std::string& name, double chargingPower, double efficiency,
      79              :                        bool chargeInTransit, SUMOTime chargeDelay, const std::string& chargeType,
      80              :                        SUMOTime waitingTime);
      81              : 
      82              :     /** @brief Constructor
      83              :      * @param[in] id The id of the Charging Station
      84              :      * @param[in] parkingArea The parking area the charging station is placed on
      85              :      * @param[in] frompos Begin position of the charging station on the lane
      86              :      * @param[in] topos End position of the charging station on the lane
      87              :      * @param[in] chargingPower energy charged in every timeStep
      88              :      * @param[in] efficiency efficiency of the charge
      89              :      * @param[in] chargeInTransit enable or disable charge in transit
      90              :      * @param[in] chargeDelay delay in the charge
      91              :      * @param[in] chargeType charge type (normal, electric or fuel)
      92              :      * @param[in] waitingTime waiting time until start charging
      93              :      */
      94              :     GUIChargingStation(const std::string& id, MSParkingArea* parkingArea,
      95              :                        const std::string& name, double chargingPower, double efficiency,
      96              :                        bool chargeInTransit, SUMOTime chargeDelay, const std::string& chargeType,
      97              :                        SUMOTime waitingTime);
      98              : 
      99              :     /// @brief Destructor
     100              :     ~GUIChargingStation();
     101              : 
     102              :     /// @name inherited from GUIGlObject
     103              :     //@{
     104              : 
     105              :     /** @brief Returns an own popup-menu
     106              :      *
     107              :      * @param[in] app The application needed to build the popup-menu
     108              :      * @param[in] parent The parent window needed to build the popup-menu
     109              :      * @return The built popup-menu
     110              :      * @see GUIGlObject::getPopUpMenu
     111              :      */
     112              :     GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent);
     113              : 
     114              :     /** @brief Returns an own parameter window
     115              :      *
     116              :      * Bus stops have no parameter windows (yet).
     117              :      *
     118              :      * @param[in] app The application needed to build the parameter window
     119              :      * @param[in] parent The parent window needed to build the parameter window
     120              :      * @return The built parameter window (always 0 in this case)
     121              :      * @see GUIGlObject::getParameterWindow
     122              :      */
     123              :     GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent);
     124              : 
     125              :     /// @brief return exaggeration associated with this GLObject
     126              :     double getExaggeration(const GUIVisualizationSettings& s) const;
     127              : 
     128              :     /** @brief Returns the boundary to which the view shall be centered in order to show the object
     129              :      *
     130              :      * @return The boundary the object is within
     131              :      * @see GUIGlObject::getCenteringBoundary
     132              :      */
     133              :     Boundary getCenteringBoundary() const;
     134              : 
     135              :     /// @brief Returns the stopping place name
     136              :     const std::string getOptionalName() const;
     137              : 
     138              :     /** @brief Draws the object
     139              :      * @param[in] s The settings for the current view (may influence drawing)
     140              :      * @see GUIGlObject::drawGL
     141              :      */
     142              :     void drawGL(const GUIVisualizationSettings& s) const;
     143              :     //@}
     144              : 
     145              :     const Position& getSignPos() const {
     146            0 :         return myFGSignPos;
     147              :     }
     148              : 
     149              : private:
     150              :     /// @brief Returns the stopping place name
     151              :     void initAppearance(MSLane& lane, double frompos, double topos);
     152              : 
     153              : private:
     154              :     /// @brief The rotations of the shape parts
     155              :     std::vector<double> myFGShapeRotations;
     156              : 
     157              :     /// @brief The lengths of the shape parts
     158              :     std::vector<double> myFGShapeLengths;
     159              : 
     160              :     /// @brief The shape
     161              :     PositionVector myFGShape;
     162              : 
     163              :     /// @brief The position of the sign
     164              :     Position myFGSignPos;
     165              : 
     166              :     /// @brief The rotation of the sign
     167              :     double myFGSignRot;
     168              : };
        

Generated by: LCOV version 2.0-1