Simple Module MessageChecker

Package: inet.common.misc
File: src/inet/common/misc/MessageChecker.ned

C++ definition

Module that allows checking fields of messages

Example of XML configuration:

 <message occurence="i">     # check i successive messages
     <fieldValue name="<fieldname>" value="<fieldvalue>" [ type="<fieldtype>" ]/>
     <fieldObject name="<fieldname>" [ type="<objecttype>" ]>
         ...
     </field>
     <fieldArray name="<fieldname>" [ size="<arraysize>" type="<fieldtype>" ]/>
     <fieldValueInArray name="<fieldname>" index="<arrayindex>" value="<fieldvalue>" [ size="<arraysize>" type="<objecttype>" ]/>
     <fieldObjectInArray name="<fieldname>" [ index="<arrayindex>" size="<arraysize>" type="<objecttype>" ]>
         ...
     </field>
 </message>
 <message occurence="n"/>    # ignore n messages

Optional attributes are surrounded with square brackets. See also validation schema (XSD, DTD)

MessageChecker

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Used in compound modules:

Name Type Description
BGPRouterEx compound module

Example IP router with BGPv4 and OSPFv4 support.

BGPRouterSimple compound module

Example IPv4 router with BGPv4 support.

Parameters:

Name Type Default value Description
config xml

Configuration file

Gates:

Name Direction Size Description
in input
out output

Source code:

//
// Module that allows checking fields of messages
//
// Example of XML configuration:
//
// <pre>
//  <message occurence="i">     # check i successive messages
//      <fieldValue name="<fieldname>" value="<fieldvalue>" [ type="<fieldtype>" ]/>
//      <fieldObject name="<fieldname>" [ type="<objecttype>" ]>
//          ...
//      </field>
//      <fieldArray name="<fieldname>" [ size="<arraysize>" type="<fieldtype>" ]/>
//      <fieldValueInArray name="<fieldname>" index="<arrayindex>" value="<fieldvalue>" [ size="<arraysize>" type="<objecttype>" ]/>
//      <fieldObjectInArray name="<fieldname>" [ index="<arrayindex>" size="<arraysize>" type="<objecttype>" ]>
//          ...
//      </field>
//  </message>
//  <message occurence="n"/>    # ignore n messages
// </pre>
//
// Optional attributes are surrounded with square brackets.
// See also validation schema (XSD, DTD)
//
simple MessageChecker
{
    parameters:
        xml config;   // Configuration file
    gates:
        input in;
        output out;
}