18#include "simdb/apps/argos/ArgosCollector.hpp"
42 const std::string& group, uint32_t index,
43 const std::string& desc =
"CollectableTreeNode <no desc>") :
57 const std::string& desc=
"CollectableTreeNode <no desc>") :
85 (void)serialized_types;
112 is_collected_ =
true;
127 is_collected_ =
false;
154 virtual void closeRecord(
const bool & simulation_ending =
false) { (void) simulation_ending; }
175 bool is_collected_ =
false;
Define a base Collector class.
Basic Node framework in sparta device tree composite pattern.
Node in a composite tree representing a sparta Tree item.
static const group_idx_type GROUP_IDX_NONE
GroupIndex indicating that a node has no group index because it belongs to no group.
void markHidden(bool hidden=true)
Marks this TreeNode hidden for the purposes of printint out nodes. This does not make the node inacce...
static constexpr char GROUP_NAME_NONE[]
Group name indicating that a node belongs to no group.
virtual TreeNode * getParent()
Gets immediate parent of this node if one exists.
An abstract type of TreeNode that has virtual calls to start collection on this node,...
virtual std::string encodeCollectedType(bool human_readable=false) const =0
Encode the collected data type in a way Argos python deserializers will understand:
virtual void serializeStructSchema(simdb::DatabaseManager *, std::set< std::string > &serialized_types)
Whether a scalar (Collectable) or container (IterableCollector), serialize struct-like data structure...
virtual void closeRecord(const bool &simulation_ending=false)
CollectableTreeNode(sparta::TreeNode *parent, const std::string &name, const std::string &group, uint32_t index, const std::string &desc="CollectableTreeNode <no desc>")
Construct.
virtual ~CollectableTreeNode()
Virtual destructor.
virtual void setCollecting_(bool collect, Collector *)
Indicate to sub-classes that collection has flipped.
simdb::argos::EntryPoint * entry_point_
Entry point into the SimDB collection system.
CollectableTreeNode(sparta::TreeNode *parent, const std::string &name, const std::string &desc="CollectableTreeNode <no desc>")
Construct.
void startCollecting(Collector *collector)
Method that tells this treenode that is now running collection.
virtual void createSimDbEntryPoint(simdb::argos::ArgosCollector *)=0
Collectable classes must be able to register themselves with the ArgosCollector.
bool isCollected() const
Determine whether or not this node has collection turned on or off.
void stopCollecting(Collector *collector)
Method that tells this treenode that is now not running collection.
virtual void restartRecord()
bool isIterableCollectorBin() const
Check if this CollectableTreeNode is a Collectable inside an IterableCollector.
A non-templated base class that all Collectors should inherit from.
Macros for handling exponential backoff.