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 feat: subscription.py optional param for sampling_interval #1087

Merged
merged 10 commits into from
Oct 18, 2022

Conversation

AndreasHeine
Copy link
Member

No description provided.

@AndreasHeine AndreasHeine requested a review from oroulet October 17, 2022 14:03
@AndreasHeine AndreasHeine marked this pull request as ready for review October 18, 2022 07:20
@AndreasHeine
Copy link
Member Author

@oroulet tested against a "Unified Automation Cpp Server"!

queuesize: int = 0,
monitoring=ua.MonitoringMode.Reporting,
sampling_interval: ua.Duration = 0.0
) -> Union[int, List[Union[int, ua.StatusCode]]]:
Copy link
Member

Choose a reason for hiding this comment

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

ideally we should pass nodes AND the entire MonitoredItemCreateRequest so people can add whatever they want. but that breaks the API....

Copy link
Member Author

Choose a reason for hiding this comment

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

for that we have "create_monitored_items"

async def create_monitored_items(self, monitored_items: List[ua.MonitoredItemCreateRequest]) -> List[Union[int, ua.StatusCode]]:

Copy link
Member

Choose a reason for hiding this comment

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

but create_monitored_items is hard to use, it does not any handler or anything, so you need to catch events by hand (I do not even remember how tot do that)
Anyway. let's do it the way you propose for now

@oroulet
Copy link
Member

oroulet commented Oct 18, 2022

your PR is so hard to read because you have mixed up many formatting changes and typing with real code changes...

@oroulet oroulet merged commit ff07391 into FreeOpcUa:master Oct 18, 2022
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