[riot-notifications] [RIOT-OS/RIOT] Proposal: eSAUL - Extended Sensor Actuator Uber Layer (#14121)

Marian Buschsieweke notifications at github.com
Tue May 26 16:37:12 CEST 2020


> I now begin to wonder if the Message Bus was actually a reinvention of the Event Queue wheel

Well, the event queue has 1..n publishers and one subscriber, the message bus has 1..n publishers and 1..n subscribers

> whereas an event always gets set but it's just indistinguishable whether it was set once or multiple times.

That would be the exact same behavior when doing:

```C
while (1) {
    msg_t msg;
    msg_receive(&msg);
    phydat_t data;
    saul_reg_read(msg.content.ptr, &data);
    work_on_data(&data);
}
```

The content of the message does not change, it is just a pointer to the `saul_reg_t` SAUL registry entry. So there is no difference if I only receive the first, the last, or a message in the middle. And from the usability perspective, it is nice to receive a pointer that can be fed directly into `saul_reg_read()`.

With the approach of setting bits in a bitmask on events, the subscriber would have to translate that bit into the sensor it is interested in. This is both less convenient and less efficient.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/14121#issuecomment-634065824
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200526/b18cc600/attachment.htm>


More information about the notifications mailing list