|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.comp.Component
|
+--drcl.net.tool.Classifier
The component classifies the incoming packets and pass them on at corresponding ports.
Specifically, this component uses the PktClassifier to obtain an integer key for
an incoming packet and then retrieves the corresponding port from its key-port map.
The class defines a set of add() and remove() methods to
configure the key-port map.
| Inner classes inherited from class drcl.comp.Component |
Component.LockPack |
| Constructor Summary | |
Classifier()
|
|
Classifier(java.lang.String id_)
|
|
| Method Summary | |
void |
add(int value_,
int mask_,
Port p_)
Adds or replaces a mapping. |
void |
add(int value_,
int mask_,
java.lang.String portID_)
Adds or replaces a mapping. |
void |
add(int value_,
int mask_,
java.lang.String portGroup_,
java.lang.String portID_)
Adds or replaces a mapping. |
void |
add(MapKey key_,
Port p_)
Adds or replaces a mapping. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
PktClassifier |
getPktClassifier()
|
java.lang.String |
info()
Returns information regarding this component. |
protected void |
process(java.lang.Object data_,
Port inPort_)
The main callback method of a component. |
Port |
remove(int value_,
int mask_)
Removes a mapping. |
Port |
remove(MapKey key_)
Removes a mapping. |
void |
removeAll()
Removes all the mappings. |
void |
reset()
Resets the component for being used anew. |
void |
setPktClassifier(PktClassifier pc_)
|
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Classifier()
public Classifier(java.lang.String id_)
| Method Detail |
protected void process(java.lang.Object data_,
Port inPort_)
Componentprocess in class Componentdrcl.comp.Componentdata_ - the arrival data.inPort_ - the port where the data arrives.public void reset()
Componentreset in class Componentpublic void duplicate(java.lang.Object source_)
Componentduplicate in class Componentpublic java.lang.String info()
Componentinfo in class Componentpublic void setPktClassifier(PktClassifier pc_)
public PktClassifier getPktClassifier()
public void add(int value_,
int mask_,
java.lang.String portID_)
value_ - value of the key.mask_ - mask of the key.portID_ - ID of the port to be mapped from the key.
public void add(int value_,
int mask_,
java.lang.String portGroup_,
java.lang.String portID_)
value_ - value of the key.mask_ - mask of the key.portID_ - ID of the port to be mapped from the key.portGroup_ - port group ID of the port to be mapped from the key.
public void add(MapKey key_,
Port p_)
key_ - the key.p_ - the port to be mapped from the key.
public void add(int value_,
int mask_,
Port p_)
value_ - value of the key.mask_ - mask of the key.p_ - the port to be mapped from the key.
public Port remove(int value_,
int mask_)
value_ - value of the key.mask_ - mask of the key.public Port remove(MapKey key_)
key_ - the key.public void removeAll()
removeAll in class Component
|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||