Package: inet.common.misc
MessageChecker
simple moduleModule 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)
Parameters
Name | Type | Default value | Description |
---|---|---|---|
config | xml |
Configuration file |
Gates
Name | Direction | Size | Description |
---|---|---|---|
in | input | ||
out | output |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
in | Indication | 3 (TcpStatusInd::TCP_I_AVAILABLE) | TcpAvailableInfo | Tcp | SocketInd |
in | Indication | 4 (TcpStatusInd::TCP_I_ESTABLISHED) | TcpConnectInfo | Tcp | SocketInd |
in | Indication | 6 (TcpStatusInd::TCP_I_CLOSED) | TcpCommand | Tcp | SocketInd |
in | Indication | 8 (TcpStatusInd::TCP_I_CONNECTION_RESET) | TcpCommand | Tcp | SocketInd |
in | Packet | 1 (TcpStatusInd::TCP_I_DATA) | Tcp | SocketInd | |
in | Packet | 4 (TcpCommandCode::TCP_C_SEND) | Bgp | DispatchProtocolReq, SocketReq | |
in | Request | 1 (TcpCommandCode::TCP_C_OPEN_ACTIVE) | TcpOpenCommand | Bgp | DispatchProtocolReq, SocketReq |
in | Request | 11 (TcpCommandCode::TCP_C_SETOPTION) | TcpSetTimeToLiveCommand | Bgp | DispatchProtocolReq, SocketReq |
in | Request | 2 (TcpCommandCode::TCP_C_OPEN_PASSIVE) | TcpOpenCommand | Bgp | DispatchProtocolReq, SocketReq |
in | Request | 3 (TcpCommandCode::TCP_C_ACCEPT) | TcpAcceptCommand | Bgp | DispatchProtocolReq, SocketReq |
in | Request | 6 (TcpCommandCode::TCP_C_ABORT) | TcpCommand | Bgp | DispatchProtocolReq, SocketReq |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
out | Indication | 3 (TcpStatusInd::TCP_I_AVAILABLE) | TcpAvailableInfo | Bgp | SocketInd |
out | Indication | 4 (TcpStatusInd::TCP_I_ESTABLISHED) | TcpConnectInfo | Bgp | SocketInd |
out | Indication | 6 (TcpStatusInd::TCP_I_CLOSED) | TcpCommand | Bgp | SocketInd |
out | Indication | 8 (TcpStatusInd::TCP_I_CONNECTION_RESET) | TcpCommand | Bgp | SocketInd |
out | Packet | 1 (TcpStatusInd::TCP_I_DATA) | Bgp | SocketInd | |
out | Packet | 4 (TcpCommandCode::TCP_C_SEND) | Tcp | DispatchProtocolReq, SocketReq | |
out | Request | 1 (TcpCommandCode::TCP_C_OPEN_ACTIVE) | TcpOpenCommand | Tcp | DispatchProtocolReq, SocketReq |
out | Request | 11 (TcpCommandCode::TCP_C_SETOPTION) | TcpSetTimeToLiveCommand | Tcp | DispatchProtocolReq, SocketReq |
out | Request | 2 (TcpCommandCode::TCP_C_OPEN_PASSIVE) | TcpOpenCommand | Tcp | DispatchProtocolReq, SocketReq |
out | Request | 3 (TcpCommandCode::TCP_C_ACCEPT) | TcpAcceptCommand | Tcp | DispatchProtocolReq, SocketReq |
out | Request | 6 (TcpCommandCode::TCP_C_ABORT) | TcpCommand | Tcp | DispatchProtocolReq, SocketReq |
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; }File: src/inet/common/misc/MessageChecker.ned