Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dataflow_id getter in python #501

Merged
merged 1 commit into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apis/python/node/dora/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ node = Node()

This method returns the parsed dataflow YAML file."""

def dataflow_id(self) -> str:
"""Returns the dataflow id."""

def merge_external_events(self, subscription: dora.Ros2Subscription) -> None:
"""Merge an external event stream with dora main loop.
This currently only work with ROS2."""
Expand Down
7 changes: 7 additions & 0 deletions apis/python/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ impl Node {
pythonize::pythonize(py, self.node.dataflow_descriptor())
}

/// Returns the dataflow id.
///
/// :rtype: str
pub fn dataflow_id(&self) -> String {
self.node.dataflow_id().to_string()
}

/// Merge an external event stream with dora main loop.
/// This currently only work with ROS2.
///
Expand Down
Loading