SUMO - Simulation of Urban MObility
Command_SaveTLSSwitchStates.h
Go to the documentation of this file.
00001 /****************************************************************************/
00008 // Writes the switch times of a tls into a file when the tls switches
00009 /****************************************************************************/
00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00012 /****************************************************************************/
00013 //
00014 //   This file is part of SUMO.
00015 //   SUMO is free software: you can redistribute it and/or modify
00016 //   it under the terms of the GNU General Public License as published by
00017 //   the Free Software Foundation, either version 3 of the License, or
00018 //   (at your option) any later version.
00019 //
00020 /****************************************************************************/
00021 #ifndef Command_SaveTLSSwitchStates_h
00022 #define Command_SaveTLSSwitchStates_h
00023 
00024 
00025 // ===========================================================================
00026 // included modules
00027 // ===========================================================================
00028 #ifdef _MSC_VER
00029 #include <windows_config.h>
00030 #else
00031 #include <config.h>
00032 #endif
00033 
00034 #include <string>
00035 #include <map>
00036 #include <utils/common/Command.h>
00037 #include <microsim/traffic_lights/MSTLLogicControl.h>
00038 
00039 
00040 // ===========================================================================
00041 // class declarations
00042 // ===========================================================================
00043 class MSTrafficLightLogic;
00044 class OutputDevice;
00045 
00046 
00047 // ===========================================================================
00048 // class definitions
00049 // ===========================================================================
00056 class Command_SaveTLSSwitchStates : public Command {
00057 public:
00063     Command_SaveTLSSwitchStates(const MSTLLogicControl::TLSLogicVariants& logics,
00064                                 OutputDevice& od);
00065 
00066 
00068     ~Command_SaveTLSSwitchStates();
00069 
00070 
00073 
00084     SUMOTime execute(SUMOTime currentTime);
00086 
00087 
00088 private:
00090     OutputDevice& myOutputDevice;
00091 
00093     const MSTLLogicControl::TLSLogicVariants& myLogics;
00094 
00096     std::string myPreviousState;
00097 
00099     std::string myPreviousProgramID;
00100 
00101 
00102 private:
00104     Command_SaveTLSSwitchStates(const Command_SaveTLSSwitchStates&);
00105 
00107     Command_SaveTLSSwitchStates& operator=(const Command_SaveTLSSwitchStates&);
00108 
00109 };
00110 
00111 
00112 #endif
00113 
00114 /****************************************************************************/
00115 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines