LCOV - code coverage report
Current view: top level - src/Module/Stateful/Controller/Controller_limit - Controller_limit.cpp (source / functions) Hit Total Coverage
Test: streampu_clean.info Lines: 0 20 0.0 %
Date: 2025-01-11 12:25:42 Functions: 0 4 0.0 %

          Line data    Source code
       1             : #include <string>
       2             : 
       3             : #include "Module/Stateful/Controller/Controller_limit/Controller_limit.hpp"
       4             : 
       5             : using namespace spu;
       6             : using namespace spu::module;
       7             : 
       8           0 : Controller_limit::Controller_limit(const size_t limit, const size_t init_path)
       9             :   : Controller(init_path)
      10           0 :   , limit(limit)
      11           0 :   , counter(0)
      12             : {
      13           0 :     const std::string name = "Controller_limit";
      14           0 :     this->set_name(name);
      15           0 :     this->tasks[0]->set_replicability(true);
      16           0 : }
      17             : 
      18             : Controller_limit*
      19           0 : Controller_limit::clone() const
      20             : {
      21           0 :     auto m = new Controller_limit(*this);
      22           0 :     m->deep_copy(*this);
      23           0 :     return m;
      24             : }
      25             : 
      26             : void
      27           0 : Controller_limit::reset()
      28             : {
      29           0 :     Controller::reset();
      30           0 :     this->counter = 0;
      31           0 : }
      32             : 
      33             : void
      34           0 : Controller_limit::_control(int8_t* out, const size_t frame_id)
      35             : {
      36           0 :     if (this->counter >= this->limit) this->path = !init_path;
      37           0 :     out[0] = this->path;
      38           0 :     counter++;
      39           0 : }

Generated by: LCOV version 1.14