tic  130
Public Member Functions | List of all members
ModeAvg Class Reference

Frequency/Period Average measurement mode. More...

#include <tina.hxx>

Inheritance diagram for ModeAvg:
TinaMode Failable

Public Member Functions

bool isDone () const
 true when the requested count of measurements (defined by the cBlock constructor argument) is available
 
unsigned cMeas () const
 current count of measurements available for read via rdFreq(), rdPeriod()
 
unsigned cSamp () const
 
void clear ()
 prepare next block
 
 ModeAvg (unsigned cAverage, unsigned cBlock=1, const Umi::Time &tiTmo=Umi::Time(1))
 Measurement Mode constructor. More...
 
 ~ModeAvg ()
 Measurement Mode destructor, releases all resources bound to this measurement mode.
 
Measurement returns

These functions fetch the current (least recent) measurement from the input queue.

They return 0.0 if called erroneously (i.e. with no measurement available).

double rdFreq ()
 frequency average
 
double rdPeriod ()
 period average
 
- Public Member Functions inherited from TinaMode
const TinaConfigtc ()
 
unsigned cBlock () const
 
int cFifo () const
 
int cCapt () const
 
Umi::Time tiTmo ()
 
bool fEdgeRise (int i) const
 
bool fModeFilt (int i) const
 
 TinaMode (int cFifo, unsigned cBlock, const Umi::Time &tiTmo)
 
- Public Member Functions inherited from Failable
bool isGood () const
 fine
 
int print (char *sz, unsigned size) const
 
int iErr ()
 error code
 
const char * szErr ()
 error text
 
bool isFail () const
 last op failed, but object is uncorrupted
 
bool isBad () const
 last op failed, object is corrupted
 
bool operator! () const
 true if failed More...
 
 operator const void * () const
 zero if failed More...
 
FailablesetFailed (const char *sz, int i=0)
 set 'this' failed, record a string and an integer for failure identification More...
 
FailablesetBad (const char *sz, int i=0)
 set this bad, record a string and an integer for failure identification
 
Failableclear ()
 user clear of failed/bad state
 
 Failable (const char *sz, int i)
 

Additional Inherited Members

- Protected Types inherited from Failable
enum  StatE { E_OK, E_FAIL = 001, E_BAD = 002, E_NEXT = 004 }
 
- Protected Member Functions inherited from TinaMode
int timeout (Timer tmCur, bool fReset)
 
const TiCore * ptc () const
 
- Protected Member Functions inherited from Failable
FailablesetStat (StatE eStat, const char *sz, int i)
 
FailablesetStat (const Failable &fa)
 
bool entry ()
 resets the failed state. More...
 
- Protected Attributes inherited from TinaMode
TinaConfig _tc
 
unsigned _cBlock
 
Timer _tmTmo
 
Timer _tmLim
 
union {
   Timer   _tmEpoch
 
   Timer   _mptmEpoch [2]
 
}; 
 
- Protected Attributes inherited from Failable
enum Failable::StatE _eStat
 

Detailed Description

Frequency/Period Average measurement mode.

Examples:
tic_freq.cxx.

Constructor & Destructor Documentation

◆ ModeAvg()

ModeAvg ( unsigned  cAverage,
unsigned  cBlock = 1,
const Umi::Time &  tiTmo = Umi::Time(1) 
)

Measurement Mode constructor.

  • cAverage averaging factor, must be > 0
  • cBlock block size until isDone() is true, 0=unlimited
  • tiTmo inactivity (no input edges) timeout

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