28 #include <unordered_map>
31 #ifdef STANDALONE_PARSER
41 class SaleaeInputFile;
43 #ifdef STANDALONE_PARSER
52 Net(
const std::string n, uint32_t i=0) : mId(i), mName(n) {;}
53 uint32_t
get_id()
const {
return mId; }
54 std::string
get_name()
const {
return mName; }
76 static std::string strim(std::string s);
80 struct DataFileHandle {
81 std::function<void(
void*obj, uint64_t,
int)> callback;
86 std::multimap<uint64_t,DataFileHandle> mNextValueMap;
106 bool register_callback(
const std::string&
name, uint32_t
id, std::function<
void(
void*,uint64_t,
int)> callback,
void* obj);
const std::string & get_name() const
The SaleaeDirectory class provides the API for the SALEAE directory file. The SALEAE directory file w...
The SaleaeParser class is an engine which allows to parse any number of SALEAE files into a sequence ...
bool next_event()
Call to parser to deliver next event via registered callbacks (see above).
bool register_callback(const std::string &name, uint32_t id, std::function< void(void *, uint64_t, int)> callback, void *obj)
Registers callback which gets executed upon next_event()
uint64_t get_max_time() const
Get last simulated time from SALEAE directory.
SaleaeDirectory get_directory() const
Getter for SALEAE directory instance.
static uint64_t sTimeScaleFactor
conversion factor to be applied when converting double values from original SALEAE file to integer va...
SaleaeParser(const std::string &filename)