

file name: structs.hpp, structs.cpp
classification: simulation
contents: SApplClockEvent, SApplCommand, SApplCrashEvent, SApplDelayEstimationEvent,
SApplDelayEvent, SApplDistribution, SApplEvent, SApplGpsEvent, SApplNetEvent,
SApplPreloadEvent, SApplRateEvent, SApplRecvMsgEvent, SApplSendMsgEvent,
SApplTimeEvent, SApplWobbleDrift, SBase, SBooleanReply, SCommand, SDoubleReply,
SEnumSizes, SEvent, SEventReport, SGpsConnectCommand, SModuleBase, SNetCrashEvent,
SNetDistribution, SNetDistributionP2P, SNetEvent, SNetMessageEvent, SNetworkCommand,
SNetworkConnectCommand, SNetworkCreateCommand, SNetworkData, SNetworkParameter,
SParameter, SRateData, SReply, SSingleNetworkParameter, SSingleParameter,
STimeParameter, STransmissionData
use: contains all structures used in communication with the
evaluation system
Note: all structures have a member size as their first
item, which must be set to the size of the structure. If new classes are
derived, all constructors must include the statement size=sizeof(*this);.
Note: all structures should only have public members. If you
also include protected or private members, the ordering of these members
depends on the compiler and it is not guaranteed anymore that member size
is located at the base address of the structure.
Note: most structures just have some members that can be set.
Only structure SEventReport is a little bit more complex (see
below).
global items used by the structures:
inheritance relations:
SBase
-
SNetworkCommand
-
SNetworkCreateCommand
-
SApplEvent
-
SApplClockEvent
-
SApplCrashEvent
-
SApplDelayEstimationEvent
-
SApplGpsEvent
-
SApplNetEvent
-
SApplRateEvent
-
SApplSendMsgEvent
-
SApplTimeEvent
-
SNetEvent
-
SNetCrashEvent
-
SNetMessageEvent
-
SNetworkParameter
-
SNetDistribution
-
SSingleNetworkParameter
-
SSingleParameter
-
STimeParameter
structure internas:
struct SApplCommand : derived
from SCommand
-
SINT32 nodeID: the node identifier of the application.
-
int area: the area of the application.
struct SApplClockEvent : derived
from SApplEvent
-
STimestamp newTime: the new value of the clock if it is set anew.
struct SApplCrashEvent : derived
from SApplEvent
-
EBool crashed: True if the module has crashed, False if it has
recovered.
struct SApplDelayEstimationEvent
: derived from SApplEvent
-
SINT32 networkID: the ID of the network for which the transmission
delay was measured.
-
SINT32 sender: the ID of the node whose message transmission times
are estimated
-
SDelay delay: the new transmission delay data that was computed
struct SApplDelayEvent : derived
from SApplRecvMsgEvent
-
STimestamp delaytime: the transmission delay of the message, measured
with clock of event sender.
struct SApplDistribution :
derived from SParameter
-
SRandomData data: the data necessary to draw random values.
struct SApplEvent : derived
from SEvent
-
STimestamp clockTime: the current value of the clock.
-
SINT32 nodeID: the node identifier of the application.
-
int area: the area of the UTCSU.
struct SApplGpsEvent : derived from
SApplEvent
-
double diff: the difference of the GPS time from the clock time.
struct SApplNetEvent : derived
from SApplEvent
-
SINT32 networkID: the network identifier of the network belonging
to the event.
struct SApplPreloadEvent :
derived from SApplClockEvent
-
double loadAt: the clock time at which the amortization starts.
struct SApplRateEvent : derived from
SApplEvent
-
EBool input: is True if the interval is used as input to the rate
algorithm, False if it is the result of the rate algorithm.
-
SRate rate: the rate interval (thetaMinus, thetaPlus, U) itself.
-
double refPoint: the reference point of the rate interval.
struct SApplRecvMsgEvent :
derived from SApplSendMsgEvent
-
INT32 msgID: the number of the message sent by this CSA.
-
SINT32 receiver: the node ID of the receiver, or -1 for a broadcast
message.
struct SApplSendMsgEvent :
derived from SApplEvent
-
INT32 msgID: the number of the message sent by this CSA.
-
SINT32 receiver: the node ID of the receiver, or -1 for a broadcast
message.
struct SApplTimeEvent : derived
from SApplEvent
-
EBool input: is True if the interval is used as input to the convergence
function, False if it is the result of the CV.
-
STimeInterval interval: the time interval (low bound, high bound,
reference point) itself.
struct SApplWobbleDrift : derived
from SApplDistribution
-
double period: time in seconds between two wobble modifications
-
double rhoMax: upper bound on the clock drift during wobbling
-
double rhoMin: lower bound on the clock drift during wobbling
struct SBase
-
INT32 size: the size of the structure. It must be set to sizeof(*this)
in every constructor, but should not be modified by the application. Do
not change the type of this member, class CStreamInterface
expects this type.
struct SBooleanReply : derived
from SReply
-
EBool result: the result of the parameter or command from the evaluation.
-
SBooleanReply (EBool res): sets the reply type to ReplyBoolean,
result
to res. Of course, the constructor also sets the
size
member.
struct SCommand : derived from SModuleBase
-
ESystemCommand type: the type of the command.
struct SDoubleReply : derived from
SReply
-
double value: the value that is transmitted with the reply.
-
SDoubleReply (double val): sets the reply type to ReplyDouble,
value
to val. Of course, the constructor also sets the
size
member.
struct SEnumSizes : derived from SBase
-
INT8 sizedouble: the size of built-in type double.
-
INT8 sizeint: the size of built-in type int.
-
INT8 sizeEBool: the size of enumeration type EBool.
-
INT8 sizeEEvent: the size of enumeration type EEvent.
-
INT8 sizeGpsUnit: the size of enumeration type EGpsUnit.
-
INT8 sizeEModule: the size of enumeration type EModule.
-
INT8 sizeEReplyType: the size of enumeration type EReplyType.
-
INT8 sizeESystemCommand: the size of enumeration type ESystemCommand.
-
INT8 sizeESystemParameter: the size of enumeration type ESystemParameter.
-
SEnumSizes(): sets all members to their appropriate values.
struct SEvent : derived from SModuleBase
-
EEvent type: the type of the event that is reported
-
double time: global timestamp of the report. The global time is
read in function CControllingObject::NoteEvent()
and is specified in seconds.
struct SEventReport : derived from
SSingleParameter
used for accessing event and event class bitmasks
EBool set: Is True if the bit should be set to True, False if
it should be set to False. If a complete mask is being set (masksize
is positive, this member is ignored.
INT32 masksize: The size of the mask. Set this member to zero
if you want to set a single bit.
char mask[EventCount/8+1]: Stores the bitmask. If masksize
is zero, this member should be ignored.
Note: it is assumed that there are more events than event classes!
SEventReport (): sets set to False (and of course
sets the size member).
void Set (EEvent event, EBool on): Sets set to on,
and stores the event in inherited member value. The type
is set to EventReport, and masksize
is set to 0.
void Set (EEventClass eventClass, EBool on): Sets set
to on, and stores the event class in inherited member value.
The type is set to EventClassReport,
and masksize is set to 0.
void Set (ESystemParameter eventType, void *map, INT32 s):
Copies s bytes of map into the internal mask
and sets the type to eventType. If member mask
is less than s bytes large, if eventType is neither EventReport
nor EventClassReport, or if map is NULL,
an assert fails.
void Get (EBool& on) const: Copies the value of set
into on.
void Get (SINT32& value) const: Copies the value of inherited
member value into the parameter value.
struct SGpsConnectCommand
: derived from SCommand
-
EGpsUnit gpu: the GPS unit.
struct SModuleBase : derived from
SBase
-
EModule module: the module reporting the event.
struct SNetCrashEvent : derived
from SNetEvent
-
EBool crashed: True if the network has crashed, False if it has
recovered.
struct SNetDistribution : derived
from SNetworkParameter
-
SRandomData data: the data necessary to draw random values.
struct SNetDistributionP2P
: derived from SNetDistribution
-
SINT32 sender: the sender nodeID of a message.
-
SINT32 receiver: the receiver nodeID of a message.
struct SNetEvent : derived from
SEvent
-
SINT32 networkID: the identifier of the network that has sent
the event.
struct SNetMessageEvent : derived
from SNetEvent
-
SINT32 sender: the node ID of the sender of the message.
-
SINT32 area: the area of the sender.
-
SINT32 receiver: the node ID of the receiver.
-
SINT32 msgID: the number of the message.
struct SNetworkCommand : derived
from SCommand
-
SINT32 networkID: the identifier of the network.
struct SNetworkConnectCommand
: derived from SNetworkCommand
-
SINT32 nodeID: the identifier of the node that is to be connected.
struct SNetworkCreateCommand
: derived from SCommand
-
ENetworkType networkType: type of the network
struct SNetworkData : derived from
SSingleNetworkParameter
-
SINT32 sender: the identifier of the sender node.
-
SINT32 receiver: the identifier of the receiver node.
struct SNetworkParameter :
derived from SParameter
-
SINT32 networkID: needed for determining which network is meant.
struct SParameter : derived from SModuleBase
-
ESystemParameter type: the parameter type
struct SRateData : derived from STransmissionData
-
int area: the area of the UTCSU.
struct SReply : derived from SModuleBase
-
EReplyType type: the type of the reply.
struct SSingleNetworkParameter
: derived from SNetworkParameter
-
double value: the value of the parameter.
struct SSingleParameter : derived
from SParameter
-
double value: the parameter value.
struct STimeParameter : derived
from SParameter
-
INT32 macrostamp: the macrostamp of the clock.
-
INT32 timestamp: the timestamp of the clock.
struct STransmissionData :
derived from SParameter
-
SINT32 networkID: needed for determining which network is meant
-
SINT32 nodeID: specify the node itself
-
double value: the value of the parameter
last modified: Fri Feb 5 18:56:37 1999