diff --git a/python_module/CacaoProcessTools.cpp b/python_module/CacaoProcessTools.cpp index 8b696c1e..18ef4a41 100644 --- a/python_module/CacaoProcessTools.cpp +++ b/python_module/CacaoProcessTools.cpp @@ -154,6 +154,14 @@ PYBIND11_MODULE(CacaoProcessTools, m) .value("FPSNAME", FPS_type::FPSNAME) .export_values(); + py::enum_(m, "FPS_flags") + .value("DEFAULT_INPUT", FPS_flags::DEFAULT_INPUT) + .value("DEFAULT_OUTPUT", FPS_flags::DEFAULT_OUTPUT) + .value("DEFAULT_INPUT_STREAM", FPS_flags::DEFAULT_INPUT_STREAM) + .value("DEFAULT_OUTPUT_STREAM", FPS_flags::DEFAULT_OUTPUT_STREAM) + .export_values(); + + py::class_(m, "timespec") .def(py::init()) .def_readwrite("tv_sec", ×pec::tv_sec) @@ -410,6 +418,8 @@ If entry already exists, do not modify it Parameters: name [in]: the name of the shared memory file to connect + comment [in]: description + fptype [in]: datatype )pbdoc", py::arg("entry_name"), py::arg("entry_desc"), @@ -423,6 +433,9 @@ If entry already exists, do not modify it Parameters: name [in]: the name of the shared memory file to connect + comment [in]: description + fptype [in]: datatype + fpflag [in]: fps flags )pbdoc", py::arg("entry_name"), py::arg("entry_desc"), diff --git a/python_module/pyFps.hpp b/python_module/pyFps.hpp index 0fc98da4..63b63ba1 100644 --- a/python_module/pyFps.hpp +++ b/python_module/pyFps.hpp @@ -223,8 +223,8 @@ class pyFps keys_[entry_name] = static_cast(fptype); // We need to prepend a . to entry to abide by FPS conventions // See fps_add_entry.c - std::string preprended = "." + entry_name; - return function_parameter_add_entry(&fps_, preprended.c_str(), + std::string prepended = "." + entry_name; + return function_parameter_add_entry(&fps_, prepended.c_str(), entry_desc.c_str(), fptype, FPFLAG_DEFAULT_INPUT, nullptr, nullptr); } @@ -244,8 +244,8 @@ class pyFps uint32_t fptype, uint64_t fpflag) { keys_[entry_name] = static_cast(fptype); - std::string preprended = "." + entry_name; - return function_parameter_add_entry(&fps_, entry_name.c_str(), + std::string prepended = "." + entry_name; + return function_parameter_add_entry(&fps_, prepended.c_str(), entry_desc.c_str(), fptype, fpflag, nullptr, nullptr); }