EMANE  1.2.1
emane.shell.emaneshell.EMANEShell Class Reference
Inheritance diagram for emane.shell.emaneshell.EMANEShell:

Public Member Functions

def __init__ (self, host, port)
 
def emptyline (self)
 
def can_exit (self)
 
def default (self, line)
 
def help_help (self)
 
def do_EOF (self, args)
 
def do_exit (self, message)
 
def do_show (self, args)
 
def do_info (self, args)
 
def complete_info (self, text, line, begidx, endidx)
 
def do_get (self, args)
 
def complete_get (self, text, line, begidx, endidx)
 
def do_clear (self, args)
 
def complete_clear (self, text, line, begidx, endidx)
 
def complete_set (self, text, line, begidx, endidx)
 
def do_set (self, args)
 
def complete_loglevel (self, text, line, begidx, endidx)
 
def do_loglevel (self, args)
 
def __init__ (self, host, port)
 
def emptyline (self)
 
def can_exit (self)
 
def default (self, line)
 
def help_help (self)
 
def do_EOF (self, args)
 
def do_exit (self, message)
 
def do_show (self, args)
 
def do_info (self, args)
 
def complete_info (self, text, line, begidx, endidx)
 
def do_get (self, args)
 
def complete_get (self, text, line, begidx, endidx)
 
def do_clear (self, args)
 
def complete_clear (self, text, line, begidx, endidx)
 
def complete_set (self, text, line, begidx, endidx)
 
def do_set (self, args)
 
def complete_loglevel (self, text, line, begidx, endidx)
 
def do_loglevel (self, args)
 

Public Attributes

 prompt
 

Detailed Description

Definition at line 47 of file build/lib/emane/shell/emaneshell.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

def emane.shell.emaneshell.EMANEShell.__init__ (   self,
  host,
  port 
)

Definition at line 48 of file build/lib/emane/shell/emaneshell.py.

◆ __init__() [2/2]

def emane.shell.emaneshell.EMANEShell.__init__ (   self,
  host,
  port 
)

Definition at line 48 of file emane/shell/emaneshell.py.

Member Function Documentation

◆ can_exit() [1/2]

def emane.shell.emaneshell.EMANEShell.can_exit (   self)

Definition at line 87 of file build/lib/emane/shell/emaneshell.py.

◆ can_exit() [2/2]

def emane.shell.emaneshell.EMANEShell.can_exit (   self)

Definition at line 87 of file emane/shell/emaneshell.py.

◆ complete_clear() [1/2]

def emane.shell.emaneshell.EMANEShell.complete_clear (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 464 of file build/lib/emane/shell/emaneshell.py.

◆ complete_clear() [2/2]

def emane.shell.emaneshell.EMANEShell.complete_clear (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 464 of file emane/shell/emaneshell.py.

◆ complete_get() [1/2]

def emane.shell.emaneshell.EMANEShell.complete_get (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 424 of file build/lib/emane/shell/emaneshell.py.

◆ complete_get() [2/2]

def emane.shell.emaneshell.EMANEShell.complete_get (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 424 of file emane/shell/emaneshell.py.

◆ complete_info() [1/2]

def emane.shell.emaneshell.EMANEShell.complete_info (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 364 of file build/lib/emane/shell/emaneshell.py.

◆ complete_info() [2/2]

def emane.shell.emaneshell.EMANEShell.complete_info (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 364 of file emane/shell/emaneshell.py.

◆ complete_loglevel() [1/2]

def emane.shell.emaneshell.EMANEShell.complete_loglevel (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 1002 of file emane/shell/emaneshell.py.

◆ complete_loglevel() [2/2]

def emane.shell.emaneshell.EMANEShell.complete_loglevel (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 1002 of file build/lib/emane/shell/emaneshell.py.

◆ complete_set() [1/2]

def emane.shell.emaneshell.EMANEShell.complete_set (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 697 of file build/lib/emane/shell/emaneshell.py.

◆ complete_set() [2/2]

def emane.shell.emaneshell.EMANEShell.complete_set (   self,
  text,
  line,
  begidx,
  endidx 
)

Definition at line 697 of file emane/shell/emaneshell.py.

◆ default() [1/2]

def emane.shell.emaneshell.EMANEShell.default (   self,
  line 
)

Definition at line 90 of file emane/shell/emaneshell.py.

◆ default() [2/2]

def emane.shell.emaneshell.EMANEShell.default (   self,
  line 
)

Definition at line 90 of file build/lib/emane/shell/emaneshell.py.

◆ do_clear() [1/2]

def emane.shell.emaneshell.EMANEShell.do_clear (   self,
  args 
)
The clear command is used to clear statistic elements that have
been designated as clearable.

Optional target-specific statistic element names can be specified.
When no names are specified all clearable statistic elements will
be cleared.

usage: clear stat <targets> <layer> [<target-specific>]
       <type>            ::=  'stat' | 'table'
       <targets>         ::=  <nem> | <nem> <target> | 'emulator' |
                      'nems'| '*'
       <layer>           ::=  'all' | 'mac' | 'phy' | <shim>
       <nem>             ::=  [1-9] | [1-9][0-9]+
       <shim>            ::=  'shim'[0-9]+
       <target-specific> ::= <names> | ''
       <names>           ::= <name> | <name> <names>
       <name>            ::= [A-Za-z0-9]+

example:
  Clear all statistics from all NEM layers and the emulator
  ## clear stat * all

  Clear all statistics from all NEM mac layers
  ## clear stat nems mac

  Clear two statistic items from the phy layers of NEM 1 and 2
  ## clear stat 1 2 phy processedEvents processedDownstreamControl

Definition at line 431 of file build/lib/emane/shell/emaneshell.py.

◆ do_clear() [2/2]

def emane.shell.emaneshell.EMANEShell.do_clear (   self,
  args 
)
The clear command is used to clear statistic elements that have
been designated as clearable.

Optional target-specific statistic element names can be specified.
When no names are specified all clearable statistic elements will
be cleared.

usage: clear stat <targets> <layer> [<target-specific>]
       <type>            ::=  'stat' | 'table'
       <targets>         ::=  <nem> | <nem> <target> | 'emulator' |
                      'nems'| '*'
       <layer>           ::=  'all' | 'mac' | 'phy' | <shim>
       <nem>             ::=  [1-9] | [1-9][0-9]+
       <shim>            ::=  'shim'[0-9]+
       <target-specific> ::= <names> | ''
       <names>           ::= <name> | <name> <names>
       <name>            ::= [A-Za-z0-9]+

example:
  Clear all statistics from all NEM layers and the emulator
  ## clear stat * all

  Clear all statistics from all NEM mac layers
  ## clear stat nems mac

  Clear two statistic items from the phy layers of NEM 1 and 2
  ## clear stat 1 2 phy processedEvents processedDownstreamControl

Definition at line 431 of file emane/shell/emaneshell.py.

◆ do_EOF() [1/2]

def emane.shell.emaneshell.EMANEShell.do_EOF (   self,
  args 
)
The ^D (Ctrl+d) command is used to exit the shell.

usage: ^D

example:
  ## ^D

Definition at line 103 of file build/lib/emane/shell/emaneshell.py.

◆ do_EOF() [2/2]

def emane.shell.emaneshell.EMANEShell.do_EOF (   self,
  args 
)
The ^D (Ctrl+d) command is used to exit the shell.

usage: ^D

example:
  ## ^D

Definition at line 103 of file emane/shell/emaneshell.py.

◆ do_exit() [1/2]

def emane.shell.emaneshell.EMANEShell.do_exit (   self,
  message 
)
The exit command is used to exit the shell.

usage: exit

example:
  ## exit

Definition at line 116 of file emane/shell/emaneshell.py.

◆ do_exit() [2/2]

def emane.shell.emaneshell.EMANEShell.do_exit (   self,
  message 
)
The exit command is used to exit the shell.

usage: exit

example:
  ## exit

Definition at line 116 of file build/lib/emane/shell/emaneshell.py.

◆ do_get() [1/2]

def emane.shell.emaneshell.EMANEShell.do_get (   self,
  args 
)
The get command is used to get configuration, statistic and
statistic table values.

All get types use optional target-specific name parameters:
* 'config' names specify configuration parameter names
* 'stat' names specify statistic element names
* 'table' names specify table names

When no names are specified all items are retrieved.

usage: get <type> <targets> <layer> [<target-specific>]
       <type>            ::=  'config' | 'stat' | 'table'
       <targets>         ::=  <nem> | <nem> <target> | 'emulator' |
                      'nems'| '*'
       <layer>           ::=  'all' | 'mac' | 'phy' | <shim>
       <nem>             ::=  [1-9] | [1-9][0-9]+
       <shim>            ::=  'shim'[0-9]+
       <target-specific> ::= <names> | ''
       <names>           ::= <name> | <name> <names>
       <name>            ::= [A-Za-z0-9]+

example:

  Get all configuration info from all NEM layers and the emulator
  ## get config * all

  Get all statistic tables from all NEM mac layers
  ## get table nems mac

  Get two statistic items from the mac layers of NEM 1 and 2
  ## get stat 1 2 mac processedEvents processedDownstreamControl

Definition at line 388 of file emane/shell/emaneshell.py.

◆ do_get() [2/2]

def emane.shell.emaneshell.EMANEShell.do_get (   self,
  args 
)
The get command is used to get configuration, statistic and
statistic table values.

All get types use optional target-specific name parameters:
* 'config' names specify configuration parameter names
* 'stat' names specify statistic element names
* 'table' names specify table names

When no names are specified all items are retrieved.

usage: get <type> <targets> <layer> [<target-specific>]
       <type>            ::=  'config' | 'stat' | 'table'
       <targets>         ::=  <nem> | <nem> <target> | 'emulator' |
                      'nems'| '*'
       <layer>           ::=  'all' | 'mac' | 'phy' | <shim>
       <nem>             ::=  [1-9] | [1-9][0-9]+
       <shim>            ::=  'shim'[0-9]+
       <target-specific> ::= <names> | ''
       <names>           ::= <name> | <name> <names>
       <name>            ::= [A-Za-z0-9]+

example:

  Get all configuration info from all NEM layers and the emulator
  ## get config * all

  Get all statistic tables from all NEM mac layers
  ## get table nems mac

  Get two statistic items from the mac layers of NEM 1 and 2
  ## get stat 1 2 mac processedEvents processedDownstreamControl

Definition at line 388 of file build/lib/emane/shell/emaneshell.py.

◆ do_info() [1/2]

def emane.shell.emaneshell.EMANEShell.do_info (   self,
  args 
)
The info command is used to display information loaded from plugin
manifest files. There are four types of info commands: manifest,
config, stat and table. The manifest info command is used to display
the names of discovered plugins. The config, stat and table info
commands are used to display plugin specific item descriptions.


The config, stat and table info commands use a single optional
plugin-specific name parameter:
* config name specifies a configuration parameter name
* stat name specifies a statistic element name
* table name specifies a table name

When no name is specified all known names are listed.

usage: info <type> <plugin> [<plugin-specific>]
       <type>            ::=  'config' | 'stat' | 'table'
       <plugin>          ::=  plugin-name
       <plugin-specific> ::= <names>
       <names>           ::= <name> | <name> <names>
       <name>            ::= [A-Za-z0-9]+

       info 'manifest'

example:
  ## info manifest
  ## info config rfpipemaclayer
  ## info config rfpipemaclayer neighbormetricdeletetime
  ## info stat emanephy processedEvents

Definition at line 155 of file build/lib/emane/shell/emaneshell.py.

◆ do_info() [2/2]

def emane.shell.emaneshell.EMANEShell.do_info (   self,
  args 
)
The info command is used to display information loaded from plugin
manifest files. There are four types of info commands: manifest,
config, stat and table. The manifest info command is used to display
the names of discovered plugins. The config, stat and table info
commands are used to display plugin specific item descriptions.


The config, stat and table info commands use a single optional
plugin-specific name parameter:
* config name specifies a configuration parameter name
* stat name specifies a statistic element name
* table name specifies a table name

When no name is specified all known names are listed.

usage: info <type> <plugin> [<plugin-specific>]
       <type>            ::=  'config' | 'stat' | 'table'
       <plugin>          ::=  plugin-name
       <plugin-specific> ::= <names>
       <names>           ::= <name> | <name> <names>
       <name>            ::= [A-Za-z0-9]+

       info 'manifest'

example:
  ## info manifest
  ## info config rfpipemaclayer
  ## info config rfpipemaclayer neighbormetricdeletetime
  ## info stat emanephy processedEvents

Definition at line 155 of file emane/shell/emaneshell.py.

◆ do_loglevel() [1/2]

def emane.shell.emaneshell.EMANEShell.do_loglevel (   self,
  args 
)
The loglevel command is used to set the emulator loglevel.

  0 - No log messages
  1 - Abort log messages
  2 - Error log messages
  3 - Info log messages
  4 - Debug log messages

usage: loglevel [0,4]

example:
  ## loglevel 4

Definition at line 1014 of file emane/shell/emaneshell.py.

◆ do_loglevel() [2/2]

def emane.shell.emaneshell.EMANEShell.do_loglevel (   self,
  args 
)
The loglevel command is used to set the emulator loglevel.

  0 - No log messages
  1 - Abort log messages
  2 - Error log messages
  3 - Info log messages
  4 - Debug log messages

usage: loglevel [0,4]

example:
  ## loglevel 4

Definition at line 1014 of file build/lib/emane/shell/emaneshell.py.

◆ do_set() [1/2]

def emane.shell.emaneshell.EMANEShell.do_set (   self,
  args 
)
The set command is used to set configuration elements that have
been designated as modifiable.

One or more configuration parameter value expressions can be
specified.

usage: set config <targets> <layer> <expressions>
       <targets>     ::=  <nem> | <nem> <target> | 'nems' |
                  '*'
       <layer>       ::=  'all' | 'mac' | 'phy' | <shim>
       <nem>         ::=  [1-9] | [1-9][0-9]+
       <shim>        ::=  'shim'[0-9]+
       <nem>         ::=  [1-9] | [1-9][0-9]+
       <expressions> ::=  <expression> | <expression> <expressions>
       <expression>  ::= <name>'='<values>
       <name>        ::= [.A-Za-z0-9]+
       <values>      ::= <value> | <value>','<values>
       <value>       ::= value-string

example:
  Set the txpower parameter for all NEM phy layers
  ## set config nems phy txpower=20

  Set the cwmin0 and cwmax0 parameters for NEM 1, 2 and 3 mac layers
  ## set config 1 2 3 mac cwmin0=100 cwmax0=200

Definition at line 703 of file emane/shell/emaneshell.py.

◆ do_set() [2/2]

def emane.shell.emaneshell.EMANEShell.do_set (   self,
  args 
)
The set command is used to set configuration elements that have
been designated as modifiable.

One or more configuration parameter value expressions can be
specified.

usage: set config <targets> <layer> <expressions>
       <targets>     ::=  <nem> | <nem> <target> | 'nems' |
                  '*'
       <layer>       ::=  'all' | 'mac' | 'phy' | <shim>
       <nem>         ::=  [1-9] | [1-9][0-9]+
       <shim>        ::=  'shim'[0-9]+
       <nem>         ::=  [1-9] | [1-9][0-9]+
       <expressions> ::=  <expression> | <expression> <expressions>
       <expression>  ::= <name>'='<values>
       <name>        ::= [.A-Za-z0-9]+
       <values>      ::= <value> | <value>','<values>
       <value>       ::= value-string

example:
  Set the txpower parameter for all NEM phy layers
  ## set config nems phy txpower=20

  Set the cwmin0 and cwmax0 parameters for NEM 1, 2 and 3 mac layers
  ## set config 1 2 3 mac cwmin0=100 cwmax0=200

Definition at line 703 of file build/lib/emane/shell/emaneshell.py.

◆ do_show() [1/2]

def emane.shell.emaneshell.EMANEShell.do_show (   self,
  args 
)
The show command is used to display manifest information provided
by the connected control port server.

The displayed information will include the NEM ids, component layer
types present and the name of the component layer plugin.

usage: show

example:
  ## show

Definition at line 130 of file emane/shell/emaneshell.py.

◆ do_show() [2/2]

def emane.shell.emaneshell.EMANEShell.do_show (   self,
  args 
)
The show command is used to display manifest information provided
by the connected control port server.

The displayed information will include the NEM ids, component layer
types present and the name of the component layer plugin.

usage: show

example:
  ## show

Definition at line 130 of file build/lib/emane/shell/emaneshell.py.

◆ emptyline() [1/2]

def emane.shell.emaneshell.EMANEShell.emptyline (   self)

Definition at line 84 of file emane/shell/emaneshell.py.

◆ emptyline() [2/2]

def emane.shell.emaneshell.EMANEShell.emptyline (   self)

Definition at line 84 of file build/lib/emane/shell/emaneshell.py.

◆ help_help() [1/2]

def emane.shell.emaneshell.EMANEShell.help_help (   self)

Definition at line 93 of file emane/shell/emaneshell.py.

◆ help_help() [2/2]

def emane.shell.emaneshell.EMANEShell.help_help (   self)

Definition at line 93 of file build/lib/emane/shell/emaneshell.py.

Member Data Documentation

◆ prompt

emane.shell.emaneshell.EMANEShell.prompt

Definition at line 50 of file build/lib/emane/shell/emaneshell.py.


The documentation for this class was generated from the following file: