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] Darwin: Pass event timestamp to MTRDeviceDelegate #24711

Closed
kpark-apple opened this issue Jan 27, 2023 · 4 comments · Fixed by #24858
Closed

[Feature] Darwin: Pass event timestamp to MTRDeviceDelegate #24711

kpark-apple opened this issue Jan 27, 2023 · 4 comments · Fixed by #24858
Assignees

Comments

@kpark-apple
Copy link
Contributor

Feature description

Current Darwin MTRDevice doesn't pass event timestamp to the MTRDeviceDelegate.
Apps may need to use the timestamp to discard too old events.
Please add event timestamps (maybe add to the dictionary with a dedicated key).

Platform

darwin

Platform Version(s)

No response

Anything else?

No response

@bzbarsky-apple
Copy link
Contributor

For an event, we should be including everything present in MTREventReport. So:

  1. MTREventPath
  2. Event number
  3. Event priority
  4. Event timestamp
  5. The actual payload

Or just the path and error if here is an error.

@bzbarsky-apple
Copy link
Contributor

Oh, and the event timestamp even in MTREventReport is kinda broken, since it just gives the value but not the type (system vs epoch time).... We should add the type information in MTREventReport, and in the MTRDevice bits.

@bzbarsky-apple
Copy link
Contributor

And we should decide for "epoch time" whether to leave it as CHIP epoch time or convert it to something people are more likely to understand....

@jtung-apple jtung-apple self-assigned this Jan 28, 2023
@bzbarsky-apple
Copy link
Contributor

Summary of Slack discussion, from @jtung-apple:

MTREventTimeTypeKey => NSNumber-wrapped enum of { epoch_type, system_type }
MTREventEpochTimeKey => NSDate object
MTREventSystemTimeKey => NSNumber-wrapped NSTimeInterval (which is seconds in a double)

and for MTREventReport, nullable NSDate and nullable NSNumber for the system time case. And the enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants