C# Класс Brunet.Simulator.Simulator

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
BrunetNamespace string
CurrentNetworkSize int
NCEnable bool
Nodes NodeMapping>.SortedList
SimBroadcastHandler Brunet.Messaging.SimpleFilter
SimBroadcastPType Brunet.Util.PType
StartingNetworkSize int
TakenIDs NodeMapping>.SortedList

Защищенные свойства (Protected)

Свойство Тип Описание
_broken double
_ca_cert Brunet.Security.Certificate
_dtls bool
_parameters Parameters
_pathing bool
_rand System.Random
_se_key System.Security.Cryptography.RSACryptoServiceProvider
_secure_edges bool
_secure_senders bool
_start bool

Открытые методы

Метод Описание
AddNode ( ) : Node

Add a new (random) node to the simulation.

AddNode ( int id, AHAddress address ) : Node

Add a new specific node to the simulation.

AreConnected ( Node node0, Node node1 ) : bool
CheckRing ( bool log ) : bool

Performs a crawl of the network using the ConnectionTable of each node.

Complete ( bool quiet ) : bool
Disconnect ( ) : void

Disconnects all the nodes in the simulator.

FindMissing ( bool log ) : List

Returns a list of missing nodes, while crawling the simulation. This is an example of a PassiveTask.

PrintConnectionState ( ) : void
PrintConnections ( ) : void

Prints all the connections for the nodes in the simulator.

PrintConnections ( Node node ) : void
RandomNode ( ) : NodeMapping
RemoveNode ( Node node, bool cleanly, bool output ) : void
RemoveNode ( bool cleanly, bool output ) : void
Revoke ( bool log ) : NodeMapping

Revoke a random node from a random node.

Simulator ( Parameters parameters ) : System

Защищенные методы

Метод Описание
CreateEdgeListener ( int id ) : EdgeListener

Return the SimulationEdgeListener.

GenerateAddress ( ) : AHAddress

Generate a new unique address, there is potential for collissions when we make the address space small.

GetRemoteTAs ( ) : List

Return a small list of random TAs.

PrepareNode ( int id, AHAddress address ) : StructuredNode
Simulator ( Parameters parameters, bool start ) : System
Start ( ) : void
TakeID ( ) : int

Remove and return the next ID from availability.

Описание методов

AddNode() публичный Метод

Add a new (random) node to the simulation.
public AddNode ( ) : Node
Результат Node

AddNode() публичный Метод

Add a new specific node to the simulation.
public AddNode ( int id, AHAddress address ) : Node
id int
address Brunet.Symphony.AHAddress
Результат Node

AreConnected() статический публичный Метод

static public AreConnected ( Node node0, Node node1 ) : bool
node0 Node
node1 Node
Результат bool

CheckRing() публичный Метод

Performs a crawl of the network using the ConnectionTable of each node.
public CheckRing ( bool log ) : bool
log bool
Результат bool

Complete() публичный Метод

public Complete ( bool quiet ) : bool
quiet bool
Результат bool

CreateEdgeListener() защищенный Метод

Return the SimulationEdgeListener.
protected CreateEdgeListener ( int id ) : EdgeListener
id int
Результат Brunet.Transport.EdgeListener

Disconnect() публичный Метод

Disconnects all the nodes in the simulator.
public Disconnect ( ) : void
Результат void

FindMissing() публичный Метод

Returns a list of missing nodes, while crawling the simulation. This is an example of a PassiveTask.
public FindMissing ( bool log ) : List
log bool
Результат List

GenerateAddress() защищенный Метод

Generate a new unique address, there is potential for collissions when we make the address space small.
protected GenerateAddress ( ) : AHAddress
Результат Brunet.Symphony.AHAddress

GetRemoteTAs() защищенный Метод

Return a small list of random TAs.
protected GetRemoteTAs ( ) : List
Результат List

PrepareNode() защищенный Метод

protected PrepareNode ( int id, AHAddress address ) : StructuredNode
id int
address Brunet.Symphony.AHAddress
Результат Brunet.Symphony.StructuredNode

PrintConnectionState() публичный Метод

public PrintConnectionState ( ) : void
Результат void

PrintConnections() публичный Метод

Prints all the connections for the nodes in the simulator.
public PrintConnections ( ) : void
Результат void

PrintConnections() публичный Метод

public PrintConnections ( Node node ) : void
node Node
Результат void

RandomNode() публичный Метод

public RandomNode ( ) : NodeMapping
Результат NodeMapping

RemoveNode() публичный Метод

public RemoveNode ( Node node, bool cleanly, bool output ) : void
node Node
cleanly bool
output bool
Результат void

RemoveNode() публичный Метод

public RemoveNode ( bool cleanly, bool output ) : void
cleanly bool
output bool
Результат void

Revoke() публичный Метод

Revoke a random node from a random node.
public Revoke ( bool log ) : NodeMapping
log bool
Результат NodeMapping

Simulator() публичный Метод

public Simulator ( Parameters parameters ) : System
parameters Parameters
Результат System

Simulator() защищенный Метод

protected Simulator ( Parameters parameters, bool start ) : System
parameters Parameters
start bool
Результат System

Start() защищенный Метод

protected Start ( ) : void
Результат void

TakeID() защищенный Метод

Remove and return the next ID from availability.
protected TakeID ( ) : int
Результат int

Описание свойств

BrunetNamespace публичное свойство

public string BrunetNamespace
Результат string

CurrentNetworkSize публичное свойство

public int CurrentNetworkSize
Результат int

NCEnable публичное свойство

public bool NCEnable
Результат bool

Nodes публичное свойство

public SortedList Nodes
Результат NodeMapping>.SortedList

SimBroadcastHandler публичное свойство

public SimpleFilter,Brunet.Messaging SimBroadcastHandler
Результат Brunet.Messaging.SimpleFilter

SimBroadcastPType публичное статическое свойство

public static PType,Brunet.Util SimBroadcastPType
Результат Brunet.Util.PType

StartingNetworkSize публичное свойство

public int StartingNetworkSize
Результат int

TakenIDs публичное свойство

public SortedList TakenIDs
Результат NodeMapping>.SortedList

_broken защищенное свойство

protected double _broken
Результат double

_ca_cert защищенное свойство

protected Certificate,Brunet.Security _ca_cert
Результат Brunet.Security.Certificate

_dtls защищенное свойство

protected bool _dtls
Результат bool

_parameters защищенное свойство

protected Parameters,Brunet.Simulator _parameters
Результат Parameters

_pathing защищенное свойство

protected bool _pathing
Результат bool

_rand защищенное свойство

protected Random,System _rand
Результат System.Random

_se_key защищенное свойство

protected RSACryptoServiceProvider,System.Security.Cryptography _se_key
Результат System.Security.Cryptography.RSACryptoServiceProvider

_secure_edges защищенное свойство

protected bool _secure_edges
Результат bool

_secure_senders защищенное свойство

protected bool _secure_senders
Результат bool

_start защищенное свойство

protected bool _start
Результат bool