diff options
author | David Lamparter <equinox@diac24.net> | 2013-03-25 23:29:15 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2013-03-25 23:29:15 +0100 |
commit | ac8beb0cb06e8aef35d9cfa134111e5c6ae09935 (patch) | |
tree | 3c9b6aba5fda143ad9aee2c0d36976d15c1540f5 /cethcan/can.c | |
parent | a69a211a4a95e5c4ac0055a8f2de8ec1c56a7d1a (diff) |
cethcan: json output
Diffstat (limited to 'cethcan/can.c')
-rw-r--r-- | cethcan/can.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cethcan/can.c b/cethcan/can.c index a36fd6c..5145871 100644 --- a/cethcan/can.c +++ b/cethcan/can.c @@ -50,6 +50,14 @@ void can_broadcast(struct can_user *origin, struct can_message *msg) u->handler(u->arg, msg); } +void can_json(json_t *json, enum json_subtype type) +{ + struct can_user *u; + for (u = users; u; u = u->next) + if (u->json) + u->json(u->arg, json, type); +} + void can_init(void) { /* nothing to do */ |