Skip to content

Commit

Permalink
Wrap subscriber (problems with callbacks)
Browse files Browse the repository at this point in the history
  • Loading branch information
KerstinKeller committed Feb 12, 2025
1 parent 75a5e9a commit dca99e2
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 543 deletions.
2 changes: 0 additions & 2 deletions lang/python/nanobind_core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ set(nanobind_sources
core/config/py_time.h
core/config/py_transport_layer.cpp
core/config/py_transport_layer.h
core/pubsub/py_payload_writer.cpp
core/pubsub/py_payload_writer.h
core/pubsub/py_publisher.cpp
core/pubsub/py_publisher.h
core/pubsub/py_subscriber.cpp
Expand Down
119 changes: 0 additions & 119 deletions lang/python/nanobind_core/src/core/pubsub/py_payload_writer.cpp

This file was deleted.

119 changes: 0 additions & 119 deletions lang/python/nanobind_core/src/core/pubsub/py_payload_writer.h

This file was deleted.

4 changes: 2 additions & 2 deletions lang/python/nanobind_core/src/core/pubsub/py_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ void AddPubsubPublisher(nanobind::module_& module)
.def("__init__", [](CPublisher* t, nb::str topic_name, const SDataTypeInformation& datatype_info/*, const PubEventCallbackT& event_callback_*/, const Publisher::Configuration& config_) { new (t) CPublisher(topic_name.c_str(), datatype_info/*, event_callback_*/, config_ ); },
nb::arg("topic_name"),
nb::arg("data_type_info") = SDataTypeInformation(),
//nb::arg("event_callback") = nullptr
nb::arg("config") = GetPublisherConfiguration()
)
//nb::arg("event_callback") = nullptr
)

// Send function for Python bytes
.def("send", [](CPublisher& pub, nb::bytes payload, long long time) {
Expand Down
Loading

0 comments on commit dca99e2

Please sign in to comment.