A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
python-unit-tests.TestSimulator Class Reference

TestSimulator class. More...

Inheritance diagram for python-unit-tests.TestSimulator:
Collaboration diagram for python-unit-tests.TestSimulator:

Public Member Functions

 testAttributes (self)
 Test attributes function.
 testCommandLine (self)
 Test command line.
 testConfig (self)
 Test configuration.
 testEchoServerApplication (self)
 Test python-based application.
 testIdentity (self)
 Test identify.
 testSchedule (self)
 Test schedule.
 testScheduleDestroy (self)
 Test schedule destroy.
 testScheduleNow (self)
 Test schedule now.
 testScheduleWithContext (self)
 Test schedule with context.
 testSocket (self)
 Test socket.
 testSubclass (self)
 Test subclass.
 testTimeComparison (self)
 Test time comparison.
 testTimeNumericOperations (self)
 Test numeric operations.
 testTypeId (self)
 Test type ID.

Public Attributes

 m_socket
 Socket used by the server to listen to port.
 port = port
 Listen port for the server.

Protected Attributes

 _args_received = list(map(lambda x: x.decode("utf-8"), args))
 args
 _cb_time = ns.Simulator.Now()
 current time
 _context_received = context
 context
 _received_packet = None
 received packet

Private Attributes

bool __python_owns__ = False
 python_owns flag indicates that Cppyy should not manage the lifetime of this variable

Detailed Description

TestSimulator class.

Definition at line 25 of file python-unit-tests.py.

Member Function Documentation

◆ testAttributes()

python-unit-tests.TestSimulator.testAttributes ( self)

Test attributes function.

Parameters
selfthis object
Returns
None

Definition at line 227 of file python-unit-tests.py.

◆ testCommandLine()

python-unit-tests.TestSimulator.testCommandLine ( self)

Test command line.

Parameters
selfthis object
Returns
None

Definition at line 287 of file python-unit-tests.py.

◆ testConfig()

python-unit-tests.TestSimulator.testConfig ( self)

Test configuration.

Parameters
selfthis object
Returns
None

Definition at line 180 of file python-unit-tests.py.

◆ testEchoServerApplication()

python-unit-tests.TestSimulator.testEchoServerApplication ( self)

Test python-based application.

Parameters
selfthis object
Returns
None

Definition at line 337 of file python-unit-tests.py.

◆ testIdentity()

python-unit-tests.TestSimulator.testIdentity ( self)

Test identify.

Parameters
selfthis object
Returns
None

Definition at line 258 of file python-unit-tests.py.

◆ testSchedule()

python-unit-tests.TestSimulator.testSchedule ( self)

Test schedule.

Parameters
selfthis object
Returns
None

Definition at line 64 of file python-unit-tests.py.

References _args_received, and _cb_time.

◆ testScheduleDestroy()

python-unit-tests.TestSimulator.testScheduleDestroy ( self)

Test schedule destroy.

Parameters
selfthis object
Returns
None

Definition at line 93 of file python-unit-tests.py.

References _args_received, and _cb_time.

◆ testScheduleNow()

python-unit-tests.TestSimulator.testScheduleNow ( self)

Test schedule now.

Parameters
selfthis object
Returns
None

Definition at line 35 of file python-unit-tests.py.

◆ testScheduleWithContext()

python-unit-tests.TestSimulator.testScheduleWithContext ( self)

Test schedule with context.

Parameters
selfthis object
Returns
None

Definition at line 125 of file python-unit-tests.py.

◆ testSocket()

python-unit-tests.TestSimulator.testSocket ( self)

Test socket.

Parameters
self
Returns
None

Definition at line 188 of file python-unit-tests.py.

◆ testSubclass()

python-unit-tests.TestSimulator.testSubclass ( self)

Test subclass.

Parameters
selfthis object
Returns
None

Definition at line 321 of file python-unit-tests.py.

◆ testTimeComparison()

python-unit-tests.TestSimulator.testTimeComparison ( self)

Test time comparison.

Parameters
selfthis object
Returns
None

Definition at line 158 of file python-unit-tests.py.

◆ testTimeNumericOperations()

python-unit-tests.TestSimulator.testTimeNumericOperations ( self)

Test numeric operations.

Parameters
selfthis object
Returns
None

Definition at line 169 of file python-unit-tests.py.

◆ testTypeId()

python-unit-tests.TestSimulator.testTypeId ( self)

Test type ID.

Parameters
selfthis object
Returns
None

Definition at line 275 of file python-unit-tests.py.

Member Data Documentation

◆ __python_owns__

bool python-unit-tests.TestSimulator.__python_owns__ = False
private

python_owns flag indicates that Cppyy should not manage the lifetime of this variable

Definition at line 390 of file python-unit-tests.py.

◆ _args_received

python-unit-tests.TestSimulator._args_received = list(map(lambda x: x.decode("utf-8"), args))
protected

args

Definition at line 46 of file python-unit-tests.py.

Referenced by testSchedule(), and testScheduleDestroy().

◆ _cb_time

python-unit-tests.TestSimulator._cb_time = ns.Simulator.Now()
protected

current time

Definition at line 47 of file python-unit-tests.py.

Referenced by testSchedule(), and testScheduleDestroy().

◆ _context_received

python-unit-tests.TestSimulator._context_received = context
protected

context

Definition at line 137 of file python-unit-tests.py.

◆ _received_packet

python-unit-tests.TestSimulator._received_packet = None
protected

received packet

Definition at line 197 of file python-unit-tests.py.

◆ m_socket

python-unit-tests.TestSimulator.m_socket
Initial value:
= ns.Socket.CreateSocket(
node, ns.TypeId.LookupByName("ns3::UdpSocketFactory")
)

Socket used by the server to listen to port.

Definition at line 394 of file python-unit-tests.py.

◆ port

python-unit-tests.TestSimulator.port = port

Listen port for the server.

Definition at line 392 of file python-unit-tests.py.


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