Search in sources :

Example 6 with Signal

use of de.neemann.digital.core.Signal in project Digital by hneemann.

the class DataShape method registerModel.

@Override
public void registerModel(ModelCreator modelCreator, Model model, ModelEntry element) {
    ArrayList<Signal> signals = model.getSignalsCopy();
    new OrderMerger<String, Signal>(modelCreator.getCircuit().getMeasurementOrdering()) {

        @Override
        public boolean equals(Signal a, String b) {
            return a.getName().equals(b);
        }
    }.order(signals);
    ValueTableObserver valueTableObserver = new ValueTableObserver(microStep, signals, maxSize);
    logDataModel = valueTableObserver.getLogData();
    model.addObserver(valueTableObserver);
}
Also used : Signal(de.neemann.digital.core.Signal) ValueTableObserver(de.neemann.digital.gui.components.data.ValueTableObserver)

Example 7 with Signal

use of de.neemann.digital.core.Signal in project Digital by hneemann.

the class ProbeTest method testProbeNesting.

public void testProbeNesting() throws Exception {
    Model m = new ToBreakRunner("dig/probe/probeNest.dig").getModel();
    ArrayList<Signal> signals = m.getSignals();
    assertEquals(6, signals.size());
    assertTrue(signals.contains(new Signal("M-Probe1", null)));
    assertTrue(signals.contains(new Signal("M-Nest-Probe1", null)));
    assertTrue(signals.contains(new Signal("M-Nest-Probe2", null)));
}
Also used : Signal(de.neemann.digital.core.Signal) Model(de.neemann.digital.core.Model) ToBreakRunner(de.neemann.digital.integration.ToBreakRunner)

Example 8 with Signal

use of de.neemann.digital.core.Signal in project Digital by hneemann.

the class ProbeTest method testProbe.

public void testProbe() throws Exception {
    Model m = new ToBreakRunner("dig/probe/probe.dig").getModel();
    ArrayList<Signal> signals = m.getSignals();
    assertEquals(5, signals.size());
    assertTrue(signals.contains(new Signal("M-Probe1", null)));
    assertTrue(signals.contains(new Signal("M-Probe2", null)));
}
Also used : Signal(de.neemann.digital.core.Signal) Model(de.neemann.digital.core.Model) ToBreakRunner(de.neemann.digital.integration.ToBreakRunner)

Aggregations

Signal (de.neemann.digital.core.Signal)8 Model (de.neemann.digital.core.Model)4 Variable (de.neemann.digital.analyse.expression.Variable)2 BoolTableByteArray (de.neemann.digital.analyse.quinemc.BoolTableByteArray)2 ObservableValue (de.neemann.digital.core.ObservableValue)2 ToBreakRunner (de.neemann.digital.integration.ToBreakRunner)2 ArrayList (java.util.ArrayList)2 BoolTable (de.neemann.digital.analyse.quinemc.BoolTable)1 TableReducer (de.neemann.digital.analyse.quinemc.TableReducer)1 Node (de.neemann.digital.core.Node)1 NodeException (de.neemann.digital.core.NodeException)1 XOr (de.neemann.digital.core.basic.XOr)1 Clock (de.neemann.digital.core.wiring.Clock)1 Value (de.neemann.digital.data.Value)1 ValueTable (de.neemann.digital.data.ValueTable)1 ValueTableObserver (de.neemann.digital.gui.components.data.ValueTableObserver)1 Lang (de.neemann.digital.lang.Lang)1 Context (de.neemann.digital.testing.parser.Context)1 LineEmitter (de.neemann.digital.testing.parser.LineEmitter)1 ParserException (de.neemann.digital.testing.parser.ParserException)1