#include <EC_Masked_Type_Filter.h>
Inheritance diagram for TAO_EC_Masked_Type_Filter:
This filter only accepts events whose type and/or source have a given value when a bitmask is applied to them. In short the filter checks that: (event.header.type & type_mask) == type_value and that: (event.header.source & source_mask) == source_value
Definition at line 40 of file EC_Masked_Type_Filter.h.
|
Constructor.
Definition at line 10 of file EC_Masked_Type_Filter.cpp.
00014 : source_mask_ (source_mask), 00015 type_mask_ (type_mask), 00016 source_value_ (source_value), 00017 type_value_ (type_value) 00018 { 00019 } |
|
Destructor.
Definition at line 21 of file EC_Masked_Type_Filter.cpp.
00022 { 00023 } |
|
|
|
This is used for computing the scheduling dependencies: Leaf filters check if the header could be matched, similar to the can_match() method; if it does they return 1, and 0 otherwise. Intermediate nodes always return 0. This is used to build precise dependencies between the suppliers and the leaf of the filters that accept that event. Notice that only the nodes doing scheduling recurse through the list, so in configurations that do no require scheduling the recursion stops fairly soon. Implements TAO_EC_Filter. Definition at line 114 of file EC_Masked_Type_Filter.cpp.
00117 {
00118 return 0;
00119 }
|
|
STL-like iterators Filters follow the Composite pattern. All filters expose the same interface as if they all had children, but for simple filters the iterators return an empty range. Reimplemented from TAO_EC_Filter. Definition at line 26 of file EC_Masked_Type_Filter.cpp.
00027 {
00028 return 0;
00029 }
|
|
Returns 0 if an event with that header could never be accepted. This can used by the suppliers to filter out consumers that couldn't possibly be interested in their events. The rt_info and Implements TAO_EC_Filter. Definition at line 103 of file EC_Masked_Type_Filter.cpp. References RtecEventComm::EventHeader::source, source_value_, RtecEventComm::EventHeader::type, and type_value_.
00105 { 00106 if ((header.type & this->type_mask_) == this->type_value_ 00107 && (header.source & this->source_mask_) == this->source_value_) 00108 return 1; 00109 00110 return 0; 00111 } |
|
Clear any saved state, must reset and assume no events have been received. Implements TAO_EC_Filter. Definition at line 92 of file EC_Masked_Type_Filter.cpp.
00093 { 00094 } |
|
Reimplemented from TAO_EC_Filter. Definition at line 32 of file EC_Masked_Type_Filter.cpp.
00033 {
00034 return 0;
00035 }
|
|
Filter this event, returns 1 if the event is accepted, 0 otherwise. Notice that there are two versions of the method, if the event is not const then filter can take ownership of the event.
Implements TAO_EC_Filter. Definition at line 44 of file EC_Masked_Type_Filter.cpp. References RtecEventComm::EventSet, TAO_EC_Filter::parent(), TAO_EC_Filter::push(), source_value_, and type_value_.
00046 { 00047 if (event.length () != 1) 00048 return 0; 00049 00050 if ((event[0].header.type & this->type_mask_) != this->type_value_ 00051 || (event[0].header.source & this->source_mask_) != this->source_value_) 00052 return 0; 00053 00054 if (this->parent () != 0) 00055 { 00056 this->parent ()->push (event, qos_info); 00057 } 00058 return 1; 00059 } |
|
Implements TAO_EC_Filter. Definition at line 62 of file EC_Masked_Type_Filter.cpp. References RtecEventComm::EventSet, TAO_EC_Filter::parent(), TAO_EC_Filter::push_nocopy(), source_value_, and type_value_.
00064 { 00065 if (event.length () != 1) 00066 return 0; 00067 00068 if ((event[0].header.type & this->type_mask_) != this->type_value_ 00069 || (event[0].header.source & this->source_mask_) != this->source_value_) 00070 return 0; 00071 00072 if (this->parent () != 0) 00073 { 00074 this->parent ()->push_nocopy (event, qos_info); 00075 } 00076 return 1; 00077 } |
|
Returns the maximum size of the events pushed by this filter.
Implements TAO_EC_Filter. Definition at line 97 of file EC_Masked_Type_Filter.cpp.
00098 {
00099 return 1;
00100 }
|
|
|
|
This is called by the children when they accept an event and which to pass it up. Notice that there are two versions of the method, if the event is not const then filter can take ownership of the event. Implements TAO_EC_Filter. Definition at line 80 of file EC_Masked_Type_Filter.cpp. References RtecEventComm::EventSet.
00082 { 00083 } |
|
Implements TAO_EC_Filter. Definition at line 86 of file EC_Masked_Type_Filter.cpp. References RtecEventComm::EventSet.
00088 { 00089 } |
|
Reimplemented from TAO_EC_Filter. Definition at line 38 of file EC_Masked_Type_Filter.cpp.
00039 {
00040 return 0;
00041 }
|
|
The bitmasks.
Definition at line 77 of file EC_Masked_Type_Filter.h. |
|
The values.
Definition at line 81 of file EC_Masked_Type_Filter.h. Referenced by can_match(), filter(), and filter_nocopy(). |
|
Definition at line 78 of file EC_Masked_Type_Filter.h. |
|
Definition at line 82 of file EC_Masked_Type_Filter.h. Referenced by can_match(), filter(), and filter_nocopy(). |