ifw-slm 0.1.2
 
Loading...
Searching...
No Matches
ifw::slm::LoopStateData Class Reference

#include <loopStateData.hpp>

Public Member Functions

 LoopStateData (int loop_index, OldbInterface &oldb)
 
void SetActive (bool active)
 
void SetState (LoopState state)
 
LoopState GetState () const
 
void CycleUpdate ()
 
void CycleExec ()
 
void CycleReset ()
 
void SetFail (bool failed)
 
int GetNumErrors () const
 
void SetLastError (const std::string &message)
 
void IncrementSuccess ()
 
void SetValue (double value)
 
double GetValue () const
 
bool CheckStop (int max_errors) const
 

Detailed Description

Manages per-loop runtime state in OLDB. Provides methods to read/write state attributes matching legacy AOO format.

Constructor & Destructor Documentation

◆ LoopStateData()

ifw::slm::LoopStateData::LoopStateData ( int loop_index,
OldbInterface & oldb )

Member Function Documentation

◆ CheckStop()

bool ifw::slm::LoopStateData::CheckStop ( int max_errors) const

◆ CycleExec()

void ifw::slm::LoopStateData::CycleExec ( )

◆ CycleReset()

void ifw::slm::LoopStateData::CycleReset ( )

◆ CycleUpdate()

void ifw::slm::LoopStateData::CycleUpdate ( )

◆ GetNumErrors()

int ifw::slm::LoopStateData::GetNumErrors ( ) const

◆ GetState()

LoopState ifw::slm::LoopStateData::GetState ( ) const

◆ GetValue()

double ifw::slm::LoopStateData::GetValue ( ) const

◆ IncrementSuccess()

void ifw::slm::LoopStateData::IncrementSuccess ( )

Increment the count of successful executions since the loop started (OLDB key cycle_nsuccess). Reset by CycleReset().

◆ SetActive()

void ifw::slm::LoopStateData::SetActive ( bool active)

◆ SetFail()

void ifw::slm::LoopStateData::SetFail ( bool failed)

◆ SetLastError()

void ifw::slm::LoopStateData::SetLastError ( const std::string & message)

Record a human-readable description of the last cycle error in OLDB (key cycle_last_error). Pass an empty string to clear it on success.

◆ SetState()

void ifw::slm::LoopStateData::SetState ( LoopState state)

◆ SetValue()

void ifw::slm::LoopStateData::SetValue ( double value)

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