Changes between Version 10 and Version 11 of TrickleApi


Ignore:
Timestamp:
Aug 2, 2018, 12:31:46 PM (6 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TrickleApi

    v10 v11  
    2222== Server-side API ==
    2323
     24=== Handling trickle-up messages ===
     25
    2426To handle trickle-up messages, use a 'trickle_handler' daemon.
    25 This is a program, based on sched/trickle_handler.cpp, linked with a function
     27This is a program, based on sched/trickle_handler.cpp, linked with functions
    2628
    2729{{{
    28 int handle_trickle(MSG_FROM_HOST&);
     30int handle_trickle_init(int argc, char** argv);     // initialize
     31int handle_trickle(MSG_FROM_HOST&);                 // handle a trickle message
    2932
    3033struct MSG_FROM_HOST {
     
    4043The daemon must be passed a '--variety X' command-line argument, telling it what kind of messages to handle.
    4144The daemon should be specified in the [ProjectDaemons project configuration file].
     45
     46By default, a trickle handler daemon enumerates msg_from_host records with handled==0,
     47and when done sets handled=1.
     48If you need multiple stages of trickle handling,
     49you can do so by assigning '''handled_enum''' and '''handled_set''' in handle_trickle_init().
     50For example, by setting these to 1 and 2 respectively you can add a 2nd stage of handling.
     51
     52
     53=== Sending trickle-down messages ===
    4254
    4355To send trickle-down messages (from a trickle handler daemon or other program) you must insert a record in the 'msg_to_host' table.