Generic Classifier ================== The :ned:`PacketClassifier` module classifies packets based on the configured packet classifier function. In this example network, packets are generated by an active packet source (:ned:`ActivePacketSource`). The packets are pushed into a :ned:`PacketClassifier` module, which are connected to two passive packet sinks (:ned:`PassivePacketSink`). The source generates 1-byte packets, which randomly contain either 0 or 1 as data. The classifier is configured to use the ``PacketDataClassifier`` function to classify packets. The function selects the classifier's output where the output index matches the data contained in the packet. Thus packets with data 0 are pushed to ``consumer1``, and those with data 1 to ``consumer2``. .. figure:: media/GenericClassifier.png :width: 80% :align: center .. literalinclude:: ../QueueingTutorial.ned :start-at: network GenericClassifierTutorialStep :end-before: //---- :language: ned .. literalinclude:: ../omnetpp.ini :start-at: Config GenericClassifier :end-at: classifierClass :language: ini