Class SimCountry
java.lang.Object
|
+--Country
|
+--SimCountry
- public class SimCountry
- extends Country
Simulated Country object. This object knows the state of Country Object
and it can produce the necessary state update messages for required
attributes to the RTI so that other interested federates can receive
these updates.
Constructor Summary |
SimCountry(RTIcap.RTIambassador _rtiAmb,
HelloWorld _father,
int _ObjectID)
|
SimCountry(RTIcap.RTIambassador _rtiAmb,
HelloWorld _father,
java.lang.String _name,
double _initialPopulation,
int _ObjectID)
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
grRate
double grRate
rtiAmb
RTIcap.RTIambassador rtiAmb
boss
HelloWorld boss
sendNameUpdateFlag
boolean sendNameUpdateFlag
sendPopuUpdateFlag
boolean sendPopuUpdateFlag
nameChanged
boolean nameChanged
popuChanged
boolean popuChanged
SimCountry
public SimCountry(RTIcap.RTIambassador _rtiAmb,
HelloWorld _father,
int _ObjectID)
SimCountry
public SimCountry(RTIcap.RTIambassador _rtiAmb,
HelloWorld _father,
java.lang.String _name,
double _initialPopulation,
int _ObjectID)
UpdateTime
public final void UpdateTime(double time)
- After each time adavancement in the Main simulation loop,
this method will be invoked. So that object can update its state,
and broadcast its updates if it is necessary.
UpdateName
public final void UpdateName(java.lang.String cntName)
UpdatePopulation
public final void UpdatePopulation(double newPop)
UpdateControls
public final void UpdateControls(boolean status,
short[] theAttributes)
- turnUpdates[On/Off]ForObjectInstance in HwFederateAmbassador uses
this method to tell this object to start sending attribute updates.
setNameChanged
public final void setNameChanged()
resetNameChanged
public final void resetNameChanged()
isNameChanged
public final boolean isNameChanged()
setPopuChanged
public final void setPopuChanged()
resetPopuChanged
public final void resetPopuChanged()
isPopuChanged
public final boolean isPopuChanged()