Changes between Version 10 and Version 11 of TrickleApi
- Timestamp:
- Aug 2, 2018, 12:31:46 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TrickleApi
v10 v11 22 22 == Server-side API == 23 23 24 === Handling trickle-up messages === 25 24 26 To handle trickle-up messages, use a 'trickle_handler' daemon. 25 This is a program, based on sched/trickle_handler.cpp, linked with a function27 This is a program, based on sched/trickle_handler.cpp, linked with functions 26 28 27 29 {{{ 28 int handle_trickle(MSG_FROM_HOST&); 30 int handle_trickle_init(int argc, char** argv); // initialize 31 int handle_trickle(MSG_FROM_HOST&); // handle a trickle message 29 32 30 33 struct MSG_FROM_HOST { … … 40 43 The daemon must be passed a '--variety X' command-line argument, telling it what kind of messages to handle. 41 44 The daemon should be specified in the [ProjectDaemons project configuration file]. 45 46 By default, a trickle handler daemon enumerates msg_from_host records with handled==0, 47 and when done sets handled=1. 48 If you need multiple stages of trickle handling, 49 you can do so by assigning '''handled_enum''' and '''handled_set''' in handle_trickle_init(). 50 For example, by setting these to 1 and 2 respectively you can add a 2nd stage of handling. 51 52 53 === Sending trickle-down messages === 42 54 43 55 To send trickle-down messages (from a trickle handler daemon or other program) you must insert a record in the 'msg_to_host' table.