Currently the on_peer_signaled callback has access to the emitter name and the new value, but not to the sensor on the current node that is subscribed to the signal. If the node uses on_peer_signaled to respond to a signal it is very useful to know what sensor in the node received the signal.
This patch is for an oversight in the signals work. Behind the scenes zocp has already updated the value in the capability tree (which is why this oversight went unnoticed for a while). The patch adds a list of sensor names to the data argument of the on_peer_signaled call, thus keeping the signature of the callback the same. Note that a signal from one emitter can be sent to several sensors in a node, so the data argument now contains a list of sensors.
Currently the on_peer_signaled callback has access to the emitter name and the new value, but not to the sensor on the current node that is subscribed to the signal. If the node uses on_peer_signaled to respond to a signal it is very useful to know what sensor in the node received the signal.
This patch is for an oversight in the signals work. Behind the scenes zocp has already updated the value in the capability tree (which is why this oversight went unnoticed for a while). The patch adds a list of sensor names to the data argument of the on_peer_signaled call, thus keeping the signature of the callback the same. Note that a signal from one emitter can be sent to several sensors in a node, so the data argument now contains a list of sensors.