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

Feature/event options #11

Merged
merged 5 commits into from
Oct 13, 2024
Merged

Feature/event options #11

merged 5 commits into from
Oct 13, 2024

Conversation

mkabtoul
Copy link
Contributor

  • Adds options to Event for handling the event only once during the node lifetime or adding a delay between consecutive event handling instances
  • Adds support for list values in Event source values
  • Fixes sending service requests from the monitor

@mkabtoul mkabtoul requested a review from aleph-ra October 13, 2024 08:17
@mkabtoul mkabtoul self-assigned this Oct 13, 2024
Copy link
Contributor

@aleph-ra aleph-ra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggested changes.

@@ -36,7 +36,7 @@ class QoSConfig(BaseAttrs):

# used only honored if the “history” policy was set to “keep last”
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment needs correction

@@ -151,7 +177,7 @@ def __init__(self, ros_message: Any, attributes: List[str]) -> None:
self._message = ros_message
self._attrs = attributes
# Get attribute from ros message
self.value: Union[float, int, bool, str] = _access_attribute(
self.value: Union[float, int, bool, str, list] = _access_attribute(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing should be used for 3.8 compatibility

@@ -284,25 +324,32 @@ def __init__(
self,
event_name: str,
event_source: Union[Topic, str, Dict],
trigger_value: Union[float, int, bool, str, None],
trigger_value: Union[float, int, bool, str, list, None],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing should be used for 3.8 compatibility

@@ -153,7 +156,7 @@ def __init__(
self,
event_name: str,
event_source: Union[Topic, str, Dict],
trigger_value: Union[float, int, bool, str],
trigger_value: Union[float, int, bool, str, list],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing should be used

@@ -164,7 +167,7 @@ def __init__(
:param event_source:
:type event_source: Union[Topic, str, Dict]
:param trigger_value:
:type trigger_value: Union[float, int, bool, str]
:type trigger_value: Union[float, int, bool, str, list]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing

@@ -210,7 +213,7 @@ def __init__(
self,
event_name: str,
event_source: Union[Topic, str, Dict],
trigger_value: Union[float, int, bool, str],
trigger_value: Union[float, int, bool, str, list],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing

@@ -221,7 +224,7 @@ def __init__(
:param event_source:
:type event_source: Union[Topic, str, Dict]
:param trigger_value:
:type trigger_value: Union[float, int, bool, str]
:type trigger_value: Union[float, int, bool, str, list]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing

@@ -245,7 +323,7 @@ def __init__(
self,
event_name: str,
event_source: Union[Topic, str, Dict],
trigger_value: Union[float, int, bool, str],
trigger_value: Union[float, int, bool, str, list],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing

@@ -256,7 +334,7 @@ def __init__(
:param event_source:
:type event_source: Union[Topic, str, Dict]
:param trigger_value:
:type trigger_value: Union[float, int, bool, str]
:type trigger_value: Union[float, int, bool, str, list]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List from typing

@mkabtoul mkabtoul merged commit 05f09dc into main Oct 13, 2024
0 of 2 checks passed
@mkabtoul mkabtoul deleted the feature/event_options branch October 13, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants