microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

led simulator doesn't update promptly #398

Closed tballmsft closed 3 years ago

pelikhan commented 3 years ago

You need to issue a register get command after animation to reflect the animation in the UI.

pelikhan commented 3 years ago

In general, we should specify this kind of data dependencies in the spec.

tballmsft commented 3 years ago

I don't understand why the reception of a command at the JDService for the LED doesn't raise a CHANGE event that will cause the UI of the LED to update.

pelikhan commented 3 years ago

Nothing in the spec says that it should send a packet. The UI is listening to packets.

Sent from Outlookhttp://aka.ms/weboutlook


From: Tom Ball @.> Sent: Monday, May 24, 2021 10:55 PM To: microsoft/jacdac @.> Cc: Peli de Halleux @.>; Comment @.> Subject: Re: [microsoft/jacdac] led simulator doesn't update promptly (#398)

I don't understand why the reception of a command at the JDService for the LED doesn't raise a CHANGE event that will cause the UI of the LED to update.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fissues%2F398%23issuecomment-847558216&data=04%7C01%7Cjhalleux%40microsoft.com%7Cc8d1d0a723e942c0d3e908d91f41ab89%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637575189173203411%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KrwVxtyevt4VYIuqd3AwrXC9akuGqNPp9%2B3srqTRqok%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA73QKP4MCK6L54335XVWKLTPM3UHANCNFSM45OFY5QQ&data=04%7C01%7Cjhalleux%40microsoft.com%7Cc8d1d0a723e942c0d3e908d91f41ab89%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637575189173213408%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Oh4HAdJvKsbKc9DslOeuKYtx1zq%2BWE5KseAGf8AEiHI%3D&reserved=0.

mmoskal commented 3 years ago

I think that could happen client-side - when the client sees packets being directed at a service (either from itself or from elsewhere), it could rise some event

tballmsft commented 3 years ago

right, that's what I meant.

pelikhan commented 3 years ago

not clear what the strategy here since some commands have long lasting effects

tballmsft commented 3 years ago

You said:

You need to issue a register get command after animation to reflect the animation in the UI.

This seems service-specific - how should the code generator know to do this?

pelikhan commented 3 years ago

This where we need richer models for our services. Otherwise, every client will have different heursitics.

tballmsft commented 3 years ago

I am confused why this isn't a policy specific to the LED client, as Michael suggested.