Next: Sample C Application Up:
Sample Applications
Previous:
Sample C++ Application
#include <cmlog.h> #include <cmlogFilter.h> #include <cmlogFilterSLAC.h> ... cmlogClient *client = cmlogClient::logClient(); // set up client connection cmlogFilterSLAC *filter = new cmlogFilterSLAC(); // create SLAC filter client -> setFilter (filter); // install SLAC filter // set up first throttle filter -> setThrottle ("text", // in field "text" 2, // allow 2 messages 10.0, // every 10 seconds ""); // matching all defined values for "text" tag // set up second throttle filter -> setThrottle ("foo", // in field "foo" 1, // allow 1 message 60.0, // every 60 seconds ""); // matching all defined values for "foo" tag ... filter -> throttleShow (); // display list of throttles ... filter -> throttleOff (); // temporarily disable all throttles ... filter -> throttleOn (); // re-enable all throttles ...