Lisp Educational Network Simulator (LENS)

Table of Contents

1 Summary

Lisp Educational Network Simulator (LENS) is a discrete event simulation framework written in Common Lisp. It provides a generic architecture for modelling in problem domains where the system may be represented by the exchanging of messages between entities. It is being used to develop simulations for research into Wireless Sensor Networks.

1.1 Why Use LENS?

LENS is easier to extend and develop for than other network simulators.

The decision to write a new network simulator in |LISP| was based upon a number of observations:

  • Simulation environments require a core model and a means for specifying particular simulations at run time. Most simulators have the core model written in a compiled language (e.g. C++) for efficiency and have a separate embedded run time interpreter (e.g. Tcl or a domain specific language) for describing the particular simulation. |LISP| provides the full language and compiler environment at run-time so there is no need for this separation.
  • Users of a simulator will want to describe their problem in a way which matches their particular domain. |LISP| is an extensible language which is especially good for writing domain specific languages.
  • LISP enables introspection of all aspects of the simulated system while it is running without any additional programming. Most other simulators provide only limited introspection capabilities which have to be explicitly programmed in.
  • In modern LENS the simulations are run in a separate thread to the normal Common Lisp read-eval loop so the user can probe or modify the simulation even while it is running.

The architecture of LENS is inspired by the http://www.omnetpp.org/ [OMNET++ simulator framework written in C++ however may aspects of that design become simpler when implemented in LISP.

1.2 Dependences

LENS has been developed using the SBCL http://sbcl.sourceforge.net/ Common Lisp implementation. Implementation specific features are accessed through a thin compatibility layer in `core/compatibility.lisp` which is the only file that should need changed to port it to other implementations. Currently the only implementation feature used is threading so porting is a minimal task. If you do port LENS to another implementation please send me the changes to encorporate back into the main distribution.

LENS is dependant on the following additional Common Lisp libraries

1.3 Installation

LENS is available from the GIT repository. You can clone and install LENS like this:

cd ~/src/
git clone https://github.com/willijar/LENS.git

1.4 How to Use

  1. The file lens.asd provides the asdf system definition for LENS. You should place a symbolic link to this file in a system definition directory where ASDF can find it. Similarly for
  2. Load LENS with
    (asdf:operate 'asdf:load-op :lens)
    
  3. Load the simulation system you want with
    (asdf:operate 'asdf:load-op :simulation-system-name)
    

    e.g. (asdf:operate 'asdf:load-op :lens.samples) for the provided example `samples` network.

  4. Make the simulation package your current package
    (asdf:operate 'asdf:load-op :simulation-package-name)
    

    e.g. (in-package :lens.samples) for the provided example networks.

  5. Load and run a simulation configuration from a configuration file
    (run-simulations "configuration-file.ini" :config "section-name")
    

    e.g. (run-simulations +tictoc+ :config "TicToc2") will run the sample simulation specified by section "TicToc2" in the samples configuration file (+tictoc+ is defined in the :lens.samples package to point to this file)

1.5 Feedback

If you have have questions, remarks, or ideas about LENS or want to submit a bug report then please email me at mailto:J.A.R.Williams@aston.ac.uk

2 Using LENS

LENS provides a generic architecture for modelling systems that may be represented by entities exchanging discrete messages over time (such as communication systems). It is designed to support a modular system model design (enabling model component reuse) and a clear separation between the model implementation and the simulated experiments that are being carried out in it. Models are implemented in Common Lisp. Simulation experiments are specified using text configuration files and the results are produced in text data files which may then be analysed by further tools.

This document is a manual for implementing and using models in LENS

2.1 Introduction

Simulations of networks can provide a useful educational tool both for supporting traditional modular courses and for enabling students to carry out more open ended project work. In terms of research ultralow power wireless are an interesting engineering problem as they operate under significant resource constraints and the protocols and techniques that are needed are therefore very application dependant. Simulations provide an efficient way of investigating those challenges and potential solutions. A simulation framework that can support both these tasks would enable students to carry out research work in wireless sensor networks as part of their projects.

There are many discrete time event network simulators available. Those which are most widely used (such as NS2 and it's derivatives) are popular because they have been around a long time and a very large number of network models have been written for them. The range of models available has outgrown the original framework design and this gives rise to many workarounds and the introduction of substantial unnecessary complexity. This growth of baroque complexity makes it very difficult to fully understand the details of the models or to modify or customise them. As the models continue to grow this is becoming harder and harder. While there have been attempts to re-factor some of these large simulator frameworks they have met with limited success - partly because one of the goals is to try to maintain some sort of compatibility with the legacy of complex models.

An alternative is to design a new simulator framework based on experience of the limitations of the previous designs which have led to the growth in their complexity. One such framework is OMNET++ which is a simulator framework written in C++ which addresses the design issues. The disadvantage is that it does have the wide range of network models available as the more long standing simulators.

Traditionally simulation models are typically made up of a fixed compiled component written in C or C++ for efficiency and a run time interpreted component to allow customisation without having to recompile for every model change. The run time component is either in a dynamic extension language (such as Tcl for NS2) or a custom language (NED for OMNET++). This simulation models are typically spread across at least two files in two different programming languages. Aspects which have been fixed in the compiled model cannot be changed at run time. It is not always transparent which aspects of the model should be fixed and which should be configurable at model implementation time, nor is it obvious in complex models where to find different aspects of the implementation.

From experience I have found that students take too long to have sufficiently in depth understanding of the Baroque mature simulators to write new models withing the 6 month time frame allowed for Masters projects. They are suitable for projects involving running currently available models but not if the project is to evaluate some new model. Additionally, when looking for a network simulator to carry out more complete systematic evaluation of wireless sensor networks I found that none of the already existing network simulators had implementations of all the protocols of interest. No matter which simulator I chose I would need to port across implementations of protocols.

On this basis a new simulator framework \acr{LENS} has been designed. Many aspects of the architecture are based on the excellent design of OMNET++ however it was written entirely in \gls{CL}. \gls{CL} provides a dynamic compiled environment with full introspection capabilities during run time. It is an extensible language which is especially good for domain specific customisation. There is therefore no need to use or design a separate interpreted language for the dynamic aspect. This simplifies the design - typically a single protocol will be fully described in a single file containing a class definition describing its state variables and configurable parameters as well as its implementation. Full use has been made of the [[CLOS] [Common Lisp Object System (CLOS)] to provide modularity in the design and the associated Meta Object protocol has been used to handle cross cutting concerns in the design. It was considered that the initial investment in designing the simulation framework would pay off when having to port protocols across to it and when designing new protocols.

2.2 Overview

(defclass communications(compound-module)
 ()
 (:gates
  (application :inout)
  (channel :inout))
 (:submodules
  (routing routing)
  (mac mac)
  (radio radio))
 (:connections
  (<=> application (routing application))
  (<=> (routing mac) (mac routing))
  (<=> (mac radio) (radio mac))
  (<= (radio receive) channel))
 (:metaclass compound-module-class)
 (:documentation "A Communications module"))

compound-module-example.png

A Compound module example with three submodules

LENS is a discrete time event simulator. It is suitable for simulating systems which can be represented as a set of entities exchanging discrete messages over time. It supports a hierarchical design methodology where complex entities (called compound modules) are broken down into smaller networks of components etc until we get to simple modules (or just modules) which contain the specific implementation details of the system being modelled. The modules (whether simple or compound) interact by send and received messages through named gates. Connections between gates are represented using channels which may include delays and modify the messages (for example adding in message loss or errors). The system models are described and implemented using the Common Lisp (CL) programming language. Figure fig:compound shows an example of a compound communications model with the CL and the associated graphical representation. The system component types are defined as classes using CLOS - part of this definition is the set of configurable parameters for the model which will be read from a configuration file when it is being run.

Simulations are used to run a series of experiments which varying system parameters and to collect a measurements of the system performance for each experiment. LENS provides separation of the system model from the specification of the experiments being performed. It is not necessary to change the model to carry out different experiments. Experiments are described in configuration files which specify what parameters to use and what measurements are to be recorded. A single configuration file may describe many different named experiments and may also specify a series of experiments with varying parameters.

The model implementation modules are instrumented by signalling signal useful events or value changes using emit. These signals may be handled by the simulator to collect statistics and provide performance evaluation reports. They might also be used to update various views of the running simulation (for example a graphical display). No such graphical display is currently implemented.

The framework is generic and many different models may be represented using it. It is recommended that a package be created for each model which uses the :lens package (as well as :cl and :cl-user) and that all declarations for that model are made in it's package. This will prevent namespace collisions between models. Users should then be in a particular model package when running it. When reading parameters the :lens namespace is used by default so symbols which may be read from external files will need to be specified either with an explicit package name or be exported into the :lens package. Parameter names however are parsed as strings as they are addressed by their position in the model hierarchy and so the package in which they are declared is ignored.

2.3 Network Description

Simulations are represented as a heirarchical network of modules interconnected using channels. Every simulation must have one top level network module which will specify submodules and their interconnections. These submodules may be compound modules which can contain further submodules or simple modules which contain implementations. All module types are declared as CLOS classes inheriting from network, compound-module and module base classes as appropriate. In addition module classes must declare a metaclass - compound-module-class for networks and compound modules and module-class for simple modules. These meta-classes allow for the declaration of parameter slots (where the value may be initialised from the configuration file), gates, submodules and connections in the class definition. When a simulation is run the network type is read from the parameter file and created. This will then create the submodules and so on until the whole network is created.

2.3.1 Network Modules

A network topology is described using the declaration of a new class of type network.

(defclass TicToc1(network)
 ()                   ;; No parameters declared
 (:submodules         ;; submodule declaration
  (tic Txc1)
  (toc Txc1))
 (:connections        ;; interconnection declaration
  (=> (delay-channel :delay 0.1d0) (tic out) (toc in))
  (=> (delay-channel :delay 0.1d0) (toc out) (tic in)))
 (:metaclass compound-module-class)) ;; metaclass required

This network is called TicToc1. It has no slots or parameters specified. The :submodules class option specifies a list of two node submodules named tic and toc each of must be of type Txc1 (which we will define later). The :connections class option specifies connections between the gates of these submodules - in this case there are two connections - one from the out gate of each module to the in gate of the other module each using a delay-channel with a delay of 0.1 sec. Networks are compound modules withp=out any gates (external connections) and so must use the compound-module-class metaclass. There is usually just one network instance for each simulation.

Declarations are placed in lisp files and loaded as usual into your lisp environment. For every simulation the user will need to specify the network name in the configuration file.

[General]
network=TicToc1

2.3.2 Simple Modules

Simple modules are the basic building blocks defining the network behaviour. In the example above we declared two submodules each of type Txc1 which could be declared as simple modules. A minimal declaration is given below.

(defclass Txc1(module)
  ()
  (:gates       ;; gate declarations
   (in :input)
   (out :output))
  (:metaclass module-class)) ;; module-class metaclass required for simple modules

In this declaration we have defined a module which has two gates, one input gate which can receive messages named in and one output gate which can send messages named out. These named gates were used when specifying the connections for the TicToc network declared previously.

In addition to declaring the simple model class we need to define an implementation. We do this by writing methods with the required behaviour. In this case we want the modules to resend a message to their output gate when they receive it on their input gate. Additionally to get the process started we need one of the modules to send a message on startup.

(defmethod initialize list ((module Txc1) &optional (stage 0))
  (when (eql (name module) 'tic)
    (send module (make-instance 'message :name 'TicTocMsg) 'out))
  t)

(defmethod handle-message((module Txc1) msg)
  (send module msg 'out))

After the simulator has constructed the network entities from the definitions and configuration file the initialize generic function is called recursively depth first on the network hierarchy. This takes the module an initialisation stage number as arguments. Simple Modules define their initialisation here and return true if their initialisation is finished. Multiple stage initialisation is enabled. This may be necessary where there is a cross dependence in initialisation between modules. In this case the initialize function will be called with increasing stage number until it returns true i.e. if a module requires multiple stage initialisation it should return nil until it has reached its last stage when it should return true. In this simple example we only want one module to start the message sending process so we check it is named tic and if so send a new message to the out gate.

When a message is received by a module the handle-message method is called with the module and message arguments. Every simple module will want to specialise this method to implement their behaviour. In this example it is specialised on the Txc1 class and it immediately calls send to send the message to the out gate of the module.

2.3.3 Compound Modules

The above network nodes were very simple and could be implemented as simple modules. In general however nodes will involve complex behaviour and we will want to break their implementation down into simpler components. A compound module can be used in this case. Figure fig:compound shows an example of such a module. It has the list of submodules and connections (as per the network modules) as well as a list of external gates which can also be connected to submodule gates.

Generally all of the behavioural implementation is defined in simple modules however it is possible to add to or override some of the default behaviour in compound modules. An example of this is were the network of submodules and interconnections may be parameterised and therefore a method may be added to add in the necessary network behaviour creation before module initialisation 1.

2.3.4 Gates

Gates are the named input and output ports of both simple or compound modules. They are given symbolic names, and may be declared either as :input, :output or :inout (which creates both an input and output gate of the same name. Additionally a numerical second argument may be used to declare an array of gates. This may be 0 indicating that it the array may be extended during module initialisation or may be the name of a module slot specifying the size. The basic addressing format for gates is (name [index] [direction]) or name which is used by the gate generic function to return a named gate for a module. The :index keyword argument '++ may be used to indicate that a new gate should be created on the addressed gate array. If the direction is obvious from the context (e.g. it must be :output when sending a message) then it may be left off the address.

2.3.5 Channels

Channels are the final component types which are used to create a simulation. LENS provides two inbuilt channel types. The ideal-channel which is the default and has zero propagation and transmission delay and is always enabled. The delay-channel has a propagation delay specified using a :delay argument and may be disabled. In addition the transmission-channel base class is provided for more complex behaviour - taking account of transmission time, packet loss etc. Most derived channels will be based on this class and must specialise the process-message generic function to provide the required functionality. This method should model the transmission of the given message starting at the given time, and return the propagation delay, transmission duration, and discard flag in a channel-result structure. The transmission duration and bit error modeling only applies to instances of packet and should be skipped for non-packet messages. The method does not need to set the duration of the packet; this is done by the simulation kernel. However, the method should set the bit-error-p on the packet if error modeling results in bit errors. If the discard flag is set in the result object, it means that the message object should be deleted by the simulation kernel; this facility can be used to model that the message gets lost in the channel.

The method does not need to throw error on overlapping transmissions, or if the packet's duration field is already set; these checks are done by the simulation kernel before process-message is called.

In addition they may wish to implement nominal-datarate and calculate-duration methods.

2.3.6 Parameters

All modules and channels can be configured using named parameters. In LENS parameters are defined as slots in the class definition with :parameter argument set to true. If the slot is not initialised by slot argument during object creation the object will try and read a value from the configuration file. If no value is defined in the configuration file then the default initialisation form is evaluated and used 2.

(defclass Txc4(Txc1)
  ((send-msg-on-init
    :parameter t :initarg :send-msg-on-init :initform nil :type boolean
    :reader send-msg-on-init
    :documentation "Whether module should send message on initialization"))
  (:metaclass module-class))

In this example The send-msg-on-init instance slot is declared as a parameter. If the initialisation argument :send-msg-on-init is specified during creation of a Txc4 (either in code or in the module specification in a compound module) then its value will be used. Otherwise the simulation configuration will be checked for a value. Finally if neither of these are specified the :initform value will be used as the default.

When declaring parameter slots you should specify a format to be used to parse the configuration string into an internal type. By default this is derived from the declared slot :type however the slot :format may be used to customise this parsing for example to allow for additional error checking. This argument takes any format type specification understood by the data-format-validation library and new format types may be added as per that library. If no format or type are declared the parameter will be read in as a string.

2.4 Messages and Packets

message instances in LENS are used to represent events, packets, commands, jobs, customers and other types of entities depending on the model domain. They may be sent through gates and channels between modules or may be send directly to a module. The base message class records the creation time, transmission time, arrival time and the source and destination entites. The send generic function provides the basic mechanism for a module to send a message out through one of its named gates. The gate can be an actual gate object or it's specifier.

The simulator will call handle-message with the module and message when at the message arrival time.

packet instances objects are messages used to represent network packets.

All message and packet types must override the duplicate method to provide proper duplication semantics (i.e. must explicitely copy slots from an originating packet to a duplicate one. The encapsulate and decapsulate methods are used to embed and access higher level encapsulated packets. Duplication does results in the originating and duplicate packets sharing the same encapsulated packet - however decapsulating returns a duplicate of the encapsulated packet ensuring appropriate copy semantics are maintained efficiently through this interface.

The control-info field in packets may be used to pass additional information with packets as they are passed between protocol layers - for example command information to a lower layer as the packet is passed down or additional information associated with packet reception as the packet is passed up a protocol stack.

2.5 Signals and Instrumentation

For a simulation to be useful it must collect useful information on the model operation. Separating our the generation of the information from the collecting and reporting of it allows for the maximum flexibility and generality. The LENS this is achieved with the use of named signals which may be emitted with useful information in the model implementation code and which can then be collected and analysed by listeners attached to the various modules in the simulation.

The register-signal function is normally called as a top level form to register a particular named signal with the symbol. Adding documentation is recommended so that other implements may reuse it if they have similar semantics. Registering commonly used signals ensures that their handling will be optimised.

In the model implementation the emit method is called to broadcast a signal. This may optionally take an argument (for example a count) associated with that signal. Listeners registered to receive this signal in the broadcasting module or above it in the hierarchy will all receive the signal in via the receive-signal method. If the generation of the broadcast signal is expensive the may-have-listeners function may be called to check whether it is necessary first.

Modules call the subscribe and unsubscribe functions to register or unregister a listener object for a particular signal on a particular module. A listener may be registered to more than one signal or module and can use the source-component, signal and value arguments to differentiate the source as required).

As an example an application module might register signals for packet transmission and reception at the top level in the source file.

(register-signal
 'packet-receive
 "Emitted when application receives a packet.")

(register-signal
 'packet-send
 "Emitted when application sends a packet.")

In the relevant code implementation for transmission and reception it may call (emit application 'packet-send packet) or (emit application 'packet-receive packet) respectively to inform the relevant listeners of these events. These send the actual packet as a value. Listeners should not modify the packet but may read values from them.

2.5.1 Statistics

Network instrumentation is performed by registering listeners which can receive signals and perform the relevant analysis. These are registered as part of a module class declaration as statistic properties of that module e.g.

(defclass application(wsn-module)
  ( 
    ;; parameter declarations
   )
  (:gates
    ;; gate declarations
  }
  (:properties
   :statistic (latency
               :source (latency packet-receive)
               :title "application latency"
               :default ((histogram :min 0)))
   :statistic (packet-receive :title "application packets received"
                              :default (count))
   :statistic (packet-receive-per-node
               :title "packets received per node"
               :source (source (control-info packet-receive))
               :default (indexed-count))
   :statistic (packet-send :title "application packets sent"
                           :default (count)))
  (:metaclass module-class)
  (:documentation "Application connects to sensors for measurements
  and to communication module for sending/receiving data."))

This example declares four different statistics associated using the packet-send and packet-receive signals. Each statistics is given a name and title (used in reports), a source declaration (a function which when applied to the signal value will return a number) and a list of default and optional statistics to be performed on the source value. These statistics are registered listener classes which will collect their received values and produce either scalar or vector outputs from the simulation for analysis. See the statistics.lisp and statistics-impl.lisp core files for more information. Whether a particular statistic is active or not is controlled in the simulation configuration file - those declared as default are active unless turned off and those declare optional are not active unless turned on in the configuration file. The framework allows for the implementation and declaration of new statistic listener types if required.

2.6 Configuring Simulations and Experiments

3 Internal Package: lens

3.1 Description

This package provides the main simulation framework. It is intended that every simulation system will be defined in its own package which will use this package to import the public API. Simulations should be run from within the dynamic context of their specific simulation package so that symbolic configuration parameters will be read into the correct package.

Simulations are represented as a heirarchical network of modules interconnected using channels. Every simulation must have one top level network module which will specify submodules and their interconnections. These submodules may be compound modules which can contain further submodules or simple modules which contain implementations. All module types are declared as CLOS classes inheriting from network, compound-module and module base classes as appropriate. In addition module classes must declare a metaclass - compound-module-class for networks and compound modules and module-class for simple modules. These meta-classes allow for the declaration of parameter slots (where the value may be initialised from the configuration file), gates, submodules and connections in the class definition. When a simulation is run the network type is read from the parameter file and created. This will then create the submodules and so on until the whole network is created.

3.2 Class Hierarchy

class-0004_37d20fcf66197c2f9050c9e105b3593e2437d71b.png

3.3 External Symbols

3.3.1 External Classes

External Class: channel
Parameters

None.

Description

Base class for all channels entities in the simulations. Channells are attached to their source gate.

Direct Slots

Internal Slot: source-gate
  • Value type: t
  • Initial value: NIL
  • Initargs: source-gate
  • Allocation: instance
Description

The gate which sends messages over the channel.

Accessors

Internal Slot Accessor: source-gate
Syntax
(source-gate object)
Methods
Indirect Slots

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: component
Parameters
collect-trace-info
a boolean. If true tracelog outputs will be traced for this component.
Description

class component adds in random number sequence mapping and tracing functionality on top of parameter and signal handling. It is the base class for all modules and channels in simulation which require these.

Additional Parameters
rng-<n>
a integer. Specifies the global random number sequence number to be mapped to the n th sequence for this component
scalar-recording
a boolean. If true scalar recording will be activated for statistics objects associated with this component.
vector-recording
a boolean. If true vector recording will be activated for statistics objects associated with this component.
Notes

Both tracing (using tracelog) and rng mapping depend on the *context* dynamic global variable being set to the correct component. This is set for initialize-instance, finish and for handle-message. Functions or methods designed to be used to access a component directly outside these contexts must explicitely bind *context* around around any dynamic context using random number generation or tracing. and should do it in all such cases as a matter of safe practice.

Direct Slots

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

If true tracelog outputs will be traced for this component.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Accessors

External Slot Accessor: rng-map
Syntax
(rng-map context)
Methods
  • (rng-map (component component))
  • (rng-map (simulation simulation))
  • (rng-map (context (eql nil)))

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

Accessors

External Slot Accessor: initialized-p
Syntax
(initialized-p component)
Arguments
component
a simulation component
Description

Returns true if an entity has finished its initialization using the initialize method.

Methods
Indirect Slots

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: compound-module
Parameters

None.

Description

Base class for all compound-modules using the compound-module-class metaclass. See class compound-module-class for details of the additional class slot options available.

Typically no further implementation beyond the class specification is used with compound modules as messages will be automatically routed in the gates of submodules as per the :connections specifications. It is however allowed to have unconnected gates in which case handle-message must be implemented to receive the messages. This would allow some implementation in compound modules which they might then send to several contained submodules.

The build-submodules and build-connections may be usefully extended to allow algorithmic creation of the contained network.

Direct Slots

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: submodules
Syntax
(submodules object)
Methods

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: channels
Syntax
(channels object)
Methods
Indirect Slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: compound-module-class
Additional Class Options
types
( (typename initargs)* )
  • typename : a symbol
  • initargs : (classname {keyword argument}*)
submodules
( (submodule-name [/sizespec/] ((classname | typename) {keyword argument}* ) *)
  • submodule-name : a symbol
  • sizespec : (integer | (sizeof gate-name) | slot-name)
connections
( (gate-specifier [/channel-spec/] direction gate-specifier)* )
  • gate-specifier : (gate-name | (submodule-name gate-name))
  • channel-spec : ((classname | typename) {keyword argument}* )
  • direction : (> | <=> | <)
Description

Metaclass for all compound modules classes - the base class for modules with gates, submodules and connections between those submodules and gates. Must be used as metaclass for compound-module classes.

See module-class for details on the :gates class option.

The :types class option provides a way of providing a mapping between a single symbolic typename and a list of initargs which would correspond to the classname and keyword arguments passed in construction of either a submodule or channel. These names thus provide a useful shortcut when defining submodules or channels. If a typename is specified with some additional arguments they will override the default ones.

The :submodules class option provides a list of submodule class specifications consisting of the local name for the submodule, an optional sizespec if an array of submodules is to be created and the arguments to make-instance to be used. A previously defined local type shortcut may be used instead of the classname. At creation the :owner keywword will be added to the initargs with the current instance as the argument. A sizespec may either be an integer, a symbolic slot-name corresponding to one of the slots in the class or (sizeof gate-name) which will correspond to the size of the array of gates with the given gate-name.

The :connections class option specifies connections between gates. Gates are specified either as the gate name if a gate in the current module or a list of submodule name and gate name for submodules. They may additionally have an index parameter if corresponding to gate arrays. The direction specifier specifies the direction of connection, <=> may be used to provide connections in both directions between :inout gates. An optional channel specifier may be used as the second argument specifying the channel type and initargs for creating the channel. The type may be a local type definied with the :types slot option. The :name argument may be used to give individual channels names - otherwise they will be named after their type name. The :owner keyword argument will be added with the current object instance as the argument.

Direct Slots

Internal Slot: %localtypes
  • Value type: list
  • Initial value: NIL
  • Initargs: types
  • Allocation: instance
Description

Specified local type mapping.

Internal Slot: %submodules
  • Value type: list
  • Initial value: NIL
  • Initargs: submodules
  • Allocation: instance
Description

Submodule specifications

Internal Slot: %connections
  • Value type: list
  • Initial value: NIL
  • Initargs: connections
  • Allocation: instance
Description

Connection specification for this class

Indirect Slots

Internal Slot: %gatespec
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The parsed gate specification used to build gates for this class

Internal Slot: properties
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The properties for this class

Internal Slot: slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: direct-slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: prototype
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: wrapper
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: incompatible-superclass-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: can-precede-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: cpl-available-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: %class-precedence-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: finalized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: safe-p
  • Value type: t
  • Initial value: NIL
  • Initargs: safe-p
  • Allocation: instance
Description

Slot: %documentation
  • Value type: t
  • Initial value: NIL
  • Initargs: documentation
  • Allocation: instance
Description

Slot: direct-methods
  • Value type: t
  • Initial value: (CONS NIL NIL)
  • Initargs: none
  • Allocation: instance
Description

Slot: direct-subclasses
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Internal Slot: direct-superclasses
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: class-eq-specializer
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

External Slot: name
  • Value type: t
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Slot: plist
  • Value type: t
  • Initial value: NIL
  • Initargs: plist
  • Allocation: instance
Description

Internal Slot: source
  • Value type: t
  • Initial value: NIL
  • Initargs: definition-source
  • Allocation: instance
Description

Slot: %type
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

External Class: delay-channel
Inheritance
Parameters
delay
a time-type. Default: 0.0d0. The propagation delay in seconds
disabled-p
a bool. NIL
Description

A channel with propagation delay.

Direct Slots

External Slot: delay
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: delay
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The propagation delay in seconds

Accessors

External Slot Accessor: delay
Syntax
(delay object)
Methods

External Slot: disabled-p
  • Value type: bool
  • Initial value: NIL
  • Initargs: disabled
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

External Slot Accessor: disabled-p
Syntax
(disabled-p object)
Methods
Indirect Slots

Internal Slot: source-gate
  • Value type: t
  • Initial value: NIL
  • Initargs: source-gate
  • Allocation: instance
Description

The gate which sends messages over the channel.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: entity-with-signals
Inheritance
Description

An entity which can subscribe to and emit and receive-signal signals.

Direct Slots

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

Accessors

Internal Slot Accessor: signal-table
Syntax
(signal-table object)
Methods

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Indirect Slots

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: gate
Inheritance
Description

Represents a module gate. Created and managed by modules; the user typically does not want to directly create or destroy gate objects. However, they are important if a module algorithm needs to know about its surroundings. Module gates connect only in one direction. Bidirectional connections result in two chains of gates going in each direction.

Direct Slots

Internal Slot: previous-gate
  • Value type: link
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The previous gate in the series of connections (the path)

Accessors

Internal Slot Accessor: previous-gate
Syntax
(previous-gate object)
Methods
  • (previous-gate (gate gate))

Internal Slot: next-gate
  • Value type: link
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The next gate in the series of connections (the path)

Accessors

Internal Slot Accessor: next-gate
Syntax
(next-gate object)
Methods
  • (next-gate (gate gate))

External Slot: channel
  • Value type: channel
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Channel object (if exists) to next link

Accessors

External Slot Accessor: channel
Syntax
(channel object)
Methods
  • (channel (gate gate))

External Slot: deliver-on-reception-start-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Messages with nonzero length then have a nonzero transmission duration (and thus, reception duration on the other side of the connection). By default, the delivery of the message to the module marks the end of the reception. Setting this bit will cause the channel to deliver the message to the module at the start of the reception. The duration that the reception will take can be extracted from the message object, by its duration() method.

Accessors

External Slot Accessor: deliver-on-reception-start-p
Syntax
(deliver-on-reception-start-p object)
Methods
  • (deliver-on-reception-start-p (gate gate))
Indirect Slots

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: gate-slot
Inheritance
Description

Named storage slot for gate or gates - direction initarg must be specified as :input, :output or :inout. If an initial size is given then it will be an array of gates and access must by index

Direct Slots

External Slot: input
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot for input gate or gates

Accessors

External Slot Accessor: input
Syntax
(input object)
Methods

Internal Slot Accessor: input-gate-p
Syntax
(input-gate-p object)
Methods

External Slot: output
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot for output gate or gates

Accessors

External Slot Accessor: output
Syntax
(output object)
Methods

Internal Slot Accessor: output-gate-p
Syntax
(output-gate-p object)
Methods
Indirect Slots

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: histogram
Inheritance
Description

Base class for density estimation classes.

For the histogram classes, you need to specify the number of cells and the range. Range can either be set explicitly or you can choose automatic range determination.

Automatic range estimation works in the following way:

  1. The first num_firstvals observations are stored.
  2. After having collected a given number of observations, the actual histogram is set up. The range (min, max) of the initial values is expanded range_ext_factor times, and the result will become the histogram's range (rangemin, rangemax). Based on the range, the cells are layed out. Then the initial values that have been stored up to this point will be transferred into the new histogram structure and their store is deleted – this is done by the transform() function.

You may also explicitly specify the lower or upper limit and have the other end of the range estimated automatically. The setRange…() member functions of cDensityEstBase deal with setting up the histogram range. It also provides pure virtual functions transform() etc.

Subsequent observations are placed in the histogram structure. If an observation falls out of the histogram range, the underflow or the overflow cell is incremented.

Direct Slots

Internal Slot: range-min
  • Value type: real
  • Initial value: NIL
  • Initargs: min
  • Allocation: instance
Accessors

Internal Slot Accessor: range-min
Syntax
(range-min object)
Methods

Internal Slot: range-max
  • Value type: real
  • Initial value: NIL
  • Initargs: max
  • Allocation: instance
Accessors

Internal Slot Accessor: range-max
Syntax
(range-max object)
Methods

Internal Slot: range-ext-factor
  • Value type: real
  • Initial value: 1
  • Initargs: range-ext-factor
  • Allocation: instance
Description

Factor to expand range by

Accessors

Internal Slot Accessor: range-ext-factor
Syntax
(range-ext-factor object)
Methods

Internal Slot: mode
  • Value type: symbol
  • Initial value: NIL
  • Initargs: mode
  • Allocation: instance
Description

integer or float mode for collection.

Accessors

Internal Slot Accessor: histogram-mode
Syntax
(histogram-mode object)
Methods

Internal Slot: rng
  • Value type: fixnum
  • Initial value: 0
  • Initargs: genk
  • Allocation: instance
Description

Index of random number generator to use

Internal Slot: num-cells
  • Value type: fixnum
  • Initial value: 10
  • Initargs: num-cells
  • Allocation: instance
Description

How many cells to use.

Accessors

Internal Slot Accessor: num-cells
Syntax
(num-cells object)
Methods

Internal Slot: cell-size
  • Value type: real
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Cell size once scale determined.

Accessors

Internal Slot Accessor: cell-size
Syntax
(cell-size object)
Methods

Internal Slot Accessor: histogram-transformed-p
Syntax
(histogram-transformed-p object)
Methods
  • (histogram-transformed-p (histogram histogram))

Inherited Slot: array
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Pre-collected observations or cells

Accessors

Internal Slot Accessor: cells
Syntax
(cells object)
Methods

Internal Slot: units
  • Value type: string
  • Initial value: ="s"=
  • Initargs: units
  • Allocation: instance

Internal Slot: underflow-cell
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Description

Number of observations below range-min

Accessors

Internal Slot Accessor: underflow-cell
Syntax
(underflow-cell object)
Methods

Internal Slot: overflow-cell
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Description

Number of observations above range-max

Accessors

Internal Slot Accessor: overflow-cell
Syntax
(overflow-cell object)
Methods
Indirect Slots

Internal Slot: sqrsum
  • Value type: float
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

External Slot: sum
  • Value type: float
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Inherited Slot: max
  • Value type: float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Inherited Slot: min
  • Value type: float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Inherited Slot: count
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Internal Slot: output-format
  • Value type: t
  • Initial value: ="~3@/dfv:eng/"=
  • Initargs: format
  • Allocation: instance
Description

Format to use when outputing recorded units

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: history-buffer
Inheritance
Description

A class for recording the history of seen objects. The duplicate-p method is called with an object and will return true if the object is previously recorded in the history of this buffer.

Additional Initialization Arguments
:size
an integer specifies the size of the history buffer (number of previous entities to remember)
:element-type
a type specification for the elements to be stored in the histire buffer.
Direct Slots

External Slot: queue
  • Value type: vector-wrap-queue
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

External Slot Accessor: queue
Syntax
(queue object)
Methods

Internal Slot: test
  • Value type: t
  • Initial value: #'EQUALP
  • Initargs: test
  • Allocation: instance
Description

The test function to compare entities

Accessors

Internal Slot Accessor: buffer-test
Syntax
(buffer-test object)
Methods

Internal Slot: key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: key
  • Allocation: instance
Description

The jey function to use to compare entities.

Accessors

Internal Slot Accessor: buffer-key
Syntax
(buffer-key object)
Methods

External Class: ideal-channel
Inheritance
Parameters

None.

Description

Channel with zero propagation delay, zero transmission delay (infinite datarate), and always enabled.

Direct Slots
Indirect Slots

Internal Slot: source-gate
  • Value type: t
  • Initial value: NIL
  • Initargs: source-gate
  • Allocation: instance
Description

The gate which sends messages over the channel.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: indexed-count-recorder
Inheritance
Description

Indexed count records the number of times a particular value is received. Values are compare using EQL. If a CONS is recieved using record the car is taken as the index key and the cdr is the amount the count is to be incremented.

This provides a means e.g. to record the number of packets received by source at a destination etc.

The recorder reports as a statistic with the keys as field names.

Direct Slots

Inherited Slot: count
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE :TEST #'EQUAL)
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: recorded-value
Syntax
(recorded-value scalar-recorder)
Description

Return the value to record for a scalar recorder

Methods
Indirect Slots

Internal Slot: output-format
  • Value type: t
  • Initial value: ="~A"=
  • Initargs: format
  • Allocation: instance
Description

Format to use when outputing recorded units

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: last-value
Description

Record the last value received.

Direct Slots

Internal Slot: value
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: recorded-value
Syntax
(recorded-value scalar-recorder)
Description

Return the value to record for a scalar recorder

Methods
Indirect Slots

Internal Slot: output-format
  • Value type: t
  • Initial value: ="~A"=
  • Initargs: format
  • Allocation: instance
Description

Format to use when outputing recorded units

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: mean
Inheritance
Description

Record the mean of the numeric values received.

Direct Slots

External Slot: sum
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Inherited Slot: count
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Indirect Slots

Internal Slot: output-format
  • Value type: t
  • Initial value: ="~A"=
  • Initargs: format
  • Allocation: instance
Description

Format to use when outputing recorded units

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: message
Description

Messages objects represent events, packets, commands, jobs, customers or other kinds of entities, depending on the model domain.

Direct Slots

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

Accessors

External Slot Accessor: creation-time
Syntax
(creation-time object)
Methods
  • (creation-time (message message))

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

Accessors

Internal Slot Accessor: from
Syntax
(from object)
Methods

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Accessors

Internal Slot Accessor: to
Syntax
(to object)
Methods

External Slot: sent-time
  • Value type: time-type
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Accessors

External Slot Accessor: sent-time
Syntax
(sent-time object)
Methods

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Accessors

External Slot Accessor: timestamp
Syntax
(timestamp object)
Methods
Indirect Slots

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: module
Parameters

None.

Description

Base class for all modules which must have metaclass module-class.

Modules are used to implement protocols by specialising on the following methods.

  • initialize method may be used to specify initial configuration of the module after creation but before the simulation starts. It may for example send a self message to initiate some process.
  • handle-message is used to receive and process all incoming messages.
  • send is used to send messages out of a gate.
  • schedule-at is used to schedule self messages.
Direct Slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

Accessors

Internal Slot Accessor: gate-slots
Syntax
(gate-slots object)
Methods
  • (gate-slots (module module))
Indirect Slots

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: module-class
Additional Class Options
gates
( (gate-name direction [/size]/)*)
  • gate-name : a symbol
  • direction : (:input | :output | :inout)
  • size : an integer
Description

Metaclass for entities with gates. Must be used as metaclass for module classes.

The gates class option specified what gates are to be created for instances of classes of this type. The gate-name specifies the symbolic name to be used to identify the gate and must be unique for this module. If direction is specified as :inout both input and output gates will be created. If size is specified an array of gates will be created. A size of zero can be useful to allow for the automatic creation of the gates on demand depending on the connections the module.

Direct Slots

Internal Slot: %gatespec
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The parsed gate specification used to build gates for this class

Indirect Slots

Internal Slot: properties
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The properties for this class

Internal Slot: slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: direct-slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: prototype
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: wrapper
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: incompatible-superclass-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: can-precede-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: cpl-available-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: %class-precedence-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: finalized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: safe-p
  • Value type: t
  • Initial value: NIL
  • Initargs: safe-p
  • Allocation: instance
Description

Slot: %documentation
  • Value type: t
  • Initial value: NIL
  • Initargs: documentation
  • Allocation: instance
Description

Slot: direct-methods
  • Value type: t
  • Initial value: (CONS NIL NIL)
  • Initargs: none
  • Allocation: instance
Description

Slot: direct-subclasses
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Internal Slot: direct-superclasses
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: class-eq-specializer
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

External Slot: name
  • Value type: t
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Slot: plist
  • Value type: t
  • Initial value: NIL
  • Initargs: plist
  • Allocation: instance
Description

Internal Slot: source
  • Value type: t
  • Initial value: NIL
  • Initargs: definition-source
  • Allocation: instance
Description

Slot: %type
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

External Class: mt-random-state
Inheritance
Description

The Mersenne Twister is an algorithm for generating random numbers. It was designed with consideration of the flaws in various other generators. The period, 2^19937-1, and the order of equidistribution, 623 dimensions, are far greater. The generator is also fast; it avoids multiplication and division, and it benefits from caches and pipelines. For more information see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html

Reference
  1. Matsumoto and T. Nishimura, 'Mersenne Twister: A 623-Dimensionally

Equidistributed Uniform Pseudo-Random Number Generator', ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.

Direct Slots

Internal Slot: arr
  • Value type: array
  • Initial value: (MAKE-ARRAY +MT-N+ :ELEMENT-TYPE '(UINT 32))
  • Initargs: none
  • Allocation: instance

Internal Slot: mti
  • Value type: fixnum
  • Initial value: +MT-N+
  • Initargs: none
  • Allocation: instance

External Slot: seed
  • Value type: t
  • Initial value: NIL
  • Initargs: seed
  • Allocation: instance
Description

The initial seed value.

Inherited Slot: count
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Description

The number of random values extracted.

External Class: named-object
Inheritance
Description

Not documented.

Direct Slots

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Accessors

External Slot Accessor: name
Syntax
(name object)
Methods

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

Accessors

External Slot Accessor: index
Syntax
(index object)
Methods

External Class: network
Parameters

None.

Description

Base class for networks. This is the required type for the top-level compound-module of a simulation network and it is required that it has no gate specification. It is specified in the network simulation parameter.

Direct Slots

Internal Slot: gate-slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Indirect Slots

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: owned-object
Inheritance
Description

Not documented.

Direct Slots

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

Accessors

External Slot Accessor: owner
Syntax
(owner object)
Methods
Indirect Slots

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: packet
Description

Representation of network packets. Packets are messages which may take time to deliver over transmission links.

Protocol modules will typically encapsulate a packet from an upper level in a packet message type, adding in any additional fields before passing to a lower level]]. On receiving their packet from a lower level they can call decapsulate to get the original encapsulated packet to pass on to upper levels. If a packet is to be sent to multiple destinations then duplicate must be called to create multiple copies as required.

Direct Slots

Internal Slot: encapsulated-packet
  • Value type: packet
  • Initial value: NIL
  • Initargs: encapsulated-packet
  • Allocation: instance
Description

Higher level encapsulated protocol packet.

External Slot: duration
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Duration of last transmission

Accessors

External Slot Accessor: duration
Syntax
(duration object)
Methods

External Slot: control-info
  • Value type: t
  • Initial value: NIL
  • Initargs: control-info
  • Allocation: instance
Description

Additional data to be passed with packet between protocol layers.

Accessors

External Slot Accessor: control-info
Syntax
(control-info object)
Methods
  • (control-info (packet packet))

Internal Slot: reception-start-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: deliver-on-reception-start
  • Allocation: instance
Description

Identify whether this packet represents the start or the end of the reception after the packet travelled through a channel with a data rate. This flag is controlled by the deliver-on-reception-start flag of the receiving gate.

Accessors

Internal Slot Accessor: reception-start-p
Syntax
(reception-start-p object)
Methods
  • (reception-start-p (packet packet))

External Slot: bit-error-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The result of error modelling after the packet is sent through a channel that has a nonzero packet error rate (PER) or bit error rate (BER). It is up to the receiver to examine this flag after having received the packet, and to act upon it.

Accessors

External Slot Accessor: bit-error-p
Syntax
(bit-error-p object)
Methods
  • (bit-error-p (packet packet))
Indirect Slots

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: packet-buffer
Parameters
buffer-size
a fixnum. Default: 32. max buffer size in messages
buffer-size-bytes
a fixnum. max size in bytes
Description

A packet buffer emplements the queue interface for packets using a timestamped queue. dequeue and peek from a timestamped-queue returns this time as a second value. It also keeps track of the average queue duration which can be obtained using average-queue-time.

It keeps track of the buffer size which may be set using the buffer-size or buffer-size-bytes parameters. packets are dropped if either maximum buffer size is exceeded and the drop signal will be generated with the dropped packet as the argument. Every time the queue length is changed the buffer-length and buffer-time events are generated with the buffer and the duration the packet was in the buffer respectively.

Direct Slots

External Slot: queue
  • Value type: timestamped-queue
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

External Slot Accessor: queue
Syntax
(queue object)
Methods

External Slot: buffer-size
  • Value type: fixnum
  • Initial value: 32
  • Initargs: buffer-size
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

max buffer size in messages

Accessors

External Slot Accessor: buffer-size
Syntax
(buffer-size object)
Methods

External Slot: buffer-size-bytes
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: buffer-size-bytes
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

max size in bytes

Accessors

External Slot Accessor: buffer-size-bytes
Syntax
(buffer-size-bytes object)
Methods

External Slot: byte-length
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

External Slot Accessor: byte-length
Syntax
(byte-length entity)
Description

Return the length in whole octets (8 bit bytes) of an entity. For a packet the length should include the length of all encapsulated packets together with its overhead.

Methods
Indirect Slots

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

External Class: parameter-class
Description

Metaclass for classes which have slots initialised from an external parameter source.

Additional class options
properties
an alist

The properties class option specifies the default set of properties all classes of this metaclass will take as a default. These are in addiiton to the instance properties that may be specified. The instance properties take precedence.

Additional slot options
parameter
a boolean
volatile
a boolean
properties
an alist

If parameter is true then this is a parameter slot and the value for this slot will be initialised from the simulation configuration file as a priority over the default value specified in the :initform slot option. If volatile is specified for a parameter slot then the parameter will be evaluated upon every initialisation allowing random initialisation for different instances. The properties of a parameter slot specify additional properties in an alist. By default the following properties are currently understood.

format
specifies a format form to used in parse-input when reading the parameter - overrides the default reading format for the slot type.
Direct Slots

Internal Slot: properties
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The properties for this class

Accessors

Internal Slot Accessor: properties
Syntax
(properties instance)
Description

Return an a-list of properties associated with an instance of a parameter-object. These may be used to specify parameters that may be used outside the simulation itself such as statistics gathers for components or display properties etc. The may be specified on a per class or per instance basis with instance overriding class values.

Methods
Indirect Slots

Internal Slot: slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: direct-slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: prototype
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: wrapper
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: incompatible-superclass-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: can-precede-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: cpl-available-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: %class-precedence-list
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: finalized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: safe-p
  • Value type: t
  • Initial value: NIL
  • Initargs: safe-p
  • Allocation: instance
Description

Slot: %documentation
  • Value type: t
  • Initial value: NIL
  • Initargs: documentation
  • Allocation: instance
Description

Slot: direct-methods
  • Value type: t
  • Initial value: (CONS NIL NIL)
  • Initargs: none
  • Allocation: instance
Description

Slot: direct-subclasses
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Internal Slot: direct-superclasses
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Slot: class-eq-specializer
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

External Slot: name
  • Value type: t
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Slot: plist
  • Value type: t
  • Initial value: NIL
  • Initargs: plist
  • Allocation: instance
Description

Internal Slot: source
  • Value type: t
  • Initial value: NIL
  • Initargs: definition-source
  • Allocation: instance
Description

Slot: %type
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

External Class: parameter-object
Inheritance
Parameters

None.

Description

Base class for all components which can have slots initialoised from parameters. See the parameter-class metaclass for the additional slot options available and their affect. The :properties initarg may be used to specify instance specific properties (see properties).

Direct Slots

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

External Class: simulation
Inheritance
Parameters
num-rngs
a fixnum. Default: 1. Total number of rngs for this simulation
rng-class
a symbol. Default: ='MT-RANDOM-STATE=. Class for rng's
warmup-period
a time-type. Default: 0. Warmup period for statistics collection
cpu-time-limit
a time-type. Default: 300. Max cpu time for run.
sim-time-limit
a time-type. Default: (* 100 60 60 60). Maximum simulation run time
network
a symbol. Specified Network type parameter
Description

The main discrete time event simulation class reads global parameters, creates the network being simulated and manages the queue of events for the simulation.

Direct Slots

Internal Slot: clock
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: start-time
  • Allocation: instance
Description

Simulation virtual time

Accessors

Internal Slot Accessor: clock
Syntax
(clock object)
Methods

Internal Slot: halted
  • Value type: boolean
  • Initial value: T
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: halted
Syntax
(halted object)
Methods

Internal Slot: thread
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Thread running simulation

Accessors

Internal Slot Accessor: simulation-thread
Syntax
(simulation-thread object)
Methods

Internal Slot: last-schedule-id
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Internal Slot: event-queue
  • Value type: t
  • Initial value: =(MAKE-BINARY-HEAP :INITIAL-SIZE 1024 :EXTEND-SIZE 1.4 :ELEMENT-TYPE 'EVENT :COMP-FN #'EVENT< :INDEX #'EVENT-RANK)=
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: event-queue
Syntax
(event-queue object)
Methods

External Slot: configuration
  • Value type: t
  • Initial value: NIL
  • Initargs: configuration
  • Allocation: instance
Description

Configuration data used for simulation

Accessors

External Slot Accessor: configuration
Syntax
(configuration instance)
Description

Return the configuration trie with an instance. By default this will be the configuration read at the start of the simulation.

Methods

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level array of rngs

Accessors

External Slot Accessor: rng-map
Syntax
(rng-map context)
Methods
  • (rng-map (component component))
  • (rng-map (simulation simulation))
  • (rng-map (context (eql nil)))

Internal Slot: seed-set
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Seed set used in this simulation

Accessors

Internal Slot Accessor: seed-set
Syntax
(seed-set object)
Methods

Internal Slot: num-rngs
  • Value type: fixnum
  • Initial value: 1
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Total number of rngs for this simulation

Accessors

Internal Slot Accessor: num-rngs
Syntax
(num-rngs object)
Methods

Internal Slot: rng-class
  • Value type: symbol
  • Initial value: ='MT-RANDOM-STATE=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Class for rng's

Internal Slot: warmup-period
  • Value type: time-type
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Warmup period for statistics collection

Accessors

Internal Slot Accessor: warmup-period
Syntax
(warmup-period object)
Methods

External Slot: cpu-time-limit
  • Value type: time-type
  • Initial value: 300
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Max cpu time for run.

Accessors

External Slot Accessor: cpu-time-limit
Syntax
(cpu-time-limit object)
Methods

External Slot: sim-time-limit
  • Value type: time-type
  • Initial value: (* 100 60 60 60)
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Maximum simulation run time

Accessors

External Slot Accessor: sim-time-limit
Syntax
(sim-time-limit object)
Methods

External Slot: network
  • Value type: symbol
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Specified Network type parameter

External Slot: initialized-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: network-instance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Actual network instance in this simulation

Accessors

External Slot Accessor: network
Syntax
(network object)
Methods

Internal Slot: vector-stream
  • Value type: t
  • Initial value: NIL
  • Initargs: vector-stream
  • Allocation: instance
Description

Destination stream for vector results

Accessors

Internal Slot Accessor: vector-stream
Syntax
(vector-stream object)
Methods

Internal Slot: scalar-stream
  • Value type: t
  • Initial value: NIL
  • Initargs: scalar-stream
  • Allocation: instance
Description

Destination stream for scalar results

Accessors

Internal Slot Accessor: scalar-stream
Syntax
(scalar-stream object)
Methods
Indirect Slots

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

External Class: simulation-condition
Inheritance
Description

Not documented.

Direct Slots

External Class: stddev
Description

Output basic statistics (cound,min,max,mean and stddev) of numeric values received.

Direct Slots

Internal Slot: output-format
  • Value type: t
  • Initial value: ="~3@/dfv:eng/"=
  • Initargs: none
  • Allocation: instance

Inherited Slot: count
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: result-count
Syntax
(result-count object)
Methods
  • (result-count (stddev stddev))

Inherited Slot: min
  • Value type: float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: result-min
Syntax
(result-min object)
Methods
  • (result-min (stddev stddev))

Inherited Slot: max
  • Value type: float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: result-max
Syntax
(result-max object)
Methods
  • (result-max (stddev stddev))

External Slot: sum
  • Value type: float
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: result-sum
Syntax
(result-sum object)
Methods
  • (result-sum (stddev stddev))

Internal Slot: sqrsum
  • Value type: float
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: result-sqrsum
Syntax
(result-sqrsum object)
Methods
  • (result-sqrsum (stddev stddev))
Indirect Slots

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: sum
Inheritance
Description

Record the sum of the numeric values received.

Direct Slots

External Slot: sum
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: recorded-value
Syntax
(recorded-value scalar-recorder)
Description

Return the value to record for a scalar recorder

Methods
Indirect Slots

Internal Slot: output-format
  • Value type: t
  • Initial value: ="~A"=
  • Initargs: format
  • Allocation: instance
Description

Format to use when outputing recorded units

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: timeavg
Inheritance
Description

Record the time averaged value received.

Direct Slots

Internal Slot: start-time
  • Value type: timetype
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Internal Slot: last-time
  • Value type: timetype
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: weighted-sum
  • Value type: real
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

External Slot: last-value
  • Value type: real
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Indirect Slots

Internal Slot: output-format
  • Value type: t
  • Initial value: ="~A"=
  • Initargs: format
  • Allocation: instance
Description

Format to use when outputing recorded units

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: timer-message
Inheritance
Description

Class for timer messages. Components which subclass with-timers will receive these messages via handle-timer

Direct Slots
Indirect Slots

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: transmission-channel
Parameters

None.

Description

Base classe for all transmission channels

Direct Slots
Indirect Slots

Internal Slot: source-gate
  • Value type: t
  • Initial value: NIL
  • Initargs: source-gate
  • Allocation: instance
Description

The gate which sends messages over the channel.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: unknown-message
Inheritance
Description

Not documented.

Direct Slots

External Slot: module
  • Value type: t
  • Initial value: NIL
  • Initargs: module
  • Allocation: instance

External Slot: message
  • Value type: t
  • Initial value: NIL
  • Initargs: message
  • Allocation: instance

External Class: with-timers
Inheritance
Description

Mixin class with dynamic timer handling. See set-timer, handle-timer and cancel-timer for additional functionality provided for this class.

Direct Slots

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

3.3.2 External Structures

External Structure: channel-result
Slots
delay
The propagation delay of the channel
duration
The transmition duration of the packet.
discard
If true packet packet will be discarded (was lost in transmission)
Description

Structure containg result of process-message from a channel

Slots

External Slot: delay
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance

External Slot: duration
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance

Internal Slot: discard
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

External Structure: coord
Description

A spatial coordinate

Slots

Internal Slot: x
  • Value type: float
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance

Internal Slot: y
  • Value type: float
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance

Internal Slot: z
  • Value type: float
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance

External Structure: message-sent-signal-value
Slots
timestamp
a time-type - the time message was sent
message
a message being sent.
result
a channel-result
Description

Structure used to to pass information on message-sent signal conataining the time it was sent, the message and the channel result.

Slots

External Slot: timestamp
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance

External Slot: message
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: result
  • Value type: channel-result
  • Initial value: (MAKE-CHANNEL-RESULT)
  • Initargs: none
  • Allocation: instance

External Structure: timestamped
Slots
time
a time-type (default simulation-time)
value
a value
Description

Structure associating a time with a value.

Slots

Inherited Slot: time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance

Internal Slot: value
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

External Structure: timestamped-queue
Description

A timestamped queue records the simulation time of when items are enqueued. dequeue and peek from a timestamped-queue returns this time as a second value. The timestamped-queue also keeps track of the average queue duration which can be obtained using average-queue-time.

Slots

Internal Slot: average-timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance

3.3.3 External Types

External Type: gate-direction

Not documented.

External Type: time-type

Not documented.

3.3.4 External Constants

External Constant: +c+
Value
2.99792458d8

Type: double-float

Description

Speed of Light in m/sec

3.3.5 External Global Variables

External Variable: *context*
Value
NIL

Type: null

Description

Current global component context in which evaluation is taking place. It is used to determine mapping for random number streams and for providing tracing context. This should be bound for the extent of exposed interfaces to components. The kernel binds it around the handle-message and initialize methods.

External Variable: *simulation*
Value
NIL

Type: null

Description

The global simulation instance

External Variable: *simulation-init-hooks*
Value
(ADD-STATISTICS)

Type: cons

Description

A list of functions which take the simulation as an argument which are called after simulation etc is created. Can be used to add in layers which use signals such as statistical reporting or graphical presentation.

External Variable: *simulation-trace-stream*
Value
#<SWANK-BACKEND::SLIME-OUTPUT-STREAM {BCDD449}>

Type: slime-output-stream

Description

The stream on which tracing information (using tracelog) is to be written.

External Variable: *time-format*
Value
"~7/lens::sec/"

Type: simple-array

Description

The time format control used when tracing.

External Variable: network
Value
NIL

Type: null

Description

Network name for current run

3.3.6 External Macros

External Macro: define-statistic-filter
Syntax
(define-statistic-filter name
    (var &rest statevars)
  &body
  body)
Arguments
name
a symbol (evaluated)
var
a symbol (evaluated)
statevars
a binding form*
body
form*
Description

Define and register a statistic filter function. var is the name used in body to refer to the input value. statevars are the state value definitions as per let which are bound outside the finction. body must return the filter value or null to abort filtering.

Example
(define-statistic-filter count(value (count 0))
  (declare (ignore value))
  (incf count))

External Macro: filter
Syntax
(filter test lst &key (key '#'identity))
Arguments
test
a designator for a function of one argument which returns a generalised boolean
lst
a proper list
key
a designator for a function of one argument
Returns
result
a list
Description

Return a list of the elements in lst for which test (applied to key) is true.

External Macro: for
Syntax
(for (var start stop)
  &body
  body)
Arguments
var
a variable name (not evaluated)
start
an integer (evaluated)
stop
an integer (evaluated)
body
a list of forms
Description

Iterate from the value supplied by start upto but not including the value supplied by end setting var to each value in turn before evaluating the body

External Macro: tracelog
Syntax
(tracelog &rest args)
Rest Arguments
args
list of format arguments.
Description

Write to simulation-trace-stream using args provided the collect-trace-info parameter for the current context is true.

This is designed to enable efficient configuration file controlled tracing of simulation execution.

External Macro: until
Syntax
(until test
  &body
  body)
Description

Repeat body until test returns true

External Macro: while
Syntax
(while test
  &body
  body)
Description

A while loop - repeat body while test is true

3.3.7 External Functions

External Function: <=
Syntax
(<= number &rest more-numbers)
Description

Return T if arguments are in strictly non-decreasing order, NIL otherwise.

External Function: <=
Syntax
(<= number &rest more-numbers)
Description

Return T if arguments are in strictly non-decreasing order, NIL otherwise.

External Function: arrival-time
Syntax
(arrival-time event)
Description

Return the simulation time at which an event is to be handled

External Function: arrived
Syntax
(arrived module message gate arrival-time)
Arguments
module
a module
message
a message
gate
a gate
arrival-time
a time-type

*Description

Called when the message arrives at the gate which is not further connected (that is, next-gate is NULL) of of module. arrival-time is when the message is to be delivered.

The default implementation will fill in the arrival gate details in the message and schedule it for delivery at the arrival-time. Packets will be schedule at the arrival-time + their duration unless deliver-on-reception-start-p is set true for the gate in which case they will the reception-start-p will be set true for the packet and they will be delivered at arrival-time.

External Function: average-queue-time
Syntax
(average-queue-time queue)
Arguments
Description

Returns the average simulation time items have been on queue.

External Function: bernoulli
Syntax
(bernoulli p &optional (rng 0))
Arguments
p
an integer
Optional Arguments
rng
an integer (default 0)
Description

Returns the result of a Bernoulli trial with probability p, that is, 1 with probability p and 0 with probability (1-p) using the random number stream rng in the current context.

External Function: beta
Syntax
(beta alpha1 alpha2 &optional (rng 0))
Arguments
alpha1
a positive real number
alpha2
a positive real number
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate from the beta distribution with parameters alpha1, alpha2 from the random number stream rng in the current context.

Generation is using relationship to Gamma distribution (see gamma-d): if Y1 has gamma distribution with alpha=alpha1 and beta=1 and Y2 has gamma distribution with alpha=alpha2 and beta=2, then Y = Y1/(Y1+Y2) has beta distribution with parameters alpha1 and alpha2.

External Function: binomial
Syntax
(binomial n p &optional (rng 0))
Arguments
n
an integer n>0
p
an integer 0<=p<=1
Optional Arguments
rng
an integer (default 0)
Description

Return a random integer from the binomial distribution with parameters n and p, that is, the number of successes in n independent trials with probability p using the random number stream rng in the current context.

Generation is using the relationship to Bernoulli distribution (runtime is proportional to n).

External Function: bit-error-p
Syntax
(bit-error-p object)
Description

Not documented.

External Function: bit-length
Syntax
(bit-length entity)
Description

Return the length in bits of an entity. This is the byte-length * 8 for most entities, but is the actual length of a bit-vector which may be used to represent bit fields.

External Function: buffer-size
Syntax
(buffer-size object)
Description

Not documented.

External Function: buffer-size-bytes
Syntax
(buffer-size-bytes object)
Description

Not documented.

External Function: build-connections
Syntax
(build-connections module)
Arguments
module
a compound-module
Description

Build connections between submodules and gates of module as per the :connections. This may be specialised usefully to add in build the network connections algorithmically.

External Function: build-gates
Syntax
(build-gates module)
Arguments
module
a module
Description

Build the module gates on the basis of the gate specification from the :gates argument in the module-class specification.

This method is called during a module instance initialisation.

External Function: build-inside
Syntax
(build-inside module)
Arguments
module
a module
Description

Build the the submodules (calling build-submodules) of compound-module module as per the :submodules class argument and connect them (calling build-connections as per the :connections class argument.

This method is recursively called upon network creation.

External Function: build-submodules
Syntax
(build-submodules module)
Arguments
module
a compound-module
Description

Build the submodules inside a compound-module as per the :submodules class argument. This may be specialised usefully to add in additional submodule creation algoritmically.

External Function: busy-p
Syntax
(busy-p channel)
Arguments
Returns
busy
a boolean
Description

For transmission channels: returns whether the sender gate is currently transmitting, ie. whether transmission-finish-time is greater than the current simulation time.

External Function: byte-length
Syntax
(byte-length entity)
Description

Return the length in whole octets (8 bit bytes) of an entity. For a packet the length should include the length of all encapsulated packets together with its overhead.

External Function: calculate-duration
Syntax
(calculate-duration channel message)
Arguments
channel
a transmission-channel
message
a message
Returns
duration
a time-type
Description

Calculates the transmission duration of the message with the current transmission channel configuration (datarate, etc); it does not check or modify channel state. For non-transmission channels this method returns zero.

This method is useful for transmitter modules that need to determine the transmission time of a packet without actually sending the packet.

Caveats: this method is best-effort – there is no guarantee that transmission time when the packet is actually sent will be the same as the value returned by this method. The difference may be caused by changed channel parameters (i.e. datarate being overwritten), or by a non-time-invariant transmission algorithm.

Note that there is no requirement that method process-message relies on this method to calculated the packet duration. That is, to change the duration computation algorithm via subclassing you need to redefine both process-message and calculate-duration.

External Function: cancel
Syntax
(cancel event)
Arguments
event
an event
Description

Cancel event event if it was scheduled.

External Function: cancel-timer
Syntax
(cancel-timer module timer)
Arguments
module
an instance of with-timers
timer
a timer designator (either symbol or timer-message)
Description

Cancel an already schedule timer designated by timer associated with module. If the associated timer-message was created when scheduled set-timer it will be deleted at this point.

External Function: cauchy
Syntax
(cauchy a b &optional (rng 0))
Arguments
a
a real
b
a positive real
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate from the Cauchy distribution (also called Lorentzian distribution) with parameters a,b where b>0 using the random number stream rng in the current context.

This is a continuous distribution describing resonance behavior. It also describes the distribution of horizontal distances at which a line segment tilted at a random angle cuts the x-axis.

Generation uses the inverse transform.

External Function: channel
Syntax
(channel object)
Description

Not documented.

External Function: chi-square
Syntax
(chi-square k &optional (rng 0))
Arguments
k
a positive integer
Optional Arguments
rng
an integer (default 0)

Returns a random variate from the chi-square distribution with k degrees of freedom using the random number stream rng in the current context.

The chi-square distribution arises in statistics. If Y_i are k independent random variates from the normal distribution with unit variance, then the sum-of-squares (sum(Y_i^2)) has a chi-square distribution with k degrees of freedom.

The expected value of this distribution is k. Chi_square with parameter k is gamma-distributed with /alpha/=/k//2, /beta/=2.

Generation is using relationship to gamma distribution (see gamma-d).

External Function: configuration
Syntax
(configuration instance)
Description

Return the configuration trie with an instance. By default this will be the configuration read at the start of the simulation.

External Function: configure
Syntax
(configure instance)
Description

Configure an instances unbound parameter slots from configuration data. Called after initialization from initargs but before initialization from initforms (defaults)

External Function: connect
Syntax
(connect from-gate to-gate &key channel leave-uninitialized)
Description

Connects the gate to another gate, using the given channel object (if one is specified). This method can be used to manually create connections for dynamically created modules.

This method invokes initialize on the channel object, unless the compound module containing this connection is not yet initialized (then it assumes that this channel will be initialized as part of the compound module initialization process.) To leave the channel uninitialized, specify true for the leave-uninitialized parameter.

If the gate is already connected, an error will occur. The gate argument cannot be nil, that is, you cannot use this function to disconnect a gate; use disconnect for that.

Simulation Events
pre-model-change
a list. Emitted before the gate is connected
post-model-change
a list. Emitted after the gate is connected.

Model change events are emiited with a list describing the change. This list has a descriptive symbol followed by keyword arguments of the elements involved in the change. connect provides the following model change notifications.

gate-connect-notification
signalled in the module containing this gate
path-create-notification
signalled to the start and end modules of path

External Function: connected-outside-p
Syntax
(connected-outside-p gate)
Description

Return true if a gate is connected to the outside of its module.

External Function: connected-p
Syntax
(connected-p instance)
Description

Not documented.

External Function: control-info
Syntax
(control-info object)
Description

Not documented.

External Function: coord*
Syntax
(coord* a b)
Description

Return element wise (scalar) multiplation of coords a and b.

External Function: coord+
Syntax
(coord+ a b)
Description

Add two coords together returning result coord

External Function: coord-
Syntax
(coord- a b)
Description

Return a-b for coords

External Function: coord-op
Syntax
(coord-op op &rest coords)
Description

Given a function and a set of coordinates apply op to each set of ordinates

External Function: coord-x
Syntax
(coord-x instance)
Description

Return whether debug-block represents elsewhere code.

External Function: coord-y
Syntax
(coord-y instance)
Description

Return whether debug-block represents elsewhere code.

External Function: coord-z
Syntax
(coord-z instance)
Description

Return whether debug-block represents elsewhere code.

External Function: copy-slots
Syntax
(copy-slots slots source destination)
Arguments
slots
a list of slot names
source
a class instance
destination
a class instance
Returns
destination
a class instance
Description

Copies named slot values shallowly from source to destination returning the modifed destination object.

External Function: cpu-time-limit
Syntax
(cpu-time-limit object)
Description

Not documented.

External Function: creation-time
Syntax
(creation-time object)
Description

Not documented.

External Function: cumulative-density-function
Syntax
(cumulative-density-function instance x)
Description

Returns the estimated value of the Cumulated Density Function at a given x.

External Function: decapsulate
Syntax
(decapsulate packet)
Description

Protocols must use this to get the encapsulated packet. It returns a duplicate ensuring the returned packet is unique and can be modified. Thus it is not necessary to deep copy the encapsulated packets as packets traverse a network.

External Function: define-result-recorder
Syntax
(define-result-recorder classname &optional (name classname))
Arguments
classname
a symbol
name
a symbol
Description

Register the class denoted by classname as a result recorder which can be denoted by name name in configuration files and :statistic propery definitons of simulation components.

External Function: delay
Syntax
(delay object)
Description

Not documented.

External Function: deliver
Syntax
(deliver message gate time)
Description

This function is called internally by the send functions and channel classes' deliver to deliver the message to its destination.

External Function: deliver-on-reception-start-p
Syntax
(deliver-on-reception-start-p object)
Description

Not documented.

External Function: dequeue
Syntax
(dequeue q)
Description

Return next element x from queue q

External Function: detailed-info
Syntax
(detailed-info o)
Description

Return detailed, multi-line, arbitrarily long description of the object. The string appears in the graphical user interface (Tkenv) together with other object data (e.g. class name) wherever it is feasible to display a multi-line string.

External Function: disabled-p
Syntax
(disabled-p object)
Description

Not documented.

External Function: disconnect
Syntax
(disconnect gate)
Description

Disconnects the gate, and also deletes the associated channel object if one has been set. disconnect() must be invoked on the source gate (from side) of the connection. The method has no effect if the gate is not connected.

Simulation Events
pre-model-change
a list. Emitted before the gate is disconnected
post-model-change
a list. Emitted after the gate is disconnected.

Model change events are emiited with a list describing the change. This list has a descriptive symbol followed by keyword arguments of the elements involved in the change. disconnect provides the following model change notifications.

gate-disconnect-notification
signalled in the module containing this gate
path-cut-notification
signalled to the start and end modules of path

External Function: distance
Syntax
(distance a b)
Description

Return the Euclidean distance between two entities a and b

External Function: do-histogram
Syntax
(do-histogram values &key (min -1) (max 1) (n 10))
Description

Not documented.

External Function: duplicate
Syntax
(duplicate object &optional duplicate)
Description

Should be redefined in subclasses to create an exact copy of this object. The default implementation just throws an error, to indicate that the method was not redefined. The second argument, if defined should be the instance that the object is being duplicated into. By default this will be a new instance of the same class as the object to be duplicated.

For packets this does a shallow copy i.e. copies fields only and does not recurse into the encapsulated packets.

External Function: duplicate-p
Syntax
(duplicate-p entity buffer &optional record)
Arguments
entity
an object
buffer
a history-buffer
Optional Arguments
record
a boolean (default t)
Description

Returns true if the entity is recorded in the buffer. If record is true then /entity will be recorded in the buffer.

External Function: emit
Syntax
(emit entity signal &optional value)
Arguments
entity
an entity-with-signals
signal-id
a signal identifier
Optional Arguments
value
a value
Description

Emit the optional value with a signal. If the given signal has listeners in this component entity or in it's ancestor components, their appropriate receive-signal methods get called.

External Function: empty-p
Syntax
(empty-p s)
Description

Return true if a data structure is empty

External Function: encapsulate
Syntax
(encapsulate packet packet-to-be-encapsulated)
Description

Called to encapsulate one packet within another.

External Function: end-module
Syntax
(end-module gate)
Description

Not documented.

External Function: enqueue
Syntax
(enqueue x q)
Description

Add element x to end of queue q

External Function: erlang-k
Syntax
(erlang-k k m &optional (rng 0))
Arguments
k
a positive integer
m
a positive real number
Optional Arguments
rng
an integer (default 0)

Returns a random variate from the Erlang distribution with k phases and mean m using the random number stream rng in the current context.

This is the sum of k mutually independent random variables, each with exponential distribution. Thus, the /k/th arrival time in the Poisson process follows the Erlang distribution.

Erlang with parameters m and /k. is gamma-distributed (see gamma-d with alpha/=/k and beta/=/m / k.

Generation makes use of the fact that exponential distributions sum up to Erlang.

External Function: exponential
Syntax
(exponential mean &optional (rng 0))
Arguments
mean
a real number
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate double float from the exponential distribution with the given mean mean (that is, with parameter lambda=1/mean/) from random number stream rng in the current context.

External Function: find-object
Syntax
(find-object parent name &optional deep)
Description

Finds the object with the given name. This function is useful when called on subclasses that are containers. This method finds the object with the given name in a container object and returns a pointer to it or NULL if the object has not been found. If deep is false, only objects directly contained will be searched, otherwise the function searches the whole subtree for the object. It uses the for-each-child mechanism.

External Function: finish
Syntax
(finish component)
Arguments
component
a simulation component
Description

Called depth first for every component at end of simulation. May bee used to finalise statistics and alalysis summary.

External Function: for-each-channel
Syntax
(for-each-channel module operator)
Description

Not documented.

External Function: for-each-child
Syntax
(for-each-child parent operator)
Description

Enables traversing the object tree, performing some operation on each object. Tyhe default module and compound-module provide implementations that will recurse over gates, submodules and channels if stored in the usual way. Implementations may wish to overwrite if storing some subelements that may be considered as children differently.

External Function: for-each-gate
Syntax
(for-each-gate module operator)
Description

Not documented.

External Function: for-each-submodule
Syntax
(for-each-submodule module operator)
Arguments
module
a module
operator
a function
Description

Applies operator over each submodule of a module.

Objects with submodules must provide this to iterate over submodules. module and compound-module classes provide implementations automatically however if additional submodules beyond those specified in the class are created it may be necessary to specialise this function to include them..

External Function: format-from-type
Syntax
(format-from-type type)
Description

Given a type declaration return a format declaration suitable for use in parse-input to covert a parameter string to internal representation.

External Function: from-gate
Syntax
(from-gate message)
Description

Not documented.

External Function: from-module
Syntax
(from-module message)
Description

Not documented.

External Function: full-name
Syntax
(full-name o)
Description

When this object is part of a vector (like a submodule can be part of a module vector, or a gate can be part of a gate vector), this method returns the object's name with the index in brackets;

External Function: full-path
Syntax
(full-path o)
Description

Returns the full path of the object in the object hierarchy, like '(net host 2 tcp winsize)'. This path could be used as an address to locate the object later in the network.

If there is an owner object, this method returns the owner's full-path with this object's full-name appended, otherwise it simply returns full-name.

External Function: gamma-d
Syntax
(gamma-d alpha theta &optional (rng 0))
Arguments
alpha
a positive real number
theta
a positive real number
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate from the gamma distribution with parameters alpha/>0, /theta/>0 from the random number stream /rng in the current context. alpha is known as the shape parameter, and theta as the scale parameter.

Some sources in the literature use the inverse scale parameter beta = 1 / theta, called the rate parameter. Various other notations can be found in the literature; our usage of (alpha,theta) is consistent with Wikipedia and Mathematica (Wolfram Research).

Gamma is the generalization of the Erlang distribution for non-integer k values, which becomes the alpha parameter. The chi-square distribution is a special case of the gamma distribution.

For alpha/=1, Gamma becomes the exponential distribution with /mean/=/theta.

The mean of this distribution is alpha*theta, and variance is /alpha*theta/^2.

Generation: if /alpha/=1, it is generated as exponential(theta).

For alpha>1, we make use of the acceptance-rejection method in "A Simple Method for Generating Gamma Variables, George Marsaglia and Wai Wan Tsang", ACM Transactions on Mathematical Software, Vol. 26, No. 3, September 2000.

The alpha<1 case makes use of the alpha>1 algorithm, as suggested by the above paper.

External Function: gate
Syntax
(gate entity address &key index &allow-other-keys)
Description

Look up a gate object on entity by address. For a module the address will be a list of the gate name, the gate direction and if it is a gate array the index of the gate.

External Function: gate-direction
Syntax
(gate-direction gate)
Description

Return the direction of a gate object (either :input or :output).

External Function: gate-extend
Syntax
(gate-extend gate-slot)
Description

Adds new gate to an gate array returning new gate (or gates if an inout gate-slot)

External Function: gate-size
Syntax
(gate-size module name)
Description

Not documented.

External Function: gate-type
Syntax
(gate-type gate-slot)
Description

Return gate type for a gate slot - :input, :output or :inout

External Function: geometric
Syntax
(geometric p &optional (rng 0))
Arguments
p
an integer p>0
Optional Arguments
rng
an integer (default 0)
Description

Returns a random integer from the geometric distribution with parameter p. That is, the number of independent trials with probability p until the first success. Uses the random number stream rng in the current context.

This is the n=1 special case of the negative binomial distribution.

Generation uses inverse transform.

External Function: handle-message
Syntax
(handle-message entity message)
Arguments

– entity :: a module – message :: a message

Description

handle-message is the main processing method for modules and protocols in which they receive messages. It must be implemented for all simple modules to implement their protocols. It may usefully implemented in compound-modules if they have input gates not connected to submodules however this is not normally expected.

External Function: handle-timer
Syntax
(handle-timer module timer-name)
Arguments
module
an instance of with-timers
timer-name
a symbol
Description

Called when the timer desgnated by timer-name asociated with module module is fired. Modules will typically should specialise on this generic function to implment their timer behaviours using the eql specializer form for timer-name.

External Function: has-listeners
Syntax
(has-listeners entity signal)
Arguments
entity
an entity-with-signals
signal-id
symbol signal identifier
Description

Return true if entity has any listeners for signal designated by signal-id.

For some signals this method has a significant overhead (linear to the number of hierarchy levels in the network). may-have-listeners may be more appropriate in most cases.

External Function: index
Syntax
(index object)
Description

Not documented.

External Function: info
Syntax
(info o)
Description

Produce a one-line description of object. The string appears in the graphical user interface (Tkenv) e.g. when the object is displayed in a listbox. The returned string should possibly be at most 80-100 characters long, and must not contain newline.

External Function: initialize
Syntax
(initialize component &optional stage)
Arguments
component
a simulation component
stage
a positive integer
Return
finished
a boolean
Description

This method is called for every comonent in the simulation after the whole simulation is created but before the first event is executed. It allows depth-first staged initialization and configuration for components which may depend on other components having being created. It will be called multiple times with stage increasing by 1 (from an initial value of 0) every time until it returns finished as true. This allows for multiple stage initialisation between codependent object types. Implementations should therefore check the stage value to insure they don't initialise more than once. An object is only deemed to be initialised once it initialize method and the intialize method of all subcomponents return true.

list method combination is used so that when subclassing all the relevant initialize methods must return true for the effective method to return true.

External Function: initialized-p
Syntax
(initialized-p component)
Arguments
component
a simulation component
Description

Returns true if an entity has finished its initialization using the initialize method.

External Function: input
Syntax
(input object)
Description

Not documented.

External Function: intuniform
Syntax
(intuniform a b &optional (rng 0))
Arguments
a
an integer
b
an integer
Optional Arguments
rng
an integer (default 0)
Description

Returns a random integer x with uniform distribution in the range a<=x<=b using the random number stream rng in the current context.

External Function: latency
Syntax
(latency entity)
Arguments
entity
an object
Description

Return the latency of the packet or timestampted entity - the time difference between current simulation-time and the time the rntity was timestamped.

External Function: listeners
Syntax
(listeners entity signal)
Arguments
entity
a entity-with-signals
signal
a symbol or t
Description

Return list of local listeners to signal denoted by signal for entity. If signal is t return all listeners in entity.

External Function: lognormal
Syntax
(lognormal m w &optional (rng 0))
Arguments
m
a real number
w
a real number
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate from the lognormal distribution with scale parameter m and shape parameter w from the random number stream rng in the current context. m and w correspond to the parameters of the underlying normal distribution (m: mean,/w/: standard deviation.)

External Function: make-coord
Syntax
(make-coord &optional (x 0.0) (y 0.0) (z 0.0))
Description

Not documented.

External Function: may-have-listeners
Syntax
(may-have-listeners entity signal-id)
Arguments
entity
an entity-with-signals
signal-id
a positive integer or symbol signal identifier
Description

Return true if entity may have listeners for signal signal-id. That is if the corresponding signal has local or ancestor listeners according to the entity cache/ or the signal is outside the cache range.

It is intented that this is an efficient check that may be used to eliminate uneccessary calculations of values and calls to emit.

External Function: message
Syntax
(message condition)
Description

Not documented.

External Function: message-sent-signal-value-message
Syntax
(message-sent-signal-value-message instance)
Description

Return whether debug-block represents elsewhere code.

External Function: message-sent-signal-value-result
Syntax
(message-sent-signal-value-result instance)
Description

Return whether debug-block represents elsewhere code.

External Function: message-sent-signal-value-timestamp
Syntax
(message-sent-signal-value-timestamp instance)
Description

Not documented.

External Function: module
Syntax
(module condition)
Description

Not documented.

External Function: name
Syntax
(name object)
Description

Not documented.

External Function: negbinomial
Syntax
(negbinomial n p &optional (rng 0))
Arguments
n
an integer n>0
p
an integer 0<=p<=1
Optional Arguments
rng
an integer (default 0)
Description

Returns a random integer from the negative binomial distribution with parameters n and p, that is, the number of failures occurring before n successes in independent trials with probability p of success. Uses the random number stream rng in the current context.

Generation is using the relationship to geometric distribution (runtime is proportional to n).

External Function: network
Syntax
(network object)
Description

Not documented.

External Function: nominal-datarate
Syntax
(nominal-datarate channel)
Arguments
Returns
nominal-datarate
a number, bits per second
Description

Returns the nominal data rate of the channel in bits per second (bps). The number returned from this method should be treated as informative; there is no strict requirement that the channel calculates packet duration by dividing the packet length by the nominal data rate. For example, specialized channels may add the length of a lead-in signal to the duration.

External Function: normal
Syntax
(normal &optional (mean 0.0d0) (stddev 1.0d0) (rng 0))
Optional Arguments
mean
a real number (default 0)
stddev
a real number (default 1d0)
rng
an integer (default 0)
Description

Returns a random variate from the normal distribution with the given mean mean and standard deviation stddev from the random number stream rng in the current context.

External Function: output
Syntax
(output object)
Description

Not documented.

External Function: owner
Syntax
(owner object)
Description

Not documented.

External Function: parent-module
Syntax
(parent-module object)
Description

Return the parent module of this object - not always owner

External Function: pareto-shifted
Syntax
(pareto-shifted a b c &optional (rng 0))
Arguments
a
a real
b
a real
c
a real
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate from the shifted generalized Pareto distribution.

Generation uses inverse transform.

External Function: path-end-gate
Syntax
(path-end-gate gate)
Description

Return the last gate in the sequence of gates connected to a gate

External Function: path-start-gate
Syntax
(path-start-gate gate)
Description

Return the first gate in the sequence of gates connected to a gate

External Function: peek
Syntax
(peek s)
Description

Return value of next element on set s without removing it.

External Function: poisson
Syntax
(poisson lambda &optional (rng 0))
Arguments
lambda
an integer lambda>0
Optional Arguments
rng
an integer (default 0)
Description

Returns a random integer from the Poisson distribution with parameter lambda, that is, the number of arrivals over unit time where the time between successive arrivals follow exponential distribution with parameter lambda. Uses the random number stream rng in the current context.

lambda is also the mean (and variance) of the distribution.

Generation method depends on value of lambda:

  • 0</lambda/<=30: count number of events lambda>30:
  • Acceptance-Rejection due to Atkinson (see Banks, page 166)

External Function: probability-density-function
Syntax
(probability-density-function instance x)
Description

Returns the estimated value of the Probability Density Function at a given x.

External Function: process-message
Syntax
(process-message channel message time)
Arguments
channel
an instance of class channel
message
the class message to be processed
time
time-type the time message is to be processed
Returns
channel-result
a structure channel-result
Description

This method encapsulates the channel's functionality. The method should model the transmission of the given message starting at the given time, and return the propagation delay, transmission duration, and discard flag in the channel-result object.

Transmission duration and bit error modeling only applies to packets i.e. to instances of class packet, it should be skipped for non-packet messages. The method does not need to set the duration of the packet; this is done by the simulation kernel. However, the method should call function (setf bit-error) on the packet if error modeling results in bit errors.

If the method sets the discard flag in the result object, it means that the message object should be deleted by the simulation kernel; this facility can be used to model that the message gets lost in the channel.

The method does not need to throw errors on overlapping transmissions, or if the packet's duration field is already set; these checks are done before process-message is called.

Simulation Events
message-discarded
structure timestamped with message as value should be emited if the class message is being discarded
message-sent
structure message-sent-signal-value should be emitted if message is successfully delivered with both the class message and structure channel-result objects.
External Function: property-union
Syntax
(property-union list1 list2)
Arguments
list1
a property list
list2
a property list
Returns
list
a property list
Description

This is intended to implement property inheritence.

Returns a merged property list combining properties from list1 and list2. list1 property will have priority except if the property values are themselves a list in which case the result is list2 value appended onto end of list1 value.

External Function: queue
Syntax
(queue object)
Description

Not documented.

External Function: rand
Syntax
(rand stream &optional limit)
Arguments
stream
a random number sequence stream
Optional Arguments
limit
a real (default 1.0)
Description

Return a random number x of same type as limit from a random number sequence stream in the range 0<= x <= limit . See also randExc

External Function: range-getf
Syntax
(range-getf spec index)
Arguments
spec
a range property list
index
a number
Results
result
a value corresponding to index in spec or nil if no match
index
the lower index of range corresponding to match
Description

Range property lists are plists where the property indicator is either a number indicating a single value or a cons of a lower and upper range.

range-getf finds the property in spec that either === the index or where=index= lies between the upper and lower bound of the specified range.

Property ranges are typically used to specify parameters that vary depending on an index.

Examples
(range-getf '(1  A (2 6) B 7 C (8 10) D) 1)
=> A,1
(range-getf '(1  A (2 6) B 7 C (8 10) D) 5)
=> B,2
(range-getf '(1  A (2 6) B 7 C (8 10) D) 0)
=>nil,0

External Function: range-list-p
Syntax
(range-list-p spec)
Description

Return true if spec is a valid range property list.

See Also
External Function: read-configuration
Syntax
(read-configuration pathname &optional (key general))
Arguments
pathname
a path designator for a a configuration file
key
string or list of strings designating sections (default "General")
Returns
trie
A trie containing configuration
Description

This functions reads the configuration keys from a source file designated by pathname one or more sections designated by key and returns a trie containing the fully resolved configuration. Configuration files are used to specify the parameters for the simulation and the heirachy of components therein.

If a list of sections is given in key they are read in the specified order. If the "General" section is not listed it will be read at the end.

Configuration File Format

The configuration data have the following syntax.

comments
#<comment>
section
[<section-title>]
file-inclusion
include <path>
parameter-definition
<parameter-name> = <parameter-value>
parameter-name
(<name-part>.*)<name-part>
name-part
<name>|<glob>|<index>
glob
<*>|<**>
index
<integer> | <range>
name
<character>+
range
<integer>-<integer>

Configuration data is read line per line. Everything after # on a line is considered a comment. If a line ends with a #\ it is assumed the following line is a continuation line. All parameters are read into named sections designated by the previous <section> or "General" section if no previous section title is given.

<file-inclusion> is used to insert the contents of another file at the given point. It is exactly as if the lines from that file where inserted at that point.

The <parameter-name> is used to specify which durind simulation Parameters for the simulation have heirarchical names which correspond to the heirarchy of named components in the simulation. Globs may be used to specify an any match. * corresponds to matching a single paramater-name whereas ** will match a sequence of names in the heirarchy. For indexed components the index may either be a single integer or a range of values seperated with -.

Examples

See ini files included with source code.

External Function: read-parameter
Syntax
(read-parameter full-path source format)
Description

Loopup a fully named parameter from a configuration trie and convert from string to internal representation using parse-input with the specified format. If the format is a pathname it may be relative to the path of the source file from which the parameter was read.

External Function: receive-signal
Syntax
(receive-signal listener signal source value)
Arguments
listener
an entity-with-signals instance.
signal
a signal designator (symbol or integer)
source
an entity-with-signals instance.
value
signalled value
Description

A call of emit with signal value signal from [entity-with-signals]] object/source/ and value value will result in receive-signal being called in the source object and all ancestor objects in the simulation heirarchy that have registered to receive this signal using subscribe

All objects which wish to receive signals must specialise this method.

External Function: record
Syntax
(record recorder time value)
Arguments
recorder
a result-recorder
time
a time-type
value
a number
Description

Must be specialised for all result-recorder classes to record the value at simulation time time. value will usually be a number but could be a structure containing more information or treated as a boolean for simple counting recorders.

External Function: register-signal
Syntax
(register-signal symbol &optional documentation)
Description

*Arguments

symbol
a symbol
Optional Arguments
documentation
a string
Returns
signal-id
an integer
Description

Register signal denoted by symbol and optionally recording the documentation. If the named signal has not previously been registered it will be allocated a new integer signal-id stored in the signal-id property of the symbol and it will be added onto the end of the global signals array. documentation is stored in the signal-doc symbol.

register-signal is intended to be called as a top level form.

The first signal-cache-size signals registered are cached by entity-with-signals objects and therefore the signals which are most heavily used should be registered first when loading the simulation code.

External Function: reinitialise-slots
Syntax
(reinitialise-slots slot-names instance)
Arguments
slots-names
a list of slot names
source
a class instance
Description

Reset the names slots in instance to their initial values as defined in the slot definitions for the instance class

External Function: repair-signal-flags
Syntax
(repair-signal-flags component)
Arguments
component
an entity-with-signals
Description

Adjusts has-ancestor-listeners bits in the component's subtree; It must be called when the component's ownership changes.

External Function: report
Syntax
(report recorder stream)
Arguments
recorder
a result-recorder
stream
a stream-designator
Description

Must be specialised for all result-recorder classes to report the statistic value to stream. Defined for the scalar-recorder class to output the value returned from recorded-value using the output-format format string and for vector-recorder to output the vector returned from recorded-vector at full precision.

Notes

The finish method will be called on the result-recorder in order for it to complete its statistics analysis at the simulation termination time beforer any calls to report

External Function: rng-map
Syntax
(rng-map context)
Description

Not documented.

External Function: root-event
Syntax
(root-event object)
Description

Not documented.

External Function: run-simulations
Syntax
(run-simulations pathname &key (config general) (repeat 1) runnumber preview)
Arguments
pathname
a path designator
Keyword Arguments
config
a string or list of strings (default "General")
repeat
an integer >= 1 (default 1)
runnumber
an integer >= 1
preview
a boolean
Description

Executes one or more simulations using the configuration file at pathname. config lists one or more sections of the configuration file to use for this run. They will be loaded in order and the "General" section will always be read last. repeat specifies how many times to run the simulation. Each run will be with different seed parameters of the random number generators. If runnumber is specified then it specifies a single run within a sequence if the configuration file specifies iteration over some parameters. If preview is true simulations are not run but onfiguration parameters for each run are printed out.

External Function: schedule
Syntax
(schedule event &key delay time)
Arguments
event
and event
Keyword Arguments
delay
a positive real
time
a positive real
Description

Schedule event to be handled at the given simulation time time or delay after current simulation time. If no delay or time is provided the arrival-time value of the event is used. The scheduled time must be >= current simulation-time i.e. in the future.

External Function: schedule-at
Syntax
(schedule-at module message &key time delay)
Arguments
module
a module
message
a message
Keyword Arguments
time
a time-type
delay
a time-type
Description

Schedule a self-message. The message will be delivered back to module via handle-message either at absolute simulation time time or after delay delay which will be added onto the current simulation time. This function is the way you can implement timers or timeouts. Timers can also be cancelled via cancel. When the message is delivered at the module, you can call self-message to tell it apart from messages arriving from other modules.

cancel can be used to cancel the self-message before it arrives. This is useful for implementing timeouts: if the event occurs 'in time' (before timeout), the scheduled self-message can be cancelled.

Given a message you can check whether it is currently scheduled by calling scheduled-p. If it is scheduled, you cannot schedule it again without calling cancel first. However, after the message was delivered to the module or cancelled, you can schedule it again – so you can reuse the same message object for timeouts over and over during the whole simulation.

  • Notes

The preferred way of implementing timers is now provided using timer-messages, set-timer and cancel-timer.

External Function: scheduled-p
Syntax
(scheduled-p event)
Description

Not documented.

External Function: sec
Syntax
(sec stream arg &optional colon-p at-p (d 3) (padchar  ) (exponentchar e))
Arguments
stream
An output stream designator.
arg
time format argument
colon-p
ignored
at-p
ignored
D
number of digits to print after decimal point
padchar
character to print leading the output
exponentchar
character to print before exponent.
Description

Simulation Time formatter function outputs a time argument arg to stream in engineering format.

Example
(format nil "~3/lens:sec/" 0.5689)
=> "568.900ms"
See also
External Function: seed
Syntax
(seed stream seed)
Arguments
stream
a random number sequence stream
seed
a 32 bit integer or t

Reseed stream using seed. A seed value of t will use the system random source to seed

External Function: self-message-p
Syntax
(self-message-p message)
Description

Not documented.

External Function: send
Syntax
(send module message gateid &key delay)
Arguments
module
a module
message
a message
gateid
a gate descriptor (a gate or list of gate name, direction and index.
delay
a time-type
Description

Schedule sending message through the specified gate of given module after given delay. The delay is added onto the current simulation-time to determine delivery time and the source gate of the message will be sent. deliver is called to actually schedule the message.

External Function: send-direct
Syntax
(send-direct module togate message &key propagation-delay duration)
Arguments
module
a module
togate
a gate
message
a message
Keyword Arguments
propagation-delay
a time-type
duration
a time-type
Description

Send message directly to the togate gate of another module.

If the target togate is further connected the message will follow the connections that start at that gate. For example, when sending to an input gate of a compound-module, the message will follow the connections inside the compound module.

It is permitted to send to an output gate, which will also cause the message to follow the connections starting at that gate. This can be useful, for example, when several submodules are sending to a single output gate of their parent module.

It is not noramlly permitted to send to a gate of a compound-module which is not further connected unless function handle-message has been specialised for that compound-module class.

Also, it is not permitted to send to a gate which is otherwise connected i.e. which has a previous-gate. This means that modules must have dedicated gates for receiving via send-direct. You cannot have a gate which receives messages via both connections and send-direct.

When a nonzero duration is given, that signifies the duration of the packet transmission, that is, the time difference between the transmission (or reception) of the start of the packet and that of the end of the packet. The destination module can choose whether it wants the simulation kernel to deliver the packet object to it at the start or at the end of the reception. The default is the latter; the module can change it by calling deliver-on-reception-start on the final input gate (that is the path-end-gate). deliver-on-reception-start needs to be called in advance, for example in the initialize method of the module. When a module receives a packet, it can call the reception-start-p and [duration]] methods on the packet to find out whether it represents the start or the end of the reception, and the duration of the transmission.

For messages that are not packets the duration must be zero.

External Function: sent-time
Syntax
(sent-time object)
Description

Not documented.

External Function: serialise
Syntax
(serialise o stream)
Description

Serialise an object into a stream. Fur future use.

External Function: set-slots
Syntax
(set-slots instance defs)
Arguments
instance
a class instance
defs
a list of lists
Description

Used to set multiple slot values in a class instance. defs is a list of slot setting options. The first element of each option is the slot name and the second element is the value to set the slot to.

External Function: set-timer
Syntax
(set-timer module timer interval &optional timer-name)
Arguments
module
an instance of with-timers
timer
a timer designator (either symbol or timer-message)
interval
a [time-type]]
Optional Arguments
timer-name
a symbol
Description

Schedule a timer designated by timer to be fired after simulation interval interval. handle-message will be called after interval with the module and timer-name as its arguments. If timer is a timer-message it will be givne the name timer-name.

If a timer designated by timer already exists it will be cancelled and rescheduled otherwise a new timer-message will be created with the given name and added onto the timers slot list of module.

For efficiency if classes have a slot with slot-name timer-name it is assumed that this will contain the timer-message to be used. In this case the slot definition should definine (make-instance 'timer-message) as the initform.

External Function: signal-id
Syntax
(signal-id symbol)
Description

Return the integer id of the named signal.

External Function: sim-time-limit
Syntax
(sim-time-limit object)
Description

Not documented.

External Function: simulation-time
Syntax
(simulation-time &optional (simulation *simulation*))
Description

Return the simulation time of the current running simulation.

External Function: size
Syntax
(size s)
Description

Return the number of elements stored in a data structure

External Function: stop
Syntax
(stop simulation &key abort)
Arguments
simulation
a simulation object
Keyword Arguments
abort
a boolean
Description

Stop the simulation. If abort is teu this will stop immediately by killing the thread in which the simulation is running otherwise it will stop after it has finished processing the current even.

External Function: student-t
Syntax
(student-t i &optional (rng 0))
Arguments
i
a positive integer
Optional Arguments
rng
an integer (default 0)

Returns a random variate from the student-t distribution with i degrees of freedom using the random number stream rng in the current context.

If Y1 has a normal distribution and Y2 has a chi-square distribution with k degrees of freedom then X = Y1 / sqrt(Y2/k) has a student-t distribution with k degrees of freedom.

Generation is using relationship to gamma and chi-square.

External Function: submodule
Syntax
(submodule module address &key index)
Arguments
module
a module
address
a submodule-specifier
  • submodule-specifier : ( (submodule-name | ( submodule-name index))*)
  • submodule-name : a symbol
  • index L an integer
Description

Return the submodule of a module given a heirarchical address. This will recurse throguh the submodule structure in order if the address is a list of submodules names. At each stage the submodule name or the name and index are used to recurse further down. It will return an error if there is no such named submodule.

External Function: subscribe
Syntax
(subscribe entity signal listener)
Arguments
entity
an entity-with-signals
signal-id
symbol signal identifier
listener
an object
Description

Adds a listener (callback object) that will be notified using the receive signal method when the given signal is emitted (see emit methods). It is an error to subscribe the same listener twice to the same signal. The order in which listeners will be notified is undefined.

External Function: subscribed-p
Syntax
(subscribed-p entity signal listener)
Arguments
entity
an entity-with-signals
signal-id
symbol signal identifier
listener
an object
Description

Removes the given listener from the subscription list for signal designated by signal-id in entity . It has no effect if the given listener was not subscribed using subscribe.

Returns true if the given listener is subscribed to the signal designated by signal-id at entity component (i.e. it does not look at listeners subscribed at ancestor components).

External Function: timer
Syntax
(timer module name)
Arguments
module
an instance of with-timers
name
a symbol
Description

Return the timer message with name name associated with module. If the module has a slot with slot-name name then the slot value will be returned - otherwise the timers slot of the component will be search for the named timer.

External Function: timestamp
Syntax
(timestamp object)
Description

Not documented.

External Function: timestamped-time
Syntax
(timestamped-time instance)
Description

Not documented.

External Function: timestamped-value
Syntax
(timestamped-value instance)
Description

Return whether debug-block represents elsewhere code.

External Function: title
Syntax
(title instance)
Arguments
instance
a statistic-listener
Description

Return the publishable title for a result from a statistic-listener. Declared in the arguments to the :statistic property of a component.

External Function: to-gate
Syntax
(to-gate message)
Description

Not documented.

External Function: to-module
Syntax
(to-module message)
Description

Not documented.

External Function: transmission-channel
Syntax
(transmission-channel gate &optional incoming-p)
Description

Typically invoked on an output gate, this method returns the channel in the connection path that supports datarate (as determined; it is guaranteed that there can be at most one such channel per path). If there is no such channel, nil is returned. If incoming-p is true looks for an incoming channel - else returns the outgoing channel.

External Function: transmission-finish-time
Syntax
(transmission-finish-time channel)
Arguments
Returns
duration
a time-type
Description

Returns the simulation time the sender gate will finish transmitting over a transmission channel. If the gate is not currently transmitting, the result is unspecified but less or equal the current simulation time.

External Function: triang
Syntax
(triang a b c &optional (rng 0))
Arguments
a
a real
b
a real
c
a real
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate from the triangular distribution with parameters a <= b <= c.

Generation uses inverse transform.

External Function: truncnormal
Syntax
(truncnormal &optional (m 0.0d0) (d 1.0d0) (rng 0))
Optional Arguments
m
a real number (default 0d0)
d
a real number (default 1d0)
rng
an integer (default 0)
Description

Return the Normal distribution (from normal truncated to nonnegative values from the random number stream rng in the current context.

It is implemented with a loop that discards negative values until a nonnegative one comes. This means that the execution time is not bounded: a large negative mean with much smaller stddev is likely to result in a large number of iterations.

The mean and stddev parameters m and d serve as parameters to the normal distribution before truncation. The actual random variate returned will have a different mean and standard deviation.

External Function: uniform
Syntax
(uniform a b &optional (rng 0))
Arguments
a
a real number
b
a real number
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate x double float with uniform distribution in the range a/<=/x/<=/b from random number stream rng in the current context.

External Function: unsubscribe
Syntax
(unsubscribe entity signal listener)
Arguments
entity
an entity-with-signals
signal-id
symbol signal identifier
listener
an object
Description

Removes the given listener from the subscription list for signal designated by signal-id in entity . It has no effect if the given listener was not subscribed using subscribe.

External Function: urandom
Syntax
(urandom size)
Arguments
seed
an integer
Description

Return an integer size octets long read from the system random stream /dev/urandom

External Function: weibull
Syntax
(weibull a b &optional (rng 0))
Arguments
a
a real in range a>0
b
a real in range b>0
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate from the Weibull distribution where a is the 'scale' parameter and b is the shape parameter. Sometimes Weibull is given with alpha and beta parameters, then alpha=b and beta=a. Uses random number stream rng in the current context.

The Weibull distribution gives the distribution of lifetimes of objects. It was originally proposed to quantify fatigue data, but it is also used in reliability analysis of systems involving a weakest link, e.g. in calculating a device's mean time to failure.

When b=1, (weibull a b) is exponential with mean a.

Generation uses inverse transform.

3.4 Ambiguous Symbols

3.4.1 Gate

Disambiguation.

3.4.2 Module

Disambiguation.

3.4.3 Transmission-Channel

Disambiguation.

3.4.4 Gate-Direction

Disambiguation.

3.4.5 Network

Disambiguation.

3.4.6 Channel

Disambiguation.

3.4.7 Message

Disambiguation.

3.5 Index

A B C D E F G H I L M N O P Q R S T U W NONALPHABETIC

3.5.1 Nonalphabetic

3.5.2 A

3.5.3 B

3.5.4 C

3.5.5 D

3.5.6 E

3.5.7 F

3.5.8 G

3.5.9 H

3.5.10 I

3.5.11 L

3.5.13 N

3.5.14 O

3.5.15 P

3.5.16 Q

3.5.17 R

3.5.18 S

3.5.19 T

3.5.20 U

3.5.21 W

4 Colophon

This documentation was generated from Common Lisp source code using CLOD, version 1.0. The latest version of CLOD is available here.

5 Internal Package: lens.wsn

5.1 Description

A simulation package for Wireless Sensor Networks with interfaces and implementations for representing from physical processes, sensors, applications, communications (network, MAC and radio) and a wireless channel model including interference, asymetric bidirectional loss and temporal fading.

5.2 Class Hierarchy

class-0003_bdcca66c83bb255694a0eb1f93953e4ba1e94b8d.png

5.3 External Symbols

5.3.1 External Classes

Class: app-net-control-info
Inheritance
Description

Information passed between application and communication layer which is external to the packet i.e. not carried by a real packet (the source and destination addresses and quality measures of received signal for the packet)

Direct Slots

Slot: rssi
  • Value type: float
  • Initial value: NIL
  • Initargs: rssi
  • Allocation: instance
Description

Received signal strength indicator (RSSI) of the received packet

Accessors

Slot Accessor: rssi
Syntax
(rssi object)
Methods

Slot: lqi
  • Value type: float
  • Initial value: NIL
  • Initargs: lqi
  • Allocation: instance
Description

Link Quality Indicator (LQI) of the received packet

Accessors

Slot Accessor: lqi
Syntax
(lqi object)
Methods

Internal Slot: source
  • Value type: t
  • Initial value: NIL
  • Initargs: source
  • Allocation: instance
Description

Routing layer source address of the received packet

Accessors

Internal Slot Accessor: source
Syntax
(source object)
Methods

Internal Slot: destination
  • Value type: t
  • Initial value: NIL
  • Initargs: destination
  • Allocation: instance
Description

Routing layer destination address of the packet to be sent

Accessors

Internal Slot Accessor: destination
Syntax
(destination object)
Methods

Class: application
Parameters
applicationid
a symbol. Used to filter packet delivery to specific applications.
priority
a integer. Default: 1. What priority to give the application packets
header-overhead
a integer. Default: 8. Size of application packet header in bytes
payload-overhead
a integer. Default: 12. Size of application packet payload in bytes
Description

The Application core module class connects to node sensors for measurements and to the node communication module for sending and receiving data.

Direct Slots

External Slot: owner
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: node
Syntax
(node module)
Arguments
module
a wsn-module
Description

Return the parent node module for module/.

Methods

Slot: applicationid
  • Value type: symbol
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Used to filter packet delivery to specific applications.

Accessors

Slot Accessor: applicationid
Syntax
(applicationid object)
Methods

Internal Slot: priority
  • Value type: integer
  • Initial value: 1
  • Initargs: priority
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

What priority to give the application packets

Accessors

Internal Slot Accessor: priority
Syntax
(priority object)
Methods

Slot: header-overhead
  • Value type: integer
  • Initial value: 8
  • Initargs: header-overhead
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Size of application packet header in bytes

Accessors

Slot Accessor: header-overhead
Syntax
(header-overhead object)
Methods

Slot: payload-overhead
  • Value type: integer
  • Initial value: 12
  • Initargs: payload-overhead
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Size of application packet payload in bytes

Accessors

Slot Accessor: payload-overhead
Syntax
(payload-overhead object)
Methods

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Sequence number of last packet sent

Indirect Slots

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: application-packet
Description

A generic application packet. If defining your own packet you have to extend from this packet. You do not have to use the fields already defined, and you can always define your own size.

Direct Slots

External Slot: name
  • Value type: t
  • Initial value: NIL
  • Initargs: applicationid
  • Allocation: instance
Description

Used to filter packet delivery to specific applications.

Accessors

Slot Accessor: applicationid
Syntax
(applicationid object)
Methods

Internal Slot: encapsulated-packet
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: payload
Syntax
(payload object)
Methods

Slot: sequence-number
  • Value type: t
  • Initial value: NIL
  • Initargs: sequence-number, seqnum
  • Allocation: instance
Description

A field to distinguish between packets

Accessors

Slot Accessor: sequence-number
Syntax
(sequence-number object)
Methods

Slot Accessor: sequence-number
Syntax
(sequence-number object)
Methods

External Slot: byte-length
  • Value type: fixnum
  • Initial value: 20
  • Initargs: byte-length
  • Allocation: instance
Accessors

External Slot Accessor: byte-length
Syntax
(byte-length entity)
Description

Return the length in whole octets (8 bit bytes) of an entity. For a packet the length should include the length of all encapsulated packets together with its overhead.

Methods
Indirect Slots

External Slot: bit-error-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The result of error modelling after the packet is sent through a channel that has a nonzero packet error rate (PER) or bit error rate (BER). It is up to the receiver to examine this flag after having received the packet, and to act upon it.

Internal Slot: reception-start-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: deliver-on-reception-start
  • Allocation: instance
Description

Identify whether this packet represents the start or the end of the reception after the packet travelled through a channel with a data rate. This flag is controlled by the deliver-on-reception-start flag of the receiving gate.

External Slot: control-info
  • Value type: t
  • Initial value: NIL
  • Initargs: control-info
  • Allocation: instance
Description

Additional data to be passed with packet between protocol layers.

External Slot: duration
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Duration of last transmission

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

Class: bypass-mac
Parameters

None.

Description

Not documented.

Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 8
  • Initargs: none
  • Allocation: instance

External Slot: buffer-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Slot: max-mac-frame-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: radio
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: address
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

MAC address - will default to nodeid.

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: bypass-routing
Parameters

None.

Description

Not documented.

Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 10
  • Initargs: none
  • Allocation: instance

External Slot: buffer-size
  • Value type: t
  • Initial value: 32
  • Initargs: none
  • Allocation: instance

Slot: max-net-frame-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: comms-module
Parameters
buffer-size
a integer. Default: 32. Size of TX buffer
header-overhead
a integer. Default: 10. The overhead added to encapsulated packets in bytes
Description

Base class for all WSN communications submodules. This provides a header-overhead parameter specifying the default overhead for packets, a packet-buffer transmission buffer for packets of maximum size specified by the buffer-size parameter and a history-buffer for implementing the duplicate-p to determine if we are receiving a duplicate packet.

Direct Slots

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

Accessors

Internal Slot Accessor: buffer
Syntax
(buffer object)
Methods

External Slot: buffer-size
  • Value type: integer
  • Initial value: 32
  • Initargs: buffer-size
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Size of TX buffer

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Accessors

Slot Accessor: packet-history
Syntax
(packet-history object)
Methods

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: last-sequence-number
Syntax
(last-sequence-number object)
Methods

Slot: header-overhead
  • Value type: integer
  • Initial value: 10
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (units b)
Description

The overhead added to encapsulated packets in bytes

Accessors

Slot Accessor: header-overhead
Syntax
(header-overhead object)
Methods
Indirect Slots

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: communications
Parameters

None.

Description

The Communications module for a WSN node receives signals from the wireless-channel on the receive gate, passes them through the radio, mac and routing module representing the sublayers and sends application packets to the application (and visa versa).

Direct Slots
Indirect Slots

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: connectivity-map
Parameters
priority
a t. Default: 1. NIL
packet-spacing
a time-type. Default: 0.1d0. NIL
packets-per-node
a integer. Default: 100. NIL
Description

Application module that will generate packets-per-node packets at intervals of packets-per-spacing

  • useful to determine connectivity statistics of a network.
Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 8
  • Initargs: none
  • Allocation: instance

Slot: payload-overhead
  • Value type: t
  • Initial value: 32
  • Initargs: none
  • Allocation: instance

Internal Slot: priority
  • Value type: t
  • Initial value: 1
  • Initargs: priority
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Internal Slot Accessor: priority
Syntax
(priority object)
Methods

Slot: packet-spacing
  • Value type: time-type
  • Initial value: 0.1d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: packet-spacing
Syntax
(packet-spacing object)
Methods

Slot: packets-per-node
  • Value type: integer
  • Initial value: 100
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: packets-per-node
Syntax
(packets-per-node object)
Methods

Slot: packets-sent
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: packets-sent
Syntax
(packets-sent object)
Methods

Slot: send-packet
  • Value type: timer-message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Sequence number of last packet sent

Slot: applicationid
  • Value type: symbol
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
Description

Used to filter packet delivery to specific applications.

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: direct-node-physical-process
Parameters
default-value
a real. Default: 0.0. NIL
assigned-values
a read. Assigned values in a range specification
Description

Simple physical process where a value is assigned per node

Direct Slots

Slot: default-value
  • Value type: real
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: assigned-values
  • Value type: read
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Assigned values in a range specification

Indirect Slots

Inherited Slot: function
  • Value type: function
  • Initial value: =#'(LAMBDA (LENS.WSN::M LENS.WSN::C LENS.WSN::TM) (DECLARE (IGNORE LENS.WSN::M LENS.WSN::C LENS.WSN::TM)) (UNIFORM 0.0 1.0))=
  • Initargs: none
  • Allocation: instance
Description

A function measurand, location and time returning measured value. Default is uniform ransom number betwee 0 and 1.

Slot: description
  • Value type: string
  • Initial value: NIL
  • Initargs: description
  • Allocation: instance
Description

Text description of a physical process

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: leach-routing
Parameters
sink-network-address
a integer. NIL
applicationid
a symbol. Default: ='THROUGHPUT-TEST=. Default destination application for aggregates
percentage
a real. NIL
round-length
a time-type. NIL
slot-length
a real. NIL
adv-packet-size
a fixnum. Default: 9. NIL
join-packet-size
a fixnum. Default: 9. NIL
tdma-packet-size
a fixnum. Default: 150. NIL
data-packet-size
a fixnum. Default: 9. NIL
sensibility
a float. Default: -95. dBm
aggr-consumption
a float. Default: 5.e-9. Energy per bit used in transmitting aggregate data packet from cluster head
Description

Not documented.

Direct Slots

Slot: sink-network-address
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: sink-network-address
Syntax
(sink-network-address module)
Attributes
module
an application or other wsn-module
Description

Return the address of sink node for reporting applications. Default is sink however some applications take this as a parameter.

Methods

Slot: applicationid
  • Value type: symbol
  • Initial value: ='LENS.WSN:THROUGHPUT-TEST=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Default destination application for aggregates

Slot: header-overhead
  • Value type: t
  • Initial value: 14
  • Initargs: none
  • Allocation: instance

External Slot: buffer-size
  • Value type: t
  • Initial value: 32
  • Initargs: none
  • Allocation: instance

Slot: max-net-frame-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Inherited Slot: percentage
  • Value type: real
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: round-length
  • Value type: time-type
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: slot-length
  • Value type: real
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: adv-packet-size
  • Value type: fixnum
  • Initial value: 9
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: join-packet-size
  • Value type: fixnum
  • Initial value: 9
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: tdma-packet-size
  • Value type: fixnum
  • Initial value: 150
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: data-packet-size
  • Value type: fixnum
  • Initial value: 9
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: round-number
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: round-number
Syntax
(round-number object)
Methods

Slot: probability
  • Value type: float
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: probability
Syntax
(probability object)
Methods

Slot: sensibility
  • Value type: float
  • Initial value: -95
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

dBm

Accessors

Slot Accessor: sensibility
Syntax
(sensibility object)
Methods

Slot: aggr-consumption
  • Value type: float
  • Initial value: 5.e-9
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Energy per bit used in transmitting aggregate data packet from cluster head

Accessors

Slot Accessor: aggr-consumption
Syntax
(aggr-consumption object)
Methods

Slot: aggregate-buffer
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Stacked up application packets for sending as aggregate

Accessors

Slot Accessor: aggregate-buffer
Syntax
(aggregate-buffer object)
Methods

Slot: temp-tx-buffer
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Temp buffer for packets received before cluster formed

Accessors

Slot Accessor: temp-tx-buffer
Syntax
(temp-tx-buffer object)
Methods

Slot: cluster-members
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: cluster-members
Syntax
(cluster-members object)
Methods

Slot: cluster-head-candidates
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: cluster-head-candidates
Syntax
(cluster-head-candidates object)
Methods

Slot: powers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: powers
Syntax
(powers object)
Methods

Slot: cluster-length
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Slot: cluster-head-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: cluster-head-p
Syntax
(cluster-head-p object)
Methods

Slot: end-form-cluster
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: end-form-cluster
Syntax
(end-form-cluster object)
Methods

Slot: ct-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: line-mobility
Parameters
destination
a coord. Default: (MAKE-COORD 1.0 1.0). End location coordinate.
speed
a real. Default: 1. Speed of motion
update-interval
a time-type. Default: 1.0d0. Time tnterval for position updates along trajectory
Description

mobility module for movement backwards and forwards along a straight line between start-location and destination-location.

Direct Slots

Slot: start-location
  • Value type: coord
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Starting location coordinate

Accessors

Slot Accessor: start-location
Syntax
(start-location object)
Methods

Internal Slot: destination
  • Value type: coord
  • Initial value: (MAKE-COORD 1.0 1.0)
  • Initargs: destination-location
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

End location coordinate.

Slot: delta
  • Value type: coord
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Vector delta from start to end

External Slot: distance
  • Value type: real
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Distance from start to end

Inherited Slot: speed
  • Value type: real
  • Initial value: 1
  • Initargs: speed
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Speed of motion

Slot: update-interval
  • Value type: time-type
  • Initial value: 1.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Time tnterval for position updates along trajectory

Accessors

Slot Accessor: update-interval
Syntax
(update-interval object)
Methods

Slot: update
  • Value type: timer-message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: static-p
  • Value type: t
  • Initial value: T
  • Initargs: static-p
  • Allocation: instance
Description

If true (default) this the node is static. Subclasses should specialise this appropriately.

Slot: orientation
  • Value type: orientation
  • Initial value: (LENS.WSN::MAKE-ORIENTATION)
  • Initargs: orientation
  • Allocation: instance
Description

Initial orientation for node

Slot: location
  • Value type: coord
  • Initial value: NIL
  • Initargs: location
  • Allocation: instance
Description

Initial location coord for node.

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: mac
Parameters
max-mac-frame-size
a integer. Default: 0. in bytes
address
a integer. MAC address - will default to nodeid.
Description

Base class for all mac layer module implementations. Connects to radio submodule and routing submodule in the communications module. Has a mac-address physical layer adress for this device (defaults to the nodeid and a max-mac-frame-size specifyin largest packet size accepted.

Direct Slots

Slot: max-mac-frame-size
  • Value type: integer
  • Initial value: 0
  • Initargs: max-mac-frame-size
  • Allocation: instance
  • Parameter: t
  • Properties: (units b)
Description

in bytes

Accessors

Slot Accessor: max-mac-frame-size
Syntax
(max-mac-frame-size object)
Methods

Internal Slot: address
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

MAC address - will default to nodeid.

Accessors

Slot Accessor: mac-address
Syntax
(mac-address object)
Methods

Slot: radio
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: radio
Syntax
(radio object)
Methods
Indirect Slots

Slot: header-overhead
  • Value type: integer
  • Initial value: 10
  • Initargs: none
  • Allocation: instance
Description

The overhead added to encapsulated packets in bytes

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

External Slot: buffer-size
  • Value type: integer
  • Initial value: 32
  • Initargs: buffer-size
  • Allocation: instance
Description

Size of TX buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: mac-control-command
Description

Not documented.

Direct Slots
Indirect Slots

Slot: argument
  • Value type: t
  • Initial value: NIL
  • Initargs: argument
  • Allocation: instance
Description

Additional arguments with command

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name, command
  • Allocation: instance
Description

Command is held as message name

Class: mac-control-message
Description

Not documented.

Direct Slots
Indirect Slots

Slot: argument
  • Value type: t
  • Initial value: NIL
  • Initargs: argument
  • Allocation: instance
Description

Additional arguments with command

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name, command
  • Allocation: instance
Description

Control message command name

Class: mac-packet
Description

Base class for all mac-layer packet types.

Direct Slots
Indirect Slots

Slot: sequence-number
  • Value type: t
  • Initial value: NIL
  • Initargs: sequence-number, seqnum
  • Allocation: instance
Description

a field to distinguish between packets

Internal Slot: destination
  • Value type: t
  • Initial value: NIL
  • Initargs: destination
  • Allocation: instance
Description

the destination address of the packet to be sent

Internal Slot: source
  • Value type: t
  • Initial value: NIL
  • Initargs: source
  • Allocation: instance
Description

the source address of the received packet

Slot: header-overhead
  • Value type: t
  • Initial value: 0
  • Initargs: byte-length, header-overhead
  • Allocation: instance
Description

In bytes

External Slot: bit-error-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The result of error modelling after the packet is sent through a channel that has a nonzero packet error rate (PER) or bit error rate (BER). It is up to the receiver to examine this flag after having received the packet, and to act upon it.

Internal Slot: reception-start-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: deliver-on-reception-start
  • Allocation: instance
Description

Identify whether this packet represents the start or the end of the reception after the packet travelled through a channel with a data rate. This flag is controlled by the deliver-on-reception-start flag of the receiving gate.

External Slot: control-info
  • Value type: t
  • Initial value: NIL
  • Initargs: control-info
  • Allocation: instance
Description

Additional data to be passed with packet between protocol layers.

External Slot: duration
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Duration of last transmission

Internal Slot: encapsulated-packet
  • Value type: packet
  • Initial value: NIL
  • Initargs: encapsulated-packet
  • Allocation: instance
Description

Higher level encapsulated protocol packet.

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: mac-radio-control-info
Inheritance
Description

Control information from radi to mac layers (RSSI or LQI)

Direct Slots

Slot: rssi
  • Value type: double-float
  • Initial value: NIL
  • Initargs: rssi
  • Allocation: instance
Description

the RSSI of the received packet

Accessors

Slot Accessor: rssi
Syntax
(rssi object)
Methods

Slot: lqi
  • Value type: double-float
  • Initial value: NIL
  • Initargs: lqi
  • Allocation: instance
Description

the LQI of the received packet

Accessors

Slot Accessor: lqi
Syntax
(lqi object)
Methods

Class: mac802.15.4
Parameters
print-state-transitions
a boolean. Debugging parameter
max-mac-frame-size
a t. Default: 0. NIL
header-overhead
a t. Default: 14. NIL
buffer-size
a t. Default: 32. NIL
enable-slotted-csma
a boolean. Default: T. Enables the slotted version of the CSMA algorithm, explained in the standard.
enable-cap
a boolean. Default: T. NIL
is-ffd
a boolean. Is the node a full function device? These are the only devices which can act as coordinators.
is-pan-coordinator
a boolean. Is the node the PAN coordinator?
battery-life-extension
a boolean. NIL
frame-order
a fixnum. Default: 4. Specifies how long is the active portion of a frame, when radios are listening or transmitting. Specifically it is equal to base-superframe-duration^{2 frame-order}.
beacon-order
a fixnum. Default: 6. Specifies how long is the full frame (active and inactive). This is the period between two beacons. Specifically it is equal to base-superframe-duration^{2 beacon-order}.
unit-backoff-period
a fixnum. Default: 20. Specifies how long is the unit of time used in backing off in symbols. More specifically the standard uses a exponential backoff technique and the backoff time is: random(1…2backoff-exponent-1) · (unit-backoff-period · symbol-time). Backoff_exponent is a variable automatically updated by the protocol.
base-slot-duration
a fixnum. Default: 60. Parameter used to calculate base-superframe-duration
num-superframe-slots
a fixnum. Default: 16. Parameter used to calculate base-superframe-duration
min-be
a fixnum. Default: 5. In calculating the backoff time, this is the minimum value that the backoff exponent can take.
max-be
a fixnum. Default: 7. In calculating the backoff time, this is the maximum value that the backoff exponent can take.
max-csma-backoffs
a fixnum. Default: 4. Maximum number of backoffs until the transmission of the packet is aborted and go for another retry (if there are any left).
max-frame-retries
a fixnum. Default: 2. Maximum number of retries until the packet is considered lost and the upper layer notified.
max-lost-beacons
a fixnum. Default: 4. Maximum number of beacons lost until the node considers itself disassociated from the PAN coordinator.
min-cap-length
a fixnum. Default: 440. The minimum length of CAP period when GTS is used, defined in symbols.
request-gts
a fixnum. Default: 0. Allows a node to request a specified number of GTS slots from the coordinator. If the request is successful, DATA packets will be transmitted in the GTS slots assigned by the coordinator These slots are assigned dynamically according to availability. If no slots are available, the request will fail. Note that this is an easy way for a node to statically request a certain number of slots. A more dynamic solution would be for the application module to instruct the MAC module how many slots should it request. The current (parameter-based) solution is a shortcut when we have constant application traffic and we can figure out a priory an optimal way to share the slots among the nodes.
guard-time
a time-type. Default: 0.001. Reception guard time to sue in physical layer. Essential when dealing with time synchronisation.
Description

IEEE802.15.4 MAC - IEE standard for wireless low-power short range communications.

Functionality implemented:

  • CSMA-CA functionality (slotted and unslotted)
  • Beacon-enabled PANs with association (auto associate)
  • Direct data transfer mode
  • Guaranteed time slots (GTS).

Features that are NOT implemented:

  • Non-beacon PANs
  • Indirect data transfer mode
  • Multihop PAN topologies

See The IEEE 802.15.4 standard (ver. 2006) [http://standards.ieee.org/getieee802/download/802.15.4-2006.pdf]

Direct Slots

Slot: print-state-transitions
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Debugging parameter

Slot: max-mac-frame-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: header-overhead
  • Value type: t
  • Initial value: 14
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

External Slot: buffer-size
  • Value type: t
  • Initial value: 32
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: enable-slotted-csma
  • Value type: boolean
  • Initial value: T
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Enables the slotted version of the CSMA algorithm, explained in the standard.

Slot: enable-cap
  • Value type: boolean
  • Initial value: T
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: is-ffd
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Is the node a full function device? These are the only devices which can act as coordinators.

Slot: is-pan-coordinator
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Is the node the PAN coordinator?

Slot: battery-life-extension
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: frame-order
  • Value type: fixnum
  • Initial value: 4
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Specifies how long is the active portion of a frame, when radios are listening or transmitting. Specifically it is equal to base-superframe-duration^{2 frame-order}.

Slot: beacon-order
  • Value type: fixnum
  • Initial value: 6
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Specifies how long is the full frame (active and inactive). This is the period between two beacons. Specifically it is equal to base-superframe-duration^{2 beacon-order}.

Slot: unit-backoff-period
  • Value type: fixnum
  • Initial value: 20
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Specifies how long is the unit of time used in backing off in symbols. More specifically the standard uses a exponential backoff technique and the backoff time is: random(1…2backoff-exponent-1) · (unit-backoff-period · symbol-time). Backoff_exponent is a variable automatically updated by the protocol.

Slot: base-slot-duration
  • Value type: fixnum
  • Initial value: 60
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Parameter used to calculate base-superframe-duration

Slot: num-superframe-slots
  • Value type: fixnum
  • Initial value: 16
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Parameter used to calculate base-superframe-duration

Slot: base-superframe-duration
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: min-be
  • Value type: fixnum
  • Initial value: 5
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

In calculating the backoff time, this is the minimum value that the backoff exponent can take.

Slot: max-be
  • Value type: fixnum
  • Initial value: 7
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

In calculating the backoff time, this is the maximum value that the backoff exponent can take.

Slot: max-csma-backoffs
  • Value type: fixnum
  • Initial value: 4
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Maximum number of backoffs until the transmission of the packet is aborted and go for another retry (if there are any left).

Slot: max-frame-retries
  • Value type: fixnum
  • Initial value: 2
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Maximum number of retries until the packet is considered lost and the upper layer notified.

Slot: max-lost-beacons
  • Value type: fixnum
  • Initial value: 4
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Maximum number of beacons lost until the node considers itself disassociated from the PAN coordinator.

Slot: min-cap-length
  • Value type: fixnum
  • Initial value: 440
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The minimum length of CAP period when GTS is used, defined in symbols.

Slot: request-gts
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Allows a node to request a specified number of GTS slots from the coordinator. If the request is successful, DATA packets will be transmitted in the GTS slots assigned by the coordinator These slots are assigned dynamically according to availability. If no slots are available, the request will fail. Note that this is an easy way for a node to statically request a certain number of slots. A more dynamic solution would be for the application module to instruct the MAC module how many slots should it request. The current (parameter-based) solution is a shortcut when we have constant application traffic and we can figure out a priory an optimal way to share the slots among the nodes.

Slot: guard-time
  • Value type: time-type
  • Initial value: 0.001
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Reception guard time to sue in physical layer. Essential when dealing with time synchronisation.

Slot: next-packet-try
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: next-packet-time
  • Value type: time-type
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: locked-gts
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: associated-pan
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

ID of current PAN (-1 if not associated)

Internal Slot: state
  • Value type: mac802.15.4-state
  • Initial value: ='LENS.WSN.MAC.802.15.4::SETUP=
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: state
Syntax
(state instance)
Arguments
instance
an object with state handling.
Description

Return current state identifier of instance

Methods

Slot: next-state
  • Value type: mac802.15.4-state
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

will be switched after csma-ca algorithm

Slot: cap-length
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

duration of CAP interval (in number of superframe slots)

Slot: mac-bsn
  • Value type: integer
  • Initial value: (RANDOM 255)
  • Initargs: none
  • Allocation: instance
Description

beacon sequence number (unused)

Slot: next-packet-retries
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Description

number of retries left for next packet to be sent

Slot: lost-beacons
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Description

number of consequitive lost beacon packets

Slot: frame-interval
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

duration of active part of the frame (in symbols)

Slot: beacon-interval
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

duration of the whole frame (in symbols)

Slot: csma-number-backoffs
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: csma-contention-window-length
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: csma-backoff-exponent
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: cap-end
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Absolute time of end of CAP period for current frame

Slot: current-frame-start
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Absolute recorded start time of the current frame

Slot: gts-start
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance

Slot: gts-end
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance

Slot: gts-length
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance

Slot: gts-list
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: next-packet-response
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Duration of timeout for receiving a reply after sending a packet

Slot: next-packet-state
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: associated-devices
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

List of associated devices for PAN coordinator

Slot: beacon-packet
  • Value type: mac802.15.4-packet
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: associate-request-packet
  • Value type: mac802.15.4-packet
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: next-packet
  • Value type: mac802.15.4-data-packet
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: gts-spec
  • Value type: vector
  • Initial value: (MAKE-ARRAY 0 :ADJUSTABLE T)
  • Initargs: none
  • Allocation: instance
Description

list of GTS specifications (for PAN coordinator)

Slot: attempt-tx
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: radio
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: address
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

MAC address - will default to nodeid.

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: mobility
Parameters
location
a coord. Initial location coord for node.
orientation
a lens.wsn::orientation. Default: (MAKE-ORIENTATION). Initial orientation for node
Description

Superclass for mobility submodules of a node handling node mobility. Base class of this initialises the location from the deployment pand field arameters of the network to initialise all node positions for static nodes. Deployment takes the current forms.

Network Parameters
field
a list of the x, y and optionally z sizes of the network in m
deployment
a symbol deployment-type for the whole network or a range-list mapping node ids to the deployment-type to nodes.
Deployment Types

Specify how nodes are located over the network field.

uniform
random uniform deployment over entire field.
center
located in the center of the field
(grid dx dy dz)
nodes are located on a grid with cell dimensions (dz dy dz)
(randomized dx dy dz)
nodes are randomly located withing the cells of dimensions (dx dy dz)
Direct Slots

Slot: location
  • Value type: coord
  • Initial value: NIL
  • Initargs: location
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Initial location coord for node.

Accessors

Slot Accessor: location
Syntax
(location object)
Methods

Slot: orientation
  • Value type: orientation
  • Initial value: (LENS.WSN::MAKE-ORIENTATION)
  • Initargs: orientation
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Initial orientation for node

Accessors

Slot Accessor: orientation
Syntax
(orientation object)
Methods

Slot: static-p
  • Value type: t
  • Initial value: T
  • Initargs: static-p
  • Allocation: instance
Description

If true (default) this the node is static. Subclasses should specialise this appropriately.

Accessors

Slot Accessor: static-p
Syntax
(static-p object)
Methods
Indirect Slots

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: multipath-rings-routing
Parameters
setup-overhead
a integer. Default: 13. The size of a specific control message to setup the rings
setup-frame-size
a fixnum. Default: 13. NIL
setup-timeout
a time-type. Default: 0.05d0. Specifies a timeout when the setting up of the network tree (or level information) is taking place. If a particular node does not receive timely information it might declare it self "not connected" and reports this to the application with a message.
Description

Multipath Rings Routing nodes do not have a specific parent. A node just gets a level number (or ring number) during setup. The first setup packet sent from the sink has level

  1. Any node that receives it adds 1 to the level and retransmits

it. The process continues with every node adding 1 to the level of the received packet. Eventually all connected nodes will have a level number (there is also a possibility for unconnected nodes). When a node wants to send a packet to the sink it does not send it to a particular node but rather broadcasts it, attaching its level number. Any node with a smaller level number will rebroadcast it. The process continues until the sink is reached. You can see with this algorithm many paths to the sink can be taken. The algorithm can be more robust compared to single route algorithms but if the traffic is passes a certain low threshold, congestion can kill performance.

Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 14
  • Initargs: none
  • Allocation: instance

Slot: setup-overhead
  • Value type: integer
  • Initial value: 13
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The size of a specific control message to setup the rings

Accessors

Slot Accessor: setup-overhead
Syntax
(setup-overhead object)
Methods

External Slot: buffer-size
  • Value type: t
  • Initial value: 32
  • Initargs: none
  • Allocation: instance

Slot: max-net-frame-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Slot: setup-frame-size
  • Value type: fixnum
  • Initial value: 13
  • Initargs: setup-frame-size
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: setup-frame-size
Syntax
(setup-frame-size object)
Methods

Slot: setup-timeout
  • Value type: time-type
  • Initial value: 0.05d0
  • Initargs: setup-timeout
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Specifies a timeout when the setting up of the network tree (or level information) is taking place. If a particular node does not receive timely information it might declare it self "not connected" and reports this to the application with a message.

Accessors

Slot Accessor: setup-timeout
Syntax
(setup-timeout object)
Methods

Slot: current-sink
  • Value type: mprings-sink
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: current-sink
Syntax
(current-sink object)
Methods

External Slot: connected-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

External Slot Accessor: connected-p
Syntax
(connected-p instance)
Methods

Slot: tmp-sink
  • Value type: mprings-sink
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Used during setup

Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: net-mac-control-info
Inheritance
Description

Information between routing and MAC which is external to but related to the packet i.e. not carried by a real packet (e.g., what is the next hop, or what was the RSSI for the packet received).

Direct Slots

Slot: rssi
  • Value type: double-float
  • Initial value: NIL
  • Initargs: rssi
  • Allocation: instance
Description

the RSSI of the received packet

Accessors

Slot Accessor: rssi
Syntax
(rssi object)
Methods

Slot: lqi
  • Value type: double-float
  • Initial value: NIL
  • Initargs: lqi
  • Allocation: instance
Description

the LQI of the received packet

Accessors

Slot Accessor: lqi
Syntax
(lqi object)
Methods

Slot: next-hop
  • Value type: integer
  • Initial value: NIL
  • Initargs: next-hop
  • Allocation: instance
Accessors

Slot Accessor: next-hop
Syntax
(next-hop object)
Methods

Slot: last-hop
  • Value type: integer
  • Initial value: NIL
  • Initargs: last-hop
  • Allocation: instance
Accessors

Slot Accessor: last-hop
Syntax
(last-hop object)
Methods

External Class: network
Parameters

None.

Description

Base class for networks. This is the required type for the top-level compound-module of a simulation network and it is required that it has no gate specification. It is specified in the network simulation parameter.

Direct Slots

Internal Slot: gate-slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Indirect Slots

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

External Class: network
Parameters

None.

Description

Base class for networks. This is the required type for the top-level compound-module of a simulation network and it is required that it has no gate specification. It is specified in the network simulation parameter.

Direct Slots

Internal Slot: gate-slots
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Indirect Slots

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: network-control-command
Description

Not documented.

Direct Slots
Indirect Slots

Slot: argument
  • Value type: t
  • Initial value: NIL
  • Initargs: argument
  • Allocation: instance
Description

Additional arguments with command

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name, command
  • Allocation: instance
Description

Command is held as message name

Class: network-control-message
Description

Not documented.

Direct Slots
Indirect Slots

Slot: argument
  • Value type: t
  • Initial value: NIL
  • Initargs: argument
  • Allocation: instance
Description

Additional arguments with command

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name, command
  • Allocation: instance
Description

Control message command name

Class: no-mobility
Parameters

None.

Description

Alias for [[mobility] ] module for no movement for consistency in naming

Direct Slots
Indirect Slots

Slot: static-p
  • Value type: t
  • Initial value: T
  • Initargs: static-p
  • Allocation: instance
Description

If true (default) this the node is static. Subclasses should specialise this appropriately.

Slot: orientation
  • Value type: orientation
  • Initial value: (LENS.WSN::MAKE-ORIENTATION)
  • Initargs: orientation
  • Allocation: instance
Description

Initial orientation for node

Slot: location
  • Value type: coord
  • Initial value: NIL
  • Initargs: location
  • Allocation: instance
Description

Initial location coord for node.

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: node
Parameters
network-address
a t. The network address for this node. Defaults to nodeid
startup-offset
a time-type. Default: 0.0d0. Node offset startup delay in seconds
startup-randomization
a time-type. Default: 0.05d0. Node startup delay randomisation, in seconds
Description

Base class representing sensing motes on a wireless sensor motes. Brings together an array of sensors which received measurements from the physical-processs being sensed, a sensing application on the mote, the communications module receibing messages from the global wireless-channell and implementing the communications protocols, mobility handling mote movement, and a resources module handling energy usages.

Direct Slots

External Slot: owner
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Nodes are owned by the wsn network

Accessors

External Slot Accessor: network
Syntax
(network object)
Methods

External Slot: index
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Nodeid is an integer - the index of the node in the network array of nodes.

Accessors

Slot Accessor: nodeid
Syntax
(nodeid object)
Methods

Slot: network-address
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The network address for this node. Defaults to nodeid

Accessors

Slot Accessor: network-address
Syntax
(network-address object)
Methods

Slot: startup-offset
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Node offset startup delay in seconds

Accessors

Slot Accessor: startup-offset
Syntax
(startup-offset object)
Methods

Slot: startup-randomization
  • Value type: time-type
  • Initial value: 0.05d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Node startup delay randomisation, in seconds

Accessors

Slot Accessor: startup-randomization
Syntax
(startup-randomization object)
Methods
Indirect Slots

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: physical-process
Parameters
description
a string. Text description of a physical process
function
a (eval :type function). Default: =#'(LAMBDA (M C TM) (DECLARE (IGNORE M C TM)) (UNIFORM 0.0 1.0))=. A function measurand, location and time returning measured value. Default is uniform ransom number betwee 0 and 1.
Description

Base class for modules representing physical processes to be measured by a wireless snesor network. Subclasses should specialise measure.

Direct Slots

Slot: description
  • Value type: string
  • Initial value: NIL
  • Initargs: description
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Text description of a physical process

Accessors

Slot Accessor: description
Syntax
(description object)
Methods

Inherited Slot: function
  • Value type: function
  • Initial value: =#'(LAMBDA (LENS.WSN::M LENS.WSN::C LENS.WSN::TM) (DECLARE (IGNORE LENS.WSN::M LENS.WSN::C LENS.WSN::TM)) (UNIFORM 0.0 1.0))=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (format (eval type function))
Description

A function measurand, location and time returning measured value. Default is uniform ransom number betwee 0 and 1.

Accessors

Slot Accessor: physical-process-function
Syntax
(physical-process-function object)
Methods
Indirect Slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: radio
Parameters
address
a integer. MAC address - will default to node index.
parameters-file
a pathname. the file that contains most radio parameters
initial-mode
a symbol. we can choose an rx-mode to begin with. Modes are defined in the RadioParametersFile. nil means use the first mode defined)
state
a symbol. Default: ='RX=. we can choose a radio state to begin with. RX and TX are always there. according to the radio defined we can choose from a different set of sleep states
initial-tx-output-power
a float. we can choose a Txpower to begin with. Possible tx power values are defined in the RadioParametersFile. nil means use the first tx power defined (which is also the highest)
initial-sleep-level
a symbol. we can choose a sleep level which will be used when a transition to SLEEP state is requested. nil means use first level defined (will usually be the fastest and most energy consuming sleep state)
carrier-frequency
a float. Default: 2.4e9. the carrier frequency (in Hz) to begin with.
collision-model
a symbol. Default: ='ADDITIVE-INTERFERENCE-MODEL=. none, simple, additive or advance interference
cca-threshold
a float. Default: -95. the threshold of the RSSI register (in dBm) were above it channel is NOT clear
symbols-for-rssi
a integer. Default: 8. NIL
carrier-sense-interrupt-enabled
a boolean. NIL
max-phy-frame-size
a fixnum. Default: 1024. in bytes
avg-busy-frame
a time-type. Default: 1.0d0. integration time for measuring avg busy time
processing-delay
a time-type. Default: 1.d-5. delay to pass packets/messages/interrupts to upper layer
Description

Radio implementation for WSN networks. The radio characteristics are read from a configuration file specified in the parameters-file parameter. This implements radio interference models by using wireless-signal-start and wireless-signal-end messages from wireless channel to determine if received signal can be passsed up to mac layer. MAC layer packets received for transmission are buffered. radio-command-message messages received from MAC can be used to switch between radio states etc.

Direct Slots

Internal Slot: address
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

MAC address - will default to node index.

Accessors

Slot Accessor: mac-address
Syntax
(mac-address object)
Methods

Slot: parameters-file
  • Value type: pathname
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

the file that contains most radio parameters

Accessors

Slot Accessor: parameters-file
Syntax
(parameters-file object)
Methods

Slot: initial-mode
  • Value type: symbol
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

we can choose an rx-mode to begin with. Modes are defined in the RadioParametersFile. nil means use the first mode defined)

Internal Slot: state
  • Value type: symbol
  • Initial value: ='LENS.WSN:RX=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

we can choose a radio state to begin with. RX and TX are always there. according to the radio defined we can choose from a different set of sleep states

Accessors

Internal Slot Accessor: state
Syntax
(state instance)
Arguments
instance
an object with state handling.
Description

Return current state identifier of instance

Methods

Slot: initial-tx-output-power
  • Value type: float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

we can choose a Txpower to begin with. Possible tx power values are defined in the RadioParametersFile. nil means use the first tx power defined (which is also the highest)

Slot: initial-sleep-level
  • Value type: symbol
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

we can choose a sleep level which will be used when a transition to SLEEP state is requested. nil means use first level defined (will usually be the fastest and most energy consuming sleep state)

Slot: carrier-frequency
  • Value type: float
  • Initial value: 2.4e9
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (units hz)
Description

the carrier frequency (in Hz) to begin with.

Accessors

Slot Accessor: carrier-frequency
Syntax
(carrier-frequency object)
Methods

Slot: encoding
  • Value type: t
  • Initial value: ='LENS.WSN::NRZ=
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: encoding
Syntax
(encoding object)
Methods

Slot: collision-model
  • Value type: symbol
  • Initial value: ='LENS.WSN:ADDITIVE-INTERFERENCE-MODEL=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

none, simple, additive or advance interference

Accessors

Slot Accessor: collision-model
Syntax
(collision-model object)
Methods

Slot: cca-threshold
  • Value type: float
  • Initial value: -95
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

the threshold of the RSSI register (in dBm) were above it channel is NOT clear

Accessors

Slot Accessor: cca-threshold
Syntax
(cca-threshold object)
Methods

Slot: symbols-for-rssi
  • Value type: integer
  • Initial value: 8
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: symbols-for-rssi
Syntax
(symbols-for-rssi object)
Methods

Slot: carrier-sense-interrupt-enabled
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: carrier-sense-interrupt-enabled
Syntax
(carrier-sense-interrupt-enabled object)
Methods

Slot: max-phy-frame-size
  • Value type: fixnum
  • Initial value: 1024
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (units b)
Description

in bytes

Accessors

Slot Accessor: max-phy-frame-size
Syntax
(max-phy-frame-size object)
Methods

Slot: header-overhead
  • Value type: t
  • Initial value: 6
  • Initargs: none
  • Allocation: instance
Description

in bytes - 802.15.4=6bytes

Slot: avg-busy-frame
  • Value type: time-type
  • Initial value: 1.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (units s)
Description

integration time for measuring avg busy time

Accessors

Slot Accessor: avg-busy-frame
Syntax
(avg-busy-frame object)
Methods

Slot: avg-busy
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: avg-busy
Syntax
(avg-busy object)
Methods

External Slot: buffer-size
  • Value type: t
  • Initial value: 16
  • Initargs: none
  • Allocation: instance

Slot: wireless-channel
  • Value type: gate
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Gate to directly send wireless messages to. Messages from the wireless layer will be send direct to fromWireless input gate in radio module

Accessors

Slot Accessor: wireless-channel
Syntax
(wireless-channel object)
Methods

Slot: tx-levels
  • Value type: sequence
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: tx-levels
Syntax
(tx-levels object)
Methods

Slot: rx-modes
  • Value type: sequence
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: rx-modes
Syntax
(rx-modes object)
Methods

Slot: sleep-levels
  • Value type: sequence
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: sleep-levels
Syntax
(sleep-levels object)
Methods

Slot: transitions
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Power and delay for transitions between states stored in p-list of p-lists - access is (getf (getf args to) from)

Accessors

Slot Accessor: transitions
Syntax
(transitions object)
Methods

Slot: tx-level
  • Value type: tx-level
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: tx-level
Syntax
(tx-level object)
Methods

Slot: rx-mode
  • Value type: rx-mode
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: rx-mode
Syntax
(rx-mode object)
Methods

Slot: sleep-level
  • Value type: sleep-level
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: sleep-level
Syntax
(sleep-level object)
Methods

Slot: last-transition-time
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: last-transition-time
Syntax
(last-transition-time object)
Methods

Slot: changing-to-state
  • Value type: radio-state
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

indicates that the Radio is in the middle of changing to a new state

Accessors

Slot Accessor: changing-to-state
Syntax
(changing-to-state object)
Methods

Slot: received-signals
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

a list of signals curently being received

Accessors

Slot Accessor: received-signals
Syntax
(received-signals object)
Methods

Slot: time-of-last-signal-change
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

last time the above list changed

Accessors

Slot Accessor: time-of-last-signal-change
Syntax
(time-of-last-signal-change object)
Methods

Slot: total-power-received
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

a history of recent changes in total received power to help calculate RSSI

Accessors

Slot Accessor: total-power-received
Syntax
(total-power-received object)
Methods

Slot: rssi-integration-time
  • Value type: time-type
  • Initial value: 1.0d0
  • Initargs: none
  • Allocation: instance
Description

span of time the total received power is integrated to calculate RSSI

Accessors

Slot Accessor: rssi-integration-time
Syntax
(rssi-integration-time object)
Methods

Slot: cs-interrupt-message
  • Value type: radio-control-message
  • Initial value: (MAKE-INSTANCE 'LENS.WSN:RADIO-CONTROL-MESSAGE :COMMAND 'LENS.WSN:CARRIER-SENSE-INTERRUPT)
  • Initargs: none
  • Allocation: instance
Description

message that carries a future carrier sense interrupt

Accessors

Slot Accessor: cs-interrupt-message
Syntax
(cs-interrupt-message object)
Methods

Slot: state-transition-message
  • Value type: message
  • Initial value: (MAKE-INSTANCE 'MESSAGE :NAME 'LENS.WSN::STATE-TRANSITION)
  • Initargs: none
  • Allocation: instance
Description

Self message to complete state transmisition

Accessors

Slot Accessor: state-transition-message
Syntax
(state-transition-message object)
Methods

Slot: continue-tx-message
  • Value type: message
  • Initial value: (MAKE-INSTANCE 'MESSAGE :NAME 'LENS.WSN::RADIO-CONTINUE-TX)
  • Initargs: none
  • Allocation: instance
Description

Self message to continue transmitting

Accessors

Slot Accessor: continue-tx-message
Syntax
(continue-tx-message object)
Methods

Slot: state-after-tx
  • Value type: radio-state
  • Initial value: ='LENS.WSN:RX=
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: state-after-tx
Syntax
(state-after-tx object)
Methods

Slot: processing-delay
  • Value type: time-type
  • Initial value: 1.d-5
  • Initargs: processing-delay
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

delay to pass packets/messages/interrupts to upper layer

Accessors

Slot Accessor: processing-delay
Syntax
(processing-delay object)
Methods
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: radio-control-command
Description

Not documented.

Direct Slots
Indirect Slots

Slot: argument
  • Value type: t
  • Initial value: NIL
  • Initargs: argument
  • Allocation: instance
Description

Additional arguments with command

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name, command
  • Allocation: instance
Description

Command is held as message name

Class: radio-control-message
Description

Not documented.

Direct Slots
Indirect Slots

Slot: argument
  • Value type: t
  • Initial value: NIL
  • Initargs: argument
  • Allocation: instance
Description

Additional arguments with command

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name, command
  • Allocation: instance
Description

Control message command name

Class: resources
Parameters
ram-size
a integer. Default: 0. in kB
flash-size
a integer. Default: 0. in kB
flash-write-cost
a integer. Default: 0. in kB
ram-read-cost
a integer. Default: 0. in kB
cpu-power-levels
a list. plist mapping power level names to power
cpu-power-level
a symbol. Current power level - initialised from parameter
clock-drift-sigma
a time-type. Default: 3.d-5. Standard deviation in cpu clock drift
remaining-energy
a double-float. Default: 18720.0d0. In joules - default is 2 AA batteries
baseline-node-power
a real. Default: 0.006. Periodic power consumption
update-interval
a time-type. Default: 1.0d0. Interval for periodic updates in energy
Description

Not documented.

Direct Slots

Slot: ram-size
  • Value type: integer
  • Initial value: 0
  • Initargs: ram-size
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

in kB

Slot: flash-size
  • Value type: integer
  • Initial value: 0
  • Initargs: flash-size
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

in kB

Slot: total-ram-data
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: total-ram-data
Syntax
(total-ram-data object)
Methods

Slot: flash-write-cost
  • Value type: integer
  • Initial value: 0
  • Initargs: flash-write-cost
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

in kB

Slot: ram-read-cost
  • Value type: integer
  • Initial value: 0
  • Initargs: ram-read-cost
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

in kB

Slot: cpu-power-levels
  • Value type: list
  • Initial value: NIL
  • Initargs: cpu-power-levels
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

plist mapping power level names to power

Slot: cpu-power-level
  • Value type: symbol
  • Initial value: NIL
  • Initargs: cpu-power-level
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Current power level - initialised from parameter

Slot: clock-drift-sigma
  • Value type: time-type
  • Initial value: 3.d-5
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Standard deviation in cpu clock drift

Slot: remaining-energy
  • Value type: double-float
  • Initial value: 18720.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

In joules - default is 2 AA batteries

Accessors

Slot Accessor: remaining-energy
Syntax
(remaining-energy object)
Methods

Slot: time-of-last-calculation
  • Value type: time-type
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: baseline-node-power
  • Value type: real
  • Initial value: 0.006
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Periodic power consumption

Slot: current-node-power
  • Value type: float
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: current-node-power
Syntax
(current-node-power object)
Methods

Slot: power-levels
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Last power drawn indexed by module

Accessors

Slot Accessor: power-levels
Syntax
(power-levels object)
Methods

Slot: update-interval
  • Value type: time-type
  • Initial value: 1.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Interval for periodic updates in energy

Accessors

Slot Accessor: update-interval
Syntax
(update-interval object)
Methods

Slot: periodic-update-message
  • Value type: message
  • Initial value: (MAKE-INSTANCE 'MESSAGE :NAME 'LENS.WSN::RESOURCE-PERIODIC-UPDATE)
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: periodic-update-message
Syntax
(periodic-update-message object)
Methods

Slot: clock-drift
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Actual clock drift for this module initialised from clock-drift-sigma parameter.

Accessors

Slot Accessor: clock-drift
Syntax
(clock-drift object)
Methods
Indirect Slots

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: routing
Parameters
max-net-frame-size
a integer. Default: 0. The maximum packet size the routing can handle in bytes (0 for no limit)
Description

Base class for all routing modules. Base implementation Provides checking of maximum frame size allowed

Direct Slots

Slot: max-net-frame-size
  • Value type: integer
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (units b)
Description

The maximum packet size the routing can handle in bytes (0 for no limit)

Accessors

Slot Accessor: max-net-frame-size
Syntax
(max-net-frame-size object)
Methods
Indirect Slots

Slot: header-overhead
  • Value type: integer
  • Initial value: 10
  • Initargs: none
  • Allocation: instance
Description

The overhead added to encapsulated packets in bytes

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

External Slot: buffer-size
  • Value type: integer
  • Initial value: 32
  • Initargs: buffer-size
  • Allocation: instance
Description

Size of TX buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: routing-packet
Description

A generic routing packet header. An app packet will be encapsulated in it. If definining your own routing protocol and need a more specialized packet you have to create one the extends this generic packet. to-mac, enqueue and decapsulate specialisations provided. handle-message implementations which check destination address and forward to application and check frame size etc are provided. .

Direct Slots
Indirect Slots

Slot: sequence-number
  • Value type: t
  • Initial value: NIL
  • Initargs: sequence-number, seqnum
  • Allocation: instance
Description

a field to distinguish between packets

Internal Slot: destination
  • Value type: t
  • Initial value: NIL
  • Initargs: destination
  • Allocation: instance
Description

the destination address of the packet to be sent

Internal Slot: source
  • Value type: t
  • Initial value: NIL
  • Initargs: source
  • Allocation: instance
Description

the source address of the received packet

Slot: header-overhead
  • Value type: t
  • Initial value: 0
  • Initargs: byte-length, header-overhead
  • Allocation: instance
Description

In bytes

External Slot: bit-error-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The result of error modelling after the packet is sent through a channel that has a nonzero packet error rate (PER) or bit error rate (BER). It is up to the receiver to examine this flag after having received the packet, and to act upon it.

Internal Slot: reception-start-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: deliver-on-reception-start
  • Allocation: instance
Description

Identify whether this packet represents the start or the end of the reception after the packet travelled through a channel with a data rate. This flag is controlled by the deliver-on-reception-start flag of the receiving gate.

External Slot: control-info
  • Value type: t
  • Initial value: NIL
  • Initargs: control-info
  • Allocation: instance
Description

Additional data to be passed with packet between protocol layers.

External Slot: duration
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Duration of last transmission

Internal Slot: encapsulated-packet
  • Value type: packet
  • Initial value: NIL
  • Initargs: encapsulated-packet
  • Allocation: instance
Description

Higher level encapsulated protocol packet.

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: scenario-physical-process
Parameters
k
a real. Default: 0.25. multiplicative parameter (k)
a
a real. Default: 1.0. exponential attenuation exponent (a) for values vs distance*/k/
sources
a read. Default: `((,(MAKE-COORD 10.0 10.0) (0.0 . 30.5) (5.0 . 45) (12.0 . 7.3))). List of lists showing how sources evolve over time. Each source is represented as a coordinate and a list of conses of times and values in order.
Description

A Physical process made up of a number of discrete physical sources whose output evolves over time. The effect of multiple sources in a certain point is additive. At a certain location and time the physical process value is given by

\begin{equation} V(p,t) = \sum_{i=\text{all sources}} \frac{V_i(t)}{(K d_i(p_i,t))^a} \end{equation}

where \(V(p,t)\) denotes the value of the physical process at point \(p\) and time \(t\), \(V_i(t)\) denotes the value of the \(i^{th}\) source at time \(t\), \(K\) and \(a\) are specified by module parameters k and a that determine how the value from a source diffused.

Direct Slots

Internal Slot: k
  • Value type: real
  • Initial value: 0.25
  • Initargs: k
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

multiplicative parameter (k)

Internal Slot: a
  • Value type: real
  • Initial value: 1.0
  • Initargs: a
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

exponential attenuation exponent (a) for values vs distance*/k/

Slot: sources
  • Value type: list
  • Initial value: `((,(MAKE-COORD 10.0 10.0) (0.0 . 30.5) (5.0 . 45) (12.0 . 7.3)))
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (format read)
Description

List of lists showing how sources evolve over time. Each source is represented as a coordinate and a list of conses of times and values in order.

Accessors

Slot Accessor: sources
Syntax
(sources object)
Methods
Indirect Slots

Inherited Slot: function
  • Value type: function
  • Initial value: =#'(LAMBDA (LENS.WSN::M LENS.WSN::C LENS.WSN::TM) (DECLARE (IGNORE LENS.WSN::M LENS.WSN::C LENS.WSN::TM)) (UNIFORM 0.0 1.0))=
  • Initargs: none
  • Allocation: instance
Description

A function measurand, location and time returning measured value. Default is uniform ransom number betwee 0 and 1.

Slot: description
  • Value type: string
  • Initial value: NIL
  • Initargs: description
  • Allocation: instance
Description

Text description of a physical process

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: simple-aggregation
Parameters
priority
a t. Default: 1. NIL
sink-network-address
a fixnum. NIL
sample-interval
a time-type. Default: 1. NIL
Description

Application providing an example of sensor reading aggregation with multipath-rings routing. The aggregated value is maximum of its sensor reading and received sensor reading from nodes further away (at higher level) in multipath-rings routing.

Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 5
  • Initargs: none
  • Allocation: instance

Slot: payload-overhead
  • Value type: t
  • Initial value: 100
  • Initargs: none
  • Allocation: instance

Internal Slot: priority
  • Value type: t
  • Initial value: 1
  • Initargs: priority
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Internal Slot Accessor: priority
Syntax
(priority object)
Methods

Slot: sink-network-address
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: sink-network-address
Syntax
(sink-network-address module)
Attributes
module
an application or other wsn-module
Description

Return the address of sink node for reporting applications. Default is sink however some applications take this as a parameter.

Methods

Slot: sample-interval
  • Value type: time-type
  • Initial value: 1
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: request-sample
  • Value type: timer-message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance

Slot: send-aggregated-value
  • Value type: timer-message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance

Slot: waiting-time-for-lower-level-data
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance

Slot: last-sensed-value
  • Value type: real
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance

Slot: aggregated-value
  • Value type: real
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Sequence number of last packet sent

Slot: applicationid
  • Value type: symbol
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
Description

Used to filter packet delivery to specific applications.

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: throughput-test
Parameters
priority
a t. Default: 1. NIL
next-recipient
a read. Default: 0. Destination address for packets produced in this node. This parameter can be used to create an application-level static routing. This way we can have a multi-hop throughput test.
packet-rate
a real. Default: 0. Packets per second
startup-delay
a time-type. Default: 0. Delay in seconds before application starts producing packets
Description

This transmits packets of payload-overhead and header-overhead size and at given packet-rate after specified startup-delay. next-recipient may be used to set up static routing

Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 5
  • Initargs: none
  • Allocation: instance

Slot: payload-overhead
  • Value type: t
  • Initial value: 100
  • Initargs: none
  • Allocation: instance

Internal Slot: priority
  • Value type: t
  • Initial value: 1
  • Initargs: priority
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Internal Slot Accessor: priority
Syntax
(priority object)
Methods

Slot: next-recipient
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (format read)
Description

Destination address for packets produced in this node. This parameter can be used to create an application-level static routing. This way we can have a multi-hop throughput test.

Accessors

Slot Accessor: next-recipient
Syntax
(next-recipient object)
Methods

Slot: packet-rate
  • Value type: real
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Packets per second

Accessors

Slot Accessor: packets-rate
Syntax
(packets-rate object)
Methods

Slot: startup-delay
  • Value type: time-type
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (units s)
Description

Delay in seconds before application starts producing packets

Accessors

Slot Accessor: startup-delay
Syntax
(startup-delay object)
Methods

Slot: packet-spacing
  • Value type: real
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: packet-spacing
Syntax
(packet-spacing object)
Methods

Slot: send-packet
  • Value type: timer-message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Sequence number of last packet sent

Slot: applicationid
  • Value type: symbol
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
Description

Used to filter packet delivery to specific applications.

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: tmac
Parameters
print-state-transitions
a boolean. Debugging parameter
ack-packet-size
a integer. Default: 11. NIL
sync-packet-size
a integer. Default: 11. NIL
rts-packet-size
a integer. Default: 13. NIL
cts-packet-size
a integer. Default: 13. NIL
max-mac-frame-size
a t. Default: 0. NIL
header-overhead
a t. Default: 11. NIL
buffer-size
a t. Default: 32. NIL
max-tx-retries
a integer. Default: 2. This number of transmission attempts of a single unicast packet

that TMAC will perform. A transmission is considered successful only if acknowledgment packet is received from the destination node. Sending an RTS packet is also considered as a transmission attempt. Note that this parameter does not apply to broadcast packets.

allow-sink-sync
a boolean. Default: T. If true allows sink node to start synchronisation immediately to avoid contention interval when creating a synchronisation schedule for the network, thus allowing for faster synchronisation, and consequently, better throughput (especially if packets need to be sent early in the simulation)
use-frts
a boolean. enable/disable FRTS (Future Request To Send). Although in the original TMAC protocol it is not supported here.
use-rts-cts
a boolean. Default: T. Enable/disable RTS/CTS handshake. If disabled (not in orginal TMAC) limits any transmission to a simple DATA - ACK exchange between nodes without the overhead of a reservation. More efficient for small packets.
disable-ta-extension
a boolean. Disabling TA extension effectively creates an SMAC protocol if we also define an appropriate listen interval (10% of the whole frame).
conservative-ta
a boolean. Default: T. Conservative activation timeout - will always stay awake for at least 15 ms after any activity on the radio
resync-time
a time-type. Default: 6.0d0. The interval between broadcasting synchronization packets (in seconds). The value of this parameter is directly related to the clock drift of nodes in the simulation network. 40 seconds is an adequate value to use with current clock drift model.
contention-period
a time-type. Default: 0.01. The duration of contention interval (i.e. interval where transmissions of randomized), in milliseconds, for any transmission attempt. The major effect of this parameter is to avoid transmission interference from neighbouring nodes.
listen-timeout
a time-type. Default: 0.015. The duration of listen timeout(can also be called activation timeout). This parameter defines the amount of time which has to pass without any activity on the wireless channel in order for a node to go to sleep in the current frame.
wait-timeout
a time-type. Default: 0.005. The duration of timeout for expecting a reply from another node. This reply may be a CTS packet or an ACK packet. If no reply is received after this time interval, then transmission attempt is considered failed and transmission attempt counter is decremented.
frame-time
a time-type. Default: 0.61. The length of each frame period for all nodes (in milliseconds). Nodes try to synchronise the start and end of each frame with a global schedule (with the possibility of more than one schedules). Note that this refers to the duration of the whole frame; the active and inactive portions of each frame are determined dynamically and individually for each node.
collision-resolution
a symbol. Default: ='IMMEDIATE-RETRY=. Collision resolution mechanism, choose from
immediate-retry
Low collision avoidance - retry immediately after losing channel)
overhearing
(default). Retry only when hear a CTS or RTS/
retry-next-frame
Aggressive collision avoidance - retry only in next frame.
Description

TMAC employs many techniques to keep the energy consumption low (using aggressive duty cycling and synchronization) while trying to keep performance (e.g. packet delivery) high by adapting its duty cycle according to the traffic needs. S-MAC is a predecessor of TMAC as it initiated many of the techniques but uses a more rigid duty cycle. This implementation is from CASTELIA - see::

Yuri Tselishchev, Athanassios Boulis, Lavy Libman, “Experiences and Lessons from Implementing a Wireless Sensor Network MAC Protocol in the Castalia Simulator,” submitted to IEEE Wireless Communications & Networking Conference 2010 (WCNC 2010), Sydney, Australia.

The parameters for SMAC are defined in the SMAC.ini configuration file.

Direct Slots

Slot: print-state-transitions
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Debugging parameter

Slot: ack-packet-size
  • Value type: integer
  • Initial value: 11
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: sync-packet-size
  • Value type: integer
  • Initial value: 11
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: rts-packet-size
  • Value type: integer
  • Initial value: 13
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: cts-packet-size
  • Value type: integer
  • Initial value: 13
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: max-mac-frame-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: header-overhead
  • Value type: t
  • Initial value: 11
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

External Slot: buffer-size
  • Value type: t
  • Initial value: 32
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: max-tx-retries
  • Value type: integer
  • Initial value: 2
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

This number of transmission attempts of a single unicast packet that TMAC will perform. A transmission is considered successful only if acknowledgment packet is received from the destination node. Sending an RTS packet is also considered as a transmission attempt. Note that this parameter does not apply to broadcast packets.

Slot: allow-sink-sync
  • Value type: boolean
  • Initial value: T
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

If true allows sink node to start synchronisation immediately to avoid contention interval when creating a synchronisation schedule for the network, thus allowing for faster synchronisation, and consequently, better throughput (especially if packets need to be sent early in the simulation)

Slot: use-frts
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

enable/disable FRTS (Future Request To Send). Although in the original TMAC protocol it is not supported here.

Slot: use-rts-cts
  • Value type: boolean
  • Initial value: T
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Enable/disable RTS/CTS handshake. If disabled (not in orginal TMAC) limits any transmission to a simple DATA - ACK exchange between nodes without the overhead of a reservation. More efficient for small packets.

Slot: disable-ta-extension
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Disabling TA extension effectively creates an SMAC protocol if we also define an appropriate listen interval (10% of the whole frame).

Slot: conservative-ta
  • Value type: boolean
  • Initial value: T
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Conservative activation timeout - will always stay awake for at least 15 ms after any activity on the radio

Slot: resync-time
  • Value type: time-type
  • Initial value: 6.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The interval between broadcasting synchronization packets (in seconds). The value of this parameter is directly related to the clock drift of nodes in the simulation network. 40 seconds is an adequate value to use with current clock drift model.

Slot: contention-period
  • Value type: time-type
  • Initial value: 0.01
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The duration of contention interval (i.e. interval where transmissions of randomized), in milliseconds, for any transmission attempt. The major effect of this parameter is to avoid transmission interference from neighbouring nodes.

Slot: listen-timeout
  • Value type: time-type
  • Initial value: 0.015
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The duration of listen timeout(can also be called activation timeout). This parameter defines the amount of time which has to pass without any activity on the wireless channel in order for a node to go to sleep in the current frame.

Slot: wait-timeout
  • Value type: time-type
  • Initial value: 0.005
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The duration of timeout for expecting a reply from another node. This reply may be a CTS packet or an ACK packet. If no reply is received after this time interval, then transmission attempt is considered failed and transmission attempt counter is decremented.

Slot: frame-time
  • Value type: time-type
  • Initial value: 0.61
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The length of each frame period for all nodes (in milliseconds). Nodes try to synchronise the start and end of each frame with a global schedule (with the possibility of more than one schedules). Note that this refers to the duration of the whole frame; the active and inactive portions of each frame are determined dynamically and individually for each node.

Slot: collision-resolution
  • Value type: symbol
  • Initial value: ='LENS.WSN.MAC.TMAC::IMMEDIATE-RETRY=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Collision resolution mechanism, choose from

immediate-retry
Low collision avoidance - retry immediately after losing channel)
overhearing
(default). Retry only when hear a CTS or RTS/
retry-next-frame
Aggressive collision avoidance - retry only in next frame.

Internal Slot: state
  • Value type: tmac-state
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: state
Syntax
(state instance)
Arguments
instance
an object with state handling.
Description

Return current state identifier of instance

Methods

Slot: tx-addr
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

current communication peer (can be BROADCAST)

Slot: tx-retries
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

number of transmission attempts to txAddr (when reaches 0 - packet is dropped)

Slot: primary-wakeup
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

to distinguish between primary and secondary schedules

Slot: need-resync
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

//set to 1 when a SYNC packet has to be sent

Slot: current-frame-start
  • Value type: time-type
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

recorded start time of the current frame

Slot: activation-timeout
  • Value type: time-type
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

time untill MAC_CHECK_TA message arrival

Slot: schedule-table
  • Value type: vector
  • Initial value: (MAKE-ARRAY 8 :ELEMENT-TYPE 'LENS.WSN.MAC.TMAC::TMAC-SCHEDULE :ADJUSTABLE T :FILL-POINTER 0)
  • Initargs: none
  • Allocation: instance
Description

TMAC Schedule table (list of effective schedules)

Slot: sync-packet
  • Value type: tmac-sync-packet
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: rts-packet
  • Value type: tmac-rts-packet
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: cts-packet
  • Value type: tmac-cts-packet
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: ack-packet
  • Value type: tmac-ack-packet
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: transmission-timeout
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance

Slot: check-ta
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance

Slot: carrier-sense
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: radio
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: address
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

MAC address - will default to nodeid.

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: tuneable-mac
Parameters
duty-cycle
a float. Default: 1.0. The fraction of time that the node stays on listening to the channe;: listening / (sleeping+listening)
listen-interval
a time-type. Default: 0.01. This is the time the node stays on listening each cycle.
beacon-interval-fraction
a float. Default: 1.0. This parameter expresses the fraction of the maximum beacon interval (= sleeping interval) that our beacon interval actually is. The smaller this is the less energy we spend, but the less chance we have to wake up a neighbour.
probability-tx
a float. Default: 1.0. The probability of a single try of Transmission to happen. This value combined with the number of retransmissions can create any expected number of transmissions per node, even non integer values.
num-tx
a integer. Default: 1. Number of times we try to retransmit something.
random-tx-offset
a time-type. Default: 0.0d0. We start transmitting after time chosen randomly from interval [0..randomTxOffset]
retx-interval
a time-type. Default: 0.0d0. Interval between retransmissions.
backoff-type
a symbol. Default: ='CONSTANT=. Determines how backoff-interval is determine. Can be sleep-interval, constant, multiplying (e.g. 1*a, 2*a, 3*a, 4*a …),or exponential (e.g. 2, 4, 8, 16, 32…)
backoff-base-value
a time-type. Default: 0.016d0. Base backoff time interval. See also parameter backoff-type
csma-persistence
a (number :min 0 :max 1 :coerce-to float). Default: 0. Value in range [0..1], 0 is CSMA non-persistent, p-persistent, or 1-persistent?
tx-all-packets-in-free-channel
a boolean. Default: T. If true, if you find the channel free, transmit all packets in buffer
sleep-during-backoff
a boolean. For no dutyCycle case: sleep when backing off
beacon-frame-size
a integer. Default: 125. Have a big beacon, to avoid much processing overhead, but fit at least 2 in the listening interval
Description

A highly tuneable MAC protocol implementation with broadcast communication in mind (it does not support unicast, acknowledgements or RTC/CTS control packets). It can be tuned in regards to its persistence and backing off policies. It can also be used to duty cycle the radio and to transmit an appropriate train of beacons before each data transmission to wake up potential receivers (since the nodes are not aligned in their sleeping schedules). It also provides several other parameterized functions such as retransmissions, probabilistic transmission, and randomized TX offsets.

Default parameter values will result in non-persistent CSMA-CA behaviour with no radio duty cycling.

Most parameters can be controlled by the application using mac-control-message messages with the commands set-duty-cycle, set-listen-interval, set-beacon-interval-fraction, set-prob-tx, set-random-tx-offset, set-retx-interval, set-backoff-type, set-backoff-base-value. See the associated module parameters for semantics and arguments.

Direct Slots

Slot: duty-cycle
  • Value type: float
  • Initial value: 1.0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The fraction of time that the node stays on listening to the channe;: listening / (sleeping+listening)

Accessors

Slot Accessor: duty-cycle
Syntax
(duty-cycle object)
Methods

Slot: listen-interval
  • Value type: time-type
  • Initial value: 0.01
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

This is the time the node stays on listening each cycle.

Accessors

Slot Accessor: listen-interval
Syntax
(listen-interval object)
Methods

Slot: beacon-interval-fraction
  • Value type: float
  • Initial value: 1.0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

This parameter expresses the fraction of the maximum beacon interval (= sleeping interval) that our beacon interval actually is. The smaller this is the less energy we spend, but the less chance we have to wake up a neighbour.

Accessors

Slot Accessor: beacon-interval-fraction
Syntax
(beacon-interval-fraction object)
Methods

Slot: probability-tx
  • Value type: float
  • Initial value: 1.0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

The probability of a single try of Transmission to happen. This value combined with the number of retransmissions can create any expected number of transmissions per node, even non integer values.

Accessors

Slot Accessor: probability-tx
Syntax
(probability-tx object)
Methods

Slot: num-tx
  • Value type: integer
  • Initial value: 1
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Number of times we try to retransmit something.

Accessors

Slot Accessor: num-tx
Syntax
(num-tx object)
Methods

Slot: random-tx-offset
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

We start transmitting after time chosen randomly from interval [0..randomTxOffset]

Accessors

Slot Accessor: random-tx-offset
Syntax
(random-tx-offset object)
Methods

Slot: retx-interval
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Interval between retransmissions.

Accessors

Slot Accessor: retx-interval
Syntax
(retx-interval object)
Methods

Slot: backoff-type
  • Value type: symbol
  • Initial value: ='LENS.WSN:CONSTANT=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Determines how backoff-interval is determine. Can be sleep-interval, constant, multiplying (e.g. 1*a, 2*a, 3*a, 4*a …),or exponential (e.g. 2, 4, 8, 16, 32…)

Accessors

Slot Accessor: backoff-type
Syntax
(backoff-type object)
Methods

Slot: backoff-base-value
  • Value type: time-type
  • Initial value: 0.016d0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Base backoff time interval. See also parameter backoff-type

Accessors

Slot Accessor: backoff-base-value
Syntax
(backoff-base-value object)
Methods

Slot: csma-persistence
  • Value type: float
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (format (number min 0 max 1 coerce-to float))
Description

Value in range [0..1], 0 is CSMA non-persistent, p-persistent, or 1-persistent?

Accessors

Slot Accessor: csma-persistence
Syntax
(csma-persistence object)
Methods

Slot: tx-all-packets-in-free-channel
  • Value type: boolean
  • Initial value: T
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

If true, if you find the channel free, transmit all packets in buffer

Accessors

Slot Accessor: tx-all-packets-in-free-channel
Syntax
(tx-all-packets-in-free-channel object)
Methods

Slot: sleep-during-backoff
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

For no dutyCycle case: sleep when backing off

Accessors

Slot Accessor: sleep-during-backoff
Syntax
(sleep-during-backoff object)
Methods

Slot: header-overhead
  • Value type: t
  • Initial value: 9
  • Initargs: none
  • Allocation: instance

Slot: beacon-frame-size
  • Value type: integer
  • Initial value: 125
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Have a big beacon, to avoid much processing overhead, but fit at least 2 in the listening interval

Accessors

Slot Accessor: beacon-frame-size
Syntax
(beacon-frame-size object)
Methods

External Slot: buffer-size
  • Value type: t
  • Initial value: 32
  • Initargs: none
  • Allocation: instance

Slot: max-mac-frame-size
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

Internal Slot: state
  • Value type: tuneable-mac-state
  • Initial value: ='LENS.WSN.MAC.TUNEABLE::DEFAULT=
  • Initargs: none
  • Allocation: instance
Accessors

Internal Slot Accessor: state
Syntax
(state instance)
Arguments
instance
an object with state handling.
Description

Return current state identifier of instance

Methods

Slot: num-tx-tries
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: num-tx-tries
Syntax
(num-tx-tries object)
Methods

Slot: backoff-times
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Description

number of consequtive backoff times

Accessors

Slot Accessor: backoff-times
Syntax
(backoff-times object)
Methods

Slot: remaining-beacons-to-tx
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: remaining-beacons-to-tx
Syntax
(remaining-beacons-to-tx object)
Methods

Slot: sleep-interval
  • Value type: time-type
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: sleep-interval
Syntax
(sleep-interval object)
Methods

Slot: sleep-listen-timer
  • Value type: message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: sleep-listen-timer
Syntax
(sleep-listen-timer object)
Methods

Slot: start-cs-timer
  • Value type: message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE :NAME 'LENS.WSN.MAC.TUNEABLE::START-CS-TIMER)
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: start-cs-timer
Syntax
(start-cs-timer object)
Methods

Slot: attempt-tx-timer
  • Value type: message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE :NAME 'LENS.WSN.MAC.TUNEABLE::ATTEMPT-TX-TIMER)
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: attempt-tx-timer
Syntax
(attempt-tx-timer object)
Methods

Slot: send-beacons-or-data-timer
  • Value type: message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE :NAME 'LENS.WSN.MAC.TUNEABLE::SEND-BEACONS-OR-DATA-TIMER)
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: send-beacons-or-data-timer
Syntax
(send-beacons-or-data-timer object)
Methods
Indirect Slots

Slot: radio
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: address
  • Value type: integer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

MAC address - will default to nodeid.

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance

Slot: packet-history
  • Value type: history-buffer
  • Initial value: =(MAKE-INSTANCE 'HISTORY-BUFFER :ELEMENT-TYPE 'PACKET :KEY #'(LAMBDA (LENS.WSN::P) (CONS (LENS.WSN:SOURCE LENS.WSN::P) (LENS.WSN:SEQUENCE-NUMBER LENS.WSN::P))))=
  • Initargs: none
  • Allocation: instance
Description

received packet history buffer

Internal Slot: buffer
  • Value type: packet-buffer
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

TX buffer

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: value-propagation
Parameters
temp-threshold
a t. Default: 15. NIL
Description

Application class which will continually sample sensors and will transmit maximum of its sensor reading or received sensor reading once over the network.

Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 8
  • Initargs: none
  • Allocation: instance

Slot: payload-overhead
  • Value type: t
  • Initial value: 2
  • Initargs: none
  • Allocation: instance

Slot: temp-threshold
  • Value type: t
  • Initial value: 15
  • Initargs: temp-threshold
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: total-packets
  • Value type: fixnum
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: total-packets
Syntax
(total-packets object)
Methods

Slot: current-max-received-value
  • Value type: float
  • Initial value: -1000.0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: current-max-received-value
Syntax
(current-max-received-value object)
Methods

Slot: current-max-sensed-value
  • Value type: float
  • Initial value: -1000.0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: current-max-sensed-value
Syntax
(current-max-sensed-value object)
Methods

Slot: sent-once
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: the-value
  • Value type: float
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: the-value
Syntax
(the-value object)
Methods
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Sequence number of last packet sent

Internal Slot: priority
  • Value type: integer
  • Initial value: 1
  • Initargs: priority
  • Allocation: instance
Description

What priority to give the application packets

Slot: applicationid
  • Value type: symbol
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
Description

Used to filter packet delivery to specific applications.

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: value-reporting
Parameters
sink-network-address
a fixnum. NIL
max-sample-interval
a time-type. Default: 60.0. NIL
min-sample-interval
a time-type. Default: 1.0. NIL
Description

Document class which will continually sample sensors and send data to sink-network-address over network

Direct Slots

Slot: sink-network-address
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Accessors

Slot Accessor: sink-network-address
Syntax
(sink-network-address module)
Attributes
module
an application or other wsn-module
Description

Return the address of sink node for reporting applications. Default is sink however some applications take this as a parameter.

Methods

Slot: header-overhead
  • Value type: t
  • Initial value: 8
  • Initargs: none
  • Allocation: instance

Slot: payload-overhead
  • Value type: t
  • Initial value: 12
  • Initargs: none
  • Allocation: instance

Slot: max-sample-interval
  • Value type: time-type
  • Initial value: 60.0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: min-sample-interval
  • Value type: time-type
  • Initial value: 1.0
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil

Slot: routing-level
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: last-sensed-value
  • Value type: real
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: sent-once
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: random-back-off-interval-fraction
  • Value type: real
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: request-sample
  • Value type: timer-message
  • Initial value: (MAKE-INSTANCE 'TIMER-MESSAGE)
  • Initargs: none
  • Allocation: instance
Indirect Slots

Slot: last-sequence-number
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Sequence number of last packet sent

Internal Slot: priority
  • Value type: integer
  • Initial value: 1
  • Initargs: priority
  • Allocation: instance
Description

What priority to give the application packets

Slot: applicationid
  • Value type: symbol
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
Description

Used to filter packet delivery to specific applications.

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: wireless-channel
Parameters
cell-size
a coord. Default: (MAKE-COORD 5.0 5.0 1.0). Size of cells in each dimension (for mobility)
signal-delivery-threshold
a real. Default: -100.0. threshold in dBm above which, wireless channel module is delivering signal messages to radio modules of individual nodes
Description

The wireless channel module simulates the wireless medium. Nodes sent packets to it and according to various conditions (fading, interference etc) it is decided which nodes can receive this packet.

Direct Slots

Internal Slot: cell-size
  • Value type: coord
  • Initial value: (MAKE-COORD 5.0 5.0 1.0)
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Size of cells in each dimension (for mobility)

Accessors

Internal Slot Accessor: cell-size
Syntax
(cell-size object)
Methods

Slot: field
  • Value type: coord
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

wireless coverage field (may be larger than network field

Accessors

Slot Accessor: field
Syntax
(field object)
Methods

Slot: signal-delivery-threshold
  • Value type: real
  • Initial value: -100.0
  • Initargs: signal-delivery-threshold
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

threshold in dBm above which, wireless channel module is delivering signal messages to radio modules of individual nodes

Accessors

Slot Accessor: signal-delivery-threshold
Syntax
(signal-delivery-threshold object)
Methods

Slot: temporal-model
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

the temporal channel variation model

Accessors

Slot Accessor: temporal-model
Syntax
(temporal-model object)
Methods

Slot: max-tx-power
  • Value type: real
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
Accessors

Slot Accessor: max-tx-power
Syntax
(max-tx-power object)
Methods

Slot: receivers
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

an array of lists of receiver gateways affected by ongoing transmission.

Accessors

Slot Accessor: receivers
Syntax
(receivers object)
Methods

Internal Slot: cells
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

an array of cell entities with node occupation and path-loss to other cells

Accessors

Internal Slot Accessor: cells
Syntax
(cells object)
Methods

Slot: location-cells
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Cached location cell by node instance

Indirect Slots

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: wsn
Inheritance
Parameters
field
a coord. Default: (MAKE-COORD 30.0d0 30.0d0). Size of network deployment field
num-nodes
a fixnum. Default: 30. Number of nodes in network
num-physical-processes
a fixnum. Default: 1. Number of physical processes
deployment
a read. Default: ='UNIFORM=. Node deployment specification. See mobility module on valid values for this and it's semantics.
Description

Network for all Wirelesss sensor networks bringing together a wireless-channel, a set of sensing nodes representing motes and a number of physical-processs being sensed..

Direct Slots

Slot: field
  • Value type: coord
  • Initial value: (MAKE-COORD 30.0d0 30.0d0)
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Size of network deployment field

Accessors

Slot Accessor: field
Syntax
(field object)
Methods

Slot: num-nodes
  • Value type: fixnum
  • Initial value: 30
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Number of nodes in network

Accessors

Slot Accessor: num-nodes
Syntax
(num-nodes object)
Methods

Slot: num-physical-processes
  • Value type: fixnum
  • Initial value: 1
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: nil
Description

Number of physical processes

Accessors

Slot Accessor: num-physical-processes
Syntax
(num-physical-processes object)
Methods

Slot: deployment
  • Value type: list
  • Initial value: ='UNIFORM=
  • Initargs: none
  • Allocation: instance
  • Parameter: t
  • Properties: (format read)
Description

Node deployment specification. See mobility module on valid values for this and it's semantics.

Accessors

Slot Accessor: deployment
Syntax
(deployment object)
Methods
Indirect Slots

Internal Slot: channels
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Internal Slot: submodules
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: wsn-module
Parameters

None.

Description

wsn-modules represent all modules inside a node on thenetwork. They inherit timers from with-timers however the timers use get-simulation-time so that they take account of clock drift on the node (see the resources module). They subscribe to the node-shutdown and node-startup event signals to startup and shutdown the module All submodules of a node will receive this signal. For shutdown modules disabled-p is true.

Direct Slots

External Slot: disabled-p
  • Value type: t
  • Initial value: T
  • Initargs: disabled-p
  • Allocation: instance
Description

True if module is disabled (does not receive messages)

Accessors

External Slot Accessor: disabled-p
Syntax
(disabled-p object)
Methods
Indirect Slots

Internal Slot: timers
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Active Timers which aren't cached in slots

Internal Slot: gate-slots
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash table mapping gate names to gate-slot instances as specified in the :gates slot option in the class specification of subclasses.

External Slot: initialized-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

True if this component has been initialized.

External Slot: rng-map
  • Value type: array
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

RNG map for this component

Internal Slot: collect-trace-info
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

If true tracelog outputs will be traced for this component.

Internal Slot: properties
  • Value type: t
  • Initial value: NIL
  • Initargs: properties
  • Allocation: instance
Description

Per instance property list

Internal Slot: has-ancestor-listeners
  • Value type: simple-bit-vector
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have ancestor listeners.

Internal Slot: has-local-listeners
  • Value type: simple-bit-vector
  • Initial value: (MAKE-ARRAY +SIGNAL-CACHE-SIZE+ :ELEMENT-TYPE 'BIT :INITIAL-ELEMENT 0)
  • Initargs: none
  • Allocation: instance
Description

A bit map recording which signals have local listeners.

Internal Slot: signal-table
  • Value type: hash-table
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
Description

Hash by signal of lists of registered listeners for this entity.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

Class: wsn-packet
Inheritance
Description

Base class for network and link layer packets. Have a source and destination address relevant to the protocol layer and a header-overhead. Also provides sequence-number for identifying packets.

Direct Slots

Slot: header-overhead
  • Value type: t
  • Initial value: 0
  • Initargs: byte-length, header-overhead
  • Allocation: instance
Description

In bytes

Accessors

Slot Accessor: header-overhead
Syntax
(header-overhead object)
Methods

Internal Slot: source
  • Value type: t
  • Initial value: NIL
  • Initargs: source
  • Allocation: instance
Description

the source address of the received packet

Accessors

Internal Slot Accessor: source
Syntax
(source object)
Methods

Internal Slot: destination
  • Value type: t
  • Initial value: NIL
  • Initargs: destination
  • Allocation: instance
Description

the destination address of the packet to be sent

Accessors

Internal Slot Accessor: destination
Syntax
(destination object)
Methods

Slot: sequence-number
  • Value type: t
  • Initial value: NIL
  • Initargs: sequence-number, seqnum
  • Allocation: instance
Description

a field to distinguish between packets

Accessors

Slot Accessor: sequence-number
Syntax
(sequence-number object)
Methods
Indirect Slots

External Slot: bit-error-p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The result of error modelling after the packet is sent through a channel that has a nonzero packet error rate (PER) or bit error rate (BER). It is up to the receiver to examine this flag after having received the packet, and to act upon it.

Internal Slot: reception-start-p
  • Value type: boolean
  • Initial value: NIL
  • Initargs: deliver-on-reception-start
  • Allocation: instance
Description

Identify whether this packet represents the start or the end of the reception after the packet travelled through a channel with a data rate. This flag is controlled by the deliver-on-reception-start flag of the receiving gate.

External Slot: control-info
  • Value type: t
  • Initial value: NIL
  • Initargs: control-info
  • Allocation: instance
Description

Additional data to be passed with packet between protocol layers.

External Slot: duration
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: none
  • Allocation: instance
Description

Duration of last transmission

Internal Slot: encapsulated-packet
  • Value type: packet
  • Initial value: NIL
  • Initargs: encapsulated-packet
  • Allocation: instance
Description

Higher level encapsulated protocol packet.

External Slot: timestamp
  • Value type: time-type
  • Initial value: 0.0d0
  • Initargs: timestamp
  • Allocation: instance
Description

Utility time stamp field for user

Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or Gate which finally receices message (after a delay if appropriate)

Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Module or gate from which message was originally sent.

External Slot: creation-time
  • Value type: time-type
  • Initial value: (SIMULATION-TIME)
  • Initargs: none
  • Allocation: instance
Description

The creation time of the message. With cloned messages (see duplicate later), the creation time of the original message is returned and not the time of the cloning operation. This is particularly useful when modeling communication protocols, because many protocols clone the transmitted packages to be able to do retransmissions and/or segmentation/reassembly.

External Slot: root-event
  • Value type: event
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

Top level root for cloned messages

Internal Slot: schedule-id
  • Value type: integer
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Used to ensure events with same time and priority are scheduled in order of scheduling

Internal Slot: priority
  • Value type: fixnum
  • Initial value: 0
  • Initargs: priority
  • Allocation: instance
Description

Determines delivery of messages with same arrival time

External Slot: arrival-time
  • Value type: time-type
  • Initial value: -1.0d0
  • Initargs: time
  • Allocation: instance
Description

simulation time at which event is to be handled

External Slot: sent-time
  • Value type: double-float
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
Description

The simulation time the message was sent.

Internal Slot: rank
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
Description

Rank in priority queue - used internally for efficient removal from queue.

External Slot: owner
  • Value type: named-object
  • Initial value: NIL
  • Initargs: owner
  • Allocation: instance
Description

Object which owns this in object heirarchy

External Slot: index
  • Value type: fixnum
  • Initial value: NIL
  • Initargs: index
  • Allocation: instance
Description

Position in an object vector (if it is in an object array)

External Slot: name
  • Value type: symbol
  • Initial value: NIL
  • Initargs: name
  • Allocation: instance
Description

Name of this object - used when addressing the object internally or through simulation paramaters.

5.3.2 External Structures

Structure: cell
Description

An area of radio coverage with the list of nodes wthin it and a list of path-loss records to other cells.

Slots

External Slot: coord
  • Value type: coord
  • Initial value: (MAKE-COORD)
  • Initargs: none
  • Allocation: instance

Slot: occupation
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

Slot: path-loss
  • Value type: list
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

5.3.3 External Types

Type: radio-control-command-name

The allowed radio control commands

5.3.4 External Constants

Constant: broadcast-mac-address
Value
-1

Type: fixnum

Description

Not documented.

Constant: broadcast-network-address
Value
-1

Type: fixnum

Description

Not documented.

5.3.5 External Global Variables

External Variable: network
Value
NIL

Type: null

Description

Network name for current run

External Variable: network
Value
NIL

Type: null

Description

Network name for current run

5.3.6 External Functions

Function: applicationid
Syntax
(applicationid object)
Description

Not documented.

Function: argument
Syntax
(argument object)
Description

Not documented.

Function: attempt-tx
Syntax
(attempt-tx module &optional description)
Arguments
module
a wsn-module (usually a mac instance)
description
a string
Description

Attempt to transmit next packet in packet-buffer from module. Description added to tracelog if present.

Function: bits-per-symbol
Syntax
(bits-per-symbol entity)
Description

Not documented.

Internal Function: buffer
Syntax
(buffer object)
Description

Not documented.

External Function: buffer-size
Syntax
(buffer-size object)
Description

Not documented.

External Function: buffer-size
Syntax
(buffer-size object)
Description

Not documented.

Function: channel-clear-status
Syntax
(channel-clear-status radio)
Description

Not documented.

Function: clock-drift
Syntax
(clock-drift object)
Description

Not documented.

Function: collision-model
Syntax
(collision-model object)
Description

Not documented.

Function: command
Syntax
(command object)
Description

Not documented.

Function: data-rate
Syntax
(data-rate entity)
Arguments
entity
a radio or mac-base instance
Description

Return the physical layer data rate in bps - needed by mac layer to determine transmission times etc.

Function: deployment
Syntax
(deployment object)
Description

Not documented.

Function: description
Syntax
(description object)
Description

Not documented.

Internal Function: destination
Syntax
(destination object)
Description

Not documented.

External Function: disabled-p
Syntax
(disabled-p object)
Description

Not documented.

External Function: disabled-p
Syntax
(disabled-p object)
Description

Not documented.

External Function: exponential
Syntax
(exponential mean &optional (rng 0))
Arguments
mean
a real number
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate double float from the exponential distribution with the given mean mean (that is, with parameter lambda=1/mean/) from random number stream rng in the current context.

External Function: exponential
Syntax
(exponential mean &optional (rng 0))
Arguments
mean
a real number
Optional Arguments
rng
an integer (default 0)
Description

Returns a random variate double float from the exponential distribution with the given mean mean (that is, with parameter lambda=1/mean/) from random number stream rng in the current context.

Function: field
Syntax
(field object)
Description

Not documented.

Function: get-clock
Syntax
(get-clock instance)
Arguments
module
a wsn-module
Description

Return local value for absolute time taking account of the clock drift for the local clock as determined by the resources module.

Function: get-simulation-time
Syntax
(get-simulation-time module local-time)
Arguments
module
a wsn-module
local-time
a time-type
Description

Convert a time value local-time value into a simulation time taking account of the clock drift for the local clock as determined by the resources module.

Function: handle-control-command
Syntax
(handle-control-command module command argument)
Arguments
module
a wsn-module representation a communications protocol
command
a symbol representing the control command.
argument
a list of other arguments associated with this command
Description

Communications protocol modules should specialise this to receive and handle control commands from higher layers.

Function: handle-sensor-reading
Syntax
(handle-sensor-reading application measurement)
Arguments
application
a application
measurement
a measurement or a real
Description

Called to pass a measured value from a sensor to an application module. It must be specialised for all applications which

Must be implemented by applications to handle sensor readings

Function: header-overhead
Syntax
(header-overhead object)
Description

Not documented.

Function: last-hop
Syntax
(last-hop object)
Description

Not documented.

Function: last-sequence-number
Syntax
(last-sequence-number object)
Description

Not documented.

Function: location
Syntax
(location object)
Description

Not documented.

Function: lqi
Syntax
(lqi object)
Description

Not documented.

Function: mac-address
Syntax
(mac-address object)
Description

Not documented.

Function: max-mac-frame-size
Syntax
(max-mac-frame-size object)
Description

Not documented.

Function: max-net-frame-size
Syntax
(max-net-frame-size object)
Description

Not documented.

Function: measure
Syntax
(measure physical-process measurand location time)
Arguments
physical-process
a physical-process
measurand
a http://www.lispworks.com/reference/HyperSpec//symbol signifying what is being measured
location
a coord
time
a time-type
Description

Return the real value of specified measurand from a physical process at given time and location. Must be specialised for all physical-processs.

External Function: network
Syntax
(network object)
Description

Not documented.

External Function: network
Syntax
(network object)
Description

Not documented.

Function: network-address
Syntax
(network-address object)
Description

Not documented.

Function: next-hop
Syntax
(next-hop object)
Description

Not documented.

Function: next-sequence-number
Syntax
(next-sequence-number instance)
Arguments
instance
a module
Description

Returns the next packet sequence number to be used by a source module.

Function: node
Syntax
(node module)
Arguments
module
a wsn-module
Description

Return the parent node module for module/.

Function: nodeid
Syntax
(nodeid object)
Description

Not documented.

Function: nodes
Syntax
(nodes network)
Arguments
network
a network
Description

Returns a vector of all nodes in the wireless sensor network.

Function: num-nodes
Syntax
(num-nodes object)
Description

Not documented.

Function: packet-history
Syntax
(packet-history object)
Description

Not documented.

Function: packet-size
Syntax
(packet-size application data)
Arguments
application
an application module
data
application data
Description

Returns the size in bytes to be used as the byte-length of application packets sent by application when sending data. Default implementation returns the sum of the header-overhead and payload-overhead parameters of the application.

Function: parent-network-address
Syntax
(parent-network-address entity)
Attributes
entity
an application or other wsn-module
Description

Return the address of parent node for aggregation applications. Default is parent however some applications take this as a parameter.

Function: payload
Syntax
(payload object)
Description

Not documented.

Function: payload-overhead
Syntax
(payload-overhead object)
Description

Not documented.

Function: physical-process
Syntax
(physical-process object)
Description

Not documented.

Internal Function: priority
Syntax
(priority object)
Description

Not documented.

Function: radio
Syntax
(radio object)
Description

Not documented.

Function: ram-store
Syntax
(ram-store instance num-bytes)
Description

Record the change in use of ram

Function: read-rssi
Syntax
(read-rssi radio)
Description

Not documented.

Function: resolve-network-address
Syntax
(resolve-network-address routing network-address)
Arguments
routing
a routing module
network-address
a network-address designator
Description

Return resolved mac address from given network address

Function: rssi
Syntax
(rssi object)
Description

Not documented.

Function: sensor-request
Syntax
(sensor-request application &optional (sensor-index 0))
Arguments
application
a application
Optional Arguments
sensor-index
an integer (default 0)
Description

Sends a request for a reading from application to the sensor indicated by sensor-index. There may be a delay in the reading. The application must implement handle-sensor-reading to receive the returned measured value.

Function: sequence-number
Syntax
(sequence-number object)
Description

Not documented.

Function: set-state
Syntax
(set-state instance state &optional description)
Arguments
instance
an module with state handling.
state
a new state identifier
description
a string description of reason for state change.
Description

For modules with the [print-state-transitions] parameter and the state slot update the state slot to new value and if print-state-transitions is true print the change using tracelog. description may be used to add comments for tracing.

Function: shutdown
Syntax
(shutdown module)
Arguments
module
a wsn-module
Description

Called to shutdown a module when it receives the node-shutdown signal.

Function: sink-network-address
Syntax
(sink-network-address module)
Attributes
module
an application or other wsn-module
Description

Return the address of sink node for reporting applications. Default is sink however some applications take this as a parameter.

Function: sink-p
Syntax
(sink-p entity)
Attributes
entity
an application or other wsn-module
Description

Return true if an application (or router) is on a sink node

Inherited Function: sleep
Syntax
(sleep seconds)
Description

This function causes execution to be suspended for SECONDS. SECONDS may be any non-negative real number.

Inherited Function: sleep
Syntax
(sleep seconds)
Description

This function causes execution to be suspended for SECONDS. SECONDS may be any non-negative real number.

Function: sleep-interval
Syntax
(sleep-interval object)
Description

Not documented.

Internal Function: source
Syntax
(source object)
Description

Not documented.

Function: startup
Syntax
(startup module)
Arguments
module
a wsn-module
Description

Called to start a module when it receives the node-startup signal.

Internal Function: state
Syntax
(state instance)
Arguments
instance
an object with state handling.
Description

Return current state identifier of instance

Function: symbol-length
Syntax
(symbol-length entity)
Arguments
entity
a radio or mac-base
Description

Return the duration in bit lengths of physical layer symbols.

Function: to-mac
Syntax
(to-mac routing entity &optional next-hop-mac-address)
Arguments
routing
a routing implementation
entity
a message or communications-control-command
next-hop-mac-address
MAC address for MAC layer to forward to
Description

Send entity from routing to mac layer module.

Function: to-network
Syntax
(to-network application entity &optional destination)
Arguments
application
an application or mac
entity
a application-packet or communications-control-command from an application or routing-packet from a mac
Optional Arguments
destination
a network routing destination address
Description

Send message, packet or data to a routing module. This may be an application-packet or communications-control-command from an application module.

Function: to-radio
Syntax
(to-radio mac entity)
Arguments
mac
a mac module instance
entity
a radio-control-command or mac-packet or a cons of a control command and arguments
Description

Send a packet or control command to a radio module via the radio gate.

Function: transition-delay
Syntax
(transition-delay entity state1 state2)
Arguments
entity
a state machine
state1
a state representation
state2
a state representation
Description

Return the delay for the transition from state1 to state2 for entity.

Function: tx-time
Syntax
(tx-time entity no-octets)
Arguments
entity
a radio or mac module
no-octets
an integer or mac-packet
Description

Return the transmission time for no-octets octets or a packet from entity taking account of transmission rate.

Function: wireless-channel
Syntax
(wireless-channel object)
Description

Not documented.

5.4 Ambiguous Symbols

5.4.1 Wireless-Channel

Disambiguation.

5.4.2 Radio

Disambiguation.

5.4.3 Physical-Process

Disambiguation.

5.4.4 Node

Disambiguation.

5.4.5 Network

Disambiguation.

5.5 Index

A B C D E F G H L M N P R S T V W

5.5.5 E

5.5.6 F

5.5.7 G

6 Colophon

This documentation was generated from Common Lisp source code using CLOD, version 1.0. The latest version of CLOD is available here.

Footnotes:

1 This is a substantial difference from OMNET were all behaviour had to be in simple modules and a common pattern was to have to create simple modules that would then modify the connectivity in their parent compound modules

2 Another significant difference from OMNET++ where the parameters were declared in the ned files and had to be explicitely read in the C++ implementation code to configure the modules.

Date: 2014-04-24 13:14:20 BST

Author: Dr. John A.R. Williams

Org version 7.8.02 with Emacs version 23

Validate XHTML 1.0