MessageChecker¶
Package: inet.common.misc
simple module MessageChecker
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)
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
config |
xml |
Configuration file |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
MessageChecker |
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 extends SimpleModule
{
parameters:
@class(MessageChecker);
xml config; // Configuration file
gates:
input in;
output out;
}