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), number_of_modules_(number_of_modules) {}
7 
8 std::shared_ptr<LogFile> LogFile::open(std::string file) {
9  auto internal = hebiLogFileOpen(file.c_str());
10  if (internal == nullptr) {
11  return std::shared_ptr<LogFile>();
12  }
13 
14  return std::shared_ptr<LogFile>(new LogFile(internal, hebiLogFileGetNumberOfModules(internal)));
15 }
16 
17 int LogFile::size() const { return number_of_modules_; }
18 
21 }
22 
24  if (internal_ != nullptr) {
26  }
27 }
28 
29 } // namespace hebi
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: arm.cpp:5
HebiLogFilePtr internal_
Definition: log_file.hpp:15
const int number_of_modules_
Definition: log_file.hpp:16
bool getNextFeedback(GroupFeedback &feedback)
retrieves the next group feedback from the log file, if any exists
Definition: log_file.cpp:19
void hebiLogFileRelease(HebiLogFilePtr log_file)
Logging API.
int size() const
Returns the number of modules in the log file.
Definition: log_file.cpp:17
HebiStatusCode hebiLogFileGetNextFeedback(HebiLogFilePtr log_file, HebiGroupFeedbackPtr field)
Retrieve the next group feedback from the opened log file.
struct HebiLogFile_ * HebiLogFilePtr
The C-style&#39;s API representation of a log file.
Definition: hebi.h:514
static std::shared_ptr< LogFile > open(std::string file)
Opens an existing log file.
Definition: log_file.cpp:8
HebiGroupFeedbackPtr internal_
size_t hebiLogFileGetNumberOfModules(HebiLogFilePtr log_file)
Retrieve the number of modules in the group represented by an opened log file.


hebi_cpp_api_ros
Author(s): Chris Bollinger , Matthew Tesch
autogenerated on Thu May 28 2020 03:14:45