Bayes Filters Library
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
bfl::SimulatedStateModel Class Reference

#include <SimulatedStateModel.h>

Inheritance diagram for bfl::SimulatedStateModel:
[legend]

Public Member Functions

 SimulatedStateModel (std::unique_ptr< StateModel > state_model, const Eigen::Ref< const Eigen::VectorXd > &initial_state, const unsigned int simulation_time)
 
virtual ~SimulatedStateModel () noexcept=default
 
bool bufferData () override
 
Data getData () const override
 
bool setProperty (const std::string &property) override
 
StateModelgetStateModel ()
 
bool enable_log (const std::string &folder_path, const std::string &file_name_prefix)
 
bool disable_log ()
 
std::string get_folder_path () const
 
std::string get_file_name_prefix () const
 
template<typename DatumType >
void logger (DatumType datum)
 
template<typename... DataType>
void logger (DataType... data)
 
template<typename DatumType >
void logger (DatumType datum) const
 
template<typename... DataType>
void logger (DataType... data) const
 

Protected Member Functions

std::vector< std::string > log_file_names (const std::string &folder_path, const std::string &file_name_prefix) override
 
void log () override
 

Protected Attributes

std::unique_ptr< StateModelstate_model_
 
Data data_simulated_state_model_
 
unsigned int current_simulation_time_ = 0
 
bool log_enabled_ = false
 
std::ofstream log_file_state_
 

Private Member Functions

template<typename DatumType >
void logger_helper (const size_t pos, DatumType datum)
 
template<typename DatumType , typename... DataType>
void logger_helper (const size_t pos, DatumType datum, DataType... data)
 
template<typename DatumType >
void logger_helper (const size_t pos, DatumType datum) const
 
template<typename DatumType , typename... DataType>
void logger_helper (const size_t pos, DatumType datum, DataType... data) const
 

Private Attributes

unsigned int simulation_time_
 
Eigen::MatrixXd target_
 
std::string folder_path_
 
std::string file_name_prefix_
 
std::vector< std::string > file_names_
 
std::vector< std::ofstream > log_files_
 

Detailed Description

Definition at line 23 of file SimulatedStateModel.h.

Constructor & Destructor Documentation

◆ SimulatedStateModel()

SimulatedStateModel::SimulatedStateModel ( std::unique_ptr< StateModel state_model,
const Eigen::Ref< const Eigen::VectorXd > &  initial_state,
const unsigned int  simulation_time 
)

Definition at line 17 of file SimulatedStateModel.cpp.

◆ ~SimulatedStateModel()

virtual bfl::SimulatedStateModel::~SimulatedStateModel ( )
virtualdefaultnoexcept

Member Function Documentation

◆ bufferData()

bool SimulatedStateModel::bufferData ( )
overridevirtual

Implements bfl::Agent.

Definition at line 33 of file SimulatedStateModel.cpp.

◆ disable_log()

bool Logger::disable_log ( )
inherited

◆ enable_log()

bool Logger::enable_log ( const std::string &  folder_path,
const std::string &  file_name_prefix 
)
inherited

Definition at line 22 of file Logger.cpp.

References bfl::Logger::file_name_prefix_, bfl::Logger::file_names_, bfl::Logger::folder_path_, bfl::Logger::log_enabled_, bfl::Logger::log_file_names(), and bfl::Logger::log_files_.

Here is the call graph for this function:

◆ get_file_name_prefix()

std::string Logger::get_file_name_prefix ( ) const
inherited

Definition at line 91 of file Logger.cpp.

References bfl::Logger::file_name_prefix_.

◆ get_folder_path()

std::string Logger::get_folder_path ( ) const
inherited

Definition at line 85 of file Logger.cpp.

References bfl::Logger::folder_path_.

◆ getData()

Data SimulatedStateModel::getData ( ) const
overridevirtual

Implements bfl::Agent.

Definition at line 47 of file SimulatedStateModel.cpp.

◆ getStateModel()

StateModel & SimulatedStateModel::getStateModel ( )

Definition at line 67 of file SimulatedStateModel.cpp.

◆ log()

void SimulatedStateModel::log ( )
overrideprotectedvirtual

Reimplemented from bfl::Logger.

Definition at line 73 of file SimulatedStateModel.cpp.

◆ log_file_names()

std::vector<std::string> bfl::SimulatedStateModel::log_file_names ( const std::string &  folder_path,
const std::string &  file_name_prefix 
)
inlineoverrideprotectedvirtual

Reimplemented from bfl::Logger.

Definition at line 50 of file SimulatedStateModel.h.

◆ logger() [1/4]

template<typename... DataType>
void bfl::Logger::logger ( DataType...  data)
inlineinherited

Definition at line 42 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger() [2/4]

template<typename... DataType>
void bfl::Logger::logger ( DataType...  data) const
inlineinherited

Definition at line 56 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger() [3/4]

template<typename DatumType >
void bfl::Logger::logger ( DatumType  datum)
inlineinherited

Definition at line 35 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.

Referenced by bfl::SimulatedLinearSensor::log().

◆ logger() [4/4]

template<typename DatumType >
void bfl::Logger::logger ( DatumType  datum) const
inlineinherited

Definition at line 49 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.

◆ logger_helper() [1/4]

template<typename DatumType >
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum 
)
inlineprivateinherited

Definition at line 81 of file Logger.h.

References bfl::Logger::log_files_.

Referenced by bfl::Logger::logger(), and bfl::Logger::logger_helper().

◆ logger_helper() [2/4]

template<typename DatumType >
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum 
) const
inlineprivateinherited

Definition at line 95 of file Logger.h.

References bfl::Logger::log_files_.

◆ logger_helper() [3/4]

template<typename DatumType , typename... DataType>
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum,
DataType...  data 
)
inlineprivateinherited

Definition at line 87 of file Logger.h.

References bfl::Logger::log_files_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger_helper() [4/4]

template<typename DatumType , typename... DataType>
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum,
DataType...  data 
) const
inlineprivateinherited

Definition at line 101 of file Logger.h.

References bfl::Logger::log_files_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ setProperty()

bool SimulatedStateModel::setProperty ( const std::string &  property)
overridevirtual

Reimplemented from bfl::Agent.

Definition at line 53 of file SimulatedStateModel.cpp.

Member Data Documentation

◆ current_simulation_time_

unsigned int bfl::SimulatedStateModel::current_simulation_time_ = 0
protected

Definition at line 44 of file SimulatedStateModel.h.

◆ data_simulated_state_model_

Data bfl::SimulatedStateModel::data_simulated_state_model_
protected

Definition at line 42 of file SimulatedStateModel.h.

◆ file_name_prefix_

std::string bfl::Logger::file_name_prefix_
privateinherited

Definition at line 72 of file Logger.h.

Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_file_name_prefix().

◆ file_names_

std::vector<std::string> bfl::Logger::file_names_
privateinherited

Definition at line 74 of file Logger.h.

Referenced by bfl::Logger::disable_log(), and bfl::Logger::enable_log().

◆ folder_path_

std::string bfl::Logger::folder_path_
privateinherited

Definition at line 70 of file Logger.h.

Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_folder_path().

◆ log_enabled_

bool bfl::SimulatedStateModel::log_enabled_ = false
protected

Definition at line 46 of file SimulatedStateModel.h.

◆ log_file_state_

std::ofstream bfl::SimulatedStateModel::log_file_state_
mutableprotected

Definition at line 48 of file SimulatedStateModel.h.

◆ log_files_

std::vector<std::ofstream> bfl::Logger::log_files_
mutableprivateinherited

◆ simulation_time_

unsigned int bfl::SimulatedStateModel::simulation_time_
private

Definition at line 59 of file SimulatedStateModel.h.

◆ state_model_

std::unique_ptr<StateModel> bfl::SimulatedStateModel::state_model_
protected

Definition at line 40 of file SimulatedStateModel.h.

◆ target_

Eigen::MatrixXd bfl::SimulatedStateModel::target_
private

Definition at line 61 of file SimulatedStateModel.h.


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