-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
monitoring.h configuration files NB wrappers added
- Loading branch information
1 parent
eb7c39a
commit 22ac2b3
Showing
4 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
lang/python/nanobind_core/src/modules/module_monitoring_config.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* ========================= eCAL LICENSE ================================= | ||
* | ||
* Copyright (C) 2016 - 2024 Continental Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* ========================= eCAL LICENSE ================================= | ||
*/ | ||
|
||
/** | ||
* @brief Add Publisher config structs to nanobind module | ||
**/ | ||
|
||
|
||
#include <modules/module_monitoring_config.h> | ||
#include <wrappers/wrapper_monitoring_config.h> | ||
|
||
void AddMonitoringConfigStructToModule(nanobind::module_& m_Monitoring) | ||
{ | ||
nanobind::class_<eCAL::Monitoring::CNBMonitoringConfiguration>(m_Monitoring, "Configuration") | ||
.def(nanobind::init<>()) | ||
.def_rw("filter_excl", &eCAL::Monitoring::CNBMonitoringConfiguration::filter_excl) | ||
.def_rw("filter_incl", &eCAL::Monitoring::CNBMonitoringConfiguration::filter_incl); | ||
|
||
} | ||
|
46 changes: 46 additions & 0 deletions
46
lang/python/nanobind_core/src/modules/module_monitoring_config.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* ========================= eCAL LICENSE ================================= | ||
* | ||
* Copyright (C) 2016 - 2024 Continental Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* ========================= eCAL LICENSE ================================= | ||
*/ | ||
|
||
/** | ||
* @file module_monitoring_config.h | ||
* @brief Nanobind module for structs of file config/monitoring.h | ||
**/ | ||
|
||
#pragma once | ||
|
||
#include <nanobind/nanobind.h> | ||
#include <nanobind/operators.h> | ||
#include <ecal/ecal.h> | ||
#include <nanobind/operators.h> | ||
#include <nanobind/stl/string.h> | ||
#include <nanobind/stl/shared_ptr.h> | ||
#include <nanobind/stl/tuple.h> | ||
#include <cstdint> | ||
#include <chrono> | ||
#include <memory> | ||
#include <string> | ||
#include <cstddef> | ||
#include <ecal/ecal_types.h> | ||
|
||
/** | ||
* @brief Function to Add Nanobind module | ||
* | ||
* @param module The nanobind module variable | ||
**/ | ||
void AddMonitoringConfigStructToModule(nanobind::module_& m_Monitoring); |
29 changes: 29 additions & 0 deletions
29
lang/python/nanobind_core/src/wrappers/wrapper_monitoring_config.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* ========================= eCAL LICENSE ================================= | ||
* | ||
* Copyright (C) 2016 - 2024 Continental Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* ========================= eCAL LICENSE ================================= | ||
*/ | ||
|
||
/** | ||
* @brief logging.h configuration, adapted for Nanobind | ||
**/ | ||
|
||
#include <wrappers/wrapper_service_config.h> | ||
|
||
namespace eCAL | ||
{ | ||
// Do Nothing | ||
} |
47 changes: 47 additions & 0 deletions
47
lang/python/nanobind_core/src/wrappers/wrapper_monitoring_config.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* ========================= eCAL LICENSE ================================= | ||
* | ||
* Copyright (C) 2016 - 2024 Continental Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* ========================= eCAL LICENSE ================================= | ||
*/ | ||
|
||
/** | ||
* @file wrapper_monitoring_config.h | ||
* @brief Nanobind wrapper for structs of monitoring.h config | ||
**/ | ||
|
||
#pragma once | ||
|
||
#include <ecal/ecal.h> | ||
#include <ecal/config/service.h> | ||
#include <ecal/ecal_os.h> | ||
#include <ecal/types/ecal_custom_data_types.h> | ||
|
||
#include <stdint.h> | ||
#include <string> | ||
#include <cstddef> | ||
#include <nanobind/nanobind.h> | ||
|
||
namespace eCAL | ||
{ | ||
namespace Monitoring | ||
{ | ||
struct CNBMonitoringConfiguration | ||
{ | ||
std::string filter_excl{ "^__.*$" }; //!< Topics blacklist as regular expression (will not be monitored) (Default: "^__.*$") | ||
std::string filter_incl{ "" }; //!< Topics whitelist as regular expression (will be monitored only) (Default: "") | ||
}; | ||
} | ||
} |