microsoft / jacdac

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

annouce bits reservations #343

Closed mmoskal closed 3 years ago

mmoskal commented 3 years ago

I propose to reserve bits in word0 of announce packet (we currently have 15 bits free there):

pelikhan commented 3 years ago

Is the presence of role manager an indicator that the device is a brain?

jamesadevine commented 3 years ago

Yes, I like all of the suggested option bits.

I was never a huge fan of looking for the highest device id, looking for a bit in an announce packet seems much more achievable and universal.

Did we also want to have ones to indicate that parts of the protocol stack are supported? i.e. STREAM_SUPPORTED

We might also want to have a bit field to indicate rough active power consumption?

Another useful one might be the REDUCED_FUNCTIONALITY flag which indicates to others that the device has limitations, such as an 8 byte receive buffer

mmoskal commented 3 years ago

Padauk won't be able to detect role manager if it isn't service number 1 (it only can accept up to 8 bytes of payload). So I do think we need a bit. Also there could be a role manager on a ML module, though I guess it's not a brain? Or maybe it is...

As for streams, I think it's a per-service thing. A service either uses streams or it doesn't, no need to advertise that separately for the whole device. I guess you just won't be able to do these services on smallest Padauk (but they are things like TCP, role manager, etc. anyways).

I would skip the power consumption for now, unless we have some understanding of what's needed and have some scenario in mind?

And yes, we definitely want reduced functionality bit. Maybe we can define it as "no multiple packets per frame" and the maximum payload would then be service-dependent (typically 4 bytes, but we can usually easily support 8 since the tx buffer needs 8 byte payload for announce (ctrl + 1 service)).

pelikhan commented 3 years ago

RoleManager presence was always a bit of a hack.

mmoskal commented 3 years ago
pelikhan commented 3 years ago
pelikhan commented 3 years ago

@mmoskal this is ready on my side.

mmoskal commented 3 years ago

the documentation went into https://github.com/microsoft/jacdac/blob/main/services/control.md#commands which also fixed packet inspector - so this is done