00001 /* 00002 **************************************************************************** 00003 * 00004 * simulavr - A simulator for the Atmel AVR family of microcontrollers. 00005 * Copyright (C) 2001, 2002, 2003 Klaus Rudolph 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 * 00021 **************************************************************************** 00022 * 00023 * $Id$ 00024 */ 00025 00026 #ifndef SCOPE 00027 #define SCOPE 00028 00029 00030 #include <iostream> 00031 #include <string> 00032 #include <vector> 00033 00034 #include "../systemclocktypes.h" 00035 #include "../simulationmember.h" 00036 #include "ui.h" 00037 #include "../pin.h" 00038 00039 00040 class Scope : public SimulationMember { 00041 protected: 00042 UserInterface *ui; 00043 std::string name; 00044 unsigned char myPortValue; 00045 std::map<std::string, Pin*> allPins; 00046 00047 std::vector<Pin*> vecPin; 00048 std::vector<int> lastVal; 00049 unsigned int noOfChannels; 00050 00051 00052 public: 00053 Scope(UserInterface *ui, const std::string &name, unsigned int noOfChannels, const char *baseWindow); 00054 virtual ~Scope(); 00055 Pin *GetPin(unsigned int no); 00056 virtual int Step(bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns){return 0;} //what we should step here? 00057 void SetInStateForChannel(unsigned int channel, const Pin& p); 00058 }; 00059 00060 #endif