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

pqm: add event channels #2360

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

pqm: add event channels #2360

wants to merge 1 commit into from

Conversation

rbudai98
Copy link
Contributor

@rbudai98 rbudai98 commented Nov 8, 2024

Pull Request Description

Adding event channels to iio

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

@rbudai98 rbudai98 changed the title Add event channels pqm: add event channels Nov 8, 2024
@rbudai98 rbudai98 force-pushed the add_event_channels branch 3 times, most recently from a90f8ca to cc17fbe Compare November 11, 2024 13:42
@rbudai98 rbudai98 marked this pull request as ready for review November 11, 2024 13:42
Added new event channels to capture Swells, Dips, RVCs and Intrpts. Updated IIO and project README accordingly.

Signed-off-by: Robert Budai <[email protected]>

struct iio_attribute event_pqm_swell_attribute[] = {
{
.name = "countEvent",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can put the first 4 common attributes in a define, and reuse that common define in each event attribute initialization

return (strlen(buf));
case CHAN_EVENT_END_TIME:
strcpy(buf, "");
for (int i = 0; i < MAX_EVENT_NUMBER; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So if i understand correctly, for each event type, 6 of them are stored somewhere in pqlib and when the user reads the event channel attributes, they are all being returned, right (together with timestamps and other info) ?

I think this even section needs documenting in readme. Upon reading, do they get reset ? Or does the lib always keep track of the latest 6 events ? I'm curious if there is an "overflow" flag somewhere to know that since the last reading there were events that happened and were missed. I think this is stuff that the user may want to know. Or perhaps there is a documentation of the pqlib somewhere that I am unaware of ?

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