TelnetServerConnection¶
Package: inet.applications.tcpapp
compound module TelnetServerConnection
Contains a configurable pre-composed telnet traffic source and traffic sink as part of a telnet server application.
See also: TelnetClientApp, TelnetServerApp
Usage diagram¶
Inheritance diagram¶
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/app |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
socketIn |
input |
||
socketOut |
output |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
cloner.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
responseProvider.displayStringTextFormat |
string |
“created %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
responseProvider.packetNameFormat |
string |
“%a-%c” |
See directives in module documentation |
responseProvider.packetRepresentation |
string |
“byteCount” |
Determines the chunk of the packet data |
responseProvider.packetProtocol |
string |
“unknown” |
|
responseProvider.packetLength |
int |
||
responseProvider.packetData |
int |
-1 |
|
responseProvider.attachCreationTimeTag |
bool |
true |
|
responseProvider.attachIdentityTag |
bool |
true |
|
responseProvider.attachDirectionTag |
bool |
true |
|
responseProvider.clockModule |
string |
“” |
Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional |
responseProvider.initialProvidingOffset |
double |
0s |
Initial duration before which packets are not provided |
responseProvider.providingInterval |
double |
0s |
Elapsed time between subsequent packets allowed to be pulled by the connected packet collector, 0 means any number of packets can be pulled at the same simulation time |
responseProvider.scheduleForAbsoluteTime |
bool |
true |
When a clock is used, relative means that setting the clock will not affect the simulation time of the event |
responseServer.displayStringTextFormat |
string |
“contains {numTokens} tk\nserved {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
responseServer.initialNumTokens |
double |
0 |
Initial number of tokens |
responseServer.maxNumTokens |
double |
nan |
Maximum number of tokens |
responseServer.tokenConsumptionPerPacket |
double |
1 |
How many tokens are consumed per processed packet |
responseServer.tokenConsumptionPerBit |
double |
0 |
How many tokens are consumed per processed bit |
multiplexer.displayStringTextFormat |
string |
“passed %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
multiplexer.forwardServiceRegistration |
bool |
true |
|
multiplexer.forwardProtocolRegistration |
bool |
true |
|
classifier.displayStringTextFormat |
string |
“classified %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
classifier.reverseOrder |
bool |
false |
|
classifier.classifierClass |
string |
“inet::queueing::PacketCharacterOrEnterClassifier” |
Determines the output queue of packets, the parameter must be the name of a C++ class which implements the IPacketClassifierFunction interface and is registered via Register_Class |
characterConsumer.displayStringTextFormat |
string |
“received %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
characterConsumer.clockModule |
string |
“” |
Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional |
characterConsumer.initialConsumptionOffset |
double |
0s |
Initial duration before which packets are not consumed |
characterConsumer.consumptionInterval |
double |
0s |
Elapsed time between subsequent packets allowed to be pushed by the connected packet producer, 0 means any number of packets can be pushed at the same simulation time |
characterConsumer.scheduleForAbsoluteTime |
bool |
true |
When a clock is used, “relative” means that setting the clock will not affect the simulation time of the event |
enterTokenGenerator.displayStringTextFormat |
string |
“processed %p pk (%l)\ngenerated %t tk\nto %s” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
enterTokenGenerator.storageModule |
string |
“^.responseServer” |
Module path of the token storage where the tokens are generated via C++ method call |
enterTokenGenerator.numTokensPerPacket |
double |
1 |
Number of tokens per consumed packet |
enterTokenGenerator.numTokensPerBit |
double |
0 |
Number of tokens per consumed bit |
io.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
io.readSize |
int |
-1B |
Used only with autoRead==false |
io.readDelay |
double |
-1s |
Used only with autoRead==false; delay for issuing a READ command after previous READ was satisfied; -1 means immediately, 0 means zero delay |
Source code¶
//
// Contains a configurable pre-composed telnet traffic source and
// traffic sink as part of a telnet server application.
//
// @see ~TelnetClientApp, ~TelnetServerApp
//
module TelnetServerConnection like IApp
{
parameters:
@display("i=block/app");
gates:
input socketIn;
output socketOut;
submodules:
cloner: PacketCloner {
parameters:
@display("p=300,200");
}
responseProvider: <default("PassivePacketSource")> like IPassivePacketSource {
parameters:
@display("p=100,100");
}
responseServer: <default("TokenBasedServer")> like IPacketServer {
parameters:
@display("p=100,200");
}
multiplexer: PacketMultiplexer {
parameters:
@display("p=200,300");
}
classifier: <default("PacketClassifier")> like IPacketClassifier {
parameters:
classifierClass = default("inet::queueing::PacketCharacterOrEnterClassifier");
@display("p=500,200");
}
characterConsumer: <default("PassivePacketSink")> like IPassivePacketSink {
parameters:
@display("p=400,300");
}
enterTokenGenerator: PacketBasedTokenGenerator {
parameters:
storageModule = default("^.responseServer");
@display("p=600,300");
}
io: TcpServerSocketIo {
parameters:
@display("p=300,400");
}
connections:
io.trafficOut --> cloner.in;
cloner.out++ --> classifier.in;
cloner.out++ --> multiplexer.in++;
responseProvider.out --> responseServer.in;
responseServer.out --> multiplexer.in++;
classifier.out++ --> characterConsumer.in;
classifier.out++ --> enterTokenGenerator.in;
multiplexer.out --> { @display("m=s"); } --> io.trafficIn;
io.socketOut --> { @display("m=s"); } --> socketOut;
socketIn --> { @display("m=s"); } --> io.socketIn;
}
File: src/inet/applications/tcpapp/TelnetServerConnection.ned