indexpreviousnext

file name: evalcfg.hpp, evalcfg.cpp
classification: evaluation
contents: configuration data
use: provides macros, variables and structures necessary for configuring the simulation
 

global items used:


global items provided:

#define NO_PRINTEVENT: If the macro is defined, then evalsys does not print out events. However, it still prints the byte order of the client at the beginning, and it shows the configuration data and the precision summary after the simulation run. Defining the macro is useful if you do not need the raw event output, but do not want to redirect cout (because you are interested in the configuration data or the precision summary).

#define PLOT_DATA: If the macro is defined, then evalsys saves the state of the simulation in files. The files are generated in the directory PLOT_DIR. If the macro is not empty, then the directory must exist, otherwise evalsys will report that it could not open a file and will abort.

const INT32 numberOfNodes: The number of nodes in the system. In our case, the number of nodes equals the number of CSAs, because we only use one area on each node (to simplify the configuration in evalsys.cpp).

const INT32 numberOfNetworks: The number of networks in the system. It should be 1 for pure simulation, 0 in hardware-based simulation.
Note: if there is more than one network, the first one is used as the associated network.

const SEvalsysConfigData evalsysConfigData: contains all data evalsys needs to handle the simulation.

const SSimutcConfigData simutcConfigData: contains all data necessary to configure the simulation.
 

struct SEvalsysConfigData:

This structure contains all constants the evaluation needs to set up the simulation and to work with it. It does not contain any simulation specific constants.

int BlockTime: The time (in seconds) the ReceiveMessage() function blocks when waiting for the header of a message.

INT32 FirstSyncPrecisionRound: Evalsys traces the synchronization rounds of the simulation. It starts to collect precision data from the snapshots if the simulation is at least in the round FirstSyncPrecisionRound.

int MaskSize: The size of the event mask used in SEventReport.

int NodeArea: The area of the nodes. Currently, you can only have one area per node.

int NumberOfMessages: Maximum number of messages that are received from the simulation. If the constant is exceeded, the simulation is stopped (killed).
Note: multiply this constant with the SelectTimeout to get the number of seconds evalsys will delay before killing a simulation that does not send any messages.

int NumberOfRounds: Maximum number of simulation rounds that evalsys waites before it stops the simulation. A round is defined as the reception of an event of type RoundEvent from the CSA with the nodeID RoundNodeID and the area RoundArea. If the constant is exceeded, the simulation is stopped (killed) and evalsys exits.

int RoundArea: The area of the node used for counting the simulation rounds.

EEvent RoundEvent: The event that causes the round counter to be incremented. Only use events that are sent periodically by the CSA you have selected in RoundNodeID and RoundArea.

SINT32 RoundNodeID: The ID of the node used for counting the simulation rounds. You have to make sure that the node you select periodically sends the event you are using to count the rounds (p.e., if RoundEvent is set to ClockUpdate, then you should not use a P-node.

int SelectTimeout: The time (in seconds) SelectSocket() waits for one of the supervisor sockets to become readable.

int SnapshotArea: The area of the CSA used for triggering snapshots.

SINT32 SnapshotNodeID: The ID of the CSA used for triggering snapshots.

double SnapshotPeriod: The period (in seconds) of the supervisor that triggers periodic snapshots. This value overrides SNodeConfigData::SupervisorPeriod.

SEvalsysConfigData(): The constructor sets all values. Set the members here if you want to set your own configuration data.
 

struct SControllerConfigData:

This structure contains the configuration data for the simulation controller.

double ControllerPeriod: The period of the controller in seconds. This value affects how fast the controller reacts to user commands and how often it sends network events to the evaluation. In in pure simulation, the value is not very important.

INT32 EventClasses: Contains all enabled event classes.

INT32 Events: Contains all enabled events.

SControllerConfigData(): The constructor sets all values. Set the members here if you want to set your own configuration data.
 

struct SCommonNodeConfigData:

This structure contains all node configuration data that is the same for all nodes.

int DelayCycles: Every delayCycles-th message does delay measurement.
The parameter is sent to module ClockSync.

int NumberOfFaultyNodes: Maximum number of faulty nodes.
The parameter is sent to module ClockSync.

int NumberOfNodes: Number of nodes in the system.
The parameter is sent to module ClockSync.

int RateCycles: Every rateCycles-th message sends rate synchronization data.
The parameter is sent to module ClockSync.

double RoundPeriod: Period of a synchronization round in seconds.
The parameter is sent to module ClockSync.

EAlgorithmType SynchronizationAlgorithm: The synchronization algorithm that should be used.
The parameter is sent to module ClockSync.

SCommonNodeConfigData(): The constructor sets all values. Set the members here if you want to set your own configuration data.
 

struct SSpecificNodeConfigData:

This structure contains node specific configuration data. The default values are that of an S-node, any P-Node specific changes are done in the ctor of SSimutcConfigData.

INT32 Accuracy: Initial clock accuracy (one value for both accuracies). The value contains the UTCSU bits S:[-8,-38] of both accuracies.
The parameter is sent to module Clock.

double AmortizationDuration: The duration of a clock amortization phase (in seconds).
The parameter is sent to module Clock.

double ClockDrift: The static drift of the clock. SimUTC does only accept the parameter in pure simulation.
The parameter is sent to module Clock.

double CompDelayCompensation: The computation delay compensation (algorithm execution time) in seconds.
The parameter is sent to module ClockSync.

INT8 ConnectedGpus: The GPUs of the UTCSU which have GPS receivers connected to them. This is a binary representation, so if a receiver is connected to GPU1, bit 1<<GPU1 is set in connectedGpus. This value is not directly sent to the Clock module, but for each GPU that is set, command ConnectGps is called.

double DmaxRecvLance: The maximum delay of incoming messages in seconds.
The parameter is sent to module Lance.

double DmaxSendLance: The maximum delay of outgoing messages in seconds.
The parameter is sent to module Lance.

double DelayCompensation: The delay compensation (of network transmission times) in seconds.
The parameter is sent to module ClockSync.

INT32 EventClasses: Contains all enabled event classes.
The parameter is sent to module Supervisor.

INT32 Events: Contains all enabled events.
The parameter is sent to module Supervisor.

INT32 Macrostamp, Timestamp: Initial clock value.
The parameters are sent to module Clock.

double ProbClockCrash: Probability of "crashing" the clock (i.e., the clock stops counting).
The parameter is sent to module Clock.

double ProbClockRecover: Probability of recovering a crashed clock.
The parameter is sent to module Clock.

double ProbDriftChange: Probability that the clock drift changes.
The parameter is sent to module Clock.

double ProbFastDrift: Probability that the clock drift changes to a fast value.
The parameter is sent to module Clock.

double ProbLanceCrash: Probability of a node crash.
The parameter is sent to module Lance.

double ProbLanceRecover: Probability of node recovery after a crash.
The parameter is sent to module Lance.

double ProbLanceRecvDuplicate: Probability of duplicating an incoming message.
The parameter is sent to module Lance.

double ProbLanceSendDuplicate: Probability of duplicating an outgoing message.
The parameter is sent to module Lance.

double ProbLanceRecvScramble: Probability of scrambling an incoming message.
The parameter is sent to module Lance.

double ProbLanceSendScramble: Probability of scrambling an outgoing message.
The parameter is sent to module Lance.

double ProbReadFault: Probability that a read fault occurs.
The parameter is sent to module Clock.

double ProbSlowDrift: Probability that the clock drift changes to a slow value.
The parameter is sent to module Clock.

double ProbWriteFault: Probability that a write fault occurs.
The parameter is sent to module Clock.

double RhoMinus: Lower bound on the regular clock drift (the worst case bound for faulty drift is taken from WcRhoMinus).
The parameter is sent to module Clock.

double RhoPlus: Upper bound on the regular clock drift (the worst case bound for faulty drift is taken from WcRhoPlus).
The parameter is sent to module Clock.

double SupervisorPeriod: The period of the supervisor in seconds. Like the controller period, it affects how the supervisor reacts to user commands and how often it sends CSA events to the evaluation. If a node triggers snapshot, then SEvalsysConfigData::SnapshotPeriod overrides this value. In pure simulation, the value is not very important.
The parameter is sent to module Supervisor.

double WobbleAddRangeMax:
double WobbleAddRangeMin: The bounds of the interval from which the additional drift should be chosen (it is taken from this interval with Uniform distribution).
The parameters are sent to module Clock.

double WobblePeriod: The period of drift wobbling (in seconds).
The parameter is sent to module Clock.

double WobbleRhoMinus: The lower bound on the drift during wobbling.
The parameter is sent to module Clock.

double WobbleRhoPlus: The upper bound on the drift during wobbling.
The parameter is sent to module Clock.

SSpecificNodeConfigData(): The constructor sets all values. Set the members here if you want to set your own configuration data.
 

struct SNetworkConfigData:

This structure contains all network configuration data.

SINT32 DefaultCINetwork: The associated network in hardware. The value is always used if numberOfNetworks is zero. It should be set to the CI network interface number. In pure simulation, the value is ignored.

double Delta: Deterministic part of the transmission delay (in seconds).

double Dmax: Maximum transmission delay of late messages (in seconds).

double Dmin: Minimum transmission delay of early messages (in seconds).

double EpsilonMinus: Indeterministic lower part of the transmission delay (in seconds).

double EpsilonPlus: Indeterministic upper part of the transmission delay (in seconds).

double Lambda: Broadcast delay (in seconds).

int NumberOfNetworks: The number of simulated networks. It should be always 1 in pure simulation, 0 in hardware-based simulation.
Note: if there is more than one network, the first one is used as the associated network.

double Omega: Broadcast operation delay (in seconds).

double ProbNetCrash: Probability of a network crash.

double ProbNetEarly: Probability of early messages.

double ProbNetLate: Probability of late messages.

double ProbNetRecover: Probability of network recovery.

SNetworkConfigData(): The constructor sets all values. Set the members here if you want to set your own configuration data.
 

struct SSimutcConfigData:

This structure contains all data of the simulation.

SCommonNodeConfigData commonNodeData: Data common to all nodes.

SControllerConfigData controllerData: Controller data.

SNetworkConfigData networkData: Network data.

SSpecificNodeConfigData *nodeData: Array of node specific data.

EBool nodesDiffer: If it is True, then the ctor has configured some nodes differently from the others. This causes PrintConfiguration() to print the configuration data of every single node. If nodeDiffer is False, then it only prints the configuration data of the first node and assumes that all nodes are configured like that.

SSimutcConfigData(): The ctor creates the array objects and can be used to override some of the node specific defaults. Use this function to configure some nodes differently.

~SSimutcConfigData(): The dtor deletes the array objects.
 

local items used:

const double TwoPowMinus16: The value of 2-16.
 
 


last modified: Fri Feb 5 18:56:15 1999