10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
want to add field to route cache and packet of DSR routing protocol in ns2.34, add field, DSR package in ns2.34... (2 Replies)
Discussion started by: khubalkar
2 Replies
2. Programming
hi
i am student doing project in ns2.34.
i hav to add field in route cache and packet of DSR routing protocol.
which files hv to be changed...pl help me (1 Reply)
Discussion started by: khubalkar
1 Replies
3. IP Networking
Hello,
I am a beginner in Ns2 .
I'am trying to run the example attached bu I have this errors :
Simulation is running ... please wait ...
can't read "Node_(7)": no such element in array
while executing
"return $Node_($id)"
(procedure "_o3" line 3)
(Simulator get-node-by-id... (0 Replies)
Discussion started by: Yotta15
0 Replies
4. IP Networking
Hello,
First time poster here hoping to get some help with ns2.
I've recently started using ns2(first time user) but I'm having difficulty getting the results I'm after.
I am trying to set up a network with wireless nodes(5-15 nodes) and then use xgraph to display a timing diagram,... (0 Replies)
Discussion started by: UnicksMan
0 Replies
5. IP Networking
# Create the simulator object that we need in order to run NS
set ns
# Set the parameters that we will use for wireless communications
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set... (0 Replies)
Discussion started by: amithkhandakar
0 Replies
6. UNIX for Advanced & Expert Users
Hi!
I am using the ns2.31 simulator in Ubuntu 9.04.
I have developed my program and when I simulate it (calling ns2 from Ubuntu default shell, that uses gcc), I notice that only 1 of the 2 processors available in my notebook seems to be used (simulations are very heavy and my notebook stays... (5 Replies)
Discussion started by: Alice236
5 Replies
7. IP Networking
I have to work with NS2 (Network Simulator)and i have to install it beforeusing it on Manets Simulations.
Can some one Help me on this topic?
Thank's (1 Reply)
Discussion started by: hakim19
1 Replies
8. Shell Programming and Scripting
Hello,
Can someone explaine me the meaning of this program:
#! /usr/bin/tclsh
set mctal
set a
set b
set c
set d
set e
while {! line cell]} {
}
while {! line]} {
}
while {! line cell]} {
}
while {! line]} {
} (0 Replies)
Discussion started by: jolecanard
0 Replies
9. Shell Programming and Scripting
Hello Everyone,
I'm a very new user to both NS-2 and awk and struggling quite a bit. I have a created a wireless trace in NS2 which is of the format as given below:
s 0.029290548 _1_ RTR --- 0 message 32 -------
s 1.119926192 _0_ RTR --- 1 message 32 -------
M 10.00000 0 (5.00,... (2 Replies)
Discussion started by: cyberalienfreak
2 Replies
10. Shell Programming and Scripting
Does any one know how to capture the output of command called from a TCL script?
I cannot figure this out. I've been working on it for 4 hours now :confused: (2 Replies)
Discussion started by: Lorna
2 Replies
Standard Channels(3) Tcl Library Procedures Standard Channels(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tcl_StandardChannels - How the Tcl library deals with the standard channels
_________________________________________________________________
DESCRIPTION
This page explains the initialization and use of standard channels in the Tcl library.
The term standard channels comes out of the Unix world and refers to the three channels automatically opened by the OS for each new appli-
cation. They are stdin, stdout and stderr. The first is the standard input an application can read from, the other two refer to writable
channels, one for regular output and the other for error messages.
Tcl generalizes this concept in a cross-platform way and exposes standard channels to the script level.
APPLICATION PROGRAMMING INTERFACES
The public API procedures dealing directly with standard channels are Tcl_GetStdChannel and Tcl_SetStdChannel. Additional public APIs to
consider are Tcl_RegisterChannel, Tcl_CreateChannel and Tcl_GetChannel.
INITIALIZATION OF TCL STANDARD CHANNELS
Standard channels are initialized by the Tcl library in three cases: when explicitly requested, when implicitly required before returning
channel information, or when implicitly required during registration of a new channel.
These cases differ in how they handle unavailable platform- specific standard channels. (A channel is not "available" if it could not be
successfully opened; for example, in a Tcl application run as a Windows NT service.)
1) A single standard channel is initialized when it is explicitly specified in a call to Tcl_SetStdChannel. The states of the other
standard channels are unaffected.
Missing platform-specific standard channels do not matter here. This approach is not available at the script level.
2) All uninitialized standard channels are initialized to platform-specific default values:
(a) when open channels are listed with Tcl_GetChannelNames (or the file channels script command), or
(b) when information about any standard channel is requested with a call to Tcl_GetStdChannel, or with a call to Tcl_GetChannel
which specifies one of the standard names (stdin, stdout and stderr).
In case of missing platform-specific standard channels, the Tcl standard channels are considered as initialized and then immediately
closed. This means that the first three Tcl channels then opened by the application are designated as the Tcl standard channels.
3) All uninitialized standard channels are initialized to platform-specific default values when a user-requested channel is registered
with Tcl_RegisterChannel.
In case of unavailable platform-specific standard channels the channel whose creation caused the initialization of the Tcl standard chan-
nels is made a normal channel. The next three Tcl channels opened by the application are designated as the Tcl standard channels. In
other words, of the first four Tcl channels opened by the application the second to fourth are designated as the Tcl standard channels.
RE-INITIALIZATION OF TCL STANDARD CHANNELS
Once a Tcl standard channel is initialized through one of the methods above, closing this Tcl standard channel will cause the next call to
Tcl_CreateChannel to make the new channel the new standard channel, too. If more than one Tcl standard channel was closed Tcl_CreateChannel
will fill the empty slots in the order stdin, stdout and stderr.
Tcl_CreateChannel will not try to reinitialize an empty slot if that slot was not initialized before. It is this behavior which enables an
application to employ method 1 of initialization, i.e. to create and designate their own Tcl standard channels.
SHELL-SPECIFIC DETAILS
tclsh
The Tcl shell (or rather the function Tcl_Main, which forms the core of the shell's implementation) uses method 2 to initialize the stan-
dard channels.
wish
The windowing shell (or rather the function Tk_MainEx, which forms the core of the shell's implementation) uses method 1 to initialize the
standard channels (See Tk_InitConsoleChannels) on non-Unix platforms. On Unix platforms, Tk_MainEx implicitly uses method 2 to initialize
the standard channels.
SEE ALSO
Tcl_CreateChannel(3), Tcl_RegisterChannel(3), Tcl_GetChannel(3), Tcl_GetStdChannel(3), Tcl_SetStdChannel(3), Tk_InitConsoleChannels(3),
tclsh(1), wish(1), Tcl_Main(3), Tk_MainEx(3)
KEYWORDS
standard channels
Tcl 7.5 Standard Channels(3)