Next: C++ Throttle Setup Up: C++ API Previous: APIs
cmlogFilterNull* filter = new cmlogFilterNull(); cmlogFilterJLAB* filter = new cmlogFilterJLAB(); cmlogFilterSLAC* filter = new cmlogFilterSLAC();These calls create a new filter of the specified type: Null, JLAB, or SLAC. A pointer to the filter object is returned; this pointer should be passed to the "setFilter()" function described below, and should be saved by the application for making later calls to throttle functions.
cmlogFilter* cmlogClient::setFilter(cmlogFilter *filter)This function takes a pointer obtained from one of the filter-creation calls described above and installs the filter in the cmlog client. All subsequent cmlog messages will be run through this filter. Any previous filter is removed from the system. If no call to setFilter() is made, the cmlog client will use the default JLAB filter.
cmlogFilterSLAC* filter = client -> setFilter (new cmlogFilterSLAC());