log_file.cpp
Go to the documentation of this file.
1 #include "log_file.hpp"
2 
3 namespace hebi {
4 
5 LogFile::LogFile(HebiLogFilePtr internal, int number_of_modules)
6  : internal_(internal),
7  number_of_modules_(number_of_modules) {}
8 
9 std::shared_ptr<LogFile> LogFile::open(std::string file) {
10  auto internal = hebiLogFileOpen(file.c_str());
11  if (internal == nullptr) {
12  return std::shared_ptr<LogFile>();
13  }
14 
15  return std::shared_ptr<LogFile>(
16  new LogFile(internal, hebiLogFileGetNumberOfModules(internal))
17  );
18 }
19 
20 int LogFile::size() const {
21  return number_of_modules_;
22 }
23 
26 }
27 
29  if (internal_ != nullptr) {
31  }
32 }
33 
34 }
HebiLogFilePtr hebiLogFileOpen(const char *file)
Opens an existing log file.
A list of Feedback objects that can be received from a Group of modules; the size() must match the nu...
LogFile()=delete
Definition: color.hpp:5
HebiLogFilePtr internal_
Definition: log_file.hpp:16
const int number_of_modules_
Definition: log_file.hpp:17
bool getNextFeedback(GroupFeedback &feedback)
retrieves the next group feedback from the log file, if any exists
Definition: log_file.cpp:24
void hebiLogFileRelease(HebiLogFilePtr log_file)
Releases a log file instance.
int size() const
Returns the number of modules in the log file.
Definition: log_file.cpp:20
HebiStatusCode hebiLogFileGetNextFeedback(HebiLogFilePtr log_file, HebiGroupFeedbackPtr field)
Retrieve the next group feedback from the opened log file.
static std::shared_ptr< LogFile > open(std::string file)
Opens an existing log file.
Definition: log_file.cpp:9
HebiGroupFeedbackPtr internal_
struct _HebiLogFile * HebiLogFilePtr
The C-style&#39;s API representation of a log file.
Definition: hebi.h:388
size_t hebiLogFileGetNumberOfModules(HebiLogFilePtr log_file)
Retrieve the number of modules in the group represented by an opened log file.


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:08:21