Pārlūkot izejas kodu

Add confluent transition in tests

Eric Ramat 11 gadi atpakaļ
vecāks
revīzija
3d50ead3d5
2 mainītis faili ar 20 papildinājumiem un 0 dzēšanām
  1. 16 0
      src/tests/pdevs_tests.cpp
  2. 4 0
      src/tests/pdevs_tests.hpp

+ 16 - 0
src/tests/pdevs_tests.cpp

@@ -52,6 +52,14 @@ void A::dext(const common::Time& /* e */, const common::Messages& msgs)
     _phase = SEND;
 }
 
+void A::dconf(const common::Time& /* e */, const common::Messages& msgs)
+{
+
+    std::cout << "[ model " << get_name() << " ] dconf: "
+              << msgs.to_string() << std::endl;
+
+}
+
 common::Time A::start()
 {
 
@@ -104,6 +112,14 @@ void B::dext(const common::Time& /* e */, const common::Messages& msgs)
     _phase = SEND;
 }
 
+void B::dconf(const common::Time& /* e */, const common::Messages& msgs)
+{
+
+    std::cout << "[ model " << get_name() << " ] dconf: "
+              << msgs.to_string() << std::endl;
+
+}
+
 common::Time B::start()
 {
 

+ 4 - 0
src/tests/pdevs_tests.hpp

@@ -41,6 +41,8 @@ public:
     virtual void dint(const common::Time& t);
     virtual void dext(const common::Time& /* e */,
                       const common::Messages& /* msgs */);
+    virtual void dconf(const common::Time& /* e */,
+                       const common::Messages& /* msgs */);
     virtual common::Time start();
     virtual common::Time ta() const;
     virtual common::Messages lambda() const;
@@ -63,6 +65,8 @@ public:
     virtual void dint(const common::Time& t);
     virtual void dext(const common::Time& /* e */,
                       const common::Messages& /* msgs */);
+    virtual void dconf(const common::Time& /* e */,
+                       const common::Messages& /* msgs */);
     virtual common::Time start();
     virtual common::Time ta() const;
     virtual common::Messages lambda() const;