Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::PulseCounter Struct Referenceabstract

A counter can be incremented or decremented by pulses. It will itself issue a pulse every time a certain threshold value is reached. More...

#include <C:/Trend/Development/Trax3/Code/trax/LogicElements.h>

Inheritance diagram for trax::PulseCounter:

Public Member Functions

virtual const char * TypeName () const noexcept=0
virtual void CountUp () noexcept=0
 Increments the counter by 1.
virtual void CountDown () noexcept=0
 Decrements the counter by 1.
virtual void Threshold (int threshold)=0
 Sets the threshold to a specific value.
virtual int Threshold () const noexcept=0
 Gets the threshold value, set with this.
virtual void Counter (int counter)=0
 Sets the counter to a specific value.
virtual int Counter () const noexcept=0
 Gets the value of the counter.
virtual void Reset () noexcept=0
 Resets the counter to 0.
virtual MultiPlugPlugToCountUp ()=0
 Plug whose pulses increment the counter by 1.
virtual MultiPlugPlugToCountDown ()=0
 Plug whose pulses decrement the counter by 1.
virtual MultiPlugPlugToReset ()=0
 Plug whose pulses reset the counter to 0.
virtual JackJackOnReachThreshold ()=0
 If the counter reaches the threshold from either side the counter triggers a pulse in this Jack.
virtual JackJackOnLeaveThreshold ()=0
 If the counter leaves the threshold to either side the counter triggers a pulse in this Jack.
virtual JackJackOnCountUp ()=0
 If the counter gets counted up it triggers a pulse in this jack.
virtual JackJackOnCountDown ()=0
 If the counter gets counted down it triggers a pulse in this jack.
virtual void RegisterSockets (SocketRegistry &registry)=0
 Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.
virtual void UnregisterSockets (SocketRegistry &registry)=0
 Removes all references to Plugs and Jacks from the module.
Public Member Functions inherited from trax::Identified< PulseCounter >
virtual const std::string & Reference (const std::string &name) const=0
 Gets a reference that was set for this object by name.
virtual const std::vector< char const * > & ReferenceNames (const std::string &namePart) const=0
 Searches for all reference names that countain namePart as substring in the name.
virtual IDType ID () const noexcept=0
 Identified (const Identified &)=delete
Identified & operator= (const Identified &)=delete

Static Public Member Functions

static dclspc std::unique_ptr< PulseCounterMake () noexcept
 Makes a PulseCounter object.

Detailed Description

A counter can be incremented or decremented by pulses. It will itself issue a pulse every time a certain threshold value is reached.

The default threshold and counter values are 0.

Member Function Documentation

◆ Counter()

virtual void trax::PulseCounter::Counter ( int counter)
pure virtual

Sets the counter to a specific value.

Parameters
counterPreset of the counter. Negative values are allowed. Default value is 0.

◆ Threshold()

virtual void trax::PulseCounter::Threshold ( int threshold)
pure virtual

Sets the threshold to a specific value.

Parameters
thresholdNumber of pulses to count up (or down to). Negative values are allowed.

◆ TypeName()

virtual const char * trax::PulseCounter::TypeName ( ) const
pure virtualnoexcept
Returns
the name for the object type that implements this interface.

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