Loading [MathJax]/extensions/tex2jax.js
Dynamical system model
All Classes Namespaces Files Functions Pages
dsf::Counter Class Reference

The Counter class contains two counters to count input and output. More...

#include <Sensors.hpp>

Inheritance diagram for dsf::Counter:
dsf::SpireStreet dsf::StochasticSpireStreet

Public Member Functions

void setCode (Id const code)
 
void increaseInputCounter ()
 Increase the input counter by one.
 
void increaseOutputCounter ()
 Increase the output counter by one.
 
Id code () const
 
int inputCounts (bool reset=true)
 Get the number of input counts registered.
 
int outputCounts (bool reset=true)
 Get the number of output counts registered.
 

Protected Attributes

Id m_code
 
std::pair< int, int > m_counters = {0, 0}
 

Detailed Description

The Counter class contains two counters to count input and output.

Member Function Documentation

◆ inputCounts()

int dsf::Counter::inputCounts ( bool reset = true)

Get the number of input counts registered.

Parameters
resetIf true, the counter is reset to 0. Default is true

◆ outputCounts()

int dsf::Counter::outputCounts ( bool reset = true)

Get the number of output counts registered.

Parameters
resetIf true, the counter is reset to 0. Default is true

The documentation for this class was generated from the following file: