Struct LogFrame

Struct Documentation

struct flamegpu::LogFrame

Generic frame of logging data This can contain logged data related to agents or the environment

Public Functions

LogFrame()

Default constructor, creates an empty log

LogFrame(const std::map<std::string, util::Any> &&_environment, const std::map<util::StringPair, std::pair<std::map<LoggingConfig::NameReductionFn, util::Any>, unsigned int>> &&_agents, const unsigned int &_step_count)

Creates a log with pre-populated data

inline unsigned int getStepCount() const

Returns the step count of the log 0 is the state prior to the first step

bool hasEnvironmentProperty(const std::string &property_name) const

Environment log accessors

template<typename T>
T getEnvironmentProperty(const std::string &property_name) const
template<typename T, unsigned int N>
std::array<T, N> getEnvironmentProperty(const std::string &property_name) const
AgentLogFrame getAgent(const std::string &agent_name, const std::string &state_name = ModelData::DEFAULT_STATE) const

Agent log accessor

inline const std::map<std::string, util::Any> &getEnvironment() const

Raw access to environment log map

inline const std::map<util::StringPair, std::pair<std::map<LoggingConfig::NameReductionFn, util::Any>, unsigned int>> &getAgents() const

Raw access to agent log map

Friends

friend class CUDASimulation