| 1 | package desmoj.core.report; |
| 2 | |
| 3 | import desmoj.core.simulator.Model; |
| 4 | import desmoj.core.simulator.TimeInstant; |
| 5 | |
| 6 | /** |
| 7 | * Represents a DebugNote produced by a simulation run whenever the modeller |
| 8 | * enables the debug mode for a specific ModelComponent. Provides the basic |
| 9 | * information needed to debug a model's changes of state: |
| 10 | * <ul> |
| 11 | * <li>The Model this DebugNote originates from</li> |
| 12 | * <li>The point in simulation time that this DebugNote was issued</li> |
| 13 | * <li>The name of the ModelComponent that produced the DebugNote</li> |
| 14 | * <li>The textual debug information produced by that ModelComponent</li> |
| 15 | * </ul> |
| 16 | * |
| 17 | * @version DESMO-J, Ver. 2.3.3 copyright (c) 2011 |
| 18 | * @author Tim Lechler |
| 19 | * |
| 20 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 21 | * you may not use this file except in compliance with the License. You |
| 22 | * may obtain a copy of the License at |
| 23 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 24 | * |
| 25 | * Unless required by applicable law or agreed to in writing, software |
| 26 | * distributed under the License is distributed on an "AS IS" |
| 27 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 28 | * or implied. See the License for the specific language governing |
| 29 | * permissions and limitations under the License. |
| 30 | * |
| 31 | */ |
| 32 | public class DebugNote extends Message { |
| 33 | |
| 34 | /** |
| 35 | * The ModelComponent that produced this DebugNote. |
| 36 | */ |
| 37 | private String _dbgComponent; |
| 38 | |
| 39 | /** |
| 40 | * Constructs a debugnote with the given parameters. |
| 41 | * |
| 42 | * @param origin |
| 43 | * Model : The model that produced this debugnote |
| 44 | * @param description |
| 45 | * java.lang.String : The actual debug information |
| 46 | * @param time |
| 47 | * TimeInstant : The point of simulation time this debugnote was |
| 48 | * created |
| 49 | * @param componentName |
| 50 | * java.lang.String : The name of the modelcomponent the |
| 51 | * debugnote evolved from |
| 52 | */ |
| 53 | //TODO: |
| 54 | public DebugNote(Model origin, TimeInstant time, String componentName, |
| 55 | String description) { |
| 56 | |
| 57 | super(origin, description, time); |
| 58 | _dbgComponent = componentName; |
| 59 | |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Returns the name of the modelcomponent that produced this debugnote. |
| 64 | * |
| 65 | * @return java.lang.String : The model that produced this debugnote |
| 66 | */ |
| 67 | public String getOrigin() { |
| 68 | |
| 69 | return _dbgComponent; |
| 70 | |
| 71 | } |
| 72 | } |