aboutsummaryrefslogtreecommitdiff
path: root/NodeInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NodeInput.cpp')
-rw-r--r--NodeInput.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/NodeInput.cpp b/NodeInput.cpp
index 0fc8110..2d1d517 100644
--- a/NodeInput.cpp
+++ b/NodeInput.cpp
@@ -1,14 +1,10 @@
#include "NodeInput.h"
+#include "prut.h"
#include <iostream>
-NodeInput::NodeInput(const char * type) : Node(type) { }
-
-void NodeInput::sim() {
- if (this->output == nullptr) return;
-
- this->output->setLevel(this->input);
-}
+NodeInputLow NodeInputLow::instance(NodeInputLow::type);
+NodeInputHigh NodeInputHigh::instance(NodeInputHigh::type);
NodeInput::NodeInput(const NodeInput * prototype) : Node() { }
@@ -16,13 +12,16 @@ NodeInput * NodeInput::clone() const {
return new NodeInput(this);
}
-// INPUT_LOW
-NodeInputLow NodeInputLow::instance(NodeInputLow::type);
-NodeInputLow::NodeInputLow(const char * type) : NodeInput() { }
-
-// NodeInputLow::NodeInputLow(const NodeInputLow * prototype) : NodeInput() { }
+SignalLevel NodeInput::level() {
+ prutprint("");
+ return UNDEFINED;
+}
+SignalLevel NodeInputLow::level() {
+ prutprint("");
+ return LOW;
+}
+SignalLevel NodeInputHigh::level() {
+ prutprint("");
+ return HIGH;
+}
-// // INPUT_HIGH
-// NodeInputHigh NodeInputHigh::instance(NodeInputHigh::type);
-// NodeInputHigh::NodeInputHigh(const char * type) : NodeInput(type) { }
-// NodeInputHigh::NodeInputHigh(const NodeInputHigh * prototype) : NodeInput() { }