Package org.see.skf.core
Class SEEAbstractFederate
java.lang.Object
org.see.skf.core.SKBaseFederate
org.see.skf.core.SEEAbstractFederate
- All Implemented Interfaces:
SKFederateInterface
- Direct Known Subclasses:
SEELateJoinerFederate
A complete federate implementation for SEE. It contains the necessary of methods needed for a SpaceFOM federate.
Depending on the role of the federate i.e., early or late joiner, these methods must be called in the sequence put
forth in the SpaceFOM standard.
- Since:
- 1.5
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSEEAbstractFederate(SEEFederateAmbassador federateAmbassador, org.see.skf.conf.FederateConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionvoidachieveSyncPoint(SyncPoint syncPoint, boolean flag) Signals that the federate has achieved a previously-announced synchronization point.final voidadvanceTime(hla.rti1516_2025.time.HLAinteger64Time timeStep) Advances the federate from its current time step to the HLA logical time provided.final voidAdvances the federate to the HLA logical time boundary (HLTB).booleanawaitFederationSynchronization(SyncPoint syncPoint, int maxWaitingTime) Waits for a synchronization point to be achieved by the federation within the supplied time period.booleanawaitSyncPointAnnouncement(SyncPoint syncPoint, int maxWaitingTime) Waits for a synchronization point to be announced within the supplied time period.voidEnter the SpaceFOM freeze executive control state and pause all simulation activity indefinitely.org.see.skf.time.Timestatic longvoidregisterSyncPoint(SyncPoint syncPoint) Registers a federation-wide synchronization point that must be achieved by all federates.voidLeave the SpaceFOM freeze executive control state and resume simulation activity.static voidsetThreadWaitInterval(long interval) voidThis method should only be called post ExCO-discovery or there is a risk of inducing a time regulation failure due to missing look ahead interval value.voidDisconnect from the federation execution and terminate the simulation.voidBegin executing the simulation.abstract voidupdate()Activities performed by the simulation should be done here.Methods inherited from class org.see.skf.core.SKBaseFederate
addInteractionListener, addRemoteObjectInstanceListener, configureAndStart, connectToRTI, deleteObjectInstance, getConfiguration, joinFederationExecution, publishInteractionClass, publishObjectClass, queryRemoteObjectInstance, registerObjectInstance, registerObjectInstance, removeInteractionListener, removeRemoteObjectInstanceListener, resignFederationExecution, sendInteraction, subscribeInteractionClass, subscribeObjectClass, unpublishInteractionClass, unpublishObjectClass, unsubscribeInteractionClass, unsubscribeObjectClass, updateObjectInstance
-
Constructor Details
-
SEEAbstractFederate
protected SEEAbstractFederate(SEEFederateAmbassador federateAmbassador, org.see.skf.conf.FederateConfiguration config)
-
-
Method Details
-
startExecution
public void startExecution()Begin executing the simulation. -
freezeExecution
public void freezeExecution()Enter the SpaceFOM freeze executive control state and pause all simulation activity indefinitely. -
resumeExecution
public void resumeExecution()Leave the SpaceFOM freeze executive control state and resume simulation activity. -
shutdownExecution
public void shutdownExecution()Disconnect from the federation execution and terminate the simulation. -
setupTimeManagement
public void setupTimeManagement()This method should only be called post ExCO-discovery or there is a risk of inducing a time regulation failure due to missing look ahead interval value. -
advanceToHLTB
public final void advanceToHLTB() throws hla.rti1516_2025.exceptions.RTIexceptionAdvances the federate to the HLA logical time boundary (HLTB).- Throws:
hla.rti1516_2025.exceptions.RTIexception
-
advanceTime
public final void advanceTime(hla.rti1516_2025.time.HLAinteger64Time timeStep) throws hla.rti1516_2025.exceptions.InTimeAdvancingState, hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.RequestForTimeConstrainedPending, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.LogicalTimeAlreadyPassed, hla.rti1516_2025.exceptions.InvalidLogicalTime, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.RequestForTimeRegulationPending Advances the federate from its current time step to the HLA logical time provided.- Parameters:
timeStep- The HLA logical time the federate should advance to.- Throws:
hla.rti1516_2025.exceptions.InTimeAdvancingStatehla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.RequestForTimeConstrainedPendinghla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.LogicalTimeAlreadyPassedhla.rti1516_2025.exceptions.InvalidLogicalTimehla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgresshla.rti1516_2025.exceptions.RequestForTimeRegulationPending
-
update
public abstract void update()Activities performed by the simulation should be done here. It is called once per tick. -
registerSyncPoint
public void registerSyncPoint(SyncPoint syncPoint) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress Registers a federation-wide synchronization point that must be achieved by all federates.- Parameters:
syncPoint- A supported synchronization point in the SpaceFOM standard.- Throws:
hla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgress
-
achieveSyncPoint
public void achieveSyncPoint(SyncPoint syncPoint, boolean flag) throws hla.rti1516_2025.exceptions.SynchronizationPointLabelNotAnnounced, hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress Signals that the federate has achieved a previously-announced synchronization point.- Parameters:
syncPoint- A supported synchronization point in the SpaceFOM standard.flag- true or false depending on if the synchronization point was achieved or not.- Throws:
hla.rti1516_2025.exceptions.SynchronizationPointLabelNotAnnouncedhla.rti1516_2025.exceptions.FederateNotExecutionMemberhla.rti1516_2025.exceptions.RestoreInProgresshla.rti1516_2025.exceptions.NotConnectedhla.rti1516_2025.exceptions.RTIinternalErrorhla.rti1516_2025.exceptions.SaveInProgress
-
awaitSyncPointAnnouncement
Waits for a synchronization point to be announced within the supplied time period.- Parameters:
syncPoint- The SpaceFOM sync point.maxWaitingTime- The anticipated time period to wait for the sync point to be announced.- Returns:
- true or false depending on whether the synchronization point announcement was successful or not.
-
awaitFederationSynchronization
Waits for a synchronization point to be achieved by the federation within the supplied time period.- Parameters:
syncPoint- The SpaceFOM sync point.maxWaitingTime- The anticipated time period to wait for the sync point to be achieved.- Returns:
- true or false depending on whether the federation was successfully synchronized or not.
-
getSimulationTime
public org.see.skf.time.Time getSimulationTime() -
getThreadWaitInterval
public static long getThreadWaitInterval() -
setThreadWaitInterval
public static void setThreadWaitInterval(long interval) -
getFederateAmbassador
- Overrides:
getFederateAmbassadorin classSKBaseFederate
-