Click
Loading...
Searching...
No Matches
errorelement.hh
1// -*- c-basic-offset: 4; related-file-name: "../../../elements/standard/errorelement.cc" -*-
2#ifndef CLICK_ERRORELEMENT_HH
3#define CLICK_ERRORELEMENT_HH
4#include <click/element.hh>
5CLICK_DECLS
6
7/*
8 * =c
9 * Error(...)
10 * =s debugging
11 * always fails
12 * =d
13 * The Error element always fails to initialize. It has any number of inputs
14 * and outputs, and accepts any configuration string without complaint. It is
15 * useful to prevent a router from initializing while avoiding
16 * spurious error messages about bad configuration strings or connections.
17 * =a Message
18 */
19
20class ErrorElement : public Element { public:
21
22 ErrorElement();
23
24 const char *class_name() const override { return "Error"; }
25 const char *port_count() const override { return "-/-"; }
26 const char *processing() const override { return AGNOSTIC; }
27 const char *flow_code() const override { return "x/y"; }
28
31
32};
33
34CLICK_ENDDECLS
35#endif
Base class for Click elements.
Definition element.hh:42
virtual const char * processing() const
Return the element's processing specifier.
Definition element.cc:1139
virtual const char * port_count() const
Return the element's port count specifier.
Definition element.cc:710
virtual const char * flow_code() const
Return the element's internal packet flow specifier (its flow code).
Definition element.cc:946
virtual int configure(Vector< String > &conf, ErrorHandler *errh)
Parse the element's configuration arguments.
Definition element.cc:1372
virtual int initialize(ErrorHandler *errh)
Initialize the element.
Definition element.cc:1460
virtual const char * class_name() const =0
Return the element's class name.
Error reporting class.
Definition error.hh:90
Vector template.
Definition vector.hh:111
Click's Element class.