Struct LogFrame

Inheritance Relationships

Derived Types

Struct Documentation

struct LogFrame

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

Subclassed by flamegpu::ExitLogFrame, flamegpu::StepLogFrame

Public Functions

LogFrame()

Default constructor, creates an empty log

LogFrame(const std::map<std::string, detail::Any> &_environment, const std::map<util::StringPair, std::pair<std::map<LoggingConfig::NameReductionFn, detail::Any>, unsigned int>> &_agents, 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, detail::Any> &getEnvironment() const

Raw access to environment log map

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

Raw access to agent log map

Friends

friend class CUDASimulation