I’m writing a driver for a device that has a root device and 4 endpoints.
Each of the endpoints represent a different component in the device. For example, endpoints 1 and 2 are two different multilevel sensors (SIG1 and SIG2) and 3 and 4 are two binary switches (REL1 and REL2).
The root device has command classes that that mix those components. For example, its binary switch command class maps to REL1, and its multilevel sensor command class maps to SIG1.
In my driver, I sometimes see commands coming from endpoint 0 (the root device).
When the endpoint_to_component method is called, all I see is endpoint 0, but I don’t have access to the command class itself, so I don’t know if this is SIG1 or REL1.
Is there a way to somehow disambiguate it? Can I access the command somehow?