Prusa MINI Firmware overview
ClValidityValue Class Reference

#include <M73_PE.h>

Inheritance diagram for ClValidityValue:
Collaboration diagram for ClValidityValue:

Public Member Functions

void mSetValue (uint32_t nN, uint32_t nNow)
 
uint32_t mGetValue (void)
 
void mInit (void)
 
bool mIsActual (uint32_t nNow)
 
bool mIsActual (uint32_t nNow, uint16_t nPeriod)
 
bool mIsUsed (void)
 

Protected Attributes

uint32_t nValue
 
uint32_t nTime =0
 
bool bIsUsed =false
 

Member Function Documentation

◆ mSetValue()

void ClValidityValue::mSetValue ( uint32_t  nN,
uint32_t  nNow 
)
25 {
26 nValue=nN;
27 nTime=nNow;
28 bIsUsed=true;
29 }

◆ mGetValue()

uint32_t ClValidityValue::mGetValue ( void  )
32 {
33 return(nValue);
34 }
Here is the caller graph for this function:

◆ mInit()

void ClValidityValue::mInit ( void  )
19 {
20 //nTime=0;
21 bIsUsed=false;
22 }
Here is the caller graph for this function:

◆ mIsActual() [1/2]

bool ClValidityValue::mIsActual ( uint32_t  nNow)
37 {
39 }
Here is the caller graph for this function:

◆ mIsActual() [2/2]

bool ClValidityValue::mIsActual ( uint32_t  nNow,
uint16_t  nPeriod 
)
42 {
43 //return((nTime+nPeriod)>=nNow);
44 return(mIsUsed()&&((nTime+nPeriod)>=nNow));
45 }
Here is the call graph for this function:

◆ mIsUsed()

bool ClValidityValue::mIsUsed ( void  )
48 {
49 //return(nTime>0);
50 return(bIsUsed);
51 }
Here is the caller graph for this function:

Member Data Documentation

◆ nValue

uint32_t ClValidityValue::nValue
protected

◆ nTime

uint32_t ClValidityValue::nTime =0
protected

◆ bIsUsed

bool ClValidityValue::bIsUsed =false
protected
ClValidityValue::mIsUsed
bool mIsUsed(void)
Definition: M73_PE.cpp:47
PROGRESS_DATA_VALIDITY_PERIOD
#define PROGRESS_DATA_VALIDITY_PERIOD
Definition: M73_PE.h:5
ClValidityValue::bIsUsed
bool bIsUsed
Definition: M73_PE.h:14
ClValidityValue::mIsActual
bool mIsActual(uint32_t nNow)
Definition: M73_PE.cpp:36
ClValidityValue::nValue
uint32_t nValue
Definition: M73_PE.h:12
ClValidityValue::nTime
uint32_t nTime
Definition: M73_PE.h:13